diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 656506d84d..80a5d93cb2 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1113,7 +1113,7 @@ class Contact $contact = self::selectFirst(['id'], ['nurl' => $urls, 'uid' => $uid]); if (!empty($contact['id'])) { $contact_id = $contact['id']; - Logger::info('Fetched id by url', ['cid' => $contact_id, 'uid' => $uid, 'url' => $url, 'probed_url' => $data['url'], 'alias' => $data['alias'], 'addr' => $data['addr']]); + Logger::info('Fetched id by url', ['cid' => $contact_id, 'uid' => $uid, 'url' => $url, 'data' => $data]); } } diff --git a/src/Model/Item.php b/src/Model/Item.php index 0fcb445e0b..9890c8a995 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -3980,12 +3980,12 @@ class Item // The causer is set during a thread completion, for example because of a reshare. It countains the responsible actor. if (!empty($item['causer-id']) && Contact\User::isBlocked($item['causer-id'], $user_id)) { - Logger::notice('Causer is blocked by user', ['causer-link' => $item['causer-link'], 'uid' => $user_id, 'item-uri' => $item['uri']]); + Logger::notice('Causer is blocked by user', ['causer-link' => $item['causer-link'] ?? $item['causer-id'], 'uid' => $user_id, 'item-uri' => $item['uri']]); return false; } if (!empty($item['causer-id']) && ($item['gravity'] === GRAVITY_PARENT) && Contact\User::isIgnored($item['causer-id'], $user_id)) { - Logger::notice('Causer is ignored by user', ['causer-link' => $item['causer-link'], 'uid' => $user_id, 'item-uri' => $item['uri']]); + Logger::notice('Causer is ignored by user', ['causer-link' => $item['causer-link'] ?? $item['causer-id'], 'uid' => $user_id, 'item-uri' => $item['uri']]); return false; } diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index 43a4384d4d..531a23a69b 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -719,7 +719,7 @@ class Transmitter continue; } - if ($isforum && ($contact['dfrn'] == Protocol::DFRN)) { + if ($isforum && ($contact['network'] == Protocol::DFRN)) { continue; } diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 9e9f1a574b..7ab41eb52b 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -1565,7 +1565,6 @@ class Diaspora $datarray["gravity"] = GRAVITY_COMMENT; $datarray['thr-parent'] = $thr_parent ?: $toplevel_parent_item['uri']; - $datarray['parent-uri'] = $toplevel_parent_item['uri']; $datarray["object-type"] = Activity\ObjectType::COMMENT; @@ -1963,7 +1962,6 @@ class Diaspora $datarray["verb"] = Activity::FOLLOW; $datarray["gravity"] = GRAVITY_ACTIVITY; $datarray['thr-parent'] = $toplevel_parent_item['uri']; - $datarray['parent-uri'] = $toplevel_parent_item['parent-uri']; $datarray["object-type"] = Activity\ObjectType::NOTE; @@ -2356,7 +2354,6 @@ class Diaspora $datarray['guid'] = $parent['guid'] . '-' . $guid; $datarray['uri'] = self::getUriFromGuid($author, $datarray['guid']); $datarray['thr-parent'] = $parent['uri']; - $datarray['parent-uri'] = $parent['parent-uri']; $datarray['verb'] = $datarray['body'] = Activity::ANNOUNCE; $datarray['gravity'] = GRAVITY_ACTIVITY; diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index 9d9e10f7a3..b8724acc7f 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -521,12 +521,6 @@ class OStatus Logger::log("Item with uri ".self::$itemlist[0]['uri']." will be imported since the thread contains posts or shares.", Logger::DEBUG); } } - } else { - // But we will only import complete threads - $valid = Item::exists(['uid' => $importer["uid"], 'uri' => self::$itemlist[0]['parent-uri']]); - if ($valid) { - Logger::log("Item with uri ".self::$itemlist[0]["uri"]." belongs to parent ".self::$itemlist[0]['thr-parent']." of user ".$importer["uid"].". It will be imported.", Logger::DEBUG); - } } if ($valid) { diff --git a/view/theme/vier/style.php b/view/theme/vier/style.php index ac5cd08efb..8cd0d7a32a 100644 --- a/view/theme/vier/style.php +++ b/view/theme/vier/style.php @@ -61,7 +61,7 @@ header('Cache-Control: public'); header('ETag: "'.$etag.'"'); header('Last-Modified: '.$modified); -if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) || isset($_SERVER['HTTP_IF_NONE_MATCH'])) { +if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && isset($_SERVER['HTTP_IF_NONE_MATCH'])) { $cached_modified = gmdate('r', strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE'])); $cached_etag = str_replace(['"', "-gzip"], ['', ''], stripslashes($_SERVER['HTTP_IF_NONE_MATCH']));