diff --git a/code/controller/AssetAdmin.php b/code/controller/AssetAdmin.php index 7b963e44..ca671a5c 100755 --- a/code/controller/AssetAdmin.php +++ b/code/controller/AssetAdmin.php @@ -103,7 +103,8 @@ JS Requirements::css(CMS_DIR . "/css/cms_left.css"); Requirements::css(CMS_DIR . "/css/cms_right.css"); - if(isset($data['ID']) && $data['ID'] != 'root') $folder = DataObject::get_by_id("Folder", $data['ID']); + $id = (int) $this->request->param('ID'); + if($id) $folder = DataObject::get_by_id("Folder", $id); else $folder = singleton('Folder'); return array( 'CanUpload' => $folder->canEdit());