summaryrefslogtreecommitdiff
path: root/mobile
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-07-07 04:48:19 +0100
committerAndrew Dolgov <[email protected]>2006-07-07 04:48:19 +0100
commitc878bc0172b1fe9b17ffba95e4bc47c884e845e9 (patch)
tree7868d639878355e19949159e5520bd24aebb1746 /mobile
parent53558a918507333112b4a1d1b0b25d4df25eed07 (diff)
mobile: allow catchup page or entire feed (closes #89)
Diffstat (limited to 'mobile')
-rw-r--r--mobile/functions.php30
-rw-r--r--mobile/mobile.css5
2 files changed, 32 insertions, 3 deletions
diff --git a/mobile/functions.php b/mobile/functions.php
index 0339b56f8..df48456b1 100644
--- a/mobile/functions.php
+++ b/mobile/functions.php
@@ -346,6 +346,19 @@
catchup_feed($link, $feed, $cat_view);
}
+ if ($subop == "MarkPageRead") {
+ $ids_to_mark = $_SESSION["last_page_ids.$feed"];
+
+ 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"]);
+ }
+ }
+ }
+
$search = db_escape_string($_GET["search"]);
$search_mode = db_escape_string($_GET["smode"]);
@@ -579,8 +592,10 @@
print "$feed_title <span id=\"headingAddon\">(";
print "<a href=\"tt-rss.php\">Back</a>, ";
- print "<a href=\"tt-rss.php?go=vf&id=$feed&subop=ForceUpdate\">Update</a>, ";
- print "<a href=\"tt-rss.php?go=vf&id=$feed&subop=MarkAllRead\">Mark as read</a>";
+ print "<a href=\"tt-rss.php?go=vf&id=$feed&subop=ForceUpdate\">Update</a>";
+# print "Mark as read: ";
+# print "<a href=\"tt-rss.php?go=vf&id=$feed&subop=MarkAsRead\">Page</a>, ";
+# print "<a href=\"tt-rss.php?go=vf&id=$feed&subop=MarkAllRead\">Feed</a>";
print ")</span>";
print "</div>";
@@ -589,6 +604,8 @@
print "<ul class=\"headlines\">";
+ $page_art_ids = array();
+
$lnum = 0;
error_reporting (DEFAULT_ERROR_LEVEL);
@@ -601,6 +618,8 @@
$id = $line["id"];
$feed_id = $line["feed_id"];
+
+ array_push($page_art_ids, $id);
if ($line["last_read"] == "" &&
($line["unread"] != "t" && $line["unread"] != "1")) {
@@ -657,6 +676,13 @@
print "</ul>";
+ print "<div class='footerAddon'>Mark as read: ";
+
+ $_SESSION["last_page_ids.$feed"] = $page_art_ids;
+
+ print "<a href=\"tt-rss.php?go=vf&id=$feed&subop=MarkPageRead\">Page</a>, ";
+ print "<a href=\"tt-rss.php?go=vf&id=$feed&subop=MarkAllRead\">Feed</a></div>";
+
} else {
print "<div align='center'>No articles found.</div>";
}
diff --git a/mobile/mobile.css b/mobile/mobile.css
index a370a08e4..5317890fc 100644
--- a/mobile/mobile.css
+++ b/mobile/mobile.css
@@ -170,4 +170,7 @@ div.postTags {
font-weight : normal;
}
-
+div.footerAddon {
+ margin-top : 5px;
+ margin-bottom : 5px;
+}