diff --git a/lib/base.php b/lib/base.php index 1db6b84c5fb05..32ef612d9dfab 100644 --- a/lib/base.php +++ b/lib/base.php @@ -935,15 +935,16 @@ public static function handleRequest() { // emergency app disabling if ($requestPath === '/disableapp' && $request->getMethod() === 'POST' - && ((string)$request->getParam('appid')) !== '' + && ((array)$request->getParam('appid')) !== '' ) { \OCP\JSON::callCheck(); \OCP\JSON::checkAdminUser(); - $appId = (string)$request->getParam('appid'); - $appId = \OC_App::cleanAppId($appId); - - \OC_App::disable($appId); - \OC_JSON::success(); + $appIds = (array)$request->getParam('appid'); + foreach($appIds as $appId) { + $appId = \OC_App::cleanAppId($appId); + \OC_App::disable($appId); + \OC_JSON::success(); + } exit(); }