return Login::form();
}
- $myprofile = DI::baseUrl() . '/profile/' . $a->user['nickname'];
+ $myprofile = DI::baseUrl() . '/profile/' . $a->getLoggedInUserNickname();
$tpl = Renderer::getMarkupTemplate('mail_head.tpl');
if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'new') {
DI::baseUrl()->redirect('message/' . $conversation['id'] );
} else {
- $r = q("SELECT `parent-uri`,`convid` FROM `mail` WHERE `id` = %d AND `uid` = %d LIMIT 1",
- intval(DI::args()->getArgv()[2]),
- intval(local_user())
- );
- if (DBA::isResult($r)) {
- $parent = $r[0]['parent-uri'];
+ $parentmail = DBA::selectFirst('mail', ['parent-uri'], ['id' => DI::args()->getArgv()[2], 'uid' => local_user()]);
+ if (DBA::isResult($parentmail)) {
+ $parent = $parentmail['parent-uri'];
if (!DBA::delete('mail', ['parent-uri' => $parent, 'uid' => local_user()])) {
notice(DI::l10n()->t('Conversation was not removed.'));
$tpl = Renderer::getMarkupTemplate('msg-header.tpl');
DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
'$baseurl' => DI::baseUrl()->get(true),
- '$nickname' => $a->user['nickname'],
+ '$nickname' => $a->getLoggedInUserNickname(),
'$linkurl' => DI::l10n()->t('Please enter a link URL:')
]);
$tpl = Renderer::getMarkupTemplate('msg-header.tpl');
DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
'$baseurl' => DI::baseUrl()->get(true),
- '$nickname' => $a->user['nickname'],
+ '$nickname' => $a->getLoggedInUserNickname(),
'$linkurl' => DI::l10n()->t('Please enter a link URL:')
]);
$tpl = Renderer::getMarkupTemplate($t);
$rslt = '';
- $myprofile = DI::baseUrl() . '/profile/' . $a->user['nickname'];
+ $myprofile = DI::baseUrl() . '/profile/' . $a->getLoggedInUserNickname();
foreach ($msg as $rr) {
if ($rr['unknown']) {