summaryrefslogtreecommitdiffstats
path: root/settings/ajax/enableapp.php
blob: f4d5c53adeff3af09cb623e2cb08be6e9ba3a6d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php

OC_JSON::checkAdminUser();
OCP\JSON::callCheck();
OC_JSON::setContentTypeHeader();

$appid = OC_App::enable($_POST['appid']);
if($appid !== false) {
	OC_JSON::success(array('data' => array('appid' => $appid)));
} else {
	$l = OC_L10N::get('settings');	
	OC_JSON::error(array("data" => array( "message" => $l->t("Could not enable app. ") )));
}