summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-05-15 06:03:35 +0100
committerAndrew Dolgov <[email protected]>2007-05-15 06:03:35 +0100
commite097e8be75440dd03e7f36ff8a1d0e01725295c3 (patch)
treebac5bffaa6a92cd0d7c19dfab07bc51f0a5cdaa9 /functions.php
parent465ff90b4ac122b60d169df0b9a6f51a262296e5 (diff)
add article prefetching, remove history tracking
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/functions.php b/functions.php
index cdf592f70..6188e38d9 100644
--- a/functions.php
+++ b/functions.php
@@ -2811,6 +2811,23 @@
}
}
+ function catchupArticleById($link, $id, $cmode) {
+
+ if ($cmode == 0) {
+ db_query($link, "UPDATE ttrss_user_entries SET
+ unread = false,last_read = NOW()
+ WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]);
+ } else if ($cmode == 1) {
+ db_query($link, "UPDATE ttrss_user_entries SET
+ unread = true
+ WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]);
+ } else {
+ db_query($link, "UPDATE ttrss_user_entries SET
+ unread = NOT unread,last_read = NOW()
+ WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]);
+ }
+ }
+
function escape_for_form($s) {
return htmlspecialchars(db_unescape_string($s));
}