diff --git a/TODO b/TODO index f882e4cb..d8a0c650 100644 --- a/TODO +++ b/TODO @@ -8,6 +8,10 @@ * cache Menus in templates * don't show error indicators on first time load - createaccount page * 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: * i18n support (issue #1 on github) @@ -20,7 +24,6 @@ * rename templates to layouts as templates is meant to be used for twig templates * change gifts_system to shop_system configurable - At any time between (version not specified): * better news archive with search function (like on tibia.com) * guild wars management (issue #13 on github) diff --git a/install/index.php b/install/index.php index f5c9ca2c..fdb6e86e 100644 --- a/install/index.php +++ b/install/index.php @@ -69,10 +69,10 @@ else if($step == 'finish') { } } 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']; } - else if($_SESSION['var_account'] == $password) { + else if($_SESSION['var_account_id'] == $password) { $errors[] = $locale['step_admin_account_id_error_same']; } } diff --git a/install/steps/4-config.php b/install/steps/4-config.php index 2d0a311b..56aaa0d1 100644 --- a/install/steps/4-config.php +++ b/install/steps/4-config.php @@ -7,6 +7,7 @@ $clients_list = array( 750, 760, 770, + 772, 780, 7920, 800, diff --git a/install/steps/7-finish.php b/install/steps/7-finish.php index e847958c..75d974ba 100644 --- a/install/steps/7-finish.php +++ b/install/steps/7-finish.php @@ -113,36 +113,36 @@ else { if(fieldExist('deletion', 'players')) $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; $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Rook Sample')); 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; } $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Sorcerer Sample')); 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; } $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Druid Sample')); 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; } $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Paladin Sample')); 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; } $query = $db->query('SELECT `id` FROM `players` WHERE `name` = ' . $db->quote('Knight Sample')); 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; } diff --git a/system/locale/en/install.php b/system/locale/en/install.php index b9eb0ab9..383cebb1 100644 --- a/system/locale/en/install.php +++ b/system/locale/en/install.php @@ -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_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_id'] = 'Admin account id'; -$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'] = 'Admin account number'; +$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_same'] = 'Password may not be the same as account number.'; $locale['step_admin_password'] = 'Admin account password';