fix updateFeed rpc call, fix feed editor feed catchup/uncatchup
This commit is contained in:
parent
b018b49b2e
commit
a5873b2eaf
2 changed files with 16 additions and 9 deletions
23
backend.php
23
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 "<rpc-reply>";
|
||||
getFeedCounter($link, $feed_id);
|
||||
print "</rpc-reply>";
|
||||
|
||||
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.";
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue