mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #1720 from colintucker/fix-controller-init-visibility
Changed init() visibility to protected
This commit is contained in:
commit
afd98a2ac0
@ -141,7 +141,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
'SiteTreeAsUL' => 'HTMLFragment',
|
'SiteTreeAsUL' => 'HTMLFragment',
|
||||||
);
|
);
|
||||||
|
|
||||||
public function init() {
|
protected function init() {
|
||||||
// set reading lang
|
// set reading lang
|
||||||
if(SiteTree::has_extension('Translatable') && !$this->getRequest()->isAjax()) {
|
if(SiteTree::has_extension('Translatable') && !$this->getRequest()->isAjax()) {
|
||||||
Translatable::choose_site_locale(array_keys(Translatable::get_existing_content_languages('SilverStripe\\CMS\\Model\\SiteTree')));
|
Translatable::choose_site_locale(array_keys(Translatable::get_existing_content_languages('SilverStripe\\CMS\\Model\\SiteTree')));
|
||||||
|
@ -122,7 +122,7 @@ class ContentController extends Controller {
|
|||||||
return SiteTree::get_by_link($link);
|
return SiteTree::get_by_link($link);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function init() {
|
protected function init() {
|
||||||
parent::init();
|
parent::init();
|
||||||
|
|
||||||
// If we've accessed the homepage as /home/, then we should redirect to /.
|
// If we've accessed the homepage as /home/, then we should redirect to /.
|
||||||
|
@ -46,7 +46,7 @@ class ModelAsController extends Controller implements NestedController {
|
|||||||
return Injector::inst()->create($controller, $sitetree);
|
return Injector::inst()->create($controller, $sitetree);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function init() {
|
protected function init() {
|
||||||
singleton('SilverStripe\\CMS\\Model\\SiteTree')->extend('modelascontrollerInit', $this);
|
singleton('SilverStripe\\CMS\\Model\\SiteTree')->extend('modelascontrollerInit', $this);
|
||||||
parent::init();
|
parent::init();
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ use PageController;
|
|||||||
class RedirectorPageController extends PageController
|
class RedirectorPageController extends PageController
|
||||||
{
|
{
|
||||||
|
|
||||||
public function init()
|
protected function init()
|
||||||
{
|
{
|
||||||
parent::init();
|
parent::init();
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ in the other stage:<br />
|
|||||||
|
|
||||||
protected $orphanedSearchClass = 'SilverStripe\\CMS\\Model\\SiteTree';
|
protected $orphanedSearchClass = 'SilverStripe\\CMS\\Model\\SiteTree';
|
||||||
|
|
||||||
public function init() {
|
protected function init() {
|
||||||
parent::init();
|
parent::init();
|
||||||
|
|
||||||
if(!Permission::check('ADMIN')) {
|
if(!Permission::check('ADMIN')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user