From cc1bacfcf799bd97344a8219f8850b3a15cce8f7 Mon Sep 17 00:00:00 2001 From: Alexandre Saelens Date: Thu, 29 Oct 2015 10:15:57 +1300 Subject: [PATCH] FIX: unticking Enabled hides element --- code/models/ElementalArea.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/models/ElementalArea.php b/code/models/ElementalArea.php index a090c17a..3e25afbc 100644 --- a/code/models/ElementalArea.php +++ b/code/models/ElementalArea.php @@ -10,7 +10,8 @@ public function Elements() { $list = new HasManyList('BaseElement', $result->getForeignKey()); $list->setDataModel($this->model); - $list->sort('Sort ASC'); + $list = $list->filter('Enabled', 1); + $list = $list->sort('Sort ASC'); $list = $list->forForeignID($this->ID);