* fixed some warnings on install on servers using account.id

* added version 772 constant to install client choose (OTHire)
* forgot to add is_sample to samples on install
This commit is contained in:
slawkens1 2017-12-18 23:30:18 +01:00
parent fed5d08703
commit 0b2895dc56
5 changed files with 15 additions and 11 deletions

5
TODO
View File

@ -8,6 +8,10 @@
* cache Menus in templates * cache Menus in templates
* don't show error indicators on first time load - createaccount page * don't show error indicators on first time load - createaccount page
* update Twig to the latest version from 1.x branch * update Twig to the latest version from 1.x branch
* semantic versioning support for plugins (github.com/composer/semver)
* database towns table support for TFS 1.3
* players.is_sample is waste, better save in config.php array of ignored ids
* add some notice to the user that installing step "Import Schema" will take some time
1.0: 1.0:
* i18n support (issue #1 on github) * i18n support (issue #1 on github)
@ -20,7 +24,6 @@
* rename templates to layouts as templates is meant to be used for twig templates * rename templates to layouts as templates is meant to be used for twig templates
* change gifts_system to shop_system configurable * change gifts_system to shop_system configurable
At any time between (version not specified): At any time between (version not specified):
* better news archive with search function (like on tibia.com) * better news archive with search function (like on tibia.com)
* guild wars management (issue #13 on github) * guild wars management (issue #13 on github)

View File

@ -69,10 +69,10 @@ else if($step == 'finish') {
} }
} }
else if(isset($_SESSION['var_account_id'])) { else if(isset($_SESSION['var_account_id'])) {
if(!Validator::accountId($account_id)) { if(!Validator::accountId($_SESSION['var_account_id'])) {
$errors[] = $locale['step_admin_account_id_error_format']; $errors[] = $locale['step_admin_account_id_error_format'];
} }
else if($_SESSION['var_account'] == $password) { else if($_SESSION['var_account_id'] == $password) {
$errors[] = $locale['step_admin_account_id_error_same']; $errors[] = $locale['step_admin_account_id_error_same'];
} }
} }

View File

@ -7,6 +7,7 @@ $clients_list = array(
750, 750,
760, 760,
770, 770,
772,
780, 780,
7920, 7920,
800, 800,

View File

@ -113,36 +113,36 @@ else {
if(fieldExist('deletion', 'players')) if(fieldExist('deletion', 'players'))
$deleted = 'deletion'; $deleted = 'deletion';
$insert_into_players = "INSERT INTO `players` (`id`, `name`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `lastlogout`, `balance`, `$deleted`, `created`, `hidden`, `comment`) VALUES "; $insert_into_players = "INSERT INTO `players` (`id`, `name`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `lastlogout`, `balance`, `$deleted`, `created`, `hidden`, `comment`, `is_sample`) VALUES ";
$success = true; $success = true;
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Rook Sample')); $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Rook Sample'));
if($query->rowCount() == 0) { if($query->rowCount() == 0) {
if(!query($insert_into_players . "(null, 'Rook Sample', 1, " . getSession('account') . ", 1, 0, 150, 150, 4200, 118, 114, 38, 57, 130, 0, 0, 0, 0, 100, 1, 1000, 1000, 7, '', 400, 1, 1255179613, 2453925456, 1, 1255179614, 0, 0, UNIX_TIMESTAMP(), 1, '');")) if(!query($insert_into_players . "(null, 'Rook Sample', 1, " . getSession('account') . ", 1, 0, 150, 150, 4200, 118, 114, 38, 57, 130, 0, 0, 0, 0, 100, 1, 1000, 1000, 7, '', 400, 1, 1255179613, 2453925456, 1, 1255179614, 0, 0, UNIX_TIMESTAMP(), 1, '', 1);"))
$success = false; $success = false;
} }
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Sorcerer Sample')); $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Sorcerer Sample'));
if($query->rowCount() == 0) { if($query->rowCount() == 0) {
if(!query($insert_into_players . "(null, 'Sorcerer Sample', 1, " . getSession('account') . ", 8, 1, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 470, 1, 1255179571, 2453925456, 1, 1255179612, 0, 0, UNIX_TIMESTAMP(), 1, '');")) if(!query($insert_into_players . "(null, 'Sorcerer Sample', 1, " . getSession('account') . ", 8, 1, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 470, 1, 1255179571, 2453925456, 1, 1255179612, 0, 0, UNIX_TIMESTAMP(), 1, '', 1);"))
$success = false; $success = false;
} }
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Druid Sample')); $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Druid Sample'));
if($query->rowCount() == 0) { if($query->rowCount() == 0) {
if(!query($insert_into_players . "(null, 'Druid Sample', 1, " . getSession('account') . ", 8, 2, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 470, 1, 1255179655, 2453925456, 1, 1255179658, 0, 0, UNIX_TIMESTAMP(), 1, '');")) if(!query($insert_into_players . "(null, 'Druid Sample', 1, " . getSession('account') . ", 8, 2, 185, 185, 4200, 118, 114, 38, 57, 130, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 470, 1, 1255179655, 2453925456, 1, 1255179658, 0, 0, UNIX_TIMESTAMP(), 1, '', 1);"))
$success = false; $success = false;
} }
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Paladin Sample')); $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Paladin Sample'));
if($query->rowCount() == 0) { if($query->rowCount() == 0) {
if(!query($insert_into_players . "(null, 'Paladin Sample', 1, " . getSession('account') . ", 8, 3, 185, 185, 4200, 118, 114, 38, 57, 129, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 470, 1, 1255179854, 2453925456, 1, 1255179858, 0, 0, UNIX_TIMESTAMP(), 1, '');")) if(!query($insert_into_players . "(null, 'Paladin Sample', 1, " . getSession('account') . ", 8, 3, 185, 185, 4200, 118, 114, 38, 57, 129, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 470, 1, 1255179854, 2453925456, 1, 1255179858, 0, 0, UNIX_TIMESTAMP(), 1, '', 1);"))
$success = false; $success = false;
} }
$query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Knight Sample')); $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Knight Sample'));
if($query->rowCount() == 0) { if($query->rowCount() == 0) {
if(!query($insert_into_players . "(null, 'Knight Sample', 1, " . getSession('account') . ", 8, 4, 185, 185, 4200, 118, 114, 38, 57, 131, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 470, 1, 1255179620, 2453925456, 1, 1255179654, 0, 0, UNIX_TIMESTAMP(), 1, '');")) if(!query($insert_into_players . "(null, 'Knight Sample', 1, " . getSession('account') . ", 8, 4, 185, 185, 4200, 118, 114, 38, 57, 131, 0, 35, 35, 0, 100, 1, 1000, 1000, 7, '', 470, 1, 1255179620, 2453925456, 1, 1255179654, 0, 0, UNIX_TIMESTAMP(), 1, '', 1);"))
$success = false; $success = false;
} }

View File

@ -83,8 +83,8 @@ $locale['step_admin_account'] = 'Admin account name';
$locale['step_admin_account_desc'] = 'Name of your admin account, which will be used to login to website and server.'; $locale['step_admin_account_desc'] = 'Name of your admin account, which will be used to login to website and server.';
$locale['step_admin_account_error_format'] = 'Invalid account name format. Use only a-Z and numbers 0-9. Minimum 3, maximum 32 characters.'; $locale['step_admin_account_error_format'] = 'Invalid account name format. Use only a-Z and numbers 0-9. Minimum 3, maximum 32 characters.';
$locale['step_admin_account_error_same'] = 'Password may not be the same as account name.'; $locale['step_admin_account_error_same'] = 'Password may not be the same as account name.';
$locale['step_admin_account_id'] = 'Admin account id'; $locale['step_admin_account_id'] = 'Admin account number';
$locale['step_admin_account_id_desc'] = 'ID of your admin account, which will be used to login to website and server.'; $locale['step_admin_account_id_desc'] = 'Number of your admin account, which will be used to login to website and server.';
$locale['step_admin_account_id_error_format'] = 'Invalid account number format. Please use only numbers 0-9. Minimum 6, maximum 10 characters.'; $locale['step_admin_account_id_error_format'] = 'Invalid account number format. Please use only numbers 0-9. Minimum 6, maximum 10 characters.';
$locale['step_admin_account_id_error_same'] = 'Password may not be the same as account number.'; $locale['step_admin_account_id_error_same'] = 'Password may not be the same as account number.';
$locale['step_admin_password'] = 'Admin account password'; $locale['step_admin_password'] = 'Admin account password';