server/settings/ajax/enableapp.php
2012-08-05 01:42:17 +02:00

14 lines
301 B
PHP

<?php
// Init owncloud
require_once('../../lib/base.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 {
OC_JSON::error();
}