]> git.mxchange.org Git - friendica.git/commitdiff
include/items.php pass 'parent' to notification
authorAbinoam P. Marques Jr <abinoam@gmail.com>
Sat, 25 Feb 2012 21:23:00 +0000 (13:23 -0800)
committerAbinoam P. Marques Jr <abinoam@gmail.com>
Sun, 26 Feb 2012 00:59:44 +0000 (16:59 -0800)
include/items.php

index de3ade6b4e517aa8246418f049f9c1720c2b8e93..c461b83b49da65fae7779ea8cd00a08432f25ac3 100755 (executable)
@@ -2223,7 +2223,8 @@ function local_delivery($importer,$data) {
                                                                'source_photo' => ((link_compare($datarray['author-link'],$importer['url'])) 
                                                                        ? $importer['thumb'] : $datarray['author-avatar']),
                                                                'verb'         => ACTIVITY_POST,
-                                                               'otype'        => 'item'
+                                                               'otype'        => 'item',
+                                                               'parent'       => $parent,
 
                                                        ));
 
@@ -2317,7 +2318,7 @@ function local_delivery($importer,$data) {
                        
                                if($datarray['type'] != 'activity') {
 
-                                       $myconv = q("SELECT `author-link`, `author-avatar` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `parent` != 0 ",
+                                       $myconv = q("SELECT `author-link`, `author-avatar`, `parent` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `parent` != 0 ",
                                                dbesc($parent_uri),
                                                intval($importer['importer_uid'])
                                        );
@@ -2330,6 +2331,8 @@ function local_delivery($importer,$data) {
                                                                continue;
 
                                                        require_once('include/enotify.php');
+                                                       
+                                                       $conv_parent = $conv['parent'];
 
                                                        notification(array(
                                                                'type'         => NOTIFY_COMMENT,
@@ -2345,7 +2348,8 @@ function local_delivery($importer,$data) {
                                                                'source_photo' => ((link_compare($datarray['author-link'],$importer['url'])) 
                                                                        ? $importer['thumb'] : $datarray['author-avatar']),
                                                                'verb'         => ACTIVITY_POST,
-                                                               'otype'        => 'item'
+                                                               'otype'        => 'item',
+                                                               'parent'       => $conv_parent,
 
                                                        ));