]> git.mxchange.org Git - friendica.git/blobdiff - include/onepoll.php
Removed commented code
[friendica.git] / include / onepoll.php
index 951b87043e06d8a014f81ad365eb62d8b5abfdc3..4ac5f38bee43e919a9901104f0ae64b7a2020086 100644 (file)
@@ -475,9 +475,10 @@ function onepoll_run(&$argv, &$argc){
 
                                                // If it seems to be a reply but a header couldn't be found take the last message with matching subject
                                                if(!x($datarray,'parent-uri') and $reply) {
-                                                       $r = q("SELECT `uri` , `parent-uri` FROM `item` WHERE `title` = \"%s\" AND `uid` = %d ORDER BY `created` DESC LIMIT 1",
+                                                       $r = q("SELECT `uri` , `parent-uri` FROM `item` WHERE `title` = \"%s\" AND `uid` = %d AND `network` = '%s' ORDER BY `created` DESC LIMIT 1",
                                                                dbesc(protect_sprintf($datarray['title'])),
-                                                               intval($importer_uid));
+                                                               intval($importer_uid),
+                                                               dbesc(NETWORK_MAIL));
                                                        if(count($r))
                                                                $datarray['parent-uri'] = $r[0]['parent-uri'];
                                                }