9b9f5b1a8a
`OC_JSON::success` and `OC_JSON::error` are calling `OC_JSON::encodedPrint`, which already sets these headers. So this two calls are uneeded duplicates.
12 lines
318 B
PHP
12 lines
318 B
PHP
<?php
|
|
|
|
OC_JSON::checkAdminUser();
|
|
OCP\JSON::callCheck();
|
|
|
|
$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. ") )));
|
|
}
|