mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
386bbf8095
commit
f67cca321c
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user