Skip to content

Commit

Permalink
Fix bugs from misc PR D= (#3284)
Browse files Browse the repository at this point in the history
  • Loading branch information
tadhgboyle committed Mar 24, 2023
1 parent 8d09a86 commit 7a71d52
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion custom/templates/DefaultRevamp/widgets/online_users.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{if isset($ONLINE_USERS_LIST)}
{foreach from=$ONLINE_USERS_LIST name=online_users_arr item=user}
<a class="ui image label" href="{$user.profile}" data-poload="{$USER_INFO_URL}{$user.id}">
<img src="{$user.avatar}" alt="{$user.username}">{$user.nickname}
<img src="{$user.avatar}" alt="{if $SHOW_NICKNAME_INSTEAD}{$user.nickname}{else}{$user.username}{/if}">{if $SHOW_NICKNAME_INSTEAD}{$user.nickname}{else}{$user.username}{/if}
</a>
{/foreach}
{else}
Expand Down
2 changes: 1 addition & 1 deletion modules/Core/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ public function onPageLoad(User $user, Pages $pages, Cache $cache, Smarty $smart
'REGISTERED_DATE' => date(DATE_FORMAT, $user_query->joined),
]);

if (!Util::getSetting('private_profile') || !$user_query->private_profile) {
if ($user->canBypassPrivateProfile() || (!Util::getSetting('private_profile') || !$user_query->private_profile)) {
$smarty->assign([
'LAST_SEEN' => $language->get('user', 'last_seen_x', [
'lastSeenAt' => $timeago->inWords($user_query->last_online, $language),
Expand Down
1 change: 1 addition & 0 deletions modules/Core/widgets/OnlineUsersWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public function initialise(): void {
}

$this->_smarty->assign([
'SHOW_NICKNAME_INSTEAD' => $use_nickname_show,
'ONLINE_USERS' => $this->_language->get('general', 'online_users'),
'ONLINE_USERS_LIST' => $users,
'TOTAL_ONLINE_USERS' => $this->_language->get('general', 'total_online_users', ['count' => count($online)])
Expand Down
4 changes: 0 additions & 4 deletions modules/Forum/profile_tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@
}
}

if (!count($posts)) {
$smarty->assign('NO_POSTS', $forum_language->get('forum', 'user_no_posts'));
}

// Smarty
$smarty->assign([
'PF_LATEST_POSTS' => (isset($posts)) ? $posts : [],
Expand Down

0 comments on commit 7a71d52

Please sign in to comment.