From d4ba8198fe73d86d264eef4eeeba12bc560306c4 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Tue, 25 Apr 2017 21:19:49 +0200 Subject: [PATCH] Make the emergency disable also accept arrays Signed-off-by: Lukas Reschke --- lib/base.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/base.php b/lib/base.php index 1db6b84c5f..3ca4775dbe 100644 --- a/lib/base.php +++ b/lib/base.php @@ -935,14 +935,15 @@ class OC { // 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); + $appIds = (array)$request->getParam('appid'); + foreach($appIds as $appId) { + $appId = \OC_App::cleanAppId($appId); + \OC_App::disable($appId); + } \OC_JSON::success(); exit(); }