Permalink
Browse files

BUGFIX AssetAdmin bugs out when trying to find Folders with ID = 0 wh…

…en in /assets/
  • Loading branch information...
1 parent 82748a0 commit c5a1d69a39e581266fadf63f12ff3e08acf2c731 @stojg stojg committed Feb 21, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 filesystem/Folder.php
View
@@ -481,11 +481,14 @@ function getCMSFields() {
$addFolderBtn
),
$gridField,
- new HiddenField("ID"),
new HiddenField("DestFolderID")
)
)
);
+ // If we running in singleton mode, don't add ID with value 0, it borks ORM queries
+ if($this->ID) {
+ $fields->addFieldToTab('Root.listview', new HiddenField("ID"));
+ }
$actionsComposite->addExtraClass('cms-actions-row');

0 comments on commit c5a1d69

Please sign in to comment.