updateapp.php 382 B

12345678910111213141516
  1. <?php
  2. OC_JSON::checkAdminUser();
  3. OCP\JSON::callCheck();
  4. $appid = $_POST['appid'];
  5. $appid = OC_App::cleanAppId($appid);
  6. $result = OC_Installer::updateApp($appid);
  7. if($result !== false) {
  8. OC_JSON::success(array('data' => array('appid' => $appid)));
  9. } else {
  10. $l = OC_L10N::get('settings');
  11. OC_JSON::error(array("data" => array( "message" => $l->t("Couldn't update app.") )));
  12. }