From fc8db228e47ff6c205e1c7bceb7b984652086ba8 Mon Sep 17 00:00:00 2001 From: Karl Dietz Date: Sat, 12 Apr 2014 15:06:51 +0200 Subject: [PATCH] use the filter values from the Default template Patch by Karl Newman Fixes #11706 --- modules/tv/classes/Schedule.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/modules/tv/classes/Schedule.php b/modules/tv/classes/Schedule.php index 0c54c5a8a..a17f4e26a 100644 --- a/modules/tv/classes/Schedule.php +++ b/modules/tv/classes/Schedule.php @@ -76,7 +76,7 @@ public static function availableRecordFilters() { if (empty($cache)) { global $db; $cache = $db->query_keyed_list_assoc('filterid', - 'SELECT filterid,description,newruledefault + 'SELECT filterid,description FROM recordfilter ORDER BY filterid' ); @@ -88,22 +88,14 @@ public static function availableRecordFilters() { * * @return an array of the filters for this Schedule. Array includes * a property called "enabled" to indicate if the filter is enabled. - * If this is not a real schedule "enabled" is from the newruledefault - * property * /**/ public function recordFilters() { $filters = array(); foreach (Schedule::availableRecordFilters() as $id => $filter) { $filters[$id] = $filter; - // if this is a real schedule, use the filter property - if ($this->recordid) { - $mask = 1 << $id; - $filters[$id]['enabled'] = ($this->filter & $mask) == $mask; - // otherwise it's not a real schedule, so use the default value - } else { - $filters[$id]['enabled'] = $filter['newruledefault']; - } + $mask = 1 << $id; + $filters[$id]['enabled'] = ($this->filter & $mask) == $mask; } return $filters; }