X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fmessage.php;h=2f4fe0c1aaf47047110d68b995469e62a534803d;hb=8b450be09bacada8e4ae96079065783bbdacdf5b;hp=6326bb9ea5ffb282e4b3b85645d9e8e89492f5a3;hpb=4a4d0f04cb91e443895a6367345352017f84621c;p=friendica.git diff --git a/mod/message.php b/mod/message.php index 6326bb9ea5..2f4fe0c1aa 100644 --- a/mod/message.php +++ b/mod/message.php @@ -1,6 +1,6 @@ argc > 1 && is_numeric($a->argv[1])) { + if (DI::args()->getArgc() > 1 && is_numeric(DI::args()->getArgv()[1])) { $tabs = render_messages(get_messages(local_user(), 0, 5), 'mail_list.tpl'); } $new = [ 'label' => DI::l10n()->t('New Message'), 'url' => 'message/new', - 'sel' => $a->argc > 1 && $a->argv[1] == 'new', + 'sel' => DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'new', 'accesskey' => 'm', ]; @@ -97,8 +96,7 @@ function message_post(App $a) // fake it to go back to the input form if no recipient listed if ($norecip) { - $a->argc = 2; - $a->argv[1] = 'new'; + DI::args()->setArgv(['message', 'new']); } else { DI::baseUrl()->redirect(DI::args()->getCommand() . '/' . $ret); } @@ -114,10 +112,10 @@ function message_content(App $a) return Login::form(); } - $myprofile = DI::baseUrl() . '/profile/' . $a->user['nickname']; + $myprofile = DI::baseUrl() . '/profile/' . $a->getLoggedInUserNickname(); $tpl = Renderer::getMarkupTemplate('mail_head.tpl'); - if ($a->argc > 1 && $a->argv[1] == 'new') { + if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'new') { $button = [ 'label' => DI::l10n()->t('Discard'), 'url' => '/message', @@ -136,50 +134,20 @@ function message_content(App $a) '$button' => $button, ]); - if (($a->argc == 3) && ($a->argv[1] === 'drop' || $a->argv[1] === 'dropconv')) { - if (!intval($a->argv[2])) { + if ((DI::args()->getArgc() == 3) && (DI::args()->getArgv()[1] === 'drop' || DI::args()->getArgv()[1] === 'dropconv')) { + if (!intval(DI::args()->getArgv()[2])) { return; } - // Check if we should do HTML-based delete confirmation - if (!empty($_REQUEST['confirm'])) { - //