mirror of
https://github.com/slawkens/myaac.git
synced 2025-12-01 23:36:50 +01:00
Fix delete character exception
This commit is contained in:
@@ -61,6 +61,7 @@ if(isset($_POST['deletecharactersave']) && $_POST['deletecharactersave'] == 1) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(empty($errors)) {
|
||||||
$ownerid = 'ownerid';
|
$ownerid = 'ownerid';
|
||||||
if ($db->hasColumn('guilds', 'owner_id'))
|
if ($db->hasColumn('guilds', 'owner_id'))
|
||||||
$ownerid = 'owner_id';
|
$ownerid = 'owner_id';
|
||||||
@@ -68,9 +69,10 @@ if(isset($_POST['deletecharactersave']) && $_POST['deletecharactersave'] == 1) {
|
|||||||
if ($guild->rowCount() > 0) {
|
if ($guild->rowCount() > 0) {
|
||||||
$errors[] = 'You cannot delete a character when they own a guild.';
|
$errors[] = 'You cannot delete a character when they own a guild.';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(empty($errors)) {
|
if(empty($errors)) {
|
||||||
//dont show table "delete character" again
|
// don't show table "delete character" again
|
||||||
$show_form = false;
|
$show_form = false;
|
||||||
/** @var OTS_DB_MySQL $db */
|
/** @var OTS_DB_MySQL $db */
|
||||||
if ($db->hasColumn('players', 'deletion'))
|
if ($db->hasColumn('players', 'deletion'))
|
||||||
|
|||||||
Reference in New Issue
Block a user