mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX Re-added session-based ID setting in LeftAndMain, it was necessary to for nested controllers like TableListField form fields
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92816 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
97ece94acf
commit
45c31da863
@ -332,6 +332,9 @@ class LeftAndMain extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function show($request) {
|
public function show($request) {
|
||||||
|
// TODO Necessary for TableListField URLs to work properly
|
||||||
|
if($request->param('ID')) $this->setCurrentPageID($request->param('ID'));
|
||||||
|
|
||||||
$form = $this->getEditForm($request->param('ID'));
|
$form = $this->getEditForm($request->param('ID'));
|
||||||
|
|
||||||
if(Director::is_ajax()) {
|
if(Director::is_ajax()) {
|
||||||
@ -864,7 +867,7 @@ JS;
|
|||||||
public function currentPageID() {
|
public function currentPageID() {
|
||||||
if($this->request->getVar('ID')) {
|
if($this->request->getVar('ID')) {
|
||||||
return $this->request->getVar('ID');
|
return $this->request->getVar('ID');
|
||||||
} elseif ($this->request->param('ID')) {
|
} elseif ($this->request->param('ID') && is_numeric($this->request->param('ID'))) {
|
||||||
return $this->request->param('ID');
|
return $this->request->param('ID');
|
||||||
} elseif(Session::get("{$this->class}.currentPage")) {
|
} elseif(Session::get("{$this->class}.currentPage")) {
|
||||||
return Session::get("{$this->class}.currentPage");
|
return Session::get("{$this->class}.currentPage");
|
||||||
|
Loading…
Reference in New Issue
Block a user