mirror of
https://github.com/friendica/friendica
synced 2025-04-26 21:10:16 +00:00
Merge remote-tracking branch 'upstream/develop' into move-delivery
This commit is contained in:
commit
4eceb2d26f
37 changed files with 712 additions and 132 deletions
|
@ -624,7 +624,7 @@ class Contact
|
|||
public static function getPublicAndUserContactID(int $cid, int $uid): array
|
||||
{
|
||||
// We have to use the legacy function as long as the post update hasn't finished
|
||||
if (DI::config()->get('system', 'post_update_version') < 1427) {
|
||||
if (DI::keyValue()->get('post_update_version') < 1427) {
|
||||
return self::legacyGetPublicAndUserContactID($cid, $uid);
|
||||
}
|
||||
|
||||
|
@ -2953,7 +2953,7 @@ class Contact
|
|||
}
|
||||
|
||||
if (($network != '') && ($ret['network'] != $network)) {
|
||||
Logger::notice('Expected network ' . $network . ' does not match actual network ' . $ret['network']);
|
||||
$result['message'] = DI::l10n()->t('Expected network %s does not match actual network %s', $network, $ret['network']);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
|
@ -2145,7 +2145,7 @@ class GServer
|
|||
*/
|
||||
private static function discoverFederation()
|
||||
{
|
||||
$last = DI::config()->get('poco', 'last_federation_discovery');
|
||||
$last = DI::keyValue()->get('poco_last_federation_discovery');
|
||||
|
||||
if ($last) {
|
||||
$next = $last + (24 * 60 * 60);
|
||||
|
@ -2189,7 +2189,7 @@ class GServer
|
|||
}
|
||||
}
|
||||
|
||||
DI::config()->set('poco', 'last_federation_discovery', time());
|
||||
DI::keyValue()->set('poco_last_federation_discovery', time());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3016,6 +3016,8 @@ class Item
|
|||
$item['hashtags'] = $tags['hashtags'];
|
||||
$item['mentions'] = $tags['mentions'];
|
||||
|
||||
$item['body'] = preg_replace("#\s*\[attachment .*?].*?\[/attachment]\s*#ism", "\n", $item['body']);
|
||||
|
||||
if (!$is_preview) {
|
||||
$item['body'] = Post\Media::removeFromEndOfBody($item['body'] ?? '');
|
||||
}
|
||||
|
@ -3065,8 +3067,6 @@ class Item
|
|||
$attachments = Post\Media::splitAttachments($item['uri-id'], $shared_links, $item['has-media'] ?? false);
|
||||
$item['body'] = self::replaceVisualAttachments($attachments, $item['body'] ?? '');
|
||||
|
||||
$item['body'] = preg_replace("/\s*\[attachment .*?\].*?\[\/attachment\]\s*/ism", "\n", $item['body']);
|
||||
|
||||
self::putInCache($item);
|
||||
$item['body'] = $body;
|
||||
$s = $item["rendered-html"];
|
||||
|
@ -3166,7 +3166,7 @@ class Item
|
|||
],
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Check if the body contains a link
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue