Merge pull request #1720 from colintucker/fix-controller-init-visibility

Changed init() visibility to protected
This commit is contained in:
Daniel Hensby 2017-01-23 16:37:45 +00:00 committed by GitHub
commit afd98a2ac0
5 changed files with 5 additions and 5 deletions

View File

@ -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')));

View File

@ -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 /.

View File

@ -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();
}

View File

@ -9,7 +9,7 @@ use PageController;
class RedirectorPageController extends PageController
{
public function init()
protected function init()
{
parent::init();

View File

@ -64,7 +64,7 @@ in the other stage:<br />
protected $orphanedSearchClass = 'SilverStripe\\CMS\\Model\\SiteTree';
public function init() {
protected function init() {
parent::init();
if(!Permission::check('ADMIN')) {