diff options
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 17 |
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)); } |