更新目录结构
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\controller;
|
||||
|
||||
use app\model\Config;
|
||||
use app\model\Hooks;
|
||||
use app\model\SeoRule;
|
||||
use app\model\system\Config;
|
||||
use app\model\addons\Hooks;
|
||||
use app\model\system\SeoRule;
|
||||
use think\App;
|
||||
use think\exception\ValidateException;
|
||||
use think\facade\Cache;
|
||||
@@ -76,7 +76,7 @@ class Base {
|
||||
}
|
||||
$hooks = Cache::get('sentcms_hooks');
|
||||
if (!$hooks) {
|
||||
$hooks = Hooks::where('status', 1)->column('addons', 'name');
|
||||
$hooks = Hooks::where('status', 1)->where('addons', '<>', '')->column('addons', 'name');
|
||||
foreach ($hooks as $key => $values) {
|
||||
if (is_string($values)) {
|
||||
$values = explode(',', $values);
|
||||
@@ -247,7 +247,7 @@ class Base {
|
||||
$config = [];
|
||||
$addons = $this->request->param('addon');
|
||||
$addon = get_addons_instance($addons)->getConfig();
|
||||
$config = \app\model\Addons::where('name', $addons)->value('config');
|
||||
$config = \app\model\addons\Addons::where('name', $addons)->value('config');
|
||||
|
||||
return $config ? json_decode($config, true) : $addon;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user