From: Andrew Dolgov Date: Fri, 18 Dec 2009 13:00:58 +0000 (+0300) Subject: mobile: add feed search X-Git-Tag: 1.4.0~156 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=3585a3c5600d4e3ce69a4b3b11126bf0fa7d5674;p=tt-rss.git mobile: add feed search --- diff --git a/mobile/feed.php b/mobile/feed.php index 02461b3f..966e1b44 100644 --- a/mobile/feed.php +++ b/mobile/feed.php @@ -23,7 +23,8 @@ $feed_id = db_escape_string($_REQUEST["id"]); $cat_id = db_escape_string($_REQUEST["cat"]); $offset = (int) db_escape_string($_REQUEST["skip"]); + $search = db_escape_string($_REQUEST["search"]); - render_headlines_list($link, $feed_id, $cat_id, $offset); + render_headlines_list($link, $feed_id, $cat_id, $offset, $search); ?> diff --git a/mobile/functions.php b/mobile/functions.php index 30200a13..b6889528 100644 --- a/mobile/functions.php +++ b/mobile/functions.php @@ -217,11 +217,13 @@ function render_categories_list($link) { $owner_uid = $_SESSION["uid"]; - - + print '"; } - function render_headlines_list($link, $feed_id, $cat_id, $offset) { + function render_headlines_list($link, $feed_id, $cat_id, $offset, $search) { $feed_id = $feed_id; $limit = 15; @@ -301,11 +303,13 @@ $is_cat = false; $view_mode = 'adaptive'; - /* do not rely on params below */ - - $search = ''; - $search_mode = ''; - $match_on = ''; + if ($search) { + $search_mode = 'this_feed'; + $match_on = 'both'; + } else { + $search_mode = ''; + $match_on = ''; + } $qfh_ret = queryFeedHeadlines($link, $feed_id, $limit, $view_mode, $is_cat, $search, $search_mode, $match_on, false, $offset); @@ -314,6 +318,23 @@ $feed_title = $qfh_ret[1]; if (!$offset) { + + print "
+ + + + +
+

Search

+ Cancel + Search + + + +
+
"; + if ($cat_id) { $cat_title = getCategoryTitle($link, $cat_id); @@ -323,6 +344,8 @@ print "