aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-04-16 01:35:27 -0700
committerfriendica <info@friendica.com>2012-04-16 01:35:27 -0700
commitc8598e7da629832de3b9f52cc25f33f7f840efb2 (patch)
treebfa76ff5647f331a812085d0840fd246981822ea /include/items.php
parent37bb3c330d4547732610a1b15bd49a3aa57b0eb4 (diff)
downloadvolse-hubzilla-c8598e7da629832de3b9f52cc25f33f7f840efb2.tar.gz
volse-hubzilla-c8598e7da629832de3b9f52cc25f33f7f840efb2.tar.bz2
volse-hubzilla-c8598e7da629832de3b9f52cc25f33f7f840efb2.zip
edited comments weren't being relayed
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 85df340d3..c55a55704 100644
--- a/include/items.php
+++ b/include/items.php
@@ -2229,6 +2229,30 @@ function local_delivery($importer,$data) {
$datarray = get_atom_elements($feed,$item);
+ $r = q("SELECT `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
+ dbesc($item_id),
+ intval($importer['importer_uid'])
+ );
+
+ // Update content if 'updated' changes
+
+ if(count($r)) {
+ if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
+ $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
+ dbesc($datarray['title']),
+ dbesc($datarray['body']),
+ dbesc($datarray['tag']),
+ dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
+ dbesc($item_id),
+ intval($importer['importer_uid'])
+ );
+ }
+ proc_run('php',"include/notifier.php","comment-import",$r[0]['id']);
+
+ continue;
+ }
+
+
// TODO: make this next part work against both delivery threads of a community post
// if((! link_compare($datarray['author-link'],$importer['url'])) && (! $community)) {