Make PHPCS happy

This commit is contained in:
Marcus Funch 2025-06-02 21:35:32 +02:00 committed by oldkid
parent 5c1c4dffdf
commit 889c7f2fc1

View file

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2010-2024, the Friendica project
* SPDX-FileCopyrightText: 2010-2024 the Friendica project
@ -131,7 +132,7 @@ function message_content()
$cmd = DI::args()->getArgv()[1];
if ($cmd === 'drop') {
$message = DBA::selectFirst('mail', ['convid'], ['id' => DI::args()->getArgv()[2], 'uid' => DI::userSession()->getLocalUserId()]);
if(!DBA::isResult($message)){
if (!DBA::isResult($message)) {
DI::sysmsg()->addNotice(DI::l10n()->t('Conversation not found.'));
DI::baseUrl()->redirect('message');
}
@ -141,7 +142,7 @@ function message_content()
}
$conversation = DBA::selectFirst('mail', ['id'], ['convid' => $message['convid'], 'uid' => DI::userSession()->getLocalUserId()]);
if(!DBA::isResult($conversation)){
if (!DBA::isResult($conversation)) {
DI::baseUrl()->redirect('message');
}
@ -222,7 +223,8 @@ function message_content()
$o .= $header;
$message = DBA::fetchFirst("
$message = DBA::fetchFirst(
"
SELECT `mail`.*, `contact`.`name`, `contact`.`url`, `contact`.`thumb`
FROM `mail`
LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id`
@ -245,7 +247,8 @@ function message_content()
} else {
$sql_extra = "AND `mail`.`parent-uri` = ?";
}
$messages_stmt = DBA::p("
$messages_stmt = DBA::p(
"
SELECT `mail`.*, `contact`.`name`, `contact`.`url`, `contact`.`thumb`
FROM `mail`
LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id`
@ -396,8 +399,7 @@ function get_messages(int $uid, int $start, int $limit): array
LEFT JOIN `contact` c ON m.`contact-id` = c.`id`
WHERE m.`uid` = ?
ORDER BY m2.`mailcreated` DESC
LIMIT ?, ?'
, $uid, $uid, $start, $limit));
LIMIT ?, ?', $uid, $uid, $start, $limit));
}
function render_messages(array $msg, string $t): string