Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

… filters in HtmlEditorField and Hierarchy
  • Loading branch information...
commit 538bcdc74df3f8459efb305ae3b552e28b57a1bd 1 parent a9c7c69
@halkyon halkyon authored
Showing with 5 additions and 3 deletions.
  1. +4 −2 forms/HtmlEditorField.php
  2. +1 −1  model/Hierarchy.php
View
6 forms/HtmlEditorField.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
2  model/Hierarchy.php
@@ -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) . ")");
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.