mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 09:49:22 +02:00
Do not allow continue install when there is no server database imported
This commit is contained in:
parent
7a3dcc4dc6
commit
6dbc694409
@ -55,12 +55,30 @@ if(!$error) {
|
|||||||
error($database_error);
|
error($database_error);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if(!$db->hasTable('accounts')) {
|
||||||
|
$tmp = str_replace('$TABLE$', 'accounts', $locale['step_database_error_table']);
|
||||||
|
error($tmp);
|
||||||
|
$error = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$db->hasTable('players')) {
|
||||||
|
$tmp = str_replace('$TABLE$', 'players', $locale['step_database_error_table']);
|
||||||
|
error($tmp);
|
||||||
|
$error = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$db->hasTable('guilds')) {
|
||||||
|
$tmp = str_replace('$TABLE$', 'guilds', $locale['step_database_error_table']);
|
||||||
|
error($tmp);
|
||||||
|
$error = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$error) {
|
||||||
$twig->display('install.installer.html.twig', array(
|
$twig->display('install.installer.html.twig', array(
|
||||||
'url' => 'tools/5-database.php',
|
'url' => 'tools/5-database.php',
|
||||||
'message' => $locale['loading_spinner']
|
'message' => $locale['loading_spinner']
|
||||||
));
|
));
|
||||||
|
|
||||||
if(!$error) {
|
|
||||||
if(!Validator::email($_SESSION['var_mail_admin'])) {
|
if(!Validator::email($_SESSION['var_mail_admin'])) {
|
||||||
error($locale['step_config_mail_admin_error']);
|
error($locale['step_config_mail_admin_error']);
|
||||||
$error = true;
|
$error = true;
|
||||||
|
@ -23,24 +23,6 @@ if(!$error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$db->hasTable('accounts')) {
|
|
||||||
$locale['step_database_error_table'] = str_replace('$TABLE$', 'accounts', $locale['step_database_error_table']);
|
|
||||||
error($locale['step_database_error_table']);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!$db->hasTable('players')) {
|
|
||||||
$locale['step_database_error_table'] = str_replace('$TABLE$', 'players', $locale['step_database_error_table']);
|
|
||||||
error($locale['step_database_error_table']);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!$db->hasTable('guilds')) {
|
|
||||||
$locale['step_database_error_table'] = str_replace('$TABLE$', 'guilds', $locale['step_database_error_table']);
|
|
||||||
error($locale['step_database_error_table']);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($db->hasTable(TABLE_PREFIX . 'account_actions')) {
|
if($db->hasTable(TABLE_PREFIX . 'account_actions')) {
|
||||||
$locale['step_database_error_table_exist'] = str_replace('$TABLE$', TABLE_PREFIX . 'account_actions', $locale['step_database_error_table_exist']);
|
$locale['step_database_error_table_exist'] = str_replace('$TABLE$', TABLE_PREFIX . 'account_actions', $locale['step_database_error_table_exist']);
|
||||||
warning($locale['step_database_error_table_exist']);
|
warning($locale['step_database_error_table_exist']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user