Skip to content

Commit

Permalink
Make the emergency disable also accept arrays
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
  • Loading branch information
LukasReschke committed Apr 25, 2017
1 parent 2e39c7d commit cb56200
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit cb56200

Please sign in to comment.