summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-04-25 21:19:49 +0200
committerLukas Reschke <lukas@statuscode.ch>2017-04-26 20:07:51 +0200
commitd4ba8198fe73d86d264eef4eeeba12bc560306c4 (patch)
tree70ac48e5a66a038836b46a2fab77f4f384bae9a7 /lib
parent732c92e93abfc200e4eee90a8e727ef562dc5604 (diff)
downloadnextcloud-server-d4ba8198fe73d86d264eef4eeeba12bc560306c4.tar.gz
nextcloud-server-d4ba8198fe73d86d264eef4eeeba12bc560306c4.zip
Make the emergency disable also accept arrays
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/base.php b/lib/base.php
index 1db6b84c5fb..3ca4775dbe2 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();
}