diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-10-21 16:45:36 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-10-21 16:45:36 +0200 |
commit | 42d69a95f3276a2d6089ca68f635c4e2f6aa7a23 (patch) | |
tree | 6a17fd7998f291e6dec1d996c1e7c724b92b8e58 /controller/pagecontroller.php | |
parent | 0e6598b0734fb927109f745d9c0f3a8605a30ca5 (diff) |
convert tabs indention to indention with 4 spaces because of mixing of both variants in code and better readability on github and websites because you cant set the indention width there and 8 spaces will be used for a tab
Diffstat (limited to 'controller/pagecontroller.php')
-rw-r--r-- | controller/pagecontroller.php | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/controller/pagecontroller.php b/controller/pagecontroller.php index e8b651608..90f702d49 100644 --- a/controller/pagecontroller.php +++ b/controller/pagecontroller.php @@ -24,70 +24,70 @@ use \OCA\News\Config\AppConfig; class PageController extends Controller { - private $settings; - private $l10n; - private $userId; - private $appConfig; - private $urlGenerator; - - public function __construct($appName, - IRequest $request, - IConfig $settings, - IURLGenerator $urlGenerator, + private $settings; + private $l10n; + private $userId; + private $appConfig; + private $urlGenerator; + + public function __construct($appName, + IRequest $request, + IConfig $settings, + IURLGenerator $urlGenerator, AppConfig $appConfig, - IL10N $l10n, - $userId){ - parent::__construct($appName, $request); - $this->settings = $settings; - $this->urlGenerator = $urlGenerator; - $this->appConfig = $appConfig; - $this->l10n = $l10n; - $this->userId = $userId; - } - - - /** - * @NoAdminRequired - * @NoCSRFRequired - */ - public function index() { - return new TemplateResponse($this->appName, 'index'); - } - - - /** - * @NoAdminRequired - */ - public function settings() { - $settings = ['showAll', 'compact', 'preventReadOnScroll', 'oldestFirst']; - - $result = ['language' => $this->l10n->getLanguageCode()]; - - foreach ($settings as $setting) { - $result[$setting] = $this->settings->getUserValue( - $this->userId, $this->appName, $setting - ) === '1'; - } - return ['settings' => $result]; - } - - - /** - * @NoAdminRequired - * - * @param bool $showAll - * @param bool $compact - * @param bool $preventReadOnScroll - * @param bool $oldestFirst - */ - public function updateSettings($showAll, $compact, $preventReadOnScroll, $oldestFirst) { - $settings = ['showAll', 'compact', 'preventReadOnScroll', 'oldestFirst']; - - foreach ($settings as $setting) { - $this->settings->setUserValue($this->userId, $this->appName, - $setting, ${$setting}); - } - } + IL10N $l10n, + $userId){ + parent::__construct($appName, $request); + $this->settings = $settings; + $this->urlGenerator = $urlGenerator; + $this->appConfig = $appConfig; + $this->l10n = $l10n; + $this->userId = $userId; + } + + + /** + * @NoAdminRequired + * @NoCSRFRequired + */ + public function index() { + return new TemplateResponse($this->appName, 'index'); + } + + + /** + * @NoAdminRequired + */ + public function settings() { + $settings = ['showAll', 'compact', 'preventReadOnScroll', 'oldestFirst']; + + $result = ['language' => $this->l10n->getLanguageCode()]; + + foreach ($settings as $setting) { + $result[$setting] = $this->settings->getUserValue( + $this->userId, $this->appName, $setting + ) === '1'; + } + return ['settings' => $result]; + } + + + /** + * @NoAdminRequired + * + * @param bool $showAll + * @param bool $compact + * @param bool $preventReadOnScroll + * @param bool $oldestFirst + */ + public function updateSettings($showAll, $compact, $preventReadOnScroll, $oldestFirst) { + $settings = ['showAll', 'compact', 'preventReadOnScroll', 'oldestFirst']; + + foreach ($settings as $setting) { + $this->settings->setUserValue($this->userId, $this->appName, + $setting, ${$setting}); + } + } /** |