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:
Ingo Schommer 2009-11-21 03:19:37 +00:00
parent 97ece94acf
commit 45c31da863

View File

@ -332,6 +332,9 @@ class LeftAndMain extends Controller {
}
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 @@ JS;
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");