diff options
Diffstat (limited to 'settings/ajax/disableapp.php')
-rw-r--r-- | settings/ajax/disableapp.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/settings/ajax/disableapp.php b/settings/ajax/disableapp.php index 466a719157d..c1e5bc8eac7 100644 --- a/settings/ajax/disableapp.php +++ b/settings/ajax/disableapp.php @@ -1,7 +1,14 @@ <?php -OC_JSON::checkAdminUser(); +OCP\JSON::checkAdminUser(); OCP\JSON::callCheck(); -OC_App::disable(OC_App::cleanAppId($_POST['appid'])); +if (!array_key_exists('appid', $_POST)) { + OC_JSON::error(); + exit; +} +$appId = $_POST['appid']; +$appId = OC_App::cleanAppId($appId); + +OC_App::disable($appId); OC_JSON::success(); |