This commit is contained in:
你的名字
2025-10-15 14:53:54 +08:00
commit ac0f12b21a
864 changed files with 200931 additions and 0 deletions

View File

@ -0,0 +1,21 @@
<?php
namespace app\admin\model;
use app\common\model\TimeModel;
use think\Model;
class SystemConfig extends TimeModel
{
public static function onBeforeUpdate(Model $model): void
{
if ($model->getData('name') === 'upload_allow_ext') {
//去除 php
$model->value = implode(',',array_map(function ($ext) {
return trim(strtolower($ext), ' ');
}, array_filter(explode(',', $model->getData('value')), function ($ext) {
return strtolower(trim($ext)) !== 'php';
})));
}
}
}