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