From fc46ab83bb735904c92dea8722e0784b64b0d8fb Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 5 Dec 2007 08:59:12 +0100 Subject: mobile: add support for marking selected articles as read --- mobile/functions.php | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) (limited to 'mobile/functions.php') diff --git a/mobile/functions.php b/mobile/functions.php index 9f5dd7835..99afe10c6 100644 --- a/mobile/functions.php +++ b/mobile/functions.php @@ -315,6 +315,7 @@ $view_mode = db_escape_string($_GET["viewmode"]); $cat_view = db_escape_string($_GET["cat"]); $subop = $_GET["subop"]; + $catchup_op = $_GET["catchup_op"]; if (!$view_mode) $view_mode = "Adaptive"; if (!$limit) $limit = 30; @@ -347,11 +348,22 @@ update_generic_feed($link, $feed, $cat_view, true); } - if ($subop == "MarkAllRead") { + if ($subop == "MarkAllRead" || $catchup_op == "feed") { catchup_feed($link, $feed, $cat_view); } - if ($subop == "MarkPageRead") { + if ($catchup_op == "selection") { + $ids_to_mark = array_keys($_GET["sel_ids"]); + if ($ids_to_mark) { + foreach ($ids_to_mark as $id) { + db_query($link, "UPDATE ttrss_user_entries SET + unread = false,last_read = NOW() + WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]); + } + } + } + + if ($subop == "MarkPageRead" || $catchup_op == "page") { $ids_to_mark = $_SESSION["last_page_ids.$feed"]; if ($ids_to_mark) { @@ -416,6 +428,10 @@ if (db_num_rows($result) > 0) { + print "
"; + print ""; + print ""; + print ""; - print "
Mark as read: "; + print "
"; $_SESSION["last_page_ids.$feed"] = $page_art_ids; - print "Page, "; - print "Feed
"; +/* print "Page, "; + print "Feed
"; */ + + print " + "; + + print "
"; } else { print "
No articles found.
"; -- cgit v1.2.3