diff options
author | Joas Schilling <coding@schilljs.com> | 2018-03-05 17:06:28 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-03-06 12:05:19 +0100 |
commit | e11dab4047bde4e0f3fde5ec1d1910f152c079ab (patch) | |
tree | 9b61d4b2365d52915252a7e6e09c20a9755ad24a | |
parent | d74bad2dc15b708e91179d6d2229b9edc7948c46 (diff) | |
download | nextcloud-server-e11dab4047bde4e0f3fde5ec1d1910f152c079ab.tar.gz nextcloud-server-e11dab4047bde4e0f3fde5ec1d1910f152c079ab.zip |
Set the correct active navigation entry
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | settings/Controller/AdminSettingsController.php | 4 | ||||
-rw-r--r-- | settings/Controller/CommonSettingsTrait.php | 5 | ||||
-rw-r--r-- | settings/Controller/PersonalSettingsController.php | 4 |
3 files changed, 5 insertions, 8 deletions
diff --git a/settings/Controller/AdminSettingsController.php b/settings/Controller/AdminSettingsController.php index 0114ee73d96..e2ad577024c 100644 --- a/settings/Controller/AdminSettingsController.php +++ b/settings/Controller/AdminSettingsController.php @@ -38,9 +38,6 @@ use OCP\Template; class AdminSettingsController extends Controller { use CommonSettingsTrait; - /** @var INavigationManager */ - private $navigationManager; - /** * @param string $appName * @param IRequest $request @@ -65,7 +62,6 @@ class AdminSettingsController extends Controller { * @NoCSRFRequired */ public function index($section) { - $this->navigationManager->setActiveEntry('admin'); return $this->getIndexResponse('admin', $section); } diff --git a/settings/Controller/CommonSettingsTrait.php b/settings/Controller/CommonSettingsTrait.php index 82d675531a8..3d314d9ed53 100644 --- a/settings/Controller/CommonSettingsTrait.php +++ b/settings/Controller/CommonSettingsTrait.php @@ -25,6 +25,7 @@ namespace OC\Settings\Controller; use OCP\AppFramework\Http\TemplateResponse; +use OCP\INavigationManager; use OCP\Settings\IManager as ISettingsManager; use OCP\Settings\IIconSection; use OCP\Settings\ISettings; @@ -33,6 +34,9 @@ trait CommonSettingsTrait { /** @var ISettingsManager */ private $settingsManager; + /** @var INavigationManager */ + private $navigationManager; + /** * @param string $currentSection * @return array @@ -116,6 +120,7 @@ trait CommonSettingsTrait { } private function getIndexResponse($type, $section) { + $this->navigationManager->setActiveEntry('settings'); $templateParams = []; $templateParams = array_merge($templateParams, $this->getNavigationParameters($type, $section)); $templateParams = array_merge($templateParams, $this->getSettings($section)); diff --git a/settings/Controller/PersonalSettingsController.php b/settings/Controller/PersonalSettingsController.php index ad4eb69c32d..9ec7ce72645 100644 --- a/settings/Controller/PersonalSettingsController.php +++ b/settings/Controller/PersonalSettingsController.php @@ -34,9 +34,6 @@ use OCP\Template; class PersonalSettingsController extends Controller { use CommonSettingsTrait; - /** @var INavigationManager */ - private $navigationManager; - public function __construct( $appName, IRequest $request, @@ -57,7 +54,6 @@ class PersonalSettingsController extends Controller { * @NoSubadminRequired */ public function index($section) { - $this->navigationManager->setActiveEntry('personal'); return $this->getIndexResponse('personal', $section); } |