summaryrefslogtreecommitdiffstats
path: root/settings/ajax/updateapp.php
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2013-01-21 20:40:23 +0100
committerFrank Karlitschek <frank@owncloud.org>2013-01-21 20:40:23 +0100
commita27f92a17ae12d2d1ff48b26aadfecd7c221c589 (patch)
treeafe980f2b1eeaacefb38ebd8a431de62c2a3a009 /settings/ajax/updateapp.php
parent51a4240051cf5c4225813b3f948dcc069b725c81 (diff)
downloadnextcloud-server-a27f92a17ae12d2d1ff48b26aadfecd7c221c589.tar.gz
nextcloud-server-a27f92a17ae12d2d1ff48b26aadfecd7c221c589.zip
we are getting closer. updating is not working yet.
Diffstat (limited to 'settings/ajax/updateapp.php')
-rw-r--r--settings/ajax/updateapp.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/settings/ajax/updateapp.php b/settings/ajax/updateapp.php
new file mode 100644
index 00000000000..68c2bbf7f00
--- /dev/null
+++ b/settings/ajax/updateapp.php
@@ -0,0 +1,17 @@
+<?php
+
+OC_JSON::checkAdminUser();
+OCP\JSON::callCheck();
+
+$appid = $_POST['appid'];
+
+$result = OC_Installer::updateApp($appid);
+if($result !== false) {
+ OC_JSON::success(array('data' => array('appid' => $appid)));
+} else {
+ $l = OC_L10N::get('settings');
+ OC_JSON::error(array("data" => array( "message" => $l->t("Could update app. ") )));
+}
+
+
+