From 3585a3c5600d4e3ce69a4b3b11126bf0fa7d5674 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 18 Dec 2009 16:00:58 +0300 Subject: mobile: add feed search --- mobile/functions.php | 54 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 10 deletions(-) (limited to 'mobile/functions.php') diff --git a/mobile/functions.php b/mobile/functions.php index 30200a136..b68895288 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 "