]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/theme.php
Merge pull request #10782 from annando/display-uid
[friendica.git] / view / theme / frio / theme.php
index 41afccc824ead11dd6190df70097d49696f9fa90..3d4a993e45bc45111dd600e3692fb94126f9be44 100644 (file)
@@ -33,8 +33,8 @@ function frio_init(App $a)
        $frio = 'view/theme/frio';
 
        // disable the events module link in the profile tab
-       $a->theme_events_in_profile = false;
-       $a->videowidth = 622;
+       $a->setThemeInfoValue('events_in_profile', false);
+       $a->setThemeInfoValue('videowidth', 622);
 
        Renderer::setActiveTemplateEngine('smarty3');
 
@@ -200,9 +200,9 @@ function frio_remote_nav(App $a, array &$nav_info)
 
        // since $userinfo isn't available for the hook we write it to the nav array
        // this isn't optimal because the contact query will be done now twice
-       $fields = ['id', 'url', 'avatar', 'micro', 'name', 'nick', 'baseurl'];
-       if (local_user() && !empty($a->user['uid'])) {
-               $remoteUser = Contact::selectFirst($fields, ['uid' => $a->user['uid'], 'self' => true]);
+       $fields = ['id', 'url', 'avatar', 'micro', 'name', 'nick', 'baseurl', 'updated'];
+       if ($a->isLoggedIn()) {
+               $remoteUser = Contact::selectFirst($fields, ['uid' => $a->getLoggedInUserId(), 'self' => true]);
        } elseif (!local_user() && remote_user()) {
                $remoteUser = Contact::getById(remote_user(), $fields);
                $nav_info['nav']['remote'] = DI::l10n()->t('Guest');
@@ -313,7 +313,7 @@ function frio_display_item(App $a, &$arr)
        $followThread = [];
        if (
                local_user()
-               && local_user() == $arr['item']['uid']
+               && in_array($arr['item']['uid'], [0, local_user()])
                && $arr['item']['gravity'] == GRAVITY_PARENT
                && !$arr['item']['self']
                && !$arr['item']['mention']