aboutsummaryrefslogtreecommitdiffstats
path: root/settings/Controller
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-05-31 12:44:52 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2017-06-23 12:37:42 +0200
commite8f5c21db9bc16d7263cbfec74480d5835278b85 (patch)
tree1d2b9fc70dbcf6c8eddc35b6ae7307718048b4bb /settings/Controller
parent28fd18de43ee4371c614782a2a4b9cf0eb497faa (diff)
downloadnextcloud-server-e8f5c21db9bc16d7263cbfec74480d5835278b85.tar.gz
nextcloud-server-e8f5c21db9bc16d7263cbfec74480d5835278b85.zip
Fix trait usage
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'settings/Controller')
-rw-r--r--settings/Controller/AdminSettingsController.php3
-rw-r--r--settings/Controller/CommonSettingsTrait.php2
-rw-r--r--settings/Controller/PersonalSettingsController.php7
3 files changed, 4 insertions, 8 deletions
diff --git a/settings/Controller/AdminSettingsController.php b/settings/Controller/AdminSettingsController.php
index 087700ee555..804b7c217c2 100644
--- a/settings/Controller/AdminSettingsController.php
+++ b/settings/Controller/AdminSettingsController.php
@@ -74,8 +74,7 @@ class AdminSettingsController extends Controller {
* @param string $section
* @return array
*/
- private function getSettings($section) {
- // PhpStorm shows this as unused, but is required by CommonSettingsTrait
+ protected function getSettings($section) {
$settings = $this->settingsManager->getAdminSettings($section);
$formatted = $this->formatSettings($settings);
if($section === 'additional') {
diff --git a/settings/Controller/CommonSettingsTrait.php b/settings/Controller/CommonSettingsTrait.php
index 66ffabd84d6..4854f405861 100644
--- a/settings/Controller/CommonSettingsTrait.php
+++ b/settings/Controller/CommonSettingsTrait.php
@@ -119,5 +119,5 @@ trait CommonSettingsTrait {
return new TemplateResponse('settings', 'settings/frame', $templateParams);
}
- abstract public function getSettings($section);
+ abstract protected function getSettings($section);
}
diff --git a/settings/Controller/PersonalSettingsController.php b/settings/Controller/PersonalSettingsController.php
index 11bd9a9d941..3ccef025a72 100644
--- a/settings/Controller/PersonalSettingsController.php
+++ b/settings/Controller/PersonalSettingsController.php
@@ -31,9 +31,7 @@ use OCP\Settings\IManager as ISettingsManager;
use OCP\Template;
class PersonalSettingsController extends Controller {
- use CommonSettingsTrait {
- getSettings as private;
- }
+ use CommonSettingsTrait;
/** @var INavigationManager */
private $navigationManager;
@@ -66,8 +64,7 @@ class PersonalSettingsController extends Controller {
* @param string $section
* @return array
*/
- private function getSettings($section) {
- // PhpStorm shows this as unused, but is required by CommonSettingsTrait
+ protected function getSettings($section) {
$settings = $this->settingsManager->getPersonalSettings($section);
$formatted = $this->formatSettings($settings);
if($section === 'additional') {