diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-02-09 08:42:27 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-02-12 17:22:33 +0100 |
commit | ada5aed35ee23048f7a02c9cd4e554600998124a (patch) | |
tree | dc29ae78b2b8565828669fc61877114bc8d15317 | |
parent | 39529851a8899496b1a3c08ac37d6ad73f80ec50 (diff) | |
download | nextcloud-server-ada5aed35ee23048f7a02c9cd4e554600998124a.tar.gz nextcloud-server-ada5aed35ee23048f7a02c9cd4e554600998124a.zip |
Deprecate static methods and use Navigation manager
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r-- | lib/private/TemplateLayout.php | 4 | ||||
-rw-r--r-- | lib/private/legacy/app.php | 2 | ||||
-rw-r--r-- | settings/ajax/navigationdetect.php | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index d37a8bbabbe..8cc235bf818 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -80,9 +80,9 @@ class TemplateLayout extends \OC_Template { // Add navigation entry $this->assign( 'application', ''); $this->assign( 'appid', $appId ); - $navigation = \OC_App::getNavigation(); + $navigation = \OC::$server->getNavigationManager()->getAll(); $this->assign( 'navigation', $navigation); - $settingsNavigation = \OC_App::getSettingsNavigation(); + $settingsNavigation = \OC::$server->getNavigationManager()->getAll('settings'); $this->assign( 'settingsnavigation', $settingsNavigation); foreach($navigation as $entry) { if ($entry['active']) { diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index 6102de73693..cb2d3ca615f 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -586,6 +586,7 @@ class OC_App { * Returns the navigation * * @return array + * @deprecated 14.0.0 use \OC::$server->getNavigationManager()->getAll() * * This function returns an array containing all entries added. The * entries are sorted by the key 'order' ascending. Additional to the keys @@ -600,6 +601,7 @@ class OC_App { * Returns the Settings Navigation * * @return string[] + * @deprecated 14.0.0 use \OC::$server->getNavigationManager()->getAll('settings') * * This function returns an array containing all settings pages added. The * entries are sorted by the key 'order' ascending. diff --git a/settings/ajax/navigationdetect.php b/settings/ajax/navigationdetect.php index 167f819f91e..043e10da559 100644 --- a/settings/ajax/navigationdetect.php +++ b/settings/ajax/navigationdetect.php @@ -23,6 +23,6 @@ OC_Util::checkAdminUser(); OCP\JSON::callCheck(); -$navigation = \OC_App::getNavigation(); +$navigation = \OC::$server->getNavigationManager()->getAll(); OCP\JSON::success(['nav_entries' => $navigation]); |