mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-13 18:04:54 +02:00
Fix #345 - Character Auction storage account
When storage_account_id is not configured in config.php and people want to try the character auction system Give them an error message instead of a query crash. Telling them to edit config.php properly.
This commit is contained in:
@@ -483,9 +483,20 @@ if ($auction['characterAuction']) {
|
||||
AND `p`.`group_id` = 1
|
||||
LIMIT 1
|
||||
;");
|
||||
if (isset($player['online']) && $player['online'] == 0) {
|
||||
if (isset($player['alreadyInAuction']) && $player['alreadyInAuction'] == 0) {
|
||||
$status = true;
|
||||
// Verify storage account ID exist
|
||||
$storage_account = mysql_select_single("
|
||||
SELECT `id`
|
||||
FROM `accounts`
|
||||
WHERE `id`={$auction['storage_account_id']}
|
||||
LIMIT 1;
|
||||
");
|
||||
if ($storage_account === false) {
|
||||
data_dump($auction, false, "Configured storage_account_id in config.php does not exist!");
|
||||
} else {
|
||||
if (isset($player['online']) && $player['online'] == 0) {
|
||||
if (isset($player['alreadyInAuction']) && $player['alreadyInAuction'] == 0) {
|
||||
$status = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user