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\CodeDefinition;
|
||||||
use JBBCode\ElementNode;
|
use JBBCode\ElementNode;
|
||||||
use Sakura\Router;
|
use Sakura\Router;
|
||||||
use Sakura\User;
|
use Sakura\User as SakuraUser;
|
||||||
use Sakura\Utils;
|
use Sakura\Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,7 +47,7 @@ class User extends CodeDefinition
|
||||||
$content .= Utils::cleanString($child->getAsText(), true);
|
$content .= Utils::cleanString($child->getAsText(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = User::construct($content);
|
$user = SakuraUser::construct($content);
|
||||||
$profile = Router::route('user.profile', $user->id);
|
$profile = Router::route('user.profile', $user->id);
|
||||||
|
|
||||||
return "<a class='default username' href='{$profile} style='color: {$user->colour};
|
return "<a class='default username' href='{$profile} style='color: {$user->colour};
|
||||||
|
|
|
@ -106,7 +106,9 @@ class ForumController extends Controller
|
||||||
->orderByRaw('COUNT(*) DESC')
|
->orderByRaw('COUNT(*) DESC')
|
||||||
->limit(1)
|
->limit(1)
|
||||||
->get(['poster_id']);
|
->get(['poster_id']);
|
||||||
$activePoster = User::construct($activePosterId[0]->poster_id);
|
$activePoster = User::construct(
|
||||||
|
$activePosterId ? $activePosterId[0]->poster_id : 0
|
||||||
|
);
|
||||||
|
|
||||||
// Create the forum object
|
// Create the forum object
|
||||||
$forum = new Forum;
|
$forum = new Forum;
|
||||||
|
|
|
@ -1084,8 +1084,8 @@ class User
|
||||||
->insert([
|
->insert([
|
||||||
'change_time' => time(),
|
'change_time' => time(),
|
||||||
'user_id' => $this->id,
|
'user_id' => $this->id,
|
||||||
'username_new_clean' => $username,
|
'username_new' => $username,
|
||||||
'new_clean' => $username_clean,
|
'username_new_clean' => $username_clean,
|
||||||
'username_old' => $this->username,
|
'username_old' => $this->username,
|
||||||
'username_old_clean' => $this->usernameClean,
|
'username_old_clean' => $this->usernameClean,
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="forumMostActivePoster">
|
<div id="forumMostActivePoster">
|
||||||
<div class="head">Today's most active poster</div>
|
<div class="head">Today's most active poster</div>
|
||||||
|
{% if not activePoster.id %}
|
||||||
<a class="clean" href="{{ route('user.profile', 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="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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
{% else %}
|
||||||
|
<h1 class="stylised" style="margin: 1em 0; text-align: center;">No one yet!</h1>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-left content-column">
|
<div class="content-left content-column">
|
||||||
|
|
Reference in a new issue