From f67cca321c63b36e05c7b2ae726d2c5551162cac Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 28 Feb 2012 18:48:02 +0100 Subject: [PATCH] BUGFIX Using RequestHandler->urlParams rather than HTTPRequest->param() in LeftandMain->currentPageId() in order to avoid the wrong ID being chosen on nested controllers like GridField with their own "ID" parameters in the URL signature --- admin/code/LeftAndMain.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index faf54cfa5..a51a0fb99 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -1157,8 +1157,8 @@ class LeftAndMain extends Controller { public function currentPageID() { if($this->request->requestVar('ID')) { return $this->request->requestVar('ID'); - } elseif ($this->request->param('ID') && is_numeric($this->request->param('ID'))) { - return $this->request->param('ID'); + } elseif (isset($this->urlParams['ID']) && is_numeric($this->urlParams['ID'])) { + return $this->urlParams['ID']; } elseif(Session::get("{$this->class}.currentPage")) { return Session::get("{$this->class}.currentPage"); } else {