]> git.mxchange.org Git - friendica.git/commitdiff
bug #165
authorFriendika <info@friendika.com>
Tue, 27 Sep 2011 06:39:47 +0000 (23:39 -0700)
committerFriendika <info@friendika.com>
Tue, 27 Sep 2011 06:39:47 +0000 (23:39 -0700)
boot.php
include/delivery.php

index 3ad9cb4555b16523620548e4675cf68f52c0d89c..48d52846ee551aa5cac34357fc3c80cf8537094a 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -7,7 +7,7 @@ require_once('include/text.php');
 require_once("include/pgettext.php");
 
 
-define ( 'FRIENDIKA_VERSION',      '2.3.1115' );
+define ( 'FRIENDIKA_VERSION',      '2.3.1116' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.21'    );
 define ( 'DB_UPDATE_VERSION',      1092      );
 
index 706c07b3b861fa2762e2d8604324b89a9e6b6808..06cc1f679ed7bc9651c26abfab3e96a151b26add 100644 (file)
@@ -107,10 +107,18 @@ function delivery_run($argv, $argc){
                        return;
                }
 
-               $icontacts = q("SELECT * FROM `contact` WHERE `id` IN ( SELECT distinct(`contact-id`) FROM `item` where `parent` = %d ) ",
-                       intval($parent_id)
-               );
-               if(! count($icontacts))
+               $icontacts = null;
+               $contacts_arr = array();
+               foreach($items as $item)
+                       if(! in_array($item['contact-id'],$contacts_arr))
+                               $contacts_arr[] = intval($item['contact-id']);
+               if(count($contacts_arr)) {
+                       $str_contacts = implode(',',$contacts_arr); 
+                       $icontacts = q("SELECT * FROM `contact` 
+                               WHERE `id` IN ( $str_contacts ) "
+                       );
+               }
+               if( ! ($icontacts && count($icontacts)))
                        return;