Browse Source

Now without array_merge

pull/7334/head
Michael 2 years ago
parent
commit
ee8baf00ce
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/Model/Contact.php
  2. +1
    -1
      src/Model/Item.php

+ 1
- 1
src/Model/Contact.php View 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` = ?";


+ 1
- 1
src/Model/Item.php View 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];


Loading…
Cancel
Save