Skip to content

Commit

Permalink
Error in recent commit. #374 (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanasol authored Nov 13, 2023
1 parent a2a068a commit e6ca3bd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
34 changes: 17 additions & 17 deletions modules/account/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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)) {
Expand Down Expand Up @@ -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)));
}
Expand All @@ -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";
Expand Down Expand Up @@ -190,7 +190,7 @@

foreach ($items as $item) {
$item->cardsOver = -$item->slots;

if ($item->card0) {
$cardIDs[] = $item->card0;
$item->cardsOver++;
Expand All @@ -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;
}
Expand Down Expand Up @@ -237,7 +237,7 @@
}
}
}

$itemAttributes = Flux::config('Attributes')->toArray();
$type_list = Flux::config('ItemTypes')->toArray();
}
Expand Down
2 changes: 1 addition & 1 deletion themes/default/guild/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<th>Guild Name</th>
<td><?php echo htmlspecialchars($guild->name) ?></td>
<th>Emblem ID</th>
<td><?php echo number_format($guild->emblem_id) ?></td>
<td><?php echo number_format($guild->emblem) ?></td>
<td><img src="<?php echo $this->emblem($guild->guild_id) ?>" /></td>
</tr>
<tr>
Expand Down

0 comments on commit e6ca3bd

Please sign in to comment.