mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #191 from silverstripe-big-o/session-namespace
BUG Session namespace sharing for CMS controllers (#7815)
This commit is contained in:
commit
8c1f622503
@ -9,4 +9,6 @@ class CMSPageEditController extends CMSMain {
|
|||||||
static $url_rule = '/$Action/$ID/$OtherID';
|
static $url_rule = '/$Action/$ID/$OtherID';
|
||||||
static $url_priority = 41;
|
static $url_priority = 41;
|
||||||
static $required_permission_codes = 'CMS_ACCESS_CMSMain';
|
static $required_permission_codes = 'CMS_ACCESS_CMSMain';
|
||||||
|
static $session_namespace = 'CMSMain';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ class CMSPageHistoryController extends CMSMain {
|
|||||||
static $url_priority = 42;
|
static $url_priority = 42;
|
||||||
static $menu_title = 'History';
|
static $menu_title = 'History';
|
||||||
static $required_permission_codes = 'CMS_ACCESS_CMSMain';
|
static $required_permission_codes = 'CMS_ACCESS_CMSMain';
|
||||||
|
static $session_namespace = 'CMSMain';
|
||||||
|
|
||||||
static $allowed_actions = array(
|
static $allowed_actions = array(
|
||||||
'VersionsForm',
|
'VersionsForm',
|
||||||
|
@ -9,6 +9,7 @@ class CMSPageSettingsController extends CMSMain {
|
|||||||
static $url_rule = '/$Action/$ID/$OtherID';
|
static $url_rule = '/$Action/$ID/$OtherID';
|
||||||
static $url_priority = 42;
|
static $url_priority = 42;
|
||||||
static $required_permission_codes = 'CMS_ACCESS_CMSMain';
|
static $required_permission_codes = 'CMS_ACCESS_CMSMain';
|
||||||
|
static $session_namespace = 'CMSMain';
|
||||||
|
|
||||||
function getEditForm($id = null, $fields = null) {
|
function getEditForm($id = null, $fields = null) {
|
||||||
$record = $this->getRecord($id ? $id : $this->currentPageID());
|
$record = $this->getRecord($id ? $id : $this->currentPageID());
|
||||||
|
@ -10,6 +10,7 @@ class CMSPagesController extends CMSMain {
|
|||||||
static $url_priority = 40;
|
static $url_priority = 40;
|
||||||
static $menu_title = 'Pages';
|
static $menu_title = 'Pages';
|
||||||
static $required_permission_codes = 'CMS_ACCESS_CMSMain';
|
static $required_permission_codes = 'CMS_ACCESS_CMSMain';
|
||||||
|
static $session_namespace = 'CMSMain';
|
||||||
|
|
||||||
function LinkPreview() {
|
function LinkPreview() {
|
||||||
return false;
|
return false;
|
||||||
@ -22,14 +23,6 @@ class CMSPagesController extends CMSMain {
|
|||||||
return $this->request->getVar('view');
|
return $this->request->getVar('view');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Doesn't deal with a single record, and we need
|
|
||||||
* to avoid session state from previous record edits leaking in here.
|
|
||||||
*/
|
|
||||||
public function currentPageID() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function isCurrentPage(DataObject $record) {
|
public function isCurrentPage(DataObject $record) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user