From 07487bf192a9bc602eb72a2d1beab8f8157987fb Mon Sep 17 00:00:00 2001 From: Marcus Nyeholt Date: Wed, 29 Jun 2011 10:41:35 +1000 Subject: [PATCH] BUGFIX: Fixed issue where folderID wasn't being correctly resolved from request, thus making file upload permissions only ever checked against the 'root' folder --- code/controller/AssetAdmin.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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());