@@ -25,11 +25,11 @@ discard block |
||
| 25 | 25 | class template |
| 26 | 26 | { |
| 27 | 27 | /** variable that holds all the data we'll be substituting into |
| 28 | - * the compiled templates. Takes form: |
|
| 29 | - * --> $this->_tpldata[block][iteration#][child][iteration#][child2][iteration#][variablename] == value |
|
| 30 | - * if it's a root-level variable, it'll be like this: |
|
| 31 | - * --> $this->_tpldata[.][0][varname] == value |
|
| 32 | - */ |
|
| 28 | + * the compiled templates. Takes form: |
|
| 29 | + * --> $this->_tpldata[block][iteration#][child][iteration#][child2][iteration#][variablename] == value |
|
| 30 | + * if it's a root-level variable, it'll be like this: |
|
| 31 | + * --> $this->_tpldata[.][0][varname] == value |
|
| 32 | + */ |
|
| 33 | 33 | var $_tpldata = array('.' => array(0 => array())); |
| 34 | 34 | var $_rootref; |
| 35 | 35 | // var $_block_counter = array(); |
@@ -60,9 +60,9 @@ discard block |
||
| 60 | 60 | var $parsed = false; |
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | - * Set template location |
|
| 64 | - * @access public |
|
| 65 | - */ |
|
| 63 | + * Set template location |
|
| 64 | + * @access public |
|
| 65 | + */ |
|
| 66 | 66 | function set_template() |
| 67 | 67 | { |
| 68 | 68 | global $phpbb_root_path, $user; |
@@ -101,9 +101,9 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
| 104 | - * Set custom template location (able to use directory outside of phpBB) |
|
| 105 | - * @access public |
|
| 106 | - */ |
|
| 104 | + * Set custom template location (able to use directory outside of phpBB) |
|
| 105 | + * @access public |
|
| 106 | + */ |
|
| 107 | 107 | function set_custom_template($template_path, $template_name, $fallback_template_path = false) |
| 108 | 108 | { |
| 109 | 109 | global $phpbb_root_path, $user; |
@@ -142,10 +142,10 @@ discard block |
||
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | /** |
| 145 | - * Sets the template filenames for handles. $filename_array |
|
| 146 | - * should be a hash of handle => filename pairs. |
|
| 147 | - * @access public |
|
| 148 | - */ |
|
| 145 | + * Sets the template filenames for handles. $filename_array |
|
| 146 | + * should be a hash of handle => filename pairs. |
|
| 147 | + * @access public |
|
| 148 | + */ |
|
| 149 | 149 | function set_filenames($filename_array) |
| 150 | 150 | { |
| 151 | 151 | if (!is_array($filename_array)) |
@@ -172,9 +172,9 @@ discard block |
||
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | /** |
| 175 | - * Destroy template data set |
|
| 176 | - * @access public |
|
| 177 | - */ |
|
| 175 | + * Destroy template data set |
|
| 176 | + * @access public |
|
| 177 | + */ |
|
| 178 | 178 | function destroy() |
| 179 | 179 | { |
| 180 | 180 | $this->_tpldata = array('.' => array(0 => array())); |
@@ -182,9 +182,9 @@ discard block |
||
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | /** |
| 185 | - * Reset/empty complete block |
|
| 186 | - * @access public |
|
| 187 | - */ |
|
| 185 | + * Reset/empty complete block |
|
| 186 | + * @access public |
|
| 187 | + */ |
|
| 188 | 188 | function destroy_block_vars($blockname) |
| 189 | 189 | { |
| 190 | 190 | if (strpos($blockname, '.') !== false) |
@@ -212,9 +212,9 @@ discard block |
||
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | /** |
| 215 | - * Display handle |
|
| 216 | - * @access public |
|
| 217 | - */ |
|
| 215 | + * Display handle |
|
| 216 | + * @access public |
|
| 217 | + */ |
|
| 218 | 218 | function display($handle, $include_once = true) |
| 219 | 219 | { |
| 220 | 220 | global $user, $phpbb_hook, $lang, $config; |
@@ -248,9 +248,9 @@ discard block |
||
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | /** |
| 251 | - * Display the handle and assign the output to a template variable or return the compiled result. |
|
| 252 | - * @access public |
|
| 253 | - */ |
|
| 251 | + * Display the handle and assign the output to a template variable or return the compiled result. |
|
| 252 | + * @access public |
|
| 253 | + */ |
|
| 254 | 254 | function assign_display($handle, $template_var = '', $return_content = true, $include_once = false) |
| 255 | 255 | { |
| 256 | 256 | ob_start(); |
@@ -268,9 +268,9 @@ discard block |
||
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | /** |
| 271 | - * Load a compiled template if possible, if not, recompile it |
|
| 272 | - * @access private |
|
| 273 | - */ |
|
| 271 | + * Load a compiled template if possible, if not, recompile it |
|
| 272 | + * @access private |
|
| 273 | + */ |
|
| 274 | 274 | function _tpl_load(&$handle) |
| 275 | 275 | { |
| 276 | 276 | global $user, $config; |
@@ -453,9 +453,9 @@ discard block |
||
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | /** |
| 456 | - * Assign key variable pairs from an array |
|
| 457 | - * @access public |
|
| 458 | - */ |
|
| 456 | + * Assign key variable pairs from an array |
|
| 457 | + * @access public |
|
| 458 | + */ |
|
| 459 | 459 | function assign_vars($vararray) |
| 460 | 460 | { |
| 461 | 461 | foreach ($vararray as $key => $val) |
@@ -467,9 +467,9 @@ discard block |
||
| 467 | 467 | } |
| 468 | 468 | |
| 469 | 469 | /** |
| 470 | - * Assign a single variable to a single key |
|
| 471 | - * @access public |
|
| 472 | - */ |
|
| 470 | + * Assign a single variable to a single key |
|
| 471 | + * @access public |
|
| 472 | + */ |
|
| 473 | 473 | function assign_var($varname, $varval) |
| 474 | 474 | { |
| 475 | 475 | $this->_rootref[$varname] = $varval; |
@@ -478,9 +478,9 @@ discard block |
||
| 478 | 478 | } |
| 479 | 479 | |
| 480 | 480 | /** |
| 481 | - * Assign key variable pairs from an array to a specified block |
|
| 482 | - * @access public |
|
| 483 | - */ |
|
| 481 | + * Assign key variable pairs from an array to a specified block |
|
| 482 | + * @access public |
|
| 483 | + */ |
|
| 484 | 484 | function assign_block_vars($blockname, $vararray) |
| 485 | 485 | { |
| 486 | 486 | if (strpos($blockname, '.') !== false) |
@@ -545,33 +545,33 @@ discard block |
||
| 545 | 545 | } |
| 546 | 546 | |
| 547 | 547 | /** |
| 548 | - * Change already assigned key variable pair (one-dimensional - single loop entry) |
|
| 549 | - * |
|
| 550 | - * An example of how to use this function: |
|
| 551 | - * {@example alter_block_array.php} |
|
| 552 | - * |
|
| 553 | - * @param string $blockname the blockname, for example 'loop' |
|
| 554 | - * @param array $vararray the var array to insert/add or merge |
|
| 555 | - * @param mixed $key Key to search for |
|
| 556 | - * |
|
| 557 | - * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position] |
|
| 558 | - * |
|
| 559 | - * int: Position [the position to change or insert at directly given] |
|
| 560 | - * |
|
| 561 | - * If key is false the position is set to 0 |
|
| 562 | - * If key is true the position is set to the last entry |
|
| 563 | - * |
|
| 564 | - * @param string $mode Mode to execute (valid modes are 'insert' and 'change') |
|
| 565 | - * |
|
| 566 | - * If insert, the vararray is inserted at the given position (position counting from zero). |
|
| 567 | - * If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new value). |
|
| 568 | - * |
|
| 569 | - * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array) |
|
| 570 | - * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars) |
|
| 571 | - * |
|
| 572 | - * @return bool false on error, true on success |
|
| 573 | - * @access public |
|
| 574 | - */ |
|
| 548 | + * Change already assigned key variable pair (one-dimensional - single loop entry) |
|
| 549 | + * |
|
| 550 | + * An example of how to use this function: |
|
| 551 | + * {@example alter_block_array.php} |
|
| 552 | + * |
|
| 553 | + * @param string $blockname the blockname, for example 'loop' |
|
| 554 | + * @param array $vararray the var array to insert/add or merge |
|
| 555 | + * @param mixed $key Key to search for |
|
| 556 | + * |
|
| 557 | + * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position] |
|
| 558 | + * |
|
| 559 | + * int: Position [the position to change or insert at directly given] |
|
| 560 | + * |
|
| 561 | + * If key is false the position is set to 0 |
|
| 562 | + * If key is true the position is set to the last entry |
|
| 563 | + * |
|
| 564 | + * @param string $mode Mode to execute (valid modes are 'insert' and 'change') |
|
| 565 | + * |
|
| 566 | + * If insert, the vararray is inserted at the given position (position counting from zero). |
|
| 567 | + * If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new value). |
|
| 568 | + * |
|
| 569 | + * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array) |
|
| 570 | + * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars) |
|
| 571 | + * |
|
| 572 | + * @return bool false on error, true on success |
|
| 573 | + * @access public |
|
| 574 | + */ |
|
| 575 | 575 | function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert') |
| 576 | 576 | { |
| 577 | 577 | if (strpos($blockname, '.') !== false) |
@@ -655,9 +655,9 @@ discard block |
||
| 655 | 655 | } |
| 656 | 656 | |
| 657 | 657 | /** |
| 658 | - * Include a separate template |
|
| 659 | - * @access private |
|
| 660 | - */ |
|
| 658 | + * Include a separate template |
|
| 659 | + * @access private |
|
| 660 | + */ |
|
| 661 | 661 | function _tpl_include($filename, $include = true) |
| 662 | 662 | { |
| 663 | 663 | global $lang, $config; |
@@ -686,9 +686,9 @@ discard block |
||
| 686 | 686 | } |
| 687 | 687 | |
| 688 | 688 | /** |
| 689 | - * Include a php-file |
|
| 690 | - * @access private |
|
| 691 | - */ |
|
| 689 | + * Include a php-file |
|
| 690 | + * @access private |
|
| 691 | + */ |
|
| 692 | 692 | function _php_include($filename) |
| 693 | 693 | { |
| 694 | 694 | global $phpbb_root_path; |
@@ -705,9 +705,9 @@ discard block |
||
| 705 | 705 | } |
| 706 | 706 | |
| 707 | 707 | /** |
| 708 | - * Assign key variable pairs from an array with block support |
|
| 709 | - * @access public |
|
| 710 | - */ |
|
| 708 | + * Assign key variable pairs from an array with block support |
|
| 709 | + * @access public |
|
| 710 | + */ |
|
| 711 | 711 | function assign_recursive($values, $name = '') |
| 712 | 712 | { |
| 713 | 713 | if(isset($values['.'])) |
@@ -332,8 +332,8 @@ discard block |
||
| 332 | 332 | upd_do_query("UPDATE `{{planets}}` SET `crystal` = 0 WHERE `crystal` < 0;"); |
| 333 | 333 | upd_do_query("UPDATE `{{planets}}` SET `deuterium` = 0 WHERE `deuterium` < 0;"); |
| 334 | 334 | upd_alter_table('planets', array( |
| 335 | - "DROP COLUMN `b_building`", |
|
| 336 | - "DROP COLUMN `b_building_id`" |
|
| 335 | + "DROP COLUMN `b_building`", |
|
| 336 | + "DROP COLUMN `b_building_id`" |
|
| 337 | 337 | ), $update_tables['planets']['b_building']); |
| 338 | 338 | |
| 339 | 339 | upd_do_query("DELETE FROM {{config}} WHERE `config_name` IN ('noobprotection', 'noobprotectionmulti', 'noobprotectiontime', 'chat_admin_msgFormat');"); |
@@ -587,8 +587,8 @@ discard block |
||
| 587 | 587 | upd_do_query("UPDATE {{users}} AS u LEFT JOIN {{alliance}} AS a ON u.ally_id = a.id SET u.ally_name = a.ally_name, u.ally_tag = a.ally_tag WHERE u.ally_id IS NOT NULL;"); |
| 588 | 588 | |
| 589 | 589 | upd_alter_table('users', array( |
| 590 | - "ADD CONSTRAINT `FK_users_ally_id` FOREIGN KEY (`ally_id`) REFERENCES `{$config->db_prefix}alliance` (`id`) ON DELETE SET NULL ON UPDATE CASCADE", |
|
| 591 | - "ADD CONSTRAINT `FK_users_ally_name` FOREIGN KEY (`ally_name`) REFERENCES `{$config->db_prefix}alliance` (`ally_name`) ON DELETE SET NULL ON UPDATE CASCADE", |
|
| 590 | + "ADD CONSTRAINT `FK_users_ally_id` FOREIGN KEY (`ally_id`) REFERENCES `{$config->db_prefix}alliance` (`id`) ON DELETE SET NULL ON UPDATE CASCADE", |
|
| 591 | + "ADD CONSTRAINT `FK_users_ally_name` FOREIGN KEY (`ally_name`) REFERENCES `{$config->db_prefix}alliance` (`ally_name`) ON DELETE SET NULL ON UPDATE CASCADE", |
|
| 592 | 592 | ), !$update_foreigns['users']['FK_users_ally_id']); |
| 593 | 593 | } |
| 594 | 594 | |
@@ -1155,46 +1155,46 @@ discard block |
||
| 1155 | 1155 | upd_do_query('DELETE FROM {{statpoints}} WHERE id_owner NOT IN (SELECT id FROM {{users}}) OR id_ally NOT IN (SELECT id FROM {{alliance}});', true); |
| 1156 | 1156 | |
| 1157 | 1157 | upd_alter_table('statpoints', array( |
| 1158 | - "MODIFY COLUMN `stat_date` int(11) NOT NULL DEFAULT '0' FIRST", |
|
| 1159 | - "MODIFY COLUMN `id_owner` BIGINT(20) UNSIGNED DEFAULT NULL", |
|
| 1160 | - "MODIFY COLUMN `id_ally` BIGINT(20) UNSIGNED DEFAULT NULL", |
|
| 1161 | - "MODIFY COLUMN `stat_type` TINYINT UNSIGNED DEFAULT 0", |
|
| 1162 | - "MODIFY COLUMN `stat_code` TINYINT UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1163 | - |
|
| 1164 | - "MODIFY COLUMN `tech_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1165 | - "MODIFY COLUMN `tech_old_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1166 | - "MODIFY COLUMN `tech_points` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1167 | - "MODIFY COLUMN `tech_count` DECIMAL(65,0) UNSIGNED UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1168 | - |
|
| 1169 | - "MODIFY COLUMN `build_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1170 | - "MODIFY COLUMN `build_old_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1171 | - "MODIFY COLUMN `build_points` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1172 | - "MODIFY COLUMN `build_count` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1173 | - |
|
| 1174 | - "MODIFY COLUMN `defs_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1175 | - "MODIFY COLUMN `defs_old_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1176 | - "MODIFY COLUMN `defs_points` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1177 | - "MODIFY COLUMN `defs_count` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1178 | - |
|
| 1179 | - "MODIFY COLUMN `fleet_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1180 | - "MODIFY COLUMN `fleet_old_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1181 | - "MODIFY COLUMN `fleet_points` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1182 | - "MODIFY COLUMN `fleet_count` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1183 | - |
|
| 1184 | - "MODIFY COLUMN `res_rank` INT(11) UNSIGNED DEFAULT '0' COMMENT 'Rank by resources' AFTER `fleet_count`", |
|
| 1185 | - "MODIFY COLUMN `res_old_rank` INT(11) UNSIGNED DEFAULT '0' COMMENT 'Old rank by resources'AFTER `res_rank`", |
|
| 1186 | - "MODIFY COLUMN `res_points` DECIMAL(65,0) UNSIGNED DEFAULT '0' COMMENT 'Resource stat points' AFTER `res_old_rank`", |
|
| 1187 | - "MODIFY COLUMN `res_count` DECIMAL(65,0) UNSIGNED DEFAULT '0' COMMENT 'Resource count' AFTER `res_points`", |
|
| 1188 | - |
|
| 1189 | - "MODIFY COLUMN `total_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1190 | - "MODIFY COLUMN `total_old_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1191 | - "MODIFY COLUMN `total_points` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1192 | - "MODIFY COLUMN `total_count` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1193 | - |
|
| 1194 | - "ADD KEY `I_stats_id_ally` (`id_ally`)", |
|
| 1195 | - |
|
| 1196 | - "ADD CONSTRAINT `FK_stats_id_owner` FOREIGN KEY (`id_owner`) REFERENCES `{$config->db_prefix}users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE", |
|
| 1197 | - "ADD CONSTRAINT `FK_stats_id_ally` FOREIGN KEY (`id_ally`) REFERENCES `{$config->db_prefix}alliance` (`id`) ON DELETE CASCADE ON UPDATE CASCADE", |
|
| 1158 | + "MODIFY COLUMN `stat_date` int(11) NOT NULL DEFAULT '0' FIRST", |
|
| 1159 | + "MODIFY COLUMN `id_owner` BIGINT(20) UNSIGNED DEFAULT NULL", |
|
| 1160 | + "MODIFY COLUMN `id_ally` BIGINT(20) UNSIGNED DEFAULT NULL", |
|
| 1161 | + "MODIFY COLUMN `stat_type` TINYINT UNSIGNED DEFAULT 0", |
|
| 1162 | + "MODIFY COLUMN `stat_code` TINYINT UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1163 | + |
|
| 1164 | + "MODIFY COLUMN `tech_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1165 | + "MODIFY COLUMN `tech_old_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1166 | + "MODIFY COLUMN `tech_points` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1167 | + "MODIFY COLUMN `tech_count` DECIMAL(65,0) UNSIGNED UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1168 | + |
|
| 1169 | + "MODIFY COLUMN `build_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1170 | + "MODIFY COLUMN `build_old_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1171 | + "MODIFY COLUMN `build_points` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1172 | + "MODIFY COLUMN `build_count` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1173 | + |
|
| 1174 | + "MODIFY COLUMN `defs_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1175 | + "MODIFY COLUMN `defs_old_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1176 | + "MODIFY COLUMN `defs_points` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1177 | + "MODIFY COLUMN `defs_count` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1178 | + |
|
| 1179 | + "MODIFY COLUMN `fleet_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1180 | + "MODIFY COLUMN `fleet_old_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1181 | + "MODIFY COLUMN `fleet_points` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1182 | + "MODIFY COLUMN `fleet_count` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1183 | + |
|
| 1184 | + "MODIFY COLUMN `res_rank` INT(11) UNSIGNED DEFAULT '0' COMMENT 'Rank by resources' AFTER `fleet_count`", |
|
| 1185 | + "MODIFY COLUMN `res_old_rank` INT(11) UNSIGNED DEFAULT '0' COMMENT 'Old rank by resources'AFTER `res_rank`", |
|
| 1186 | + "MODIFY COLUMN `res_points` DECIMAL(65,0) UNSIGNED DEFAULT '0' COMMENT 'Resource stat points' AFTER `res_old_rank`", |
|
| 1187 | + "MODIFY COLUMN `res_count` DECIMAL(65,0) UNSIGNED DEFAULT '0' COMMENT 'Resource count' AFTER `res_points`", |
|
| 1188 | + |
|
| 1189 | + "MODIFY COLUMN `total_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1190 | + "MODIFY COLUMN `total_old_rank` INT(11) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1191 | + "MODIFY COLUMN `total_points` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1192 | + "MODIFY COLUMN `total_count` DECIMAL(65,0) UNSIGNED NOT NULL DEFAULT '0'", |
|
| 1193 | + |
|
| 1194 | + "ADD KEY `I_stats_id_ally` (`id_ally`)", |
|
| 1195 | + |
|
| 1196 | + "ADD CONSTRAINT `FK_stats_id_owner` FOREIGN KEY (`id_owner`) REFERENCES `{$config->db_prefix}users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE", |
|
| 1197 | + "ADD CONSTRAINT `FK_stats_id_ally` FOREIGN KEY (`id_ally`) REFERENCES `{$config->db_prefix}alliance` (`id`) ON DELETE CASCADE ON UPDATE CASCADE", |
|
| 1198 | 1198 | ), true); |
| 1199 | 1199 | } |
| 1200 | 1200 | |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | if (!defined('INSIDE')) |
| 30 | 30 | { |
| 31 | - die('Hack attempt!'); |
|
| 31 | + die('Hack attempt!'); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | $lang_info = array( |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | if (!defined('INSIDE')) |
| 30 | 30 | { |
| 31 | - die('Hack attempt!'); |
|
| 31 | + die('Hack attempt!'); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | $lang_info = array( |
@@ -1,26 +1,26 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * chat.php |
|
| 4 | - * Main chat window |
|
| 5 | - * |
|
| 6 | - * Changelog: |
|
| 7 | - * 4.0 copyright © 2009-2012 Gorlum for http://supernova.ws |
|
| 8 | - * [!] Another rewrite |
|
| 9 | - * [+] preMVC-compatible |
|
| 10 | - * 3.0 copyright © 2009-2011 Gorlum for http://supernova.ws |
|
| 11 | - * [!] Almost full rewrote |
|
| 12 | - * [+] Complies with PCG1 |
|
| 13 | - * 2.0 copyright © 2009-2010 Gorlum for http://supernova.ws |
|
| 14 | - * [+] Rewrote to remove unnecessary code dupes |
|
| 15 | - * 1.5 copyright © 2009-2010 Gorlum for http://supernova.ws |
|
| 16 | - * [~] More DDoS-realted fixes |
|
| 17 | - * 1.4 copyright © 2009-2010 Gorlum for http://supernova.ws |
|
| 18 | - * [~] DDoS-realted fixes |
|
| 19 | - * 1.3 copyright © 2009-2010 Gorlum for http://supernova.ws |
|
| 20 | - * [~] Security checks for SQL-injection |
|
| 21 | - * 1.2 by Ihor |
|
| 22 | - * 1.0 Shoutbox copyright © 2008 by e-Zobar for XNova |
|
| 23 | - **/ |
|
| 3 | + * chat.php |
|
| 4 | + * Main chat window |
|
| 5 | + * |
|
| 6 | + * Changelog: |
|
| 7 | + * 4.0 copyright © 2009-2012 Gorlum for http://supernova.ws |
|
| 8 | + * [!] Another rewrite |
|
| 9 | + * [+] preMVC-compatible |
|
| 10 | + * 3.0 copyright © 2009-2011 Gorlum for http://supernova.ws |
|
| 11 | + * [!] Almost full rewrote |
|
| 12 | + * [+] Complies with PCG1 |
|
| 13 | + * 2.0 copyright © 2009-2010 Gorlum for http://supernova.ws |
|
| 14 | + * [+] Rewrote to remove unnecessary code dupes |
|
| 15 | + * 1.5 copyright © 2009-2010 Gorlum for http://supernova.ws |
|
| 16 | + * [~] More DDoS-realted fixes |
|
| 17 | + * 1.4 copyright © 2009-2010 Gorlum for http://supernova.ws |
|
| 18 | + * [~] DDoS-realted fixes |
|
| 19 | + * 1.3 copyright © 2009-2010 Gorlum for http://supernova.ws |
|
| 20 | + * [~] Security checks for SQL-injection |
|
| 21 | + * 1.2 by Ihor |
|
| 22 | + * 1.0 Shoutbox copyright © 2008 by e-Zobar for XNova |
|
| 23 | + **/ |
|
| 24 | 24 | /* |
| 25 | 25 | $sn_mvc['model']['chat'][] = 'sn_chat_model'; |
| 26 | 26 | $sn_mvc['model']['chat_add'][] = 'sn_chat_add_model'; |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Created by PhpStorm. |
|
| 4 | - * User: Gorlum |
|
| 5 | - * Date: 26.12.2015 |
|
| 6 | - * Time: 17:19 |
|
| 7 | - */ |
|
| 3 | + * Created by PhpStorm. |
|
| 4 | + * User: Gorlum |
|
| 5 | + * Date: 26.12.2015 |
|
| 6 | + * Time: 17:19 |
|
| 7 | + */ |
|
| 8 | 8 | |
| 9 | 9 | /** |
| 10 | 10 | * Normalize and make ID safe |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Created by PhpStorm. |
|
| 4 | - * User: Gorlum |
|
| 5 | - * Date: 13.04.2015 |
|
| 6 | - * Time: 6:27 |
|
| 7 | - */ |
|
| 3 | + * Created by PhpStorm. |
|
| 4 | + * User: Gorlum |
|
| 5 | + * Date: 13.04.2015 |
|
| 6 | + * Time: 6:27 |
|
| 7 | + */ |
|
| 8 | 8 | |
| 9 | 9 | function db_account_by_user_id($user_id_safe, &$result = null) { |
| 10 | 10 | die('db_account_by_user_id() должна быть реализована в класса core_auth!'); |