aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-04-16 02:09:00 -0700
committerfriendica <info@friendica.com>2012-04-16 02:09:00 -0700
commit0b838e4cc7031f807808c05b377252b9600840fb (patch)
tree6d87c8a068b44fde2b28b5dcd046ac72fb59fdc0 /include/items.php
parentc8598e7da629832de3b9f52cc25f33f7f840efb2 (diff)
downloadvolse-hubzilla-0b838e4cc7031f807808c05b377252b9600840fb.tar.gz
volse-hubzilla-0b838e4cc7031f807808c05b377252b9600840fb.tar.bz2
volse-hubzilla-0b838e4cc7031f807808c05b377252b9600840fb.zip
propagate edited comments
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index c55a55704..e005ffaef 100644
--- a/include/items.php
+++ b/include/items.php
@@ -2229,7 +2229,7 @@ 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",
+ $r = q("SELECT `id`, `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
dbesc($item_id),
intval($importer['importer_uid'])
);
@@ -2237,7 +2237,9 @@ function local_delivery($importer,$data) {
// Update content if 'updated' changes
if(count($r)) {
+ $iid = $r[0]['id'];
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
+ logger('received updated comment' , LOGGER_DEBUG);
$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']),
@@ -2246,8 +2248,10 @@ function local_delivery($importer,$data) {
dbesc($item_id),
intval($importer['importer_uid'])
);
+
+ proc_run('php',"include/notifier.php","comment-import",$iid);
+
}
- proc_run('php',"include/notifier.php","comment-import",$r[0]['id']);
continue;
}