Make the emergency disable also accept arrays
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
732c92e93a
commit
d4ba8198fe
11
lib/base.php
11
lib/base.php
|
@ -935,14 +935,15 @@ class OC {
|
||||||
// emergency app disabling
|
// emergency app disabling
|
||||||
if ($requestPath === '/disableapp'
|
if ($requestPath === '/disableapp'
|
||||||
&& $request->getMethod() === 'POST'
|
&& $request->getMethod() === 'POST'
|
||||||
&& ((string)$request->getParam('appid')) !== ''
|
&& ((array)$request->getParam('appid')) !== ''
|
||||||
) {
|
) {
|
||||||
\OCP\JSON::callCheck();
|
\OCP\JSON::callCheck();
|
||||||
\OCP\JSON::checkAdminUser();
|
\OCP\JSON::checkAdminUser();
|
||||||
$appId = (string)$request->getParam('appid');
|
$appIds = (array)$request->getParam('appid');
|
||||||
$appId = \OC_App::cleanAppId($appId);
|
foreach($appIds as $appId) {
|
||||||
|
$appId = \OC_App::cleanAppId($appId);
|
||||||
\OC_App::disable($appId);
|
\OC_App::disable($appId);
|
||||||
|
}
|
||||||
\OC_JSON::success();
|
\OC_JSON::success();
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue