From 8105668cafa6901d5fee0cd61b4b0f91ba63195b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Thu, 4 Aug 2022 10:49:39 +0200 Subject: [PATCH 1/4] Added missing 'private' field, see Processor::processContent() where it is needed --- src/Protocol/ActivityPub/Processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index d58628ff2a..1edc07d3ec 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -200,7 +200,7 @@ class Processor */ public static function updateItem(array $activity) { - $item = Post::selectFirst(['uri', 'uri-id', 'thr-parent', 'gravity', 'post-type'], ['uri' => $activity['id']]); + $item = Post::selectFirst(['uri', 'uri-id', 'thr-parent', 'gravity', 'post-type', 'private'], ['uri' => $activity['id']]); if (!DBA::isResult($item)) { Logger::warning('No existing item, item will be created', ['uri' => $activity['id']]); $item = self::createItem($activity); From 704bd95608b15e66046e92aa03fdff9d55dbffb0 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Fri, 5 Aug 2022 15:28:21 +0200 Subject: [PATCH 2/4] Fix WSOD when Renderer throws exception `HTTPException` builds a simple static version of error page if `Renderer` throws any exception while rendering the error page. --- src/Module/Special/HTTPException.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Module/Special/HTTPException.php b/src/Module/Special/HTTPException.php index 8b520f6b5a..0cd7817ed4 100644 --- a/src/Module/Special/HTTPException.php +++ b/src/Module/Special/HTTPException.php @@ -70,8 +70,17 @@ class HTTPException $content = ''; if ($e->getCode() >= 400) { - $tpl = Renderer::getMarkupTemplate('http_status.tpl'); - $content = Renderer::replaceMacros($tpl, self::getVars($e)); + $vars = self::getVars($e); + try { + $tpl = Renderer::getMarkupTemplate('http_status.tpl'); + $content = Renderer::replaceMacros($tpl, $vars); + } catch (\Exception $e) { + $content = "

{$vars['$title']}

{$vars['$message']}

"; + if (DI::app()->isSiteAdmin()) { + $content .= "

{$vars['$thrown']}

"; + $content .= "
{$vars['$trace']}
"; + } + } } System::httpError($e->getCode(), $e->getDescription(), $content); From 91911c4676dc0506c179837ceef23171684f34a5 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Fri, 5 Aug 2022 15:37:38 +0200 Subject: [PATCH 3/4] typo in console tool @gunchleoc spottet a typo while working on the translations of Friendica. This fixes it. --- src/Console/MergeContacts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Console/MergeContacts.php b/src/Console/MergeContacts.php index 0d05c579fa..405622cc4b 100644 --- a/src/Console/MergeContacts.php +++ b/src/Console/MergeContacts.php @@ -87,7 +87,7 @@ HELP; { $first = $this->dba->selectFirst('contact', ['id', 'nurl', 'url'], ["`uri-id` = ? AND `nurl` != ? AND `url` != ?", $uriid, '', ''], ['order' => ['id']]); if (empty($first)) { - $this->err($this->l10n->t('No valid first countact found for uri-id %d.', $uriid)); + $this->err($this->l10n->t('No valid first contact found for uri-id %d.', $uriid)); return; } $this->out($first['url']); From 0f35b0697890f64358349bba3d018dc1438370ca Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Fri, 5 Aug 2022 15:52:04 +0200 Subject: [PATCH 4/4] updated the messages.po file --- view/lang/C/messages.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index cf29605f7e..b6a8c5b72a 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2022.09-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-01 12:24-0400\n" +"POT-Creation-Date: 2022-08-05 15:51+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1656,7 +1656,7 @@ msgstr "" #: src/Console/MergeContacts.php:90 #, php-format -msgid "No valid first countact found for uri-id %d." +msgid "No valid first contact found for uri-id %d." msgstr "" #: src/Console/MergeContacts.php:101