summaryrefslogtreecommitdiffstats
path: root/settings/ajax/disableapp.php
blob: be717e27ca4d86c93f8cf827d1c3b6cacdece673 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
OCP\JSON::checkAdminUser();
OCP\JSON::callCheck();

if (!array_key_exists('appid', $_POST)) {
	OC_JSON::error();
	exit;
}

$appId = $_POST['appid'];
$appId = OC_App::cleanAppId($appId);

// FIXME: Clear the cache - move that into some sane helper method
\OC::$server->getMemCacheFactory()->create('settings')->clear('listApps-');

OC_App::disable($appId);
OC_JSON::success();