Skip to content

Commit

Permalink
BUGFIX Ensure that the DataList is being used correctly when applying…
Browse files Browse the repository at this point in the history
… filters in HtmlEditorField and Hierarchy
  • Loading branch information
Sean Harvey committed Jun 15, 2012
1 parent a9c7c69 commit 538bcdc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions forms/HtmlEditorField.php
Expand Up @@ -742,8 +742,10 @@ protected function getFiles($parentID = null) {
$files = File::get()->where(implode(' OR ', $wheres)); $files = File::get()->where(implode(' OR ', $wheres));


// Limit by folder (if required) // Limit by folder (if required)
if($parentID) $files->filter('ParentID', $parentID); if($parentID) {

$files = $files->filter('ParentID', $parentID);
}

return $files; return $files;
} }


Expand Down
2 changes: 1 addition & 1 deletion model/Hierarchy.php
Expand Up @@ -591,7 +591,7 @@ public function liveChildren($showAll = false, $onlyDeletedFromStage = false) {


$ids = $stageChildren->column("ID"); $ids = $stageChildren->column("ID");
if($ids) { if($ids) {
$children->where("\"$baseClass\".\"ID\" NOT IN (" . implode(',',$ids) . ")"); $children = $children->where("\"$baseClass\".\"ID\" NOT IN (" . implode(',',$ids) . ")");
} }
} }


Expand Down

0 comments on commit 538bcdc

Please sign in to comment.