This commit is contained in:
2020-04-20 20:27:51 +08:00
parent 9a3adcde88
commit 4ae73c90a5
4 changed files with 17 additions and 25 deletions

View File

@@ -111,7 +111,6 @@ class Addons extends \think\Model {
public static function uninstall($id) {
$info = self::find($id);
if (!$info) {
$this->error = "无此插件!";
return false;
}
$class = get_addons_class($info['name']);
@@ -119,7 +118,6 @@ class Addons extends \think\Model {
//插件卸载方法
$addons = get_addons_instance($info['name']);
if (!method_exists($addons, 'uninstall')) {
$this->error = "插件卸载方法!";
return false;
}
$result = $addons->uninstall();
@@ -130,7 +128,6 @@ class Addons extends \think\Model {
$info->save(['isinstall' => 0]);
return true;
} else {
$this->error = "无法卸载插件!";
return false;
}
}