2013-01-21 23:40:23 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
OC_JSON::checkAdminUser();
|
|
|
|
OCP\JSON::callCheck();
|
|
|
|
|
|
|
|
$appid = $_POST['appid'];
|
2013-02-09 18:03:47 +04:00
|
|
|
$appid = OC_App::cleanAppId($appid);
|
2013-01-21 23:40:23 +04: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 13:34:54 +04:00
|
|
|
OC_JSON::error(array("data" => array( "message" => $l->t("Couldn't update app.") )));
|
2013-02-10 02:43:44 +04:00
|
|
|
}
|