Permalink
Browse files

BUGFIX Ensure that the DataList is being used correctly when applying…

… filters in HtmlEditorField and Hierarchy
  • Loading branch information...
halkyon committed Jun 15, 2012
1 parent a9c7c69 commit 538bcdc74df3f8459efb305ae3b552e28b57a1bd
Showing with 5 additions and 3 deletions.
  1. +4 −2 forms/HtmlEditorField.php
  2. +1 −1 model/Hierarchy.php
@@ -742,8 +742,10 @@ protected function getFiles($parentID = null) {
$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
@@ -591,7 +591,7 @@ public function liveChildren($showAll = false, $onlyDeletedFromStage = false) {
$ids = $stageChildren->column("ID");
if($ids) {
- $children->where("\"$baseClass\".\"ID\" NOT IN (" . implode(',',$ids) . ")");
+ $children = $children->where("\"$baseClass\".\"ID\" NOT IN (" . implode(',',$ids) . ")");
}
}

0 comments on commit 538bcdc

Please sign in to comment.