mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR Reinstated getting current record ID from session in AssetAdmin in order to allow routing to GridFieldPopupForms detail views (admin/assets/show/99 vs admin/assets/EditForm/field/...)
This commit is contained in:
parent
a317b66a8a
commit
f78ab9097a
@ -38,10 +38,12 @@ class AssetAdmin extends LeftAndMain {
|
||||
* Return fake-ID "root" if no ID is found (needed to upload files into the root-folder)
|
||||
*/
|
||||
public function currentPageID() {
|
||||
if(isset($_REQUEST['ID']) && is_numeric($_REQUEST['ID'])) {
|
||||
return $_REQUEST['ID'];
|
||||
if($this->request->requestVar('ID')) {
|
||||
return $this->request->requestVar('ID');
|
||||
} elseif (is_numeric($this->urlParams['ID'])) {
|
||||
return $this->urlParams['ID'];
|
||||
} elseif(Session::get("{$this->class}.currentPage")) {
|
||||
return Session::get("{$this->class}.currentPage");
|
||||
} else {
|
||||
return "root";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user