]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/vier/theme.php
Link to displayed contact URL no matter the "Stay local" setting value
[friendica.git] / view / theme / vier / theme.php
index b57d7dc1c3d84557636761924da7901554a8432f..c1562983812416cab64d99939fbf78051582ee94 100644 (file)
@@ -21,11 +21,14 @@ use Friendica\Util\Strings;
 
 function vier_init(App $a)
 {
-       $a->theme_events_in_profile = false;
+       $a->setThemeInfoValue('events_in_profile', false);
 
        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->getLoggedInUserNickname() ?? '') || $args->get(0) === 'network' && local_user()
+       ) {
                vier_community_info();
 
                DI::page()['htmlhead'] .= "<link rel='stylesheet' type='text/css' href='view/theme/vier/wide.css' media='screen and (min-width: 1300px)'/>\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'] .= "<link rel='stylesheet' href='view/theme/vier/hide.css' />";
        }
@@ -282,7 +285,7 @@ function vier_community_info()
                        $r[] = ["photo" => "images/wordpress.png", "name" => "Wordpress"];
                }
 
-               if (function_exists("imap_open") && !DI::config()->get("system", "imap_disabled") && !DI::config()->get("system", "dfrn_only")) {
+               if (function_exists("imap_open") && !DI::config()->get("system", "imap_disabled")) {
                        $r[] = ["photo" => "images/mail.png", "name" => "E-Mail"];
                }