fix:修复BUG/升级1.1.6版本
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | swiftAdmin 极速开发框架 [基于WebMan开发]
|
||||
// +----------------------------------------------------------------------
|
||||
@@ -14,7 +14,11 @@ namespace app\admin\controller;
|
||||
use app\AdminController;
|
||||
use app\common\library\ResultCode;
|
||||
use app\common\library\Upload;
|
||||
use Psr\SimpleCache\InvalidArgumentException;
|
||||
use support\Response;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
|
||||
/**
|
||||
* Ajax类
|
||||
@@ -23,6 +27,15 @@ use support\Response;
|
||||
*/
|
||||
class Ajax extends AdminController
|
||||
{
|
||||
/**
|
||||
* 初始化方法
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
/**
|
||||
* 测试接口
|
||||
* @return Response
|
||||
@@ -51,6 +64,10 @@ class Ajax extends AdminController
|
||||
/**
|
||||
* 远程下载图片
|
||||
* @return Response
|
||||
* @throws InvalidArgumentException
|
||||
* @throws DataNotFoundException
|
||||
* @throws DbException
|
||||
* @throws ModelNotFoundException
|
||||
*/
|
||||
public function getImage(): Response
|
||||
{
|
||||
|
||||
@@ -400,7 +400,8 @@ class Index extends AdminController
|
||||
return $this->error($th->getMessage());
|
||||
}
|
||||
|
||||
// 清理系统缓存
|
||||
// 清理系统核心缓存
|
||||
Cache::tag('core_system')->clear();
|
||||
$configList = Cache::get('config_list');
|
||||
foreach ($configList as $item) {
|
||||
Cache::delete($item);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | swiftAdmin 极速开发框架 [基于WebMan开发]
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | swiftAdmin 极速开发框架 [基于WebMan开发]
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | swiftAdmin 极速开发框架 [基于WebMan开发]
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | swiftAdmin 极速开发框架 [基于WebMan开发]
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | swiftAdmin 极速开发框架 [基于WebMan开发]
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | swiftAdmin 极速开发框架 [基于WebMan开发]
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | swiftAdmin 极速开发框架 [基于WebMan开发]
|
||||
// +----------------------------------------------------------------------
|
||||
@@ -17,7 +17,6 @@ use support\Response;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
use Webman\Http\Request;
|
||||
|
||||
/**
|
||||
* 字典管理
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | swiftAdmin 极速开发框架 [基于WebMan开发]
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace app\admin\controller\system;
|
||||
|
||||
use app\AdminController;
|
||||
|
||||
@@ -81,7 +81,7 @@ class Plugin extends AdminController
|
||||
return $this->error('请勿重复安装插件');
|
||||
}
|
||||
|
||||
try {
|
||||
// try {
|
||||
|
||||
$pluginZip = self::downLoad($name, ['name' => $name, 'token' => input('token')]);
|
||||
ZipArchives::unzip($pluginZip, plugin_path(), '', true);
|
||||
@@ -95,10 +95,10 @@ class Plugin extends AdminController
|
||||
self::pluginMenu($name);
|
||||
self::executeSql($name);
|
||||
self::enabled($name);
|
||||
} catch (\Throwable $th) {
|
||||
recursive_delete($pluginPath);
|
||||
return $this->error($th->getMessage(), null, self::$ServerBody, $th->getCode());
|
||||
}
|
||||
// } catch (\Throwable $th) {
|
||||
// recursive_delete($pluginPath);
|
||||
// return $this->error($th->getMessage(), null, self::$ServerBody, $th->getCode());
|
||||
// }
|
||||
|
||||
return $this->success('插件安装成功', null, get_plugin_config($name, true));
|
||||
}
|
||||
@@ -125,7 +125,7 @@ class Plugin extends AdminController
|
||||
$pluginPath = plugin_path($name);
|
||||
$pluginClass = get_plugin_instance($name);
|
||||
$pluginClass->uninstall();
|
||||
if (getenv('APP_DEBUG') && Auth::instance()->SuperAdmin()) {
|
||||
if (get_env('APP_DEBUG') && Auth::instance()->SuperAdmin()) {
|
||||
self::executeSql($name, 'uninstall');
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | swiftAdmin 极速开发框架 [基于WebMan开发]
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | swiftAdmin 极速开发框架 [基于WebMan开发]
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user