Merge remote-tracking branch 'upstream/develop' into loop-prevention

This commit is contained in:
Michael 2022-08-06 17:11:04 +00:00
commit 22c1873064
4 changed files with 15 additions and 6 deletions

View file

@ -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']);

View file

@ -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 = "<h1>{$vars['$title']}</h1><p>{$vars['$message']}</p>";
if (DI::app()->isSiteAdmin()) {
$content .= "<p>{$vars['$thrown']}</p>";
$content .= "<pre>{$vars['$trace']}</pre>";
}
}
}
System::httpError($e->getCode(), $e->getDescription(), $content);

View file

@ -226,7 +226,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, false);

View file

@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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