Browse files

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
  • Loading branch information...
1 parent 386bbf8 commit f67cca321c63b36e05c7b2ae726d2c5551162cac @chillu chillu committed Feb 28, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 admin/code/LeftAndMain.php
View
4 admin/code/LeftAndMain.php
@@ -1157,8 +1157,8 @@ function getSilverStripeNavigator() {
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 {

0 comments on commit f67cca3

Please sign in to comment.