From b06bc409e072343a69410283e1dcedfb5630572f Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Sat, 5 Sep 2015 02:24:18 +0100 Subject: 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. --- settings/ajax/navigationdetect.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'settings/ajax') 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]); -- cgit v1.2.3