From 0c258ceb4790bc6a4c6cde83cf48d9dbb81cf925 Mon Sep 17 00:00:00 2001 From: sanasol Date: Mon, 13 Nov 2023 13:16:50 +0300 Subject: [PATCH] Error in recent commit. #374 --- modules/account/view.php | 34 +++++++++++++++++----------------- themes/default/guild/view.php | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/modules/account/view.php b/modules/account/view.php index b52764661..22d0f6fdf 100644 --- a/modules/account/view.php +++ b/modules/account/view.php @@ -34,17 +34,17 @@ if (!$auth->allowedToViewAccount) { $this->deny(); } - + $sql = "SELECT login.*, {$creditColumns}, {$createColumns} FROM {$server->loginDatabase}.login "; $sql .= "LEFT OUTER JOIN {$server->loginDatabase}.{$creditsTable} AS credits ON login.account_id = credits.account_id "; $sql .= "LEFT OUTER JOIN {$server->loginDatabase}.{$createTable} AS created ON login.account_id = created.account_id "; $sql .= "WHERE login.sex != 'S' AND login.group_id >= 0 AND login.account_id = ? LIMIT 1"; $sth = $server->connection->getStatement($sql); $sth->execute(array($accountID)); - + // Account object. $account = $sth->fetch(); - + if ($account) { $title = sprintf(Flux::message('AccountViewTitle2'), $account->userid); } @@ -70,11 +70,11 @@ $vipexpires = 'Expires '.$dt->format('Y-m-d'); } elseif ($account->vip_time == '0'){ $vipexpires = 'Standard Account'; -} else {$vipexpires = 'Unknown';} +} else {$vipexpires = 'Unknown';} if (count($_POST) && $account) { $reason = (string)$params->get('reason'); - + if ($params->get('tempban') && ($tempBanDate=$params->get('tempban_date'))) { if ($canTempBan) { if ($server->loginServer->temporarilyBan($session->account->account_id, $reason, $account->account_id, $tempBanDate)) { @@ -108,30 +108,30 @@ $tbl = Flux::config('FluxTables.AccountCreateTable'); $sql = "SELECT account_id FROM {$server->loginDatabase}.$tbl WHERE confirmed = 0 AND account_id = ?"; $sth = $server->connection->getStatement($sql); - + $sth->execute(array($account->account_id)); $confirm = $sth->fetch(); - + $sql = "UPDATE {$server->loginDatabase}.$tbl SET confirmed = 1, confirm_expire = NULL WHERE account_id = ?"; $sth = $server->connection->getStatement($sql); - + if ($tempBanned && $auth->allowedToTempUnbanAccount && $server->loginServer->unban($session->account->account_id, $reason, $account->account_id)) { - + if ($confirm) { $sth->execute(array($account->account_id)); } - + $session->setMessageData(Flux::message('AccountLiftTempBan')); $this->redirect($this->url('account', 'view', array('id' => $account->account_id))); } elseif ($permBanned && $auth->allowedToPermUnbanAccount && $server->loginServer->unban($session->account->account_id, $reason, $account->account_id)) { - + if ($confirm) { $sth->execute(array($account->account_id)); } - + $session->setMessageData(Flux::message('AccountLiftPermBan')); $this->redirect($this->url('account', 'view', array('id' => $account->account_id))); } @@ -149,8 +149,8 @@ $characters = array(); foreach ($session->getAthenaServerNames() as $serverName) { $athena = $session->getAthenaServer($serverName); - - $sql = "SELECT ch.*, guild.name AS guild_name, "; + + $sql = "SELECT ch.*, guild.name AS guild_name "; $sql .= "FROM {$athena->charMapDatabase}.`char` AS ch "; $sql .= "LEFT OUTER JOIN {$athena->charMapDatabase}.guild ON guild.guild_id = ch.guild_id "; $sql .= "WHERE ch.account_id = ? ORDER BY ch.char_num ASC"; @@ -190,7 +190,7 @@ foreach ($items as $item) { $item->cardsOver = -$item->slots; - + if ($item->card0) { $cardIDs[] = $item->card0; $item->cardsOver++; @@ -207,7 +207,7 @@ $cardIDs[] = $item->card3; $item->cardsOver++; } - + if ($item->card0 == 254 || $item->card0 == 255 || $item->card0 == -256 || $item->cardsOver < 0) { $item->cardsOver = 0; } @@ -237,7 +237,7 @@ } } } - + $itemAttributes = Flux::config('Attributes')->toArray(); $type_list = Flux::config('ItemTypes')->toArray(); } diff --git a/themes/default/guild/view.php b/themes/default/guild/view.php index 1c234bea9..50bae9f5d 100644 --- a/themes/default/guild/view.php +++ b/themes/default/guild/view.php @@ -9,7 +9,7 @@ Guild Name name) ?> Emblem ID - emblem_id) ?> + emblem) ?>