diff options
author | Andrew Dolgov <[email protected]> | 2011-04-01 16:58:34 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-04-01 16:58:34 +0400 |
commit | 2fcec4c4297fca5dbbea2f312886b5c2d24a7a43 (patch) | |
tree | 1e6844e604e5f73783fcb2c14ca35ed2951d0b89 /functions.php | |
parent | dd0345769a772272bcca7be2ecbfd107012c9d57 (diff) |
add missing pubsub pings to operations changing the article published status
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/functions.php b/functions.php index 5adf46cdf..46502cd1a 100644 --- a/functions.php +++ b/functions.php @@ -1235,6 +1235,16 @@ VALUES ('$ref_id', '$owner_uid', '$feed', $unread, $last_read_qpart, $marked, $published, '$score', '', '')"); + if (PUBSUBHUBBUB_HUB && $published == 'true') { + $rss_link = get_self_url_prefix() . + "/backend.php?op=rss&id=-2&key=" . + get_feed_access_key($link, -2, false); + + $p = new Publisher(PUBSUBHUBBUB_HUB); + + $pubsub_result = $p->publish_update($rss_link); + } + $result = db_query($link, "SELECT int_id FROM ttrss_user_entries WHERE ref_id = '$ref_id' AND owner_uid = '$owner_uid' AND @@ -4036,6 +4046,16 @@ published = NOT published,last_read = NOW() WHERE ($ids_qpart) AND owner_uid = " . $_SESSION["uid"]); } + + if (PUBSUBHUBBUB_HUB) { + $rss_link = get_self_url_prefix() . + "/backend.php?op=rss&id=-2&key=" . + get_feed_access_key($link, -2, false); + + $p = new Publisher(PUBSUBHUBBUB_HUB); + + $pubsub_result = $p->publish_update($rss_link); + } } function catchupArticlesById($link, $ids, $cmode, $owner_uid = false) { |