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. --- lib/private/app.php | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'lib') diff --git a/lib/private/app.php b/lib/private/app.php index f1a1d27ae66..d5415834fa4 100644 --- a/lib/private/app.php +++ b/lib/private/app.php @@ -384,29 +384,6 @@ class OC_App { return true; } - /** - * Get the navigation entries for the $app - * - * @param string $app app - * @return array an array of the $data added with addNavigationEntry - * - * Warning: destroys the existing entries - */ - public static function getAppNavigationEntries($app) { - if (is_file(self::getAppPath($app) . '/appinfo/app.php')) { - OC::$server->getNavigationManager()->clear(); - try { - require $app . '/appinfo/app.php'; - } catch (\OC\Encryption\Exceptions\ModuleAlreadyExistsException $e) { - // FIXME we should avoid getting this exception in first place, - // For now we just catch it, since we don't care about encryption modules - // when trying to find out, whether the app has a navigation entry. - } - return OC::$server->getNavigationManager()->getAll(); - } - return array(); - } - /** * gets the active Menu entry * -- cgit v1.2.3