Browse Source
Merge pull request #8664 from nextcloud/bugfix/noid/add-missing-settings-page-title-again
Set the correct active navigation entry
pull/8714/head
Roeland Jago Douma
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
5 additions and
8 deletions
-
settings/Controller/AdminSettingsController.php
-
settings/Controller/CommonSettingsTrait.php
-
settings/Controller/PersonalSettingsController.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); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -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)); |
|
|
|
|
|
|
|
@ -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); |
|
|
|
|
|
|
|
} |
|
|
|
|