]> git.mxchange.org Git - friendica.git/commitdiff
Now without array_merge
authorMichael <heluecht@pirati.ca>
Mon, 1 Jul 2019 22:14:34 +0000 (22:14 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 1 Jul 2019 22:14:34 +0000 (22:14 +0000)
src/Model/Contact.php
src/Model/Item.php

index 8cdf331b7a443fd1bf99f52b64a420e33da7353e..a10c0d05e5f4599a610fad5188da9b578a59a2a0 100644 (file)
@@ -1587,7 +1587,7 @@ class Contact extends BaseObject
                        return '';
                }
 
-               if (in_array($contact["network"], array_merge(Protocol::FEDERATED ,['']))) {
+               if (empty($contact["network"]) || in_array($contact["network"], Protocol::FEDERATED)) {
                        $sql = "(`item`.`uid` = 0 OR (`item`.`uid` = ? AND NOT `item`.`global`))";
                } else {
                        $sql = "`item`.`uid` = ?";
index 69d9c188563d9b70202a1ed152eaa0a96640733c..c3ff0520bb5f53560fabec5647b5b0d4f1fffbe8 100644 (file)
@@ -1354,7 +1354,7 @@ class Item extends BaseObject
                 * We have to check several networks since Friendica posts could be repeated
                 * via OStatus (maybe Diasporsa as well)
                 */
-               if (in_array($item['network'], array_merge(Protocol::FEDERATED ,['']))) {
+               if (empty($item['network']) || in_array($item['network'], Protocol::FEDERATED)) {
                        $condition = ["`uri` = ? AND `uid` = ? AND `network` IN (?, ?, ?)",
                                trim($item['uri']), $item['uid'],
                                Protocol::DIASPORA, Protocol::DFRN, Protocol::OSTATUS];