From 70540e59e16cd4cabe5d51683628dc9fbb5a2be4 Mon Sep 17 00:00:00 2001
From: Steffen K9
Date: Wed, 7 Jun 2023 17:52:15 +0200
Subject: [PATCH 01/18] Remove reference to nonexistent CSS file
This removes the only occasion I found for the nonexistent file `/view/js/button/frio.css`.
Fixes #13201
---
view/theme/frio/templates/head.tpl | 2 --
1 file changed, 2 deletions(-)
diff --git a/view/theme/frio/templates/head.tpl b/view/theme/frio/templates/head.tpl
index 9e960bdc98..742a5203b8 100644
--- a/view/theme/frio/templates/head.tpl
+++ b/view/theme/frio/templates/head.tpl
@@ -51,8 +51,6 @@
type="text/css" media="screen" />
-
{{* own css files *}}
Date: Fri, 9 Jun 2023 01:37:20 -0400
Subject: [PATCH 02/18] Fix to on this day
Thanks to my system messing up I thought it was working right.
---
src/Content/Widget.php | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/Content/Widget.php b/src/Content/Widget.php
index 6b44a62eb7..abb125027a 100644
--- a/src/Content/Widget.php
+++ b/src/Content/Widget.php
@@ -472,6 +472,8 @@ class Widget
// Set the start and end date to the beginning of the month
$cutoffday = $dthen;
$thisday = substr($dnow, 4);
+ $nextday = date('Y-m-d', strtotime($dnow. ' + 1 day'));
+ $nextday = substr($nextday, 4);
$dnow = substr($dnow, 0, 8) . '01';
$dthen = substr($dthen, 0, 8) . '01';
@@ -517,6 +519,7 @@ class Widget
'$showmore' => DI::l10n()->t('show more'),
'$onthisdate' => DI::l10n()->t('On this date'),
'$thisday' => $thisday,
+ '$nextday' => $nextday,
'$cutoffday' => $cutoffday
]);
From 14b83def602fd529fd9cdac1eccef6a01a87167b Mon Sep 17 00:00:00 2001
From: anubis2814 <57196483+anubis2814@users.noreply.github.com>
Date: Fri, 9 Jun 2023 01:39:07 -0400
Subject: [PATCH 03/18] Fix to on this day
---
view/templates/widget/posted_date.tpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/view/templates/widget/posted_date.tpl b/view/templates/widget/posted_date.tpl
index a488cc8065..3c2380c60d 100644
--- a/view/templates/widget/posted_date.tpl
+++ b/view/templates/widget/posted_date.tpl
@@ -33,7 +33,7 @@ function showHideDates() {
{{if $y|cat:$thisday >= $cutoffday}}
- {{$onthisdate}}
+ {{$onthisdate}}
{{/if}}
{{foreach $arr as $d}}
From 01632b11c7ef5e831fb3984f53b847218e5e70b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roland=20H=C3=A4der?=
Date: Mon, 12 Sep 2022 03:45:19 +0200
Subject: [PATCH 04/18] Changed: - added missing type-hints
---
.../TwoFactor/Model/AppSpecificPassword.php | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/Security/TwoFactor/Model/AppSpecificPassword.php b/src/Security/TwoFactor/Model/AppSpecificPassword.php
index 5c9cd5eadf..affabb3464 100644
--- a/src/Security/TwoFactor/Model/AppSpecificPassword.php
+++ b/src/Security/TwoFactor/Model/AppSpecificPassword.php
@@ -32,12 +32,12 @@ use PragmaRX\Random\Random;
*/
class AppSpecificPassword
{
- public static function countForUser($uid)
+ public static function countForUser(int $uid)
{
return DBA::count('2fa_app_specific_password', ['uid' => $uid]);
}
- public static function checkDuplicateForUser($uid, $description)
+ public static function checkDuplicateForUser(int $uid, string $description): bool
{
return DBA::exists('2fa_app_specific_password', ['uid' => $uid, 'description' => $description]);
}
@@ -50,7 +50,7 @@ class AppSpecificPassword
* @return bool
* @throws \Exception
*/
- public static function authenticateUser($uid, $plaintextPassword)
+ public static function authenticateUser(int $uid, string $plaintextPassword): bool
{
$appSpecificPasswords = self::getListForUser($uid);
@@ -79,7 +79,7 @@ class AppSpecificPassword
* @return array
* @throws \Exception
*/
- public static function getListForUser($uid)
+ public static function getListForUser(int $uid): array
{
$appSpecificPasswordsStmt = DBA::select('2fa_app_specific_password', ['id', 'description', 'hashed_password', 'last_used'], ['uid' => $uid]);
@@ -102,7 +102,7 @@ class AppSpecificPassword
* @return array The new app-specific password data structure with the plaintext password added
* @throws \Exception
*/
- public static function generateForUser(int $uid, $description)
+ public static function generateForUser(int $uid, string $description): array
{
$Random = (new Random())->size(40);
@@ -111,10 +111,10 @@ class AppSpecificPassword
$generated = DateTimeFormat::utcNow();
$fields = [
- 'uid' => $uid,
- 'description' => $description,
+ 'uid' => $uid,
+ 'description' => $description,
'hashed_password' => User::hashPassword($plaintextPassword),
- 'generated' => $generated,
+ 'generated' => $generated,
];
DBA::insert('2fa_app_specific_password', $fields);
@@ -125,7 +125,7 @@ class AppSpecificPassword
return $fields;
}
- private static function update($appSpecificPasswordId, $fields)
+ private static function update(int $appSpecificPasswordId, array $fields)
{
return DBA::update('2fa_app_specific_password', $fields, ['id' => $appSpecificPasswordId]);
}
From 241c221e4b34a5a9cfab6ddcb2d548c4f90b9353 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roland=20H=C3=A4der?=
Date: Mon, 12 Sep 2022 03:54:36 +0200
Subject: [PATCH 05/18] Changed: - added missing type-hints - added some
missing `@return void`
---
src/Security/TwoFactor/Model/RecoveryCode.php | 26 +++++++++++++------
.../TwoFactor/Repository/TrustedBrowser.php | 1 +
2 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/src/Security/TwoFactor/Model/RecoveryCode.php b/src/Security/TwoFactor/Model/RecoveryCode.php
index 2669ae18e4..b3c197f98e 100644
--- a/src/Security/TwoFactor/Model/RecoveryCode.php
+++ b/src/Security/TwoFactor/Model/RecoveryCode.php
@@ -35,10 +35,11 @@ class RecoveryCode
* Returns the number of code the provided users can still use to replace a TOTP code
*
* @param int $uid User ID
+ *
* @return int
* @throws \Exception
*/
- public static function countValidForUser($uid)
+ public static function countValidForUser(int $uid): int
{
return DBA::count('2fa_recovery_codes', ['uid' => $uid, 'used' => null]);
}
@@ -46,12 +47,13 @@ class RecoveryCode
/**
* Checks the provided code is available to use for login by the provided user
*
- * @param int $uid User ID
+ * @param int $uid User ID
* @param string $code
+ *
* @return bool
* @throws \Exception
*/
- public static function existsForUser($uid, $code)
+ public static function existsForUser(int $uid, string $code): bool
{
return DBA::exists('2fa_recovery_codes', ['uid' => $uid, 'code' => $code, 'used' => null]);
}
@@ -60,10 +62,11 @@ class RecoveryCode
* Returns a complete list of all recovery codes for the provided user, including the used status
*
* @param int $uid User ID
+ *
* @return array
* @throws \Exception
*/
- public static function getListForUser($uid)
+ public static function getListForUser(int $uid): array
{
$codesStmt = DBA::select('2fa_recovery_codes', ['code', 'used'], ['uid' => $uid]);
@@ -76,10 +79,11 @@ class RecoveryCode
*
* @param int $uid User ID
* @param string $code
+ *
* @return bool
* @throws \Exception
*/
- public static function markUsedForUser($uid, $code)
+ public static function markUsedForUser(int $uid, string $code): bool
{
DBA::update('2fa_recovery_codes', ['used' => DateTimeFormat::utcNow()], ['uid' => $uid, 'code' => $code, 'used' => null]);
@@ -91,9 +95,11 @@ class RecoveryCode
* Generates 12 codes constituted of 2 blocks of 6 characters separated by a dash.
*
* @param int $uid User ID
+ * @return void
+ *
* @throws \Exception
*/
- public static function generateForUser($uid)
+ public static function generateForUser(int $uid)
{
$Random = (new Random())->pattern('[a-z0-9]');
@@ -120,9 +126,11 @@ class RecoveryCode
* Deletes all the recovery codes for the provided user.
*
* @param int $uid User ID
+ * @return void
+ *
* @throws \Exception
*/
- public static function deleteForUser($uid)
+ public static function deleteForUser(int $uid)
{
DBA::delete('2fa_recovery_codes', ['uid' => $uid]);
}
@@ -131,9 +139,11 @@ class RecoveryCode
* Replaces the existing recovery codes for the provided user by a freshly generated set.
*
* @param int $uid User ID
+ * @return void
+ *
* @throws \Exception
*/
- public static function regenerateForUser($uid)
+ public static function regenerateForUser(int $uid)
{
self::deleteForUser($uid);
self::generateForUser($uid);
diff --git a/src/Security/TwoFactor/Repository/TrustedBrowser.php b/src/Security/TwoFactor/Repository/TrustedBrowser.php
index a261d92ca0..d913be3c9b 100644
--- a/src/Security/TwoFactor/Repository/TrustedBrowser.php
+++ b/src/Security/TwoFactor/Repository/TrustedBrowser.php
@@ -143,6 +143,7 @@ class TrustedBrowser
/**
* @param int $local_user
+ *
* @return bool
*/
public function removeAllForUser(int $local_user): bool
From e9a8882f84a229513f31d5db7abb0c8e2c6b7461 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roland=20H=C3=A4der?=
Date: Thu, 15 Sep 2022 01:43:51 +0200
Subject: [PATCH 06/18] Changes: - reformatted array a bit - double-quote to
single
---
src/Protocol/Diaspora.php | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php
index affb3cf872..758e85e9d0 100644
--- a/src/Protocol/Diaspora.php
+++ b/src/Protocol/Diaspora.php
@@ -2839,7 +2839,7 @@ class Diaspora
public static function buildMagicEnvelope(string $msg, array $user): string
{
$b64url_data = Strings::base64UrlEncode($msg);
- $data = str_replace(["\n", "\r", " ", "\t"], ['', '', '', ''], $b64url_data);
+ $data = str_replace(["\n", "\r", ' ', "\t"], ['', '', '', ''], $b64url_data);
$key_id = Strings::base64UrlEncode(self::myHandle($user));
$type = 'application/xml';
@@ -2857,11 +2857,11 @@ class Diaspora
$xmldata = [
'me:env' => [
- 'me:data' => $data,
- '@attributes' => ['type' => $type],
- 'me:encoding' => $encoding,
- 'me:alg' => $alg,
- 'me:sig' => $sig,
+ 'me:data' => $data,
+ '@attributes' => ['type' => $type],
+ 'me:encoding' => $encoding,
+ 'me:alg' => $alg,
+ 'me:sig' => $sig,
'@attributes2' => ['key_id' => $key_id]
]
];
From d4b25cb3ffdaa824fdf099442bb1acd2fef74f98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roland=20H=C3=A4der?=
Date: Thu, 15 Sep 2022 02:13:36 +0200
Subject: [PATCH 07/18] Changes: - rewrote: ```` $arr[]; $arr['foo'] = $foo;
$arr['bar'] = $bar; ````
To:
````
$arr = [
'foo' => $foo,
'bar' => $bar,
];
````
- "imported" class name instead of referencing it everywhere
- changed some double-quotes to single
---
src/Protocol/Diaspora.php | 87 ++++++++++++++++++---------------------
1 file changed, 40 insertions(+), 47 deletions(-)
diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php
index 758e85e9d0..4549ba643f 100644
--- a/src/Protocol/Diaspora.php
+++ b/src/Protocol/Diaspora.php
@@ -42,6 +42,7 @@ use Friendica\Model\Tag;
use Friendica\Model\User;
use Friendica\Network\HTTPClient\Client\HttpClientAccept;
use Friendica\Network\HTTPException;
+use Friendica\Network\HTTPException\BadRequestException;
use Friendica\Network\Probe;
use Friendica\Protocol\Delivery;
use Friendica\Util\Crypto;
@@ -267,7 +268,7 @@ class Diaspora
if ($no_exit) {
return false;
} else {
- throw new \Friendica\Network\HTTPException\BadRequestException();
+ throw new BadRequestException();
}
}
} else {
@@ -281,7 +282,7 @@ class Diaspora
if ($no_exit) {
return false;
} else {
- throw new \Friendica\Network\HTTPException\BadRequestException();
+ throw new BadRequestException();
}
}
@@ -307,7 +308,7 @@ class Diaspora
if ($no_exit) {
return false;
} else {
- throw new \Friendica\Network\HTTPException\BadRequestException();
+ throw new BadRequestException();
}
}
@@ -322,7 +323,7 @@ class Diaspora
if ($no_exit) {
return false;
} else {
- throw new \Friendica\Network\HTTPException\BadRequestException();
+ throw new BadRequestException();
}
}
@@ -332,7 +333,7 @@ class Diaspora
if ($no_exit) {
return false;
} else {
- throw new \Friendica\Network\HTTPException\BadRequestException();
+ throw new BadRequestException();
}
}
@@ -424,7 +425,7 @@ class Diaspora
if (!$base) {
Logger::notice('unable to locate salmon data in xml');
- throw new \Friendica\Network\HTTPException\BadRequestException();
+ throw new BadRequestException();
}
@@ -444,14 +445,11 @@ class Diaspora
$encoding = $base->encoding;
$alg = $base->alg;
-
$signed_data = $data . '.' . Strings::base64UrlEncode($type) . '.' . Strings::base64UrlEncode($encoding) . '.' . Strings::base64UrlEncode($alg);
-
// decode the data
$data = Strings::base64UrlDecode($data);
-
if ($public) {
$inner_decrypted = $data;
} else {
@@ -467,14 +465,14 @@ class Diaspora
$key = self::key($author);
if (!$key) {
Logger::notice('Could not retrieve author key.');
- throw new \Friendica\Network\HTTPException\BadRequestException();
+ throw new BadRequestException();
}
$verify = Crypto::rsaVerify($signed_data, $signature, $key);
if (!$verify) {
Logger::notice('Message did not verify. Discarding.');
- throw new \Friendica\Network\HTTPException\BadRequestException();
+ throw new BadRequestException();
}
Logger::info('Message verified.');
@@ -499,8 +497,7 @@ class Diaspora
*/
public static function dispatchPublic(array $msg, int $direction)
{
- $enabled = intval(DI::config()->get('system', 'diaspora_enabled'));
- if (!$enabled) {
+ if (!DI::config()->get('system', 'diaspora_enabled')) {
Logger::notice('Diaspora is disabled');
return false;
}
@@ -940,7 +937,7 @@ class Diaspora
{
$item = Post::selectFirst(['id'], ['uid' => $uid, 'guid' => $guid]);
if (DBA::isResult($item)) {
- Logger::notice('Message ' . $guid . ' already exists for user ' . $uid);
+ Logger::notice('Message already exists.', ['uid' => $uid, 'guid' => $guid, 'id' => $item['id']]);
return $item['id'];
}
@@ -951,6 +948,7 @@ class Diaspora
* Checks for links to posts in a message
*
* @param array $item The item array
+ *
* @return void
*/
private static function fetchGuid(array $item)
@@ -2569,19 +2567,21 @@ class Diaspora
*
* @param int $uriid
* @param object $photo
+ *
* @return void
*/
private static function storePhotoAsMedia(int $uriid, $photo)
{
// @TODO Need to find object type, roland@f.haeder.net
Logger::debug('photo=' . get_class($photo));
- $data = [];
- $data['uri-id'] = $uriid;
- $data['type'] = Post\Media::IMAGE;
- $data['url'] = XML::unescape($photo->remote_photo_path) . XML::unescape($photo->remote_photo_name);
- $data['height'] = (int)XML::unescape($photo->height ?? 0);
- $data['width'] = (int)XML::unescape($photo->width ?? 0);
- $data['description'] = XML::unescape($photo->text ?? '');
+ $data = [
+ 'uri-id' => $uriid,
+ 'type' => Post\Media::IMAGE,
+ 'url' => XML::unescape($photo->remote_photo_path) . XML::unescape($photo->remote_photo_name),
+ 'height' => (int)XML::unescape($photo->height ?? 0),
+ 'width' => (int)XML::unescape($photo->width ?? 0),
+ 'description' => XML::unescape($photo->text ?? ''),
+ ];
Post\Media::insert($data);
}
@@ -2653,7 +2653,25 @@ class Diaspora
$raw_body = $body = Markdown::toBBCode($text);
- $datarray = [];
+ $datarray = [
+ 'guid' => $guid,
+ 'uri-id' => ItemURI::insert(['uri' => $guid, 'guid' => $guid]),
+ 'uid' => $importer['uid'],
+ 'contact-id' => $contact['id'],
+ 'network' => Protocol::DIASPORA,
+ 'author-link' => $contact['url'],
+ 'author-id' => Contact::getIdForURL($contact['url'], 0),
+ 'verb' => Activity::POST,
+ 'gravity' => Item::GRAVITY_PARENT,
+ 'protocol' => Conversation::PARCEL_DIASPORA,
+ 'source' => $xml,
+ 'body' => self::replacePeopleGuid($body, $contact['url']),
+ 'raw-body' => self::replacePeopleGuid($raw_body, $contact['url']),
+ 'private' => (($public == 'false') ? Item::PRIVATE : Item::PUBLIC),
+ // Default is note (aka. comment), later below is being checked the real type
+ 'object-type' => Activity\ObjectType::NOTE,
+ 'post-type' => Item::PT_NOTE,
+ ];
$datarray['guid'] = $guid;
$datarray['uri'] = $datarray['thr-parent'] = self::getUriFromGuid($guid, $author);
@@ -2670,9 +2688,6 @@ class Diaspora
} elseif ($data->poll) {
$datarray['object-type'] = Activity\ObjectType::NOTE;
$datarray['post-type'] = Item::PT_POLL;
- } else {
- $datarray['object-type'] = Activity\ObjectType::NOTE;
- $datarray['post-type'] = Item::PT_NOTE;
}
/// @todo enable support for polls
@@ -2684,27 +2699,6 @@ class Diaspora
/// @todo enable support for events
- $datarray['uid'] = $importer['uid'];
- $datarray['contact-id'] = $contact['id'];
- $datarray['network'] = Protocol::DIASPORA;
-
- $datarray['author-link'] = $contact['url'];
- $datarray['author-id'] = Contact::getIdForURL($contact['url'], 0);
-
- $datarray['owner-link'] = $datarray['author-link'];
- $datarray['owner-id'] = $datarray['author-id'];
-
- $datarray['verb'] = Activity::POST;
- $datarray['gravity'] = Item::GRAVITY_PARENT;
-
- $datarray['protocol'] = Conversation::PARCEL_DIASPORA;
- $datarray['source'] = $xml;
-
- $datarray = self::setDirection($datarray, $direction);
-
- $datarray['body'] = self::replacePeopleGuid($body, $contact['url']);
- $datarray['raw-body'] = self::replacePeopleGuid($raw_body, $contact['url']);
-
self::storeMentions($datarray['uri-id'], $text);
Tag::storeRawTagsFromBody($datarray['uri-id'], $datarray['body']);
@@ -2718,7 +2712,6 @@ class Diaspora
}
$datarray['plink'] = self::plink($author, $guid);
- $datarray['private'] = (($public == 'false') ? Item::PRIVATE : Item::PUBLIC);
$datarray['changed'] = $datarray['created'] = $datarray['edited'] = $created_at;
if (isset($address['address'])) {
From 99a92db0aabce204ccb0c7a15f234b71120bc1b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roland=20H=C3=A4der?=
Date: Thu, 15 Sep 2022 02:33:36 +0200
Subject: [PATCH 08/18] Changed: - array initialization
---
src/Protocol/OStatus.php | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php
index ff8fc3cbea..3d35394b92 100644
--- a/src/Protocol/OStatus.php
+++ b/src/Protocol/OStatus.php
@@ -385,12 +385,14 @@ class OStatus
}
}
- $header = [];
- $header['uid'] = $importer['uid'];
- $header['network'] = Protocol::OSTATUS;
- $header['wall'] = 0;
- $header['origin'] = 0;
- $header['gravity'] = Item::GRAVITY_COMMENT;
+ // Initial header elements
+ $header = [
+ 'uid' => $importer['uid'],
+ 'network' => Protocol::OSTATUS,
+ 'wall' => 0,
+ 'origin' => 0,
+ 'gravity' => Item::GRAVITY_COMMENT,
+ ];
if (!is_object($doc->firstChild) || empty($doc->firstChild->tagName)) {
return false;
From c5a4a07a5505f3f8bb8c780ea275a938851e4e62 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roland=20H=C3=A4der?=
Date: Fri, 16 Sep 2022 17:37:24 +0200
Subject: [PATCH 09/18] Changed: - added missing type-hints - changed array
initialization
---
src/Network/Probe.php | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/Network/Probe.php b/src/Network/Probe.php
index b1931ae6d3..bd98f39103 100644
--- a/src/Network/Probe.php
+++ b/src/Network/Probe.php
@@ -346,6 +346,7 @@ class Probe
* @return array uri data
* @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
+ * @todo Choice: implement $cache parameter or remove documentation
*/
public static function uri(string $uri, string $network = '', int $uid = -1): array
{
@@ -1181,7 +1182,6 @@ class Probe
$data = self::pollHcard($profile_link, $data, true);
}
- $prof_data = [];
if (empty($data['addr']) || empty($data['nick'])) {
$probe_data = self::uri($profile_link);
@@ -1189,15 +1189,17 @@ class Probe
$data['nick'] = ($data['nick'] ?? '') ?: $probe_data['nick'];
}
- $prof_data['addr'] = $data['addr'];
- $prof_data['nick'] = $data['nick'];
- $prof_data['dfrn-request'] = $data['request'] ?? null;
- $prof_data['dfrn-confirm'] = $data['confirm'] ?? null;
- $prof_data['dfrn-notify'] = $data['notify'] ?? null;
- $prof_data['dfrn-poll'] = $data['poll'] ?? null;
- $prof_data['photo'] = $data['photo'] ?? null;
- $prof_data['fn'] = $data['name'] ?? null;
- $prof_data['key'] = $data['pubkey'] ?? null;
+ $prof_data = [
+ 'addr' => $data['addr'],
+ 'nick' => $data['nick'],
+ 'dfrn-request' => $data['request'] ?? null,
+ 'dfrn-confirm' => $data['confirm'] ?? null,
+ 'dfrn-notify' => $data['notify'] ?? null,
+ 'dfrn-poll' => $data['poll'] ?? null,
+ 'photo' => $data['photo'] ?? null,
+ 'fn' => $data['name'] ?? null,
+ 'key' => $data['pubkey'] ?? null,
+ ];
Logger::debug('Result', ['link' => $profile_link, 'data' => $prof_data]);
From 80afe13a260d2a765fb7e98c661853a05b95eb06 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roland=20H=C3=A4der?=
Date: Thu, 22 Sep 2022 00:21:42 +0200
Subject: [PATCH 10/18] Changed: - added missing type-hint
---
src/Model/Contact.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Model/Contact.php b/src/Model/Contact.php
index 720d2638c4..925cc81798 100644
--- a/src/Model/Contact.php
+++ b/src/Model/Contact.php
@@ -2560,7 +2560,7 @@ class Contact
* @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
- public static function updateFromProbe(int $id, string $network = '')
+ public static function updateFromProbe(int $id, string $network = ''): bool
{
$contact = DBA::selectFirst('contact', ['uid', 'url'], ['id' => $id]);
if (!DBA::isResult($contact)) {
From 993d45d2f5617fab07c74e3b19849b459290674a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roland=20H=C3=A4der?=
Date: Sun, 20 Nov 2022 13:57:53 +0100
Subject: [PATCH 11/18] Continued: - replace double-quotes with single
---
src/Database/Database.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Database/Database.php b/src/Database/Database.php
index 78a534ead8..9366f1b314 100644
--- a/src/Database/Database.php
+++ b/src/Database/Database.php
@@ -752,8 +752,8 @@ class Database
@file_put_contents(
$this->config->get('system', 'db_log'),
DateTimeFormat::utcNow() . "\t" . $duration . "\t" .
- basename($backtrace[1]["file"]) . "\t" .
- $backtrace[1]["line"] . "\t" . $backtrace[2]["function"] . "\t" .
+ basename($backtrace[1]['file']) . "\t" .
+ $backtrace[1]['line'] . "\t" . $backtrace[2]['function'] . "\t" .
substr($this->replaceParameters($sql, $args), 0, 4000) . "\n",
FILE_APPEND
);
From 2632875bab6376cd4ae5361676596ef004b13e6a Mon Sep 17 00:00:00 2001
From: anubis2814 <57196483+anubis2814@users.noreply.github.com>
Date: Fri, 9 Jun 2023 16:07:11 -0400
Subject: [PATCH 12/18] Update src/Content/Widget.php
Co-authored-by: Hypolite Petovan
---
src/Content/Widget.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Content/Widget.php b/src/Content/Widget.php
index abb125027a..c18a3041b0 100644
--- a/src/Content/Widget.php
+++ b/src/Content/Widget.php
@@ -472,7 +472,7 @@ class Widget
// Set the start and end date to the beginning of the month
$cutoffday = $dthen;
$thisday = substr($dnow, 4);
- $nextday = date('Y-m-d', strtotime($dnow. ' + 1 day'));
+ $nextday = date('Y-m-d', strtotime($dnow . ' + 1 day'));
$nextday = substr($nextday, 4);
$dnow = substr($dnow, 0, 8) . '01';
$dthen = substr($dthen, 0, 8) . '01';
From 818a7fb451a2f2604899d97859b996999a4662d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roland=20H=C3=A4der?=
Date: Fri, 9 Jun 2023 22:19:48 +0200
Subject: [PATCH 13/18] Fixed some stuff from PR #13208 feedback: -
HTTPException is already imported - same-value-assignment not needed
---
src/Network/Probe.php | 2 --
src/Protocol/Diaspora.php | 18 ++++++++----------
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/src/Network/Probe.php b/src/Network/Probe.php
index bd98f39103..2b5cc3cff7 100644
--- a/src/Network/Probe.php
+++ b/src/Network/Probe.php
@@ -341,12 +341,10 @@ class Probe
* @param string $uri Address that should be probed
* @param string $network Test for this specific network
* @param integer $uid User ID for the probe (only used for mails)
- * @param boolean $cache Use cached values?
*
* @return array uri data
* @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
- * @todo Choice: implement $cache parameter or remove documentation
*/
public static function uri(string $uri, string $network = '', int $uid = -1): array
{
diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php
index 4549ba643f..abe56cb9a1 100644
--- a/src/Protocol/Diaspora.php
+++ b/src/Protocol/Diaspora.php
@@ -42,7 +42,6 @@ use Friendica\Model\Tag;
use Friendica\Model\User;
use Friendica\Network\HTTPClient\Client\HttpClientAccept;
use Friendica\Network\HTTPException;
-use Friendica\Network\HTTPException\BadRequestException;
use Friendica\Network\Probe;
use Friendica\Protocol\Delivery;
use Friendica\Util\Crypto;
@@ -268,7 +267,7 @@ class Diaspora
if ($no_exit) {
return false;
} else {
- throw new BadRequestException();
+ throw new HTTPException\BadRequestException();
}
}
} else {
@@ -282,7 +281,7 @@ class Diaspora
if ($no_exit) {
return false;
} else {
- throw new BadRequestException();
+ throw new HTTPException\BadRequestException();
}
}
@@ -308,7 +307,7 @@ class Diaspora
if ($no_exit) {
return false;
} else {
- throw new BadRequestException();
+ throw new HTTPException\BadRequestException();
}
}
@@ -323,7 +322,7 @@ class Diaspora
if ($no_exit) {
return false;
} else {
- throw new BadRequestException();
+ throw new HTTPException\BadRequestException();
}
}
@@ -333,7 +332,7 @@ class Diaspora
if ($no_exit) {
return false;
} else {
- throw new BadRequestException();
+ throw new HTTPException\BadRequestException();
}
}
@@ -425,7 +424,7 @@ class Diaspora
if (!$base) {
Logger::notice('unable to locate salmon data in xml');
- throw new BadRequestException();
+ throw new HTTPException\BadRequestException();
}
@@ -465,14 +464,14 @@ class Diaspora
$key = self::key($author);
if (!$key) {
Logger::notice('Could not retrieve author key.');
- throw new BadRequestException();
+ throw new HTTPException\BadRequestException();
}
$verify = Crypto::rsaVerify($signed_data, $signature, $key);
if (!$verify) {
Logger::notice('Message did not verify. Discarding.');
- throw new BadRequestException();
+ throw new HTTPException\BadRequestException();
}
Logger::info('Message verified.');
@@ -2686,7 +2685,6 @@ class Diaspora
$datarray['object-type'] = Activity\ObjectType::IMAGE;
$datarray['post-type'] = Item::PT_IMAGE;
} elseif ($data->poll) {
- $datarray['object-type'] = Activity\ObjectType::NOTE;
$datarray['post-type'] = Item::PT_POLL;
}
From 32755444ed3868a63a019bf18324a2cbf699ff8e Mon Sep 17 00:00:00 2001
From: Jonathan Lamothe
Date: Mon, 12 Jun 2023 23:45:46 -0400
Subject: [PATCH 14/18] fixed spelling of Cheshire
---
view/js/country.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/view/js/country.js b/view/js/country.js
index 83123e4cb8..65497fdbfc 100644
--- a/view/js/country.js
+++ b/view/js/country.js
@@ -260,7 +260,7 @@ aStates[233]="|Tuvalu";
aStates[234]="|Adjumani|Apac|Arua|Bugiri|Bundibugyo|Bushenyi|Busia|Gulu|Hoima|Iganga|Jinja|Kabale|Kabarole|Kalangala|Kampala|Kamuli|Kapchorwa|Kasese|Katakwi|Kibale|Kiboga|Kisoro|Kitgum|Kotido|Kumi|Lira|Luwero|Masaka|Masindi|Mbale|Mbarara|Moroto|Moyo|Mpigi|Mubende|Mukono|Nakasongola|Nebbi|Ntungamo|Pallisa|Rakai|Rukungiri|Sembabule|Soroti|Tororo";
aStates[235]="|Avtonomna Respublika Krym (Simferopol')|Cherkas'ka (Cherkasy)|Chernihivs'ka (Chernihiv)|Chernivets'ka (Chernivtsi)|Dnipropetrovs'ka (Dnipropetrovs'k)|Donets'ka (Donets'k)|Ivano-Frankivs'ka (Ivano-Frankivs'k)|Kharkivs'ka (Kharkiv)|Khersons'ka (Kherson)|Khmel'nyts'ka (Khmel'nyts'kyy)|Kirovohrads'ka (Kirovohrad)|Kyyiv|Kyyivs'ka (Kiev)|L'vivs'ka (L'viv)|Luhans'ka (Luhans'k)|Mykolayivs'ka (Mykolayiv)|Odes'ka (Odesa)|Poltavs'ka (Poltava)|Rivnens'ka (Rivne)|Sevastopol'|Sums'ka (Sumy)|Ternopil's'ka (Ternopil')|Vinnyts'ka (Vinnytsya)|Volyns'ka (Luts'k)|Zakarpats'ka (Uzhhorod)|Zaporiz'ka (Zaporizhzhya)|Zhytomyrs'ka (Zhytomyr)"
aStates[236]="|'Ajman|Abu Zaby (Abu Dhabi)|Al Fujayrah|Ash Shariqah (Sharjah)|Dubayy (Dubai)|Ra's al Khaymah|Umm al Qaywayn";
-aStates[237]="|Aberdeen|Aberdeenshire|Anglesey|Angus|Antrim|Argyl|Armagh|Avon|Ayrshire|Banffshire|Bedfordshire|Belfast|Berwickshire|Brecknockshire|Bristol|Buckinghamshire|Bute|Caernarfonshire|Cardiganshire|Caithness|Cambridgeshire|Carmarthenshire|Chesire|Clackmannashire|Cleveland|Clwyd|Cornwall|Cromartyshire|Cumberland|Cumbria|Denbighshire|Derbyshire|Devon|Dfyed|Dorset|Down|Dumfriesshire|Dunbartonshire|Dundee|Durham|East Lothian|East Suffolk|Derry|East Sussex|Edinburgh|Essex|Fermanagh|Fife|Flintshire|Glasgow|Glamorgan|Gloucestershire|Greater London|Greater Manchester|Gwent|Gwynedd|Hampshire|Hereford and Worcester|Herefordshire|Inverness-shire|Hertfordshire|Humberside|Huntingdon and Peterborough|Huntingdonshire|Isle of Ely|Isle of Wight|Kent|Kincardineshire|Kincross-shire|Kirkcudbrightshire|Lanarkshire|Lancashire|Leicestershire|Lincolnshire|London|Londonderry|Merionethshire|Merseyside|Middlesex|Mid Glamorgan|Midlothian|Monmouthshire|Montgomeryshire|Moray|Nairnshire|Norfolk|Northamptonshire|Northumberland|North Humberside|North Yorkshire|Nottinghamshire|Orkney|Oxfordshire|Peeblesshire|Pembrokeshire|Perthshire|Powys|Radnorshire|Renfrewshire|Ross And Cromarty|Ross-shire|Roxburghshire|Selkirkshire|Shetland|Stirlingshire|Sutherland|Soke of Peterborough|Rutland|Shropshire|Somerset|South Glamorgan|South Humberside|South Yorkshire|Staffordshite|Suffolk|Surrey|Sussex|Tyne and Wear|Tyrone|Warwickshire|West Glamorgan|West Lothian|West Midlands|Westmorland|West Suffolk|West Sussex|West Yorkshire|Wigtownshire|Wiltshire|Worcestershire|Yorkshire";
+aStates[237]="|Aberdeen|Aberdeenshire|Anglesey|Angus|Antrim|Argyl|Armagh|Avon|Ayrshire|Banffshire|Bedfordshire|Belfast|Berwickshire|Brecknockshire|Bristol|Buckinghamshire|Bute|Caernarfonshire|Cardiganshire|Caithness|Cambridgeshire|Carmarthenshire|Cheshire|Clackmannashire|Cleveland|Clwyd|Cornwall|Cromartyshire|Cumberland|Cumbria|Denbighshire|Derbyshire|Devon|Dfyed|Dorset|Down|Dumfriesshire|Dunbartonshire|Dundee|Durham|East Lothian|East Suffolk|Derry|East Sussex|Edinburgh|Essex|Fermanagh|Fife|Flintshire|Glasgow|Glamorgan|Gloucestershire|Greater London|Greater Manchester|Gwent|Gwynedd|Hampshire|Hereford and Worcester|Herefordshire|Inverness-shire|Hertfordshire|Humberside|Huntingdon and Peterborough|Huntingdonshire|Isle of Ely|Isle of Wight|Kent|Kincardineshire|Kincross-shire|Kirkcudbrightshire|Lanarkshire|Lancashire|Leicestershire|Lincolnshire|London|Londonderry|Merionethshire|Merseyside|Middlesex|Mid Glamorgan|Midlothian|Monmouthshire|Montgomeryshire|Moray|Nairnshire|Norfolk|Northamptonshire|Northumberland|North Humberside|North Yorkshire|Nottinghamshire|Orkney|Oxfordshire|Peeblesshire|Pembrokeshire|Perthshire|Powys|Radnorshire|Renfrewshire|Ross And Cromarty|Ross-shire|Roxburghshire|Selkirkshire|Shetland|Stirlingshire|Sutherland|Soke of Peterborough|Rutland|Shropshire|Somerset|South Glamorgan|South Humberside|South Yorkshire|Staffordshite|Suffolk|Surrey|Sussex|Tyne and Wear|Tyrone|Warwickshire|West Glamorgan|West Lothian|West Midlands|Westmorland|West Suffolk|West Sussex|West Yorkshire|Wigtownshire|Wiltshire|Worcestershire|Yorkshire";
aStates[238]="|Artigas|Canelones|Cerro Largo|Colonia|Durazno|Flores|Florida|Lavalleja|Maldonado|Montevideo|Paysandu|Rio Negro|Rivera|Rocha|Salto|San Jose|Soriano|Tacuarembo|Treinta y Tres";
aStates[239]="|Alabama|Alaska|Arizona|Arkansas|California|Colorado|Connecticut|Delaware|District of Columbia|Florida|Georgia|Hawaii|Idaho|Illinois|Indiana|Iowa|Kansas|Kentucky|Louisiana|Maine|Maryland|Massachusetts|Michigan|Minnesota|Mississippi|Missouri|Montana|Nebraska|Nevada|New Hampshire|New Jersey|New Mexico|New York|North Carolina|North Dakota|Ohio|Oklahoma|Oregon|Pennsylvania|Rhode Island|South Carolina|South Dakota|Tennessee|Texas|Utah|Vermont|Virginia|Washington|West Virginia|Wisconsin|Wyoming";
aStates[240]="|Andijon Wiloyati|Bukhoro Wiloyati|Farghona Wiloyati|Jizzakh Wiloyati|Khorazm Wiloyati (Urganch)|Namangan Wiloyati|Nawoiy Wiloyati|Qashqadaryo Wiloyati (Qarshi)|Qoraqalpoghiston (Nukus)|Samarqand Wiloyati|Sirdaryo Wiloyati (Guliston)|Surkhondaryo Wiloyati (Termiz)|Toshkent Shahri|Toshkent Wiloyati";
From 1f06089e5e3d915f2846e9dd422221bd6b25ad9a Mon Sep 17 00:00:00 2001
From: Anubis2814
Date: Thu, 15 Jun 2023 12:55:54 -0400
Subject: [PATCH 15/18] Added content warning button
---
src/Content/Conversation.php | 1 +
src/Module/Item/Compose.php | 3 +-
src/Object/Post.php | 1 +
view/lang/C/messages.po | 203 +++++++++++----------
view/templates/item/compose.tpl | 3 +
view/theme/frio/templates/comment_item.tpl | 3 +
view/theme/frio/templates/jot.tpl | 1 +
7 files changed, 115 insertions(+), 100 deletions(-)
diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php
index e0205d3d09..151002e5cb 100644
--- a/src/Content/Conversation.php
+++ b/src/Content/Conversation.php
@@ -366,6 +366,7 @@ class Conversation
'$eduline' => $this->l10n->t('Underline'),
'$edquote' => $this->l10n->t('Quote'),
'$edemojis' => $this->l10n->t('Add emojis'),
+ '$contentwarn' => $this->l10n->t('Content Warning'),
'$edcode' => $this->l10n->t('Code'),
'$edimg' => $this->l10n->t('Image'),
'$edurl' => $this->l10n->t('Link'),
diff --git a/src/Module/Item/Compose.php b/src/Module/Item/Compose.php
index 6766cb5e51..76a99750a1 100644
--- a/src/Module/Item/Compose.php
+++ b/src/Module/Item/Compose.php
@@ -191,7 +191,8 @@ class Compose extends BaseModule
'editalic' => $this->l10n->t('Italic'),
'eduline' => $this->l10n->t('Underline'),
'edquote' => $this->l10n->t('Quote'),
- '$edemojis' => $this->l10n->t('Add emojis'),
+ 'edemojis' => $this->l10n->t('Add emojis'),
+ 'contentwarn' => $this->l10n->t('Content Warning'),
'edcode' => $this->l10n->t('Code'),
'edimg' => $this->l10n->t('Image'),
'edurl' => $this->l10n->t('Link'),
diff --git a/src/Object/Post.php b/src/Object/Post.php
index 1fa7588b41..3fc9f00f7f 100644
--- a/src/Object/Post.php
+++ b/src/Object/Post.php
@@ -1072,6 +1072,7 @@ class Post
'$edbold' => DI::l10n()->t('Bold'),
'$editalic' => DI::l10n()->t('Italic'),
'$eduline' => DI::l10n()->t('Underline'),
+ '$contentwarn' => DI::l10n()->t('Content Warning'),
'$edquote' => DI::l10n()->t('Quote'),
'$edemojis' => DI::l10n()->t('Add emojis'),
'$edcode' => DI::l10n()->t('Code'),
diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po
index 7ec266268b..d8dd10d6a9 100644
--- a/view/lang/C/messages.po
+++ b/view/lang/C/messages.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 2023.09-dev\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-06-05 22:08-0400\n"
+"POT-Creation-Date: 2023-06-15 12:51-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -292,8 +292,8 @@ msgid "Insert web link"
msgstr ""
#: mod/message.php:201 mod/message.php:357 mod/photos.php:1289
-#: src/Content/Conversation.php:390 src/Content/Conversation.php:734
-#: src/Module/Item/Compose.php:205 src/Module/Post/Edit.php:145
+#: src/Content/Conversation.php:391 src/Content/Conversation.php:735
+#: src/Module/Item/Compose.php:206 src/Module/Post/Edit.php:145
#: src/Module/Profile/UnkMail.php:154 src/Object/Post.php:557
msgid "Please wait"
msgstr ""
@@ -475,7 +475,7 @@ msgstr ""
msgid "Do not show a status post for this upload"
msgstr ""
-#: mod/photos.php:731 mod/photos.php:1091 src/Content/Conversation.php:392
+#: mod/photos.php:731 mod/photos.php:1091 src/Content/Conversation.php:393
#: src/Module/Calendar/Event/Form.php:253 src/Module/Post/Edit.php:183
msgid "Permissions"
msgstr ""
@@ -488,7 +488,7 @@ msgstr ""
msgid "Delete Album"
msgstr ""
-#: mod/photos.php:796 mod/photos.php:897 src/Content/Conversation.php:408
+#: mod/photos.php:796 mod/photos.php:897 src/Content/Conversation.php:409
#: src/Module/Contact/Follow.php:173 src/Module/Contact/Revoke.php:109
#: src/Module/Contact/Unfollow.php:126
#: src/Module/Media/Attachment/Browser.php:77
@@ -606,9 +606,9 @@ msgid "Comment"
msgstr ""
#: mod/photos.php:1137 mod/photos.php:1193 mod/photos.php:1267
-#: src/Content/Conversation.php:405 src/Module/Calendar/Event/Form.php:248
-#: src/Module/Item/Compose.php:200 src/Module/Post/Edit.php:165
-#: src/Object/Post.php:1082
+#: src/Content/Conversation.php:406 src/Module/Calendar/Event/Form.php:248
+#: src/Module/Item/Compose.php:201 src/Module/Post/Edit.php:165
+#: src/Object/Post.php:1083
msgid "Preview"
msgstr ""
@@ -617,11 +617,11 @@ msgstr ""
msgid "Loading..."
msgstr ""
-#: mod/photos.php:1224 src/Content/Conversation.php:650 src/Object/Post.php:258
+#: mod/photos.php:1224 src/Content/Conversation.php:651 src/Object/Post.php:258
msgid "Select"
msgstr ""
-#: mod/photos.php:1225 src/Content/Conversation.php:651
+#: mod/photos.php:1225 src/Content/Conversation.php:652
#: src/Module/Moderation/Users/Active.php:136
#: src/Module/Moderation/Users/Blocked.php:136
#: src/Module/Moderation/Users/Index.php:151
@@ -1220,8 +1220,8 @@ msgstr[1] ""
msgid "Visible to everybody "
msgstr ""
-#: src/Content/Conversation.php:329 src/Module/Item/Compose.php:199
-#: src/Object/Post.php:1081
+#: src/Content/Conversation.php:329 src/Module/Item/Compose.php:200
+#: src/Object/Post.php:1082
msgid "Please enter a image/video/audio/webpage URL:"
msgstr ""
@@ -1281,206 +1281,211 @@ msgid "Underline"
msgstr ""
#: src/Content/Conversation.php:367 src/Module/Item/Compose.php:193
-#: src/Module/Post/Edit.php:174 src/Object/Post.php:1075
+#: src/Module/Post/Edit.php:174 src/Object/Post.php:1076
msgid "Quote"
msgstr ""
#: src/Content/Conversation.php:368 src/Module/Item/Compose.php:194
-#: src/Module/Post/Edit.php:175 src/Object/Post.php:1076
+#: src/Module/Post/Edit.php:175 src/Object/Post.php:1077
msgid "Add emojis"
msgstr ""
#: src/Content/Conversation.php:369 src/Module/Item/Compose.php:195
-#: src/Module/Post/Edit.php:176 src/Object/Post.php:1077
-msgid "Code"
+#: src/Object/Post.php:1075
+msgid "Content Warning"
msgstr ""
#: src/Content/Conversation.php:370 src/Module/Item/Compose.php:196
-#: src/Object/Post.php:1078
-msgid "Image"
+#: src/Module/Post/Edit.php:176 src/Object/Post.php:1078
+msgid "Code"
msgstr ""
#: src/Content/Conversation.php:371 src/Module/Item/Compose.php:197
-#: src/Module/Post/Edit.php:177 src/Object/Post.php:1079
-msgid "Link"
+#: src/Object/Post.php:1079
+msgid "Image"
msgstr ""
#: src/Content/Conversation.php:372 src/Module/Item/Compose.php:198
-#: src/Module/Post/Edit.php:178 src/Object/Post.php:1080
+#: src/Module/Post/Edit.php:177 src/Object/Post.php:1080
+msgid "Link"
+msgstr ""
+
+#: src/Content/Conversation.php:373 src/Module/Item/Compose.php:199
+#: src/Module/Post/Edit.php:178 src/Object/Post.php:1081
msgid "Link or Media"
msgstr ""
-#: src/Content/Conversation.php:373
+#: src/Content/Conversation.php:374
msgid "Video"
msgstr ""
-#: src/Content/Conversation.php:374 src/Module/Item/Compose.php:201
+#: src/Content/Conversation.php:375 src/Module/Item/Compose.php:202
#: src/Module/Post/Edit.php:141
msgid "Set your location"
msgstr ""
-#: src/Content/Conversation.php:375 src/Module/Post/Edit.php:142
+#: src/Content/Conversation.php:376 src/Module/Post/Edit.php:142
msgid "set location"
msgstr ""
-#: src/Content/Conversation.php:376 src/Module/Post/Edit.php:143
+#: src/Content/Conversation.php:377 src/Module/Post/Edit.php:143
msgid "Clear browser location"
msgstr ""
-#: src/Content/Conversation.php:377 src/Module/Post/Edit.php:144
+#: src/Content/Conversation.php:378 src/Module/Post/Edit.php:144
msgid "clear location"
msgstr ""
-#: src/Content/Conversation.php:379 src/Module/Item/Compose.php:206
+#: src/Content/Conversation.php:380 src/Module/Item/Compose.php:207
#: src/Module/Post/Edit.php:157
msgid "Set title"
msgstr ""
-#: src/Content/Conversation.php:381 src/Module/Item/Compose.php:207
+#: src/Content/Conversation.php:382 src/Module/Item/Compose.php:208
#: src/Module/Post/Edit.php:159
msgid "Categories (comma-separated list)"
msgstr ""
-#: src/Content/Conversation.php:386 src/Module/Item/Compose.php:223
+#: src/Content/Conversation.php:387 src/Module/Item/Compose.php:224
msgid "Scheduled at"
msgstr ""
-#: src/Content/Conversation.php:391 src/Module/Post/Edit.php:146
+#: src/Content/Conversation.php:392 src/Module/Post/Edit.php:146
msgid "Permission settings"
msgstr ""
-#: src/Content/Conversation.php:401 src/Module/Post/Edit.php:155
+#: src/Content/Conversation.php:402 src/Module/Post/Edit.php:155
msgid "Public post"
msgstr ""
-#: src/Content/Conversation.php:415 src/Content/Widget/VCard.php:113
+#: src/Content/Conversation.php:416 src/Content/Widget/VCard.php:113
#: src/Model/Profile.php:469 src/Module/Admin/Logs/View.php:92
#: src/Module/Post/Edit.php:181
msgid "Message"
msgstr ""
-#: src/Content/Conversation.php:416 src/Module/Post/Edit.php:182
+#: src/Content/Conversation.php:417 src/Module/Post/Edit.php:182
#: src/Module/Settings/TwoFactor/Trusted.php:140
msgid "Browser"
msgstr ""
-#: src/Content/Conversation.php:418 src/Module/Post/Edit.php:185
+#: src/Content/Conversation.php:419 src/Module/Post/Edit.php:185
msgid "Open Compose page"
msgstr ""
-#: src/Content/Conversation.php:678 src/Object/Post.php:244
+#: src/Content/Conversation.php:679 src/Object/Post.php:244
msgid "Pinned item"
msgstr ""
-#: src/Content/Conversation.php:694 src/Object/Post.php:502
+#: src/Content/Conversation.php:695 src/Object/Post.php:502
#: src/Object/Post.php:503
#, php-format
msgid "View %s's profile @ %s"
msgstr ""
-#: src/Content/Conversation.php:707 src/Object/Post.php:490
+#: src/Content/Conversation.php:708 src/Object/Post.php:490
msgid "Categories:"
msgstr ""
-#: src/Content/Conversation.php:708 src/Object/Post.php:491
+#: src/Content/Conversation.php:709 src/Object/Post.php:491
msgid "Filed under:"
msgstr ""
-#: src/Content/Conversation.php:716 src/Object/Post.php:516
+#: src/Content/Conversation.php:717 src/Object/Post.php:516
#, php-format
msgid "%s from %s"
msgstr ""
-#: src/Content/Conversation.php:732
+#: src/Content/Conversation.php:733
msgid "View in context"
msgstr ""
-#: src/Content/Conversation.php:797
+#: src/Content/Conversation.php:798
msgid "remove"
msgstr ""
-#: src/Content/Conversation.php:801
+#: src/Content/Conversation.php:802
msgid "Delete Selected Items"
msgstr ""
-#: src/Content/Conversation.php:866 src/Content/Conversation.php:869
-#: src/Content/Conversation.php:872 src/Content/Conversation.php:875
-#: src/Content/Conversation.php:878
+#: src/Content/Conversation.php:867 src/Content/Conversation.php:870
+#: src/Content/Conversation.php:873 src/Content/Conversation.php:876
+#: src/Content/Conversation.php:879
#, php-format
msgid "You had been addressed (%s)."
msgstr ""
-#: src/Content/Conversation.php:881
+#: src/Content/Conversation.php:882
#, php-format
msgid "You are following %s."
msgstr ""
-#: src/Content/Conversation.php:884
+#: src/Content/Conversation.php:885
msgid "You subscribed to one or more tags in this post."
msgstr ""
-#: src/Content/Conversation.php:897
+#: src/Content/Conversation.php:898
#, php-format
msgid "%s reshared this."
msgstr ""
-#: src/Content/Conversation.php:899
+#: src/Content/Conversation.php:900
msgid "Reshared"
msgstr ""
-#: src/Content/Conversation.php:899
+#: src/Content/Conversation.php:900
#, php-format
msgid "Reshared by %s <%s>"
msgstr ""
-#: src/Content/Conversation.php:902
+#: src/Content/Conversation.php:903
#, php-format
msgid "%s is participating in this thread."
msgstr ""
-#: src/Content/Conversation.php:905
+#: src/Content/Conversation.php:906
msgid "Stored for general reasons"
msgstr ""
-#: src/Content/Conversation.php:908
+#: src/Content/Conversation.php:909
msgid "Global post"
msgstr ""
-#: src/Content/Conversation.php:911
+#: src/Content/Conversation.php:912
msgid "Sent via an relay server"
msgstr ""
-#: src/Content/Conversation.php:911
+#: src/Content/Conversation.php:912
#, php-format
msgid "Sent via the relay server %s <%s>"
msgstr ""
-#: src/Content/Conversation.php:914
+#: src/Content/Conversation.php:915
msgid "Fetched"
msgstr ""
-#: src/Content/Conversation.php:914
+#: src/Content/Conversation.php:915
#, php-format
msgid "Fetched because of %s <%s>"
msgstr ""
-#: src/Content/Conversation.php:917
+#: src/Content/Conversation.php:918
msgid "Stored because of a child post to complete this thread."
msgstr ""
-#: src/Content/Conversation.php:920
+#: src/Content/Conversation.php:921
msgid "Local delivery"
msgstr ""
-#: src/Content/Conversation.php:923
+#: src/Content/Conversation.php:924
msgid "Stored because of your activity (like, comment, star, ...)"
msgstr ""
-#: src/Content/Conversation.php:926
+#: src/Content/Conversation.php:927
msgid "Distributed"
msgstr ""
-#: src/Content/Conversation.php:929
+#: src/Content/Conversation.php:930
msgid "Pushed to us"
msgstr ""
@@ -1597,7 +1602,7 @@ msgid ""
msgstr ""
#: src/Content/GroupManager.php:151 src/Content/Nav.php:276
-#: src/Content/Text/HTML.php:877 src/Content/Widget.php:540
+#: src/Content/Text/HTML.php:877 src/Content/Widget.php:543
msgid "Groups"
msgstr ""
@@ -1605,12 +1610,12 @@ msgstr ""
msgid "External link to group"
msgstr ""
-#: src/Content/GroupManager.php:157 src/Content/Widget.php:516
+#: src/Content/GroupManager.php:157 src/Content/Widget.php:518
msgid "show less"
msgstr ""
#: src/Content/GroupManager.php:158 src/Content/Widget.php:414
-#: src/Content/Widget.php:517
+#: src/Content/Widget.php:519
msgid "show more"
msgstr ""
@@ -2185,31 +2190,31 @@ msgid_plural "%d contacts in common"
msgstr[0] ""
msgstr[1] ""
-#: src/Content/Widget.php:510
+#: src/Content/Widget.php:512
msgid "Archives"
msgstr ""
-#: src/Content/Widget.php:518
+#: src/Content/Widget.php:520
msgid "On this date"
msgstr ""
-#: src/Content/Widget.php:537
+#: src/Content/Widget.php:540
msgid "Persons"
msgstr ""
-#: src/Content/Widget.php:538
+#: src/Content/Widget.php:541
msgid "Organisations"
msgstr ""
-#: src/Content/Widget.php:539 src/Model/Contact.php:1651
+#: src/Content/Widget.php:542 src/Model/Contact.php:1651
msgid "News"
msgstr ""
-#: src/Content/Widget.php:543 src/Module/Settings/Account.php:453
+#: src/Content/Widget.php:546 src/Module/Settings/Account.php:453
msgid "Account Types"
msgstr ""
-#: src/Content/Widget.php:544 src/Module/Moderation/BaseUsers.php:69
+#: src/Content/Widget.php:547 src/Module/Moderation/BaseUsers.php:69
msgid "All"
msgstr ""
@@ -2548,8 +2553,8 @@ msgstr ""
#: src/Core/Installer.php:511
msgid ""
-"The web installer needs to be able to create a file called \"local.config.php"
-"\" in the \"config\" folder of your web server and it is unable to do so."
+"The web installer needs to be able to create a file called \"local.config."
+"php\" in the \"config\" folder of your web server and it is unable to do so."
msgstr ""
#: src/Core/Installer.php:512
@@ -5165,9 +5170,9 @@ msgstr ""
#: src/Module/Admin/Summary.php:98
msgid ""
-"The last update failed. Please run \"php bin/console.php dbstructure update"
-"\" from the command line and have a look at the errors that might appear. "
-"(Some of the errors are possibly inside the logfile.)"
+"The last update failed. Please run \"php bin/console.php dbstructure "
+"update\" from the command line and have a look at the errors that might "
+"appear. (Some of the errors are possibly inside the logfile.)"
msgstr ""
#: src/Module/Admin/Summary.php:102
@@ -5328,8 +5333,8 @@ msgstr ""
#, php-format
msgid ""
"Show some informations regarding the needed information to operate the node "
-"according e.g. to EU-GDPR ."
+"according e.g. to EU-GDPR ."
msgstr ""
#: src/Module/Admin/Tos.php:81
@@ -7247,21 +7252,21 @@ msgstr ""
msgid "Visibility"
msgstr ""
-#: src/Module/Item/Compose.php:202
+#: src/Module/Item/Compose.php:203
msgid "Clear the location"
msgstr ""
-#: src/Module/Item/Compose.php:203
+#: src/Module/Item/Compose.php:204
msgid "Location services are unavailable on your device"
msgstr ""
-#: src/Module/Item/Compose.php:204
+#: src/Module/Item/Compose.php:205
msgid ""
"Location services are disabled. Please check the website's permissions on "
"your device"
msgstr ""
-#: src/Module/Item/Compose.php:210
+#: src/Module/Item/Compose.php:211
msgid ""
"You can make this page always open when you use the New Post button in the "
"Theme Customization settings ."
@@ -8363,19 +8368,19 @@ msgstr ""
#: src/Module/Profile/Conversations.php:106
#: src/Module/Profile/Conversations.php:109 src/Module/Profile/Profile.php:351
#: src/Module/Profile/Profile.php:354 src/Protocol/Feed.php:1090
-#: src/Protocol/OStatus.php:1007
+#: src/Protocol/OStatus.php:1009
#, php-format
msgid "%s's timeline"
msgstr ""
#: src/Module/Profile/Conversations.php:107 src/Module/Profile/Profile.php:352
-#: src/Protocol/Feed.php:1094 src/Protocol/OStatus.php:1012
+#: src/Protocol/Feed.php:1094 src/Protocol/OStatus.php:1014
#, php-format
msgid "%s's posts"
msgstr ""
#: src/Module/Profile/Conversations.php:108 src/Module/Profile/Profile.php:353
-#: src/Protocol/Feed.php:1097 src/Protocol/OStatus.php:1016
+#: src/Protocol/Feed.php:1097 src/Protocol/OStatus.php:1018
#, php-format
msgid "%s's comments"
msgstr ""
@@ -8416,8 +8421,8 @@ msgstr ""
#: src/Module/Profile/Profile.php:158
#, php-format
msgid ""
-"You're currently viewing your profile as %s Cancel "
+"You're currently viewing your profile as %s Cancel "
msgstr ""
#: src/Module/Profile/Profile.php:167 src/Module/Settings/Account.php:575
@@ -8965,8 +8970,8 @@ msgstr ""
#: src/Module/Security/TwoFactor/Verify.php:100
#, php-format
msgid ""
-"If you do not have access to your authentication code you can use a two-factor recovery code ."
+"If you do not have access to your authentication code you can use a two-factor recovery code ."
msgstr ""
#: src/Module/Security/TwoFactor/Verify.php:101
@@ -10435,8 +10440,8 @@ msgstr ""
#: src/Module/Settings/TwoFactor/Verify.php:149
#, php-format
msgid ""
-"Or you can open the following URL in your mobile device:
%s
"
+"Or you can open the following URL in your mobile device:
%s
"
msgstr ""
#: src/Module/Settings/TwoFactor/Verify.php:156
@@ -10526,9 +10531,9 @@ msgstr ""
msgid ""
"At any point in time a logged in user can export their account data from the "
"account settings . If the user wants "
-"to delete their account they can do so at "
-"%1$s/settings/removeme . The deletion of the account will be permanent. "
-"Deletion of the data will also be requested from the nodes of the "
+"to delete their account they can do so at %1$s/settings/removeme . The deletion of the account will be "
+"permanent. Deletion of the data will also be requested from the nodes of the "
"communication partners."
msgstr ""
@@ -11510,21 +11515,21 @@ msgstr ""
msgid "(no subject)"
msgstr ""
-#: src/Protocol/OStatus.php:1388
+#: src/Protocol/OStatus.php:1390
#, php-format
msgid "%s is now following %s."
msgstr ""
-#: src/Protocol/OStatus.php:1389
+#: src/Protocol/OStatus.php:1391
msgid "following"
msgstr ""
-#: src/Protocol/OStatus.php:1392
+#: src/Protocol/OStatus.php:1394
#, php-format
msgid "%s stopped following %s."
msgstr ""
-#: src/Protocol/OStatus.php:1393
+#: src/Protocol/OStatus.php:1395
msgid "stopped following"
msgstr ""
diff --git a/view/templates/item/compose.tpl b/view/templates/item/compose.tpl
index c127e317ee..fa311bc662 100644
--- a/view/templates/item/compose.tpl
+++ b/view/templates/item/compose.tpl
@@ -47,6 +47,9 @@
+
+
+
diff --git a/view/theme/frio/templates/comment_item.tpl b/view/theme/frio/templates/comment_item.tpl
index b5fc13deb2..c81d259b40 100644
--- a/view/theme/frio/templates/comment_item.tpl
+++ b/view/theme/frio/templates/comment_item.tpl
@@ -39,6 +39,9 @@
+
+
+
diff --git a/view/theme/frio/templates/jot.tpl b/view/theme/frio/templates/jot.tpl
index b38babebff..2160b3e0b6 100644
--- a/view/theme/frio/templates/jot.tpl
+++ b/view/theme/frio/templates/jot.tpl
@@ -112,6 +112,7 @@
+
From ad225e4cff1d685dfc53df64466e4ffd0b243409 Mon Sep 17 00:00:00 2001
From: anubis2814 <57196483+anubis2814@users.noreply.github.com>
Date: Thu, 15 Jun 2023 14:02:54 -0400
Subject: [PATCH 16/18] Update Conversation.php
made code neater.
---
src/Content/Conversation.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php
index 151002e5cb..be858e05dc 100644
--- a/src/Content/Conversation.php
+++ b/src/Content/Conversation.php
@@ -366,7 +366,7 @@ class Conversation
'$eduline' => $this->l10n->t('Underline'),
'$edquote' => $this->l10n->t('Quote'),
'$edemojis' => $this->l10n->t('Add emojis'),
- '$contentwarn' => $this->l10n->t('Content Warning'),
+ '$contentwarn' => $this->l10n->t('Content Warning'),
'$edcode' => $this->l10n->t('Code'),
'$edimg' => $this->l10n->t('Image'),
'$edurl' => $this->l10n->t('Link'),
From db3604b479dc6efbc4272a2c80993965cff0db53 Mon Sep 17 00:00:00 2001
From: anubis2814 <57196483+anubis2814@users.noreply.github.com>
Date: Thu, 15 Jun 2023 14:04:34 -0400
Subject: [PATCH 17/18] Update Post.php
made code neater
---
src/Object/Post.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Object/Post.php b/src/Object/Post.php
index 3fc9f00f7f..27f618fb6b 100644
--- a/src/Object/Post.php
+++ b/src/Object/Post.php
@@ -1072,7 +1072,7 @@ class Post
'$edbold' => DI::l10n()->t('Bold'),
'$editalic' => DI::l10n()->t('Italic'),
'$eduline' => DI::l10n()->t('Underline'),
- '$contentwarn' => DI::l10n()->t('Content Warning'),
+ '$contentwarn' => DI::l10n()->t('Content Warning'),
'$edquote' => DI::l10n()->t('Quote'),
'$edemojis' => DI::l10n()->t('Add emojis'),
'$edcode' => DI::l10n()->t('Code'),
From 0af73775bea899b3e64792d5cf5537993401351c Mon Sep 17 00:00:00 2001
From: git-marijus
Date: Sat, 17 Jun 2023 22:31:25 +0200
Subject: [PATCH 18/18] fix issue #13174
---
src/Module/Magic.php | 4 ++--
tests/src/Util/HTTPSignatureTest.php | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Module/Magic.php b/src/Module/Magic.php
index 5276252de2..481a748fcf 100644
--- a/src/Module/Magic.php
+++ b/src/Module/Magic.php
@@ -119,8 +119,8 @@ class Magic extends BaseModule
$basepath = $gserver['url'];
$header = [
- 'Accept' => ['application/x-dfrn+json', 'application/x-zot+json'],
- 'X-Open-Web-Auth' => [Strings::getRandomHex()],
+ 'Accept' => 'application/x-dfrn+json, application/x-zot+json',
+ 'X-Open-Web-Auth' => Strings::getRandomHex()
];
// Create a header that is signed with the local users private key.
diff --git a/tests/src/Util/HTTPSignatureTest.php b/tests/src/Util/HTTPSignatureTest.php
index 03b0033fa9..bc54a93184 100644
--- a/tests/src/Util/HTTPSignatureTest.php
+++ b/tests/src/Util/HTTPSignatureTest.php
@@ -124,8 +124,8 @@ G1vVmRgkLDqhc4+r3wDz3qy6JpV7tg==
-----END PRIVATE KEY-----',
'keyId' => 'acct:admin@friendica.local',
'header' => [
- 'Accept' => ['application/x-dfrn+json', 'application/x-zot+json'],
- 'X-Open-Web-Auth' => ['1dde649b855fd1aae542a91c4edd8c3a7a4c59d8eaf3136cdee05dfc16a30bac'],
+ 'Accept' => 'application/x-dfrn+json, application/x-zot+json',
+ 'X-Open-Web-Auth' => '1dde649b855fd1aae542a91c4edd8c3a7a4c59d8eaf3136cdee05dfc16a30bac'
],
'signature' => 'Signature keyId="acct:admin@friendica.local",algorithm="rsa-sha512",headers="accept x-open-web-auth",signature="cb09/wdmRdFhrQUczL0lR6LTkVh8qb/vYh70DFCW40QrzvuUYHzJ+GqqJW6tcCb2rXP4t+aobWKfZ4wFMBtVbejAiCgF01pzEBJfDevdyu7khlfKo+Gtw1CGk4/0so1QmqASeHdlG3ID3GnmuovqZn2v5f5D+1UAJ6Pu6mtAXrGRntoEM/oqYBAsRrMtDSDAE4tnOSDu2YfVJJLfyUX1ZWjUK0ejZXZ0YTDJwU8PqRcRX17NhBaDq82dEHlfhD7I/aOclwVbfKIi5Ud619XCxPq0sAAYso17MhUm40oBCJVze2x4pswJhv9IFYohtR5G/fKkz2eosu3xeRflvGicS4JdclhTRgCGWDy10DV76FiXiS5N2clLXreHItWEXlZKZx6m9zAZoEX92VRnc4BY4jDsRR89Pl88hELaxiNipviyHS7XYZTRnkLM+nvtOcxkHSCbEs7oGw+AX+pLHoU5otNOqy+ZbXQ1cUvFOBYZmYdX3DiWaLfBKraakPkslJuU3yJu95X1qYmQTpOZDR4Ma/yf5fmWJh5D9ywnXxxd6RaupoO6HTtIl6gmsfcsyZNi5hRbbgPI3BiQwGYVGF6qzJpEOMzEyHyAuFeanhicc8b+P+DCwXni5sjM7ntKwShbCBP80KHSdoumORin3/PYgHCmHZVv71N0HNlPZnyVzZw="',
]