Return possibly changed appid.

This commit is contained in:
Thomas Tanghus 2012-08-05 01:41:24 +02:00
parent cc445e4e47
commit c6b337c3dd
1 changed files with 4 additions and 3 deletions

View File

@ -6,8 +6,9 @@ OC_JSON::checkAdminUser();
OCP\JSON::callCheck();
OC_JSON::setContentTypeHeader();
if(OC_App::enable($_POST['appid'])){
OC_JSON::success();
}else{
$appid = OC_App::enable($_POST['appid']);
if($appid !== false) {
OC_JSON::success(array('data' => array('appid' => $appid)));
} else {
OC_JSON::error();
}