Skip to content

Commit

Permalink
No-avatar fix if on sub domain and so on.
Browse files Browse the repository at this point in the history
MariusTBjercke committed Sep 22, 2019
1 parent 21f7a29 commit 4c33e17
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pages/legion/user.php
Original file line number Diff line number Diff line change
@@ -76,11 +76,12 @@
</div>
<?php
if (empty($account->getAvatarID())) {
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
?>
<img src="../../img/avatars/no-avatar.png" title="Avatar" alt="Avatar">
<?php
} else {
echo '<img src="../../img/thumbnails/'.$account->getAvatarID().'.png" title="Avatar" alt="Avatar">';
echo '<img src="'. $actual_link .'/img/thumbnails/'.$account->getAvatarID().'.png" title="Avatar" alt="Avatar">';
}
?>
</div>

0 comments on commit 4c33e17

Please sign in to comment.