a few quick fixes
This commit is contained in:
parent
a0805cc29b
commit
9c42b6d722
4 changed files with 19 additions and 13 deletions
|
@ -10,7 +10,7 @@ namespace Sakura\BBcodeDefinitions;
|
|||
use JBBCode\CodeDefinition;
|
||||
use JBBCode\ElementNode;
|
||||
use Sakura\Router;
|
||||
use Sakura\User;
|
||||
use Sakura\User as SakuraUser;
|
||||
use Sakura\Utils;
|
||||
|
||||
/**
|
||||
|
@ -47,7 +47,7 @@ class User extends CodeDefinition
|
|||
$content .= Utils::cleanString($child->getAsText(), true);
|
||||
}
|
||||
|
||||
$user = User::construct($content);
|
||||
$user = SakuraUser::construct($content);
|
||||
$profile = Router::route('user.profile', $user->id);
|
||||
|
||||
return "<a class='default username' href='{$profile} style='color: {$user->colour};
|
||||
|
|
|
@ -106,7 +106,9 @@ class ForumController extends Controller
|
|||
->orderByRaw('COUNT(*) DESC')
|
||||
->limit(1)
|
||||
->get(['poster_id']);
|
||||
$activePoster = User::construct($activePosterId[0]->poster_id);
|
||||
$activePoster = User::construct(
|
||||
$activePosterId ? $activePosterId[0]->poster_id : 0
|
||||
);
|
||||
|
||||
// Create the forum object
|
||||
$forum = new Forum;
|
||||
|
|
|
@ -1084,8 +1084,8 @@ class User
|
|||
->insert([
|
||||
'change_time' => time(),
|
||||
'user_id' => $this->id,
|
||||
'username_new_clean' => $username,
|
||||
'new_clean' => $username_clean,
|
||||
'username_new' => $username,
|
||||
'username_new_clean' => $username_clean,
|
||||
'username_old' => $this->username,
|
||||
'username_old_clean' => $this->usernameClean,
|
||||
]);
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
</div>
|
||||
<div id="forumMostActivePoster">
|
||||
<div class="head">Today's most active poster</div>
|
||||
{% if not activePoster.id %}
|
||||
<a class="clean" href="{{ route('user.profile', activePoster.id) }}">
|
||||
<div class="user-container" style="background-image: url({{ route('user.header', activePoster.id) }});">
|
||||
<div class="default-avatar-setting user-container-avatar" style="background-image: url({{ route('file.avatar', activePoster.id) }}); box-shadow: 0 0 5px #{% if activePoster.isOnline %}484{% else %}844{% endif %};"></div>
|
||||
|
@ -54,6 +55,9 @@
|
|||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{% else %}
|
||||
<h1 class="stylised" style="margin: 1em 0; text-align: center;">No one yet!</h1>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-left content-column">
|
||||
|
|
Reference in a new issue