Skip to content
Browse files

BUGFIX Re-added session-based ID setting in LeftAndMain, it was neces…

…sary 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
  • Loading branch information...
1 parent 97ece94 commit 45c31da8632b975e2e1db15a58f80a3ec0221fa2 @chillu chillu committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 code/LeftAndMain.php
View
5 code/LeftAndMain.php
@@ -332,6 +332,9 @@ static function menu_title_for_class($class) {
}
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'));
if(Director::is_ajax()) {
@@ -864,7 +867,7 @@ public function printable() {
public function currentPageID() {
if($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');
} elseif(Session::get("{$this->class}.currentPage")) {
return Session::get("{$this->class}.currentPage");

0 comments on commit 45c31da

Please sign in to comment.
Something went wrong with that request. Please try again.