From 00c81d8672240f965405f8e53bc28bcae5ee346e Mon Sep 17 00:00:00 2001 From: Colin Tucker Date: Sun, 22 Jan 2017 09:35:14 +1100 Subject: [PATCH] Changed init() visibility to protected --- code/Controllers/CMSMain.php | 2 +- code/Controllers/ContentController.php | 2 +- code/Controllers/ModelAsController.php | 2 +- code/Model/RedirectorPageController.php | 2 +- code/Tasks/RemoveOrphanedPagesTask.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/Controllers/CMSMain.php b/code/Controllers/CMSMain.php index a20700fa..14fd43c7 100644 --- a/code/Controllers/CMSMain.php +++ b/code/Controllers/CMSMain.php @@ -141,7 +141,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr 'SiteTreeAsUL' => 'HTMLFragment', ); - public function init() { + protected function init() { // set reading lang if(SiteTree::has_extension('Translatable') && !$this->getRequest()->isAjax()) { Translatable::choose_site_locale(array_keys(Translatable::get_existing_content_languages('SilverStripe\\CMS\\Model\\SiteTree'))); diff --git a/code/Controllers/ContentController.php b/code/Controllers/ContentController.php index 0f348203..27c75ac5 100644 --- a/code/Controllers/ContentController.php +++ b/code/Controllers/ContentController.php @@ -122,7 +122,7 @@ class ContentController extends Controller { return SiteTree::get_by_link($link); } - public function init() { + protected function init() { parent::init(); // If we've accessed the homepage as /home/, then we should redirect to /. diff --git a/code/Controllers/ModelAsController.php b/code/Controllers/ModelAsController.php index 02f65c25..90543684 100644 --- a/code/Controllers/ModelAsController.php +++ b/code/Controllers/ModelAsController.php @@ -46,7 +46,7 @@ class ModelAsController extends Controller implements NestedController { return Injector::inst()->create($controller, $sitetree); } - public function init() { + protected function init() { singleton('SilverStripe\\CMS\\Model\\SiteTree')->extend('modelascontrollerInit', $this); parent::init(); } diff --git a/code/Model/RedirectorPageController.php b/code/Model/RedirectorPageController.php index a55e8173..31179592 100644 --- a/code/Model/RedirectorPageController.php +++ b/code/Model/RedirectorPageController.php @@ -9,7 +9,7 @@ use PageController; class RedirectorPageController extends PageController { - public function init() + protected function init() { parent::init(); diff --git a/code/Tasks/RemoveOrphanedPagesTask.php b/code/Tasks/RemoveOrphanedPagesTask.php index 3676db86..678b95f3 100644 --- a/code/Tasks/RemoveOrphanedPagesTask.php +++ b/code/Tasks/RemoveOrphanedPagesTask.php @@ -64,7 +64,7 @@ in the other stage:
protected $orphanedSearchClass = 'SilverStripe\\CMS\\Model\\SiteTree'; - public function init() { + protected function init() { parent::init(); if(!Permission::check('ADMIN')) {