]> git.mxchange.org Git - friendica.git/blobdiff - include/delivery.php
Merge pull request #448 from fermionic/limit-items-on-all-pages
[friendica.git] / include / delivery.php
index b60fef3bf70d311cb4730c5fd3e7d25d850774e5..1328771a6789bb3e623459e95e70ec76fd009c50 100644 (file)
@@ -113,7 +113,7 @@ function delivery_run($argv, $argc){
                        $uid = $r[0]['uid'];
                        $updated = $r[0]['edited'];
 
-                       // The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up
+                       // POSSIBLE CLEANUP --> The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up
                        if(! $parent_id)
                                continue;
 
@@ -280,7 +280,7 @@ function delivery_run($argv, $argc){
                                                continue;
 
                                        // private emails may be in included in public conversations. Filter them.
-                                       if(($public_message) && $item['private'])
+                                       if(($public_message) && $item['private'] == 1)
                                                continue;
 
                                        $item_contact = get_item_contact($item,$icontacts);
@@ -383,7 +383,7 @@ function delivery_run($argv, $argc){
                                                        continue;
 
                                                // private emails may be in included in public conversations. Filter them.
-                                               if(($public_message) && $item['private'])
+                                               if(($public_message) && $item['private'] == 1)
                                                        continue;
        
                                                $item_contact = get_item_contact($item,$icontacts);
@@ -492,9 +492,6 @@ function delivery_run($argv, $argc){
                                break;
 
                        case NETWORK_DIASPORA :
-                               if(get_config('system','dfrn_only') || (! get_config('system','diaspora_enabled')) || (! $normal_mode))
-                                       break;
-
                                if($public_message)
                                        $loc = 'public batch ' . $contact['batch'];
                                else 
@@ -502,6 +499,9 @@ function delivery_run($argv, $argc){
 
                                logger('delivery: diaspora batch deliver: ' . $loc);
 
+                               if(get_config('system','dfrn_only') || (! get_config('system','diaspora_enabled')) || (! $normal_mode))
+                                       break;
+
                                if((! $contact['pubkey']) && (! $public_message))
                                        break;