diff --git a/classes/pref_filters.php b/classes/pref_filters.php index 78189fcb1..c7aa54e21 100644 --- a/classes/pref_filters.php +++ b/classes/pref_filters.php @@ -105,6 +105,13 @@ class Pref_Filters extends Protected_Handler { $root['name'] = __('Filters'); $root['items'] = array(); + $search = $_SESSION["prefs_filter_search"]; + + if ($search) $search_qpart = " (LOWER(reg_exp) LIKE LOWER('%$search%') + OR LOWER(ttrss_feeds.title) LIKE LOWER('%$search%') + OR LOWER(COALESCE(ttrss_feed_categories.title, '".__('Uncategorized')."')) + LIKE LOWER('%$search%') AND cat_filter = true) AND "; + $result = db_query($this->link, "SELECT ttrss_filters.id AS id,reg_exp, ttrss_filter_types.name AS filter_type_name, @@ -119,7 +126,7 @@ class Pref_Filters extends Protected_Handler { filter_type, ttrss_filter_actions.description AS action_description, ttrss_feeds.title AS feed_title, - ttrss_feed_categories.title AS cat_title, + COALESCE(ttrss_feed_categories.title, '".__('Uncategorized')."') AS cat_title, ttrss_filter_actions.name AS action_name, ttrss_filters.action_param AS action_param FROM @@ -129,6 +136,7 @@ class Pref_Filters extends Protected_Handler { WHERE filter_type = ttrss_filter_types.id AND ttrss_filter_actions.id = action_id AND + $search_qpart ttrss_filters.owner_uid = ".$_SESSION["uid"]." ORDER by action_description, reg_exp"); @@ -580,6 +588,21 @@ class Pref_Filters extends Protected_Handler { print "