This commit is contained in:
flucout 2025-01-07 20:14:00 +08:00
parent 4c05974f09
commit 99f9a28a73

View File

@ -36,9 +36,11 @@ class BtPlugins
if(empty($result['list']) || empty($result['type'])){ if(empty($result['list']) || empty($result['type'])){
throw new Exception('获取插件列表失败:插件列表为空'); throw new Exception('获取插件列表失败:插件列表为空');
} }
foreach($result['list'] as $k=>$v){ $newlist = [];
if(in_array($v['name'], self::$block_plugins)) unset($result['list'][$k]); foreach($result['list'] as $item){
if(!in_array($item['name'], self::$block_plugins)) $newlist[] = $item;
} }
$result['list'] = $newlist;
return $result; return $result;
}else{ }else{
throw new Exception('获取插件列表失败:'.(isset($result['msg'])?$result['msg']:'面板连接失败')); throw new Exception('获取插件列表失败:'.(isset($result['msg'])?$result['msg']:'面板连接失败'));