diff options
author | Andrew Dolgov <[email protected]> | 2005-08-22 12:43:07 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2005-08-22 12:43:07 +0100 |
commit | 175847dee889442606adae97f844302cb027cebd (patch) | |
tree | 12f25541d305ff4eff3cf9ec727745d60744d266 /backend.php | |
parent | 5d348feec2484d784c70f548c68fc07a025d95aa (diff) |
mark headlines page as read now works (via rpc)
Diffstat (limited to 'backend.php')
-rw-r--r-- | backend.php | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/backend.php b/backend.php index f862d540d..c7b66929e 100644 --- a/backend.php +++ b/backend.php @@ -12,7 +12,27 @@ $op = $_GET["op"]; $fetch = $_GET["fetch"]; + + if ($op == "rpc") { + + $subop = $_GET["subop"]; + if ($subop == "catchupPage") { + + $ids = split(",", $_GET["ids"]); + + foreach ($ids as $id) { + + pg_query("UPDATE ttrss_entries SET unread=false,last_read = NOW() + WHERE id = '$id'"); + + } + + print "Marked active page as read."; + } + + } + if ($op == "feeds") { $subop = $_GET["subop"]; @@ -150,7 +170,7 @@ } } - print "<table class=\"headlines\" width=\"100%\">"; + print "<table class=\"headlinesList\" id=\"headlinesList\" width=\"100%\">"; print "<tr><td class=\"search\" colspan=\"3\"> Search: <input onchange=\"javascript:search($feed,this);\"></td></tr>"; @@ -242,9 +262,11 @@ print " "; print "<a class=\"button\" href=\"javascript:viewfeed($feed, 0, 'ForceUpdate');\">Update</a>"; + print " Mark as read: "; + print "<a class=\"button\" - href=\"javascript:viewfeed($feed, $skip, 'MarkPageRead');\">This Page</a>"; + href=\"javascript:catchupPage($feed);\">This Page</a>"; print " "; print "<a class=\"button\" href=\"javascript:viewfeed($feed, $skip, 'MarkAllRead');\">All Posts</a>"; |