2013-01-21 19:40:23 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
OC_JSON::checkAdminUser();
|
|
|
|
OCP\JSON::callCheck();
|
|
|
|
|
|
|
|
$appid = $_POST['appid'];
|
2013-02-09 14:03:47 +00:00
|
|
|
$appid = OC_App::cleanAppId($appid);
|
2013-01-21 19:40:23 +00:00
|
|
|
|
|
|
|
$result = OC_Installer::updateApp($appid);
|
|
|
|
if($result !== false) {
|
|
|
|
OC_JSON::success(array('data' => array('appid' => $appid)));
|
|
|
|
} else {
|
|
|
|
$l = OC_L10N::get('settings');
|
2013-01-31 09:34:54 +00:00
|
|
|
OC_JSON::error(array("data" => array( "message" => $l->t("Couldn't update app.") )));
|
2013-02-09 22:43:44 +00:00
|
|
|
}
|