server/settings/ajax/enableapp.php

15 lines
367 B
PHP
Raw Normal View History

<?php
2011-09-30 21:10:08 +00:00
OC_JSON::checkAdminUser();
2012-07-07 13:27:04 +00:00
OCP\JSON::callCheck();
$groups = isset($_POST['groups']) ? $_POST['groups'] : null;
try {
OC_App::enable(OC_App::cleanAppId($_POST['appid']), $groups);
OC_JSON::success();
} catch (Exception $e) {
2013-08-09 16:01:49 +00:00
OC_Log::write('core', $e->getMessage(), OC_Log::ERROR);
OC_JSON::error(array("data" => array("message" => $e->getMessage()) ));
}