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

This commit is contained in:
Ingo Schommer 2012-02-28 18:48:02 +01:00
parent 386bbf8095
commit f67cca321c

View File

@ -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 {