BUGFIX Ensure that the DataList is being used correctly when applying filters in HtmlEditorField and Hierarchy

This commit is contained in:
Sean Harvey 2012-06-15 15:49:22 +12:00
parent a9c7c69289
commit 538bcdc74d
2 changed files with 5 additions and 3 deletions

View File

@ -742,8 +742,10 @@ class HtmlEditorField_Toolbar extends RequestHandler {
$files = File::get()->where(implode(' OR ', $wheres));
// Limit by folder (if required)
if($parentID) $files->filter('ParentID', $parentID);
if($parentID) {
$files = $files->filter('ParentID', $parentID);
}
return $files;
}

View File

@ -591,7 +591,7 @@ class Hierarchy extends DataExtension {
$ids = $stageChildren->column("ID");
if($ids) {
$children->where("\"$baseClass\".\"ID\" NOT IN (" . implode(',',$ids) . ")");
$children = $children->where("\"$baseClass\".\"ID\" NOT IN (" . implode(',',$ids) . ")");
}
}