Applied fixes from StyleCI
This commit is contained in:
parent
082bd62efc
commit
64998fdc04
2 changed files with 6 additions and 5 deletions
|
@ -174,7 +174,7 @@ class User
|
||||||
$sessions = Database::fetch('sessions', true, ['user_id' => [$this->id(), '=']]);
|
$sessions = Database::fetch('sessions', true, ['user_id' => [$this->id(), '=']]);
|
||||||
|
|
||||||
// If there's no entries just straight up return false
|
// If there's no entries just straight up return false
|
||||||
if(!$sessions) {
|
if (!$sessions) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,7 +207,8 @@ class User
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add ranks to a user
|
// Add ranks to a user
|
||||||
public function addRanks($ranks) {
|
public function addRanks($ranks)
|
||||||
|
{
|
||||||
// Update the ranks array
|
// Update the ranks array
|
||||||
$ranks = array_map('intval', array_unique(array_merge($this->ranks(), $ranks)));
|
$ranks = array_map('intval', array_unique(array_merge($this->ranks(), $ranks)));
|
||||||
|
|
||||||
|
@ -231,7 +232,7 @@ class User
|
||||||
// Iterate over the ranks
|
// Iterate over the ranks
|
||||||
foreach ($ranks as $rank) {
|
foreach ($ranks as $rank) {
|
||||||
// Try to find the value
|
// Try to find the value
|
||||||
if($key = array_search($rank, $currRanks)) {
|
if ($key = array_search($rank, $currRanks)) {
|
||||||
unset($currRanks[$key]);
|
unset($currRanks[$key]);
|
||||||
|
|
||||||
// Change the main rank if it's set to the rank that's currently being remove
|
// Change the main rank if it's set to the rank that's currently being remove
|
||||||
|
|
|
@ -65,7 +65,7 @@ if (isset($_REQUEST['request-notifications']) && $_REQUEST['request-notification
|
||||||
$_SESSION['friendsOnline'][$friend->id()] = $friend->id();
|
$_SESSION['friendsOnline'][$friend->id()] = $friend->id();
|
||||||
|
|
||||||
// Add the notification to the display array
|
// Add the notification to the display array
|
||||||
if($onlineNotify) {
|
if ($onlineNotify) {
|
||||||
$notifications[] = [
|
$notifications[] = [
|
||||||
'read' => 0,
|
'read' => 0,
|
||||||
'title' => $friend->username() . ' is online.',
|
'title' => $friend->username() . ' is online.',
|
||||||
|
@ -81,7 +81,7 @@ if (isset($_REQUEST['request-notifications']) && $_REQUEST['request-notification
|
||||||
unset($_SESSION['friendsOnline'][$friend->id()]);
|
unset($_SESSION['friendsOnline'][$friend->id()]);
|
||||||
|
|
||||||
// Add the notification to the display array
|
// Add the notification to the display array
|
||||||
if($onlineNotify) {
|
if ($onlineNotify) {
|
||||||
$notifications[] = [
|
$notifications[] = [
|
||||||
'read' => 0,
|
'read' => 0,
|
||||||
'title' => $friend->username() . ' is offline.',
|
'title' => $friend->username() . ' is offline.',
|
||||||
|
|
Reference in a new issue