From a5873b2eaf8290db01499a09a2ad7991ee182245 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 19 Nov 2005 18:49:53 +0100 Subject: [PATCH] fix updateFeed rpc call, fix feed editor feed catchup/uncatchup --- backend.php | 23 ++++++++++++++--------- tt-rss.js | 2 ++ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/backend.php b/backend.php index a7fe0ff3..5a65421c 100644 --- a/backend.php +++ b/backend.php @@ -371,15 +371,18 @@ $feed_id = db_escape_string($_GET["feed"]); $result = db_query($link, - "SELECT feed_url FROM ttrss_feeds WHERE id = '$feed_id'"); + "SELECT feed_url FROM ttrss_feeds WHERE id = '$feed_id' + AND owner_uid = " . $_SESSION["uid"]); if (db_num_rows($result) > 0) { $feed_url = db_fetch_result($result, 0, "feed_url"); -// update_rss_feed($link, $feed_url, $feed_id); + update_rss_feed($link, $feed_url, $feed_id); } - print "DONE-$feed_id"; - + print ""; + getFeedCounter($link, $feed_id); + print ""; + return; } @@ -873,20 +876,22 @@ if ($subop == "unread") { $ids = split(",", $_GET["ids"]); foreach ($ids as $id) { - db_query($link, "UPDATE ttrss_entries SET unread = true WHERE feed_id = '$id'"); + db_query($link, "UPDATE ttrss_user_entries SET unread = true + WHERE feed_id = '$id' AND owner_uid = ".$_SESSION["uid"]); } - print "Marked selected feeds as read."; + print "Marked selected feeds as unread."; } if ($subop == "read") { $ids = split(",", $_GET["ids"]); foreach ($ids as $id) { - db_query($link, "UPDATE ttrss_entries - SET unread = false,last_read = NOW() WHERE feed_id = '$id'"); + db_query($link, "UPDATE ttrss_user_entries + SET unread = false,last_read = NOW() WHERE + feed_id = '$id' AND owner_uid = ".$_SESSION["uid"]); } - print "Marked selected feeds as unread."; + print "Marked selected feeds as read."; } diff --git a/tt-rss.js b/tt-rss.js index 70412fcb..922ae35b 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -149,6 +149,7 @@ function backend_sanity_check_callback() { } } +/* wtf this is obsolete function updateFeed(feed_id) { var query_str = "backend.php?op=rpc&subop=updateFeed&feed=" + feed_id; @@ -162,6 +163,7 @@ function updateFeed(feed_id) { } } +*/ function scheduleFeedUpdate(force) { -- 2.39.5