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:
Ingo Schommer 2012-02-28 18:49:31 +01:00
parent a317b66a8a
commit f78ab9097a

View File

@ -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";
}