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')) {