Merge remote-tracking branch 'upstream/2022.09-rc' into quote-uri-id
This commit is contained in:
commit
88aceeb27f
40
CHANGELOG
40
CHANGELOG
|
@ -1,10 +1,48 @@
|
|||
Version 2022.09 (unreleased)
|
||||
Friendica Core
|
||||
Added GD translation, updates to the translations AR, DE, FR, HU, PL, SV, ZH CN
|
||||
Added a check for too long passwords (due Blowfish hashing algorithm) [MrPetovan]
|
||||
Added an API endpoint to create events [MrPetovan, pankraz]
|
||||
Added the possibility to store profile avatars in a separate directory [annando]
|
||||
Added an option to not fetch parent postings [annando]
|
||||
Added an option to reject postings by language received by the relay [annando]
|
||||
Added a notification mail to all users when the server block list is updated [MrPetovan]
|
||||
Added a download link to the CSV file of the server block list on the about page [MrPetovan]
|
||||
Added support for youtube short URLs [annando]
|
||||
Updates to the themes (frio, smoothly) [AlessandroLorenzi, HankG, MrPetovan, tobiasd]
|
||||
General code cleanup [annando, fabrixxm, Quix0r, tobiasd]
|
||||
Enhanced the performance (cache, database, rendering) [annando, Quix0r]
|
||||
Enhanced the language detection [annando]
|
||||
Enhanced the display of the reason why a posting is shown to a user [annando]
|
||||
Enhanced the fetching of missing postings [annando]
|
||||
Enhanced the server detection [annando]
|
||||
Enhanced the UI for 2FA logins [nupplaphil]
|
||||
Enhanced the Woodpecker integration [nupplaphil]
|
||||
Enhanced integration with ejabberd [nupplaphil]
|
||||
Fixed a federation problem with Diaspora* during the author signature check [annando]
|
||||
Fixed a problem with Forwarded-For headers [nupplaphil]
|
||||
Fixed a problem with the encoding of mails send [MrPetovan]
|
||||
Fixed a problem with weird formatted date notations [annando, MrPetovan]
|
||||
Fixed a problem following some RSS feeds [mexon]
|
||||
Fixed a problem with quoted reshares from Twitter [annando]
|
||||
Updated dependencies [MrPetovan]
|
||||
Replace SFTP-publish with docker-publish [nupplaphil]
|
||||
Removed the poke functionality [MrPetovan]
|
||||
|
||||
Friendica Addons
|
||||
Added GD translation, updates to the translation AR, FR
|
||||
Removed the addons: morechoice, morepokes
|
||||
Marked the addon whindowsphonepush as unsupported
|
||||
twitter:
|
||||
Valid post body can be empty [MrPetovan]
|
||||
Support of Twitter threads was added [annando]
|
||||
|
||||
Closed Issues
|
||||
|
||||
11177, 11317, 11458, 11471, 11566, 11614, 11625, 11635, 11636, 11638,
|
||||
11651, 11661, 11666, 11695, 11700, 11704, 11706, 11708, 11712, 11716,
|
||||
11722, 11723, 11724, 11726, 11731, 11732, 11751, 11765, 11775, 11778,
|
||||
11779, 11794, 11798, 11799, 11800, 11824, 11826, 11851, 11861, 11870,
|
||||
11909, 11920, 11931, 11938, 11943, 11952, 11953, 11969, 11975
|
||||
|
||||
Version 2022.06 (2022-06-11)
|
||||
Friendica Core
|
||||
|
|
|
@ -656,8 +656,12 @@ class Item
|
|||
*/
|
||||
public function createSharedBlockByArray(array $item): string
|
||||
{
|
||||
if (!in_array($item['network'] ?? '', Protocol::FEDERATED)) {
|
||||
if ($item['network'] == Protocol::FEED) {
|
||||
return PageInfo::getFooterFromUrl($item['plink']);
|
||||
} elseif (!in_array($item['network'] ?? '', Protocol::FEDERATED)) {
|
||||
$item['guid'] = '';
|
||||
$item['uri'] = '';
|
||||
$item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
|
||||
}
|
||||
|
||||
$shared_content = BBCode::getShareOpeningTag($item['author-name'], $item['author-link'], $item['author-avatar'], $item['plink'], $item['created'], $item['guid'], $item['uri']);
|
||||
|
@ -666,8 +670,14 @@ class Item
|
|||
$shared_content .= '[h3]' . $item['title'] . "[/h3]\n";
|
||||
}
|
||||
|
||||
$shared = BBCode::fetchShareAttributes($item['body']);
|
||||
|
||||
// If it is a reshared post then reformat it to avoid display problems with two share elements
|
||||
if (Diaspora::isReshare($item['body'], false)) {
|
||||
if (!empty($shared['guid']) && ($encaspulated_share = self::createSharedPostByGuid($shared['guid']))) {
|
||||
$item['body'] = preg_replace("/\[share.*?\](.*)\[\/share\]/ism", $encaspulated_share, $item['body']);
|
||||
}
|
||||
|
||||
$item['body'] = HTML::toBBCode(BBCode::convertForUriId($item['uri-id'], $item['body'], BBCode::ACTIVITYPUB));
|
||||
}
|
||||
|
||||
|
|
|
@ -1680,11 +1680,9 @@ class Contact
|
|||
/**
|
||||
* Return the photo path for a given contact array in the given size
|
||||
*
|
||||
* @param array $contact contact array
|
||||
* @param string $field Fieldname of the photo in the contact array
|
||||
* @param array $contact contact array
|
||||
* @param string $size Size of the avatar picture
|
||||
* @param string $avatar Avatar path that is displayed when no photo had been found
|
||||
* @param bool $no_update Don't perfom an update if no cached avatar was found
|
||||
* @param bool $no_update Don't perfom an update if no cached avatar was found
|
||||
* @return string photo path
|
||||
*/
|
||||
private static function getAvatarPath(array $contact, string $size, bool $no_update = false): string
|
||||
|
@ -1711,7 +1709,7 @@ class Contact
|
|||
}
|
||||
}
|
||||
|
||||
return self::getAvatarUrlForId($contact['id'], $size, $contact['updated'] ?? '');
|
||||
return self::getAvatarUrlForId($contact['id'] ?? 0, $size, $contact['updated'] ?? '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -580,7 +580,7 @@ class Event
|
|||
$last_date = '';
|
||||
$fmt = DI::l10n()->t('l, F j');
|
||||
foreach ($event_result as $event) {
|
||||
$item = Post::selectFirst(['plink', 'author-name', 'author-avatar', 'author-link', 'private', 'uri-id'], ['id' => $event['itemid']]);
|
||||
$item = Post::selectFirst(['plink', 'author-name', 'author-network', 'author-id', 'author-avatar', 'author-link', 'private', 'uri-id'], ['id' => $event['itemid']]);
|
||||
if (!DBA::isResult($item)) {
|
||||
// Using default values when no item had been found
|
||||
$item = ['plink' => '', 'author-name' => '', 'author-avatar' => '', 'author-link' => '', 'private' => Item::PUBLIC, 'uri-id' => ($event['uri-id'] ?? 0)];
|
||||
|
|
|
@ -648,11 +648,13 @@ class Media
|
|||
/**
|
||||
* Add media attachments to the body
|
||||
*
|
||||
* @param int $uriid
|
||||
* @param int $uriid
|
||||
* @param string $body
|
||||
* @param array $types
|
||||
*
|
||||
* @return string body
|
||||
*/
|
||||
public static function addAttachmentsToBody(int $uriid, string $body = ''): string
|
||||
public static function addAttachmentsToBody(int $uriid, string $body = '', array $types = [self::IMAGE, self::AUDIO, self::VIDEO]): string
|
||||
{
|
||||
if (empty($body)) {
|
||||
$item = Post::selectFirst(['body'], ['uri-id' => $uriid]);
|
||||
|
@ -665,7 +667,7 @@ class Media
|
|||
|
||||
$body = preg_replace("/\s*\[attachment .*?\].*?\[\/attachment\]\s*/ism", '', $body);
|
||||
|
||||
foreach (self::getByURIId($uriid, [self::IMAGE, self::AUDIO, self::VIDEO]) as $media) {
|
||||
foreach (self::getByURIId($uriid, $types) as $media) {
|
||||
if (Item::containsLink($body, $media['preview'] ?? $media['url'], $media['type'])) {
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user