From: Andrew Dolgov Date: Mon, 31 Jul 2006 11:55:15 +0000 (+0100) Subject: support for generated feeds based on searches X-Git-Tag: schema_freeze_for_1.2.2~53 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e1eb21470e93137adc59e39f6fe093cb1636b83f;p=tt-rss.git support for generated feeds based on searches --- diff --git a/backend.php b/backend.php index 107074fb..bd53354f 100644 --- a/backend.php +++ b/backend.php @@ -807,7 +807,8 @@ function print_headline_subtoolbar($link, $feed_site_url, $feed_title, $bottom = false, $rtl_content = false, $feed_id = 0, - $is_cat = false) { + $is_cat = false, $search = false, $match_on = false, + $search_mode = false) { if (!$bottom) { $class = "headlinesSubToolbar"; @@ -864,9 +865,13 @@ print $feed_title; } + if ($search) { + $search_q = "&q=$search&m=$match_on&smode=$search_mode"; + } + print "  "; @@ -879,7 +884,7 @@ if (db_num_rows($result) > 0) { print_headline_subtoolbar($link, $feed_site_url, $feed_title, false, - $rtl_content, $feed, $cat_view); + $rtl_content, $feed, $cat_view, $search, $match_on, $search_mode); if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { print "= 0) { @@ -2120,6 +2120,11 @@ } else { $feed_title = "Uncategorized"; } + + if ($search) { + $feed_title = "Category search results ($search, $feed_title)"; + } + } else { $result = db_query($link, "SELECT title,site_url,last_error FROM ttrss_feeds @@ -2128,7 +2133,10 @@ $feed_title = db_fetch_result($result, 0, "title"); $feed_site_url = db_fetch_result($result, 0, "site_url"); $last_error = db_fetch_result($result, 0, "last_error"); - + + if ($search) { + $feed_title = "Feed search results ($search, $feed_title)"; + } } } else if ($feed == -1) { @@ -2209,10 +2217,11 @@ } - function generate_syndicated_feed($link, $feed, $is_cat) { + function generate_syndicated_feed($link, $feed, $is_cat, + $search, $search_mode, $match_on) { $qfh_ret = queryFeedHeadlines($link, $feed, - 30, false, $is_cat, false, false, false); + 30, false, $is_cat, $search, $search_mode, $match_on); $result = $qfh_ret[0]; $feed_title = $qfh_ret[1];