summaryrefslogtreecommitdiffstats
path: root/settings/ajax
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-02-09 19:15:23 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2013-02-09 19:15:23 +0100
commitb9089fe8d966b48e4c8dc3f06fd365fc506a0199 (patch)
tree36d04441896a142a69bba884ec6c8d9ba00d10b5 /settings/ajax
parent05b46f78281e5df49a5c6a0513a37eaf03c3c29d (diff)
parent0222c589ac7c006c09dca6cea09cae9a1006a0b4 (diff)
downloadnextcloud-server-b9089fe8d966b48e4c8dc3f06fd365fc506a0199.tar.gz
nextcloud-server-b9089fe8d966b48e4c8dc3f06fd365fc506a0199.zip
Merge branch 'master' into fixing-1424-master
Diffstat (limited to 'settings/ajax')
-rw-r--r--settings/ajax/disableapp.php2
-rw-r--r--settings/ajax/enableapp.php2
-rw-r--r--settings/ajax/navigationdetect.php6
-rw-r--r--settings/ajax/updateapp.php1
4 files changed, 5 insertions, 6 deletions
diff --git a/settings/ajax/disableapp.php b/settings/ajax/disableapp.php
index e89de928eac..466a719157d 100644
--- a/settings/ajax/disableapp.php
+++ b/settings/ajax/disableapp.php
@@ -2,6 +2,6 @@
OC_JSON::checkAdminUser();
OCP\JSON::callCheck();
-OC_App::disable($_POST['appid']);
+OC_App::disable(OC_App::cleanAppId($_POST['appid']));
OC_JSON::success();
diff --git a/settings/ajax/enableapp.php b/settings/ajax/enableapp.php
index 18202dc39e9..ab84aee5166 100644
--- a/settings/ajax/enableapp.php
+++ b/settings/ajax/enableapp.php
@@ -3,7 +3,7 @@
OC_JSON::checkAdminUser();
OCP\JSON::callCheck();
-$appid = OC_App::enable($_POST['appid']);
+$appid = OC_App::enable(OC_App::cleanAppId($_POST['appid']));
if($appid !== false) {
OC_JSON::success(array('data' => array('appid' => $appid)));
} else {
diff --git a/settings/ajax/navigationdetect.php b/settings/ajax/navigationdetect.php
index 93acb50dc20..7f961eb9bc5 100644
--- a/settings/ajax/navigationdetect.php
+++ b/settings/ajax/navigationdetect.php
@@ -4,11 +4,9 @@ OC_Util::checkAdminUser();
OCP\JSON::callCheck();
$app = $_GET['app'];
+$app = OC_App::cleanAppId($app);
-//load the one app and see what it adds to the navigation
-OC_App::loadApp($app);
-
-$navigation = OC_App::getNavigation();
+$navigation = OC_App::getAppNavigationEntries($app);
$navIds = array();
foreach ($navigation as $nav) {
diff --git a/settings/ajax/updateapp.php b/settings/ajax/updateapp.php
index 77c0bbc3e36..9367a3b5a3b 100644
--- a/settings/ajax/updateapp.php
+++ b/settings/ajax/updateapp.php
@@ -4,6 +4,7 @@ OC_JSON::checkAdminUser();
OCP\JSON::callCheck();
$appid = $_POST['appid'];
+$appid = OC_App::cleanAppId($appid);
$result = OC_Installer::updateApp($appid);
if($result !== false) {