From: Hypolite Petovan Date: Tue, 8 Dec 2020 14:57:58 +0000 (-0500) Subject: Use App\Arguments instead of App->args in theme/vier/theme X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a105caf833915d9fdaea62937210a1e99169799a;p=friendica.git Use App\Arguments instead of App->args in theme/vier/theme - Address https://github.com/friendica/friendica/issues/9252#issuecomment-740069639 --- diff --git a/view/theme/vier/theme.php b/view/theme/vier/theme.php index b57d7dc1c3..4d11b1cd46 100644 --- a/view/theme/vier/theme.php +++ b/view/theme/vier/theme.php @@ -25,7 +25,10 @@ function vier_init(App $a) Renderer::setActiveTemplateEngine('smarty3'); - if (!empty($a->argv[0]) && ($a->argv[0] . ($a->argv[1] ?? '')) === ('profile' . ($a->user['nickname'] ?? '')) || $a->argv[0] === 'network' && local_user()) { + $args = DI::args(); + + if ($args->get(0) === 'profile' && $args->get(1) === ($a->user['nickname'] ?? '') || $args->get(0) === 'network' && local_user() + ) { vier_community_info(); DI::page()['htmlhead'] .= "\n"; @@ -77,7 +80,7 @@ EOT; // Hide the left menu bar /// @TODO maybe move this static array out where it should belong? - if (empty(DI::page()['aside']) && in_array($a->argv[0], ["community", "events", "help", "delegation", "notifications", + if (empty(DI::page()['aside']) && in_array($args->get(0), ["community", "events", "help", "delegation", "notifications", "probe", "webfinger", "login", "invite", "credits"])) { DI::page()['htmlhead'] .= ""; }