Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions phpBB/adm/style/avatar.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
{% set color_classes = ['avatar-color-0', 'avatar-color-1', 'avatar-color-2', 'avatar-color-3', 'avatar-color-4'] %}
{% set color_class = not(avatar_data.id starts with 'g') ? color_classes[avatar_data.id % 5] : 'avatar-color-default' %}
{% if avatar_link %}<a href="{{ avatar_link }}" class="avatar">{% endif %}
<div class="avatar-placeholder {{ color_class }}">
<span class="avatar-placeholder {{ color_class }}">
{% set username = username ?: avatar_data.username %}
{% set initials = username|striptags|trim(' -+_[]', 'left')|slice(0, 1)|upper %}
<div class="avatar-initials">{% if initials %}{{ initials }}{% else %}{{ Icon('font', 'user', '', true) }}{% endif %}</div>
</div>
<span class="avatar-initials">{% if initials %}{{ initials }}{% else %}{{ Icon('font', 'user', '', true) }}{% endif %}</span>
</span>
{% if avatar_link %}</a>{% endif %}
{% endif %}
6 changes: 3 additions & 3 deletions phpBB/styles/prosilver/template/avatar.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
{% set color_classes = ['avatar-color-0', 'avatar-color-1', 'avatar-color-2', 'avatar-color-3', 'avatar-color-4'] %}
{% set color_class = not(avatar_data.id starts with 'g') ? color_classes[avatar_data.id % 5] : 'avatar-color-default' %}
{% if avatar_link %}<a href="{{ avatar_link }}" class="avatar">{% endif %}
<div class="avatar-placeholder {{ color_class }}">
<span class="avatar-placeholder {{ color_class }}">
{% set username = username ?: avatar_data.username %}
{% set initials = username|striptags|trim(' -+_[]', 'left')|slice(0, 1)|upper %}
<div class="avatar-initials">{% if initials %}{{ initials }}{% else %}{{ Icon('font', 'user', '', true) }}{% endif %}</div>
</div>
<span class="avatar-initials">{% if initials %}{{ initials }}{% else %}{{ Icon('font', 'user', '', true) }}{% endif %}</span>
</span>
{% if avatar_link %}</a>{% endif %}
{% endif %}
2 changes: 1 addition & 1 deletion tests/test_framework/phpbb_functional_test_case.php
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,7 @@ protected static function get_logged_in_user()
$is_logged_in = strpos($crawler->filter('div[class="navbar"]')->text(), 'Login') === false;
if ($is_logged_in)
{
$username_logged_in = $crawler->filter('li[id="username_logged_in"] > div > a > span:not(.avatar)')->text();
$username_logged_in = $crawler->filter('li[id="username_logged_in"] > div > a > span:not(.avatar):not(.avatar-placeholder)')->text();
}
return $username_logged_in;
}
Expand Down
Loading