mirror of
https://gitee.com/niucloud-team/niucloud.git
synced 2025-12-13 18:12:49 +00:00
更改插件卸载限制
This commit is contained in:
parent
ed9f84a03a
commit
ef01fcf32f
@ -511,8 +511,10 @@ class CoreAddonInstallService extends CoreAddonBaseService
|
||||
*/
|
||||
public function uninstall()
|
||||
{
|
||||
$site_num = (new Site())->where([ ['app', '=', $this->addon] ])->count('site_id');
|
||||
if ($site_num) throw new CommonException('APP_NOT_ALLOW_UNINSTALL');
|
||||
if (!env('app_debug', true)) {
|
||||
$site_num = (new Site())->where([['app', '=', $this->addon]])->count('site_id');
|
||||
if ($site_num) throw new CommonException('APP_NOT_ALLOW_UNINSTALL');
|
||||
}
|
||||
|
||||
//执行插件卸载方法
|
||||
$class = "addon\\" . $this->addon . "\\" . 'Addon';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user