summaryrefslogtreecommitdiffstats
path: root/settings/ajax
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2015-09-05 02:24:18 +0100
committerRobin McCorkell <rmccorkell@owncloud.com>2015-09-05 02:24:18 +0100
commitb06bc409e072343a69410283e1dcedfb5630572f (patch)
treebe8f9ae7a70bbb689551000c7a815ff394cb8a0a /settings/ajax
parent7f8bca64cbb32df8eca313a886fd21e54fc24f13 (diff)
downloadnextcloud-server-b06bc409e072343a69410283e1dcedfb5630572f.tar.gz
nextcloud-server-b06bc409e072343a69410283e1dcedfb5630572f.zip
Rebuild app navigation in JS
Retrieve all app navigations to prevent reloading appinfo/app.php and causing an error when the app isn't fully loaded. The addition/deletion logic has been moved to JS, simplifying a lot of code.
Diffstat (limited to 'settings/ajax')
-rw-r--r--settings/ajax/navigationdetect.php12
1 files changed, 2 insertions, 10 deletions
diff --git a/settings/ajax/navigationdetect.php b/settings/ajax/navigationdetect.php
index d7c1cbc5a12..abf04805d87 100644
--- a/settings/ajax/navigationdetect.php
+++ b/settings/ajax/navigationdetect.php
@@ -23,14 +23,6 @@
OC_Util::checkAdminUser();
OCP\JSON::callCheck();
-$app = (string)$_GET['app'];
-$app = OC_App::cleanAppId($app);
+$navigation = \OC::$server->getNavigationManager()->getAll();
-$navigation = OC_App::getAppNavigationEntries($app);
-
-$navIds = array();
-foreach ($navigation as $nav) {
- $navIds[] = $nav['id'];
-}
-
-OCP\JSON::success(array('nav_ids' => array_values($navIds), 'nav_entries' => $navigation));
+OCP\JSON::success(['nav_entries' => $navigation]);