summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-09-19 05:16:42 +0100
committerAndrew Dolgov <[email protected]>2006-09-19 05:16:42 +0100
commit18eddb2cb9b58c015e2cc04dd0d41008a03961a4 (patch)
tree4743226f4a1667a92c3f550c443ffcb4bbe63b58 /functions.php
parent472782e8bff08df698a3c3f87ee3fc9f7e16b06f (diff)
optimize mark selected function
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/functions.php b/functions.php
index bb80cac57..600a776c6 100644
--- a/functions.php
+++ b/functions.php
@@ -2587,6 +2587,31 @@
}
}
+ function markArticlesById($link, $ids, $cmode) {
+
+ $tmp_ids = array();
+
+ foreach ($ids as $id) {
+ array_push($tmp_ids, "ref_id = '$id'");
+ }
+
+ $ids_qpart = join(" OR ", $tmp_ids);
+
+ if ($cmode == 0) {
+ db_query($link, "UPDATE ttrss_user_entries SET
+ marked = false,last_read = NOW()
+ WHERE ($ids_qpart) AND owner_uid = " . $_SESSION["uid"]);
+ } else if ($cmode == 1) {
+ db_query($link, "UPDATE ttrss_user_entries SET
+ marked = true
+ WHERE ($ids_qpart) AND owner_uid = " . $_SESSION["uid"]);
+ } else {
+ db_query($link, "UPDATE ttrss_user_entries SET
+ marked = NOT marked,last_read = NOW()
+ WHERE ($ids_qpart) AND owner_uid = " . $_SESSION["uid"]);
+ }
+ }
+
function catchupArticlesById($link, $ids, $cmode) {
$tmp_ids = array();