diff --git a/mobile/feed.php b/mobile/feed.php index 02461b3f6..966e1b440 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 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 "