Merge remote-tracking branch 'upstream/develop' into loop-prevention
This commit is contained in:
commit
22c1873064
|
@ -87,7 +87,7 @@ HELP;
|
||||||
{
|
{
|
||||||
$first = $this->dba->selectFirst('contact', ['id', 'nurl', 'url'], ["`uri-id` = ? AND `nurl` != ? AND `url` != ?", $uriid, '', ''], ['order' => ['id']]);
|
$first = $this->dba->selectFirst('contact', ['id', 'nurl', 'url'], ["`uri-id` = ? AND `nurl` != ? AND `url` != ?", $uriid, '', ''], ['order' => ['id']]);
|
||||||
if (empty($first)) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
$this->out($first['url']);
|
$this->out($first['url']);
|
||||||
|
|
|
@ -70,8 +70,17 @@ class HTTPException
|
||||||
$content = '';
|
$content = '';
|
||||||
|
|
||||||
if ($e->getCode() >= 400) {
|
if ($e->getCode() >= 400) {
|
||||||
$tpl = Renderer::getMarkupTemplate('http_status.tpl');
|
$vars = self::getVars($e);
|
||||||
$content = Renderer::replaceMacros($tpl, 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);
|
System::httpError($e->getCode(), $e->getDescription(), $content);
|
||||||
|
|
|
@ -226,7 +226,7 @@ class Processor
|
||||||
*/
|
*/
|
||||||
public static function updateItem(array $activity)
|
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)) {
|
if (!DBA::isResult($item)) {
|
||||||
Logger::warning('No existing item, item will be created', ['uri' => $activity['id']]);
|
Logger::warning('No existing item, item will be created', ['uri' => $activity['id']]);
|
||||||
$item = self::createItem($activity, false);
|
$item = self::createItem($activity, false);
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: 2022.09-dev\n"
|
"Project-Id-Version: 2022.09-dev\n"
|
||||||
"Report-Msgid-Bugs-To: \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"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -1656,7 +1656,7 @@ msgstr ""
|
||||||
|
|
||||||
#: src/Console/MergeContacts.php:90
|
#: src/Console/MergeContacts.php:90
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "No valid first countact found for uri-id %d."
|
msgid "No valid first contact found for uri-id %d."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Console/MergeContacts.php:101
|
#: src/Console/MergeContacts.php:101
|
||||||
|
|
Loading…
Reference in New Issue
Block a user