@@ -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(); |
@@ -79,9 +79,9 @@ discard block |
||
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
| 82 | - * Set template location |
|
| 83 | - * @access public |
|
| 84 | - */ |
|
| 82 | + * Set template location |
|
| 83 | + * @access public |
|
| 84 | + */ |
|
| 85 | 85 | function set_template() |
| 86 | 86 | { |
| 87 | 87 | global $user; |
@@ -120,9 +120,9 @@ discard block |
||
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
| 123 | - * Set custom template location (able to use directory outside of phpBB) |
|
| 124 | - * @access public |
|
| 125 | - */ |
|
| 123 | + * Set custom template location (able to use directory outside of phpBB) |
|
| 124 | + * @access public |
|
| 125 | + */ |
|
| 126 | 126 | function set_custom_template($template_path, $template_name, $fallback_template_path = false) |
| 127 | 127 | { |
| 128 | 128 | global $user; |
@@ -161,10 +161,10 @@ discard block |
||
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | /** |
| 164 | - * Sets the template filenames for handles. $filename_array |
|
| 165 | - * should be a hash of handle => filename pairs. |
|
| 166 | - * @access public |
|
| 167 | - */ |
|
| 164 | + * Sets the template filenames for handles. $filename_array |
|
| 165 | + * should be a hash of handle => filename pairs. |
|
| 166 | + * @access public |
|
| 167 | + */ |
|
| 168 | 168 | function set_filenames($filename_array) |
| 169 | 169 | { |
| 170 | 170 | if (!is_array($filename_array)) |
@@ -191,9 +191,9 @@ discard block |
||
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | /** |
| 194 | - * Destroy template data set |
|
| 195 | - * @access public |
|
| 196 | - */ |
|
| 194 | + * Destroy template data set |
|
| 195 | + * @access public |
|
| 196 | + */ |
|
| 197 | 197 | function destroy() |
| 198 | 198 | { |
| 199 | 199 | $this->_tpldata = array('.' => array(0 => array())); |
@@ -201,9 +201,9 @@ discard block |
||
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | /** |
| 204 | - * Reset/empty complete block |
|
| 205 | - * @access public |
|
| 206 | - */ |
|
| 204 | + * Reset/empty complete block |
|
| 205 | + * @access public |
|
| 206 | + */ |
|
| 207 | 207 | function destroy_block_vars($blockname) |
| 208 | 208 | { |
| 209 | 209 | if (strpos($blockname, '.') !== false) |
@@ -231,14 +231,14 @@ discard block |
||
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | /** |
| 234 | - * Display handle |
|
| 235 | - * @access public |
|
| 236 | - */ |
|
| 234 | + * Display handle |
|
| 235 | + * @access public |
|
| 236 | + */ |
|
| 237 | 237 | function display($handle, $include_once = true) |
| 238 | 238 | { |
| 239 | 239 | global $phpbb_hook, |
| 240 | 240 | // This is used for accessing from compiled templates via include |
| 241 | - $user, $lang, $config; |
|
| 241 | + $user, $lang, $config; |
|
| 242 | 242 | |
| 243 | 243 | if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array(__CLASS__, __FUNCTION__), $handle, $include_once)) |
| 244 | 244 | { |
@@ -270,9 +270,9 @@ discard block |
||
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | /** |
| 273 | - * Display the handle and assign the output to a template variable or return the compiled result. |
|
| 274 | - * @access public |
|
| 275 | - */ |
|
| 273 | + * Display the handle and assign the output to a template variable or return the compiled result. |
|
| 274 | + * @access public |
|
| 275 | + */ |
|
| 276 | 276 | function assign_display($handle, $template_var = '', $return_content = true, $include_once = false) |
| 277 | 277 | { |
| 278 | 278 | ob_start(); |
@@ -290,9 +290,9 @@ discard block |
||
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 | /** |
| 293 | - * Load a compiled template if possible, if not, recompile it |
|
| 294 | - * @access private |
|
| 295 | - */ |
|
| 293 | + * Load a compiled template if possible, if not, recompile it |
|
| 294 | + * @access private |
|
| 295 | + */ |
|
| 296 | 296 | function _tpl_load(&$handle) |
| 297 | 297 | { |
| 298 | 298 | global $user, $config; |
@@ -470,9 +470,9 @@ discard block |
||
| 470 | 470 | } |
| 471 | 471 | |
| 472 | 472 | /** |
| 473 | - * Assign key variable pairs from an array |
|
| 474 | - * @access public |
|
| 475 | - */ |
|
| 473 | + * Assign key variable pairs from an array |
|
| 474 | + * @access public |
|
| 475 | + */ |
|
| 476 | 476 | function assign_vars($vararray) |
| 477 | 477 | { |
| 478 | 478 | foreach ($vararray as $key => $val) |
@@ -484,9 +484,9 @@ discard block |
||
| 484 | 484 | } |
| 485 | 485 | |
| 486 | 486 | /** |
| 487 | - * Assign a single variable to a single key |
|
| 488 | - * @access public |
|
| 489 | - */ |
|
| 487 | + * Assign a single variable to a single key |
|
| 488 | + * @access public |
|
| 489 | + */ |
|
| 490 | 490 | function assign_var($varname, $varval) |
| 491 | 491 | { |
| 492 | 492 | $this->_rootref[$varname] = $varval; |
@@ -495,9 +495,9 @@ discard block |
||
| 495 | 495 | } |
| 496 | 496 | |
| 497 | 497 | /** |
| 498 | - * Assign key variable pairs from an array to a specified block |
|
| 499 | - * @access public |
|
| 500 | - */ |
|
| 498 | + * Assign key variable pairs from an array to a specified block |
|
| 499 | + * @access public |
|
| 500 | + */ |
|
| 501 | 501 | function assign_block_vars($blockname, $vararray) |
| 502 | 502 | { |
| 503 | 503 | if (strpos($blockname, '.') !== false) |
@@ -562,33 +562,33 @@ discard block |
||
| 562 | 562 | } |
| 563 | 563 | |
| 564 | 564 | /** |
| 565 | - * Change already assigned key variable pair (one-dimensional - single loop entry) |
|
| 566 | - * |
|
| 567 | - * An example of how to use this function: |
|
| 568 | - * {@example alter_block_array.php} |
|
| 569 | - * |
|
| 570 | - * @param string $blockname the blockname, for example 'loop' |
|
| 571 | - * @param array $vararray the var array to insert/add or merge |
|
| 572 | - * @param mixed $key Key to search for |
|
| 573 | - * |
|
| 574 | - * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position] |
|
| 575 | - * |
|
| 576 | - * int: Position [the position to change or insert at directly given] |
|
| 577 | - * |
|
| 578 | - * If key is false the position is set to 0 |
|
| 579 | - * If key is true the position is set to the last entry |
|
| 580 | - * |
|
| 581 | - * @param string $mode Mode to execute (valid modes are 'insert' and 'change') |
|
| 582 | - * |
|
| 583 | - * If insert, the vararray is inserted at the given position (position counting from zero). |
|
| 584 | - * 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). |
|
| 585 | - * |
|
| 586 | - * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array) |
|
| 587 | - * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars) |
|
| 588 | - * |
|
| 589 | - * @return bool false on error, true on success |
|
| 590 | - * @access public |
|
| 591 | - */ |
|
| 565 | + * Change already assigned key variable pair (one-dimensional - single loop entry) |
|
| 566 | + * |
|
| 567 | + * An example of how to use this function: |
|
| 568 | + * {@example alter_block_array.php} |
|
| 569 | + * |
|
| 570 | + * @param string $blockname the blockname, for example 'loop' |
|
| 571 | + * @param array $vararray the var array to insert/add or merge |
|
| 572 | + * @param mixed $key Key to search for |
|
| 573 | + * |
|
| 574 | + * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position] |
|
| 575 | + * |
|
| 576 | + * int: Position [the position to change or insert at directly given] |
|
| 577 | + * |
|
| 578 | + * If key is false the position is set to 0 |
|
| 579 | + * If key is true the position is set to the last entry |
|
| 580 | + * |
|
| 581 | + * @param string $mode Mode to execute (valid modes are 'insert' and 'change') |
|
| 582 | + * |
|
| 583 | + * If insert, the vararray is inserted at the given position (position counting from zero). |
|
| 584 | + * 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). |
|
| 585 | + * |
|
| 586 | + * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array) |
|
| 587 | + * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars) |
|
| 588 | + * |
|
| 589 | + * @return bool false on error, true on success |
|
| 590 | + * @access public |
|
| 591 | + */ |
|
| 592 | 592 | function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert') |
| 593 | 593 | { |
| 594 | 594 | if (strpos($blockname, '.') !== false) |
@@ -672,9 +672,9 @@ discard block |
||
| 672 | 672 | } |
| 673 | 673 | |
| 674 | 674 | /** |
| 675 | - * Include a separate template |
|
| 676 | - * @access private |
|
| 677 | - */ |
|
| 675 | + * Include a separate template |
|
| 676 | + * @access private |
|
| 677 | + */ |
|
| 678 | 678 | function _tpl_include($filename, $include = true) |
| 679 | 679 | { |
| 680 | 680 | global $lang, $config; |
@@ -703,9 +703,9 @@ discard block |
||
| 703 | 703 | } |
| 704 | 704 | |
| 705 | 705 | /** |
| 706 | - * Include a php-file |
|
| 707 | - * @access private |
|
| 708 | - */ |
|
| 706 | + * Include a php-file |
|
| 707 | + * @access private |
|
| 708 | + */ |
|
| 709 | 709 | function _php_include($filename) |
| 710 | 710 | { |
| 711 | 711 | $file = $this->rootPhysical . $filename; |
@@ -720,9 +720,9 @@ discard block |
||
| 720 | 720 | } |
| 721 | 721 | |
| 722 | 722 | /** |
| 723 | - * Assign key variable pairs from an array with block support |
|
| 724 | - * @access public |
|
| 725 | - */ |
|
| 723 | + * Assign key variable pairs from an array with block support |
|
| 724 | + * @access public |
|
| 725 | + */ |
|
| 726 | 726 | function assign_recursive($values, $name = '') |
| 727 | 727 | { |
| 728 | 728 | if(isset($values['.'])) |
@@ -189,62 +189,62 @@ discard block |
||
| 189 | 189 | ); |
| 190 | 190 | |
| 191 | 191 | $sn_message_class_list = array( |
| 192 | - MSG_TYPE_NEW => array( |
|
| 193 | - 'name' => 'new_message', |
|
| 194 | - 'switchable' => false, |
|
| 195 | - 'email' => false, |
|
| 196 | - ), |
|
| 197 | - MSG_TYPE_ADMIN => array( |
|
| 198 | - 'name' => 'msg_admin', |
|
| 199 | - 'switchable' => false, |
|
| 200 | - 'email' => true, |
|
| 201 | - ), |
|
| 202 | - MSG_TYPE_PLAYER => array( |
|
| 203 | - 'name' => 'mnl_joueur', |
|
| 204 | - 'switchable' => false, |
|
| 205 | - 'email' => true, |
|
| 206 | - ), |
|
| 207 | - MSG_TYPE_ALLIANCE => array( |
|
| 208 | - 'name' => 'mnl_alliance', |
|
| 209 | - 'switchable' => false, |
|
| 210 | - 'email' => true, |
|
| 211 | - ), |
|
| 212 | - MSG_TYPE_SPY => array( |
|
| 213 | - 'name' => 'mnl_spy', |
|
| 214 | - 'switchable' => true, |
|
| 215 | - 'email' => true, |
|
| 216 | - ), |
|
| 217 | - MSG_TYPE_COMBAT => array( |
|
| 218 | - 'name' => 'mnl_attaque', |
|
| 219 | - 'switchable' => true, |
|
| 220 | - 'email' => true, |
|
| 221 | - ), |
|
| 222 | - MSG_TYPE_TRANSPORT => array( |
|
| 223 | - 'name' => 'mnl_transport', |
|
| 224 | - 'switchable' => true, |
|
| 225 | - 'email' => true, |
|
| 226 | - ), |
|
| 227 | - MSG_TYPE_RECYCLE => array( |
|
| 228 | - 'name' => 'mnl_exploit', |
|
| 229 | - 'switchable' => true, |
|
| 230 | - 'email' => true, |
|
| 231 | - ), |
|
| 232 | - MSG_TYPE_EXPLORE => array( |
|
| 233 | - 'name' => 'mnl_expedition', |
|
| 234 | - 'switchable' => true, |
|
| 235 | - 'email' => true, |
|
| 236 | - ), |
|
| 237 | - // 97 => 'mnl_general', |
|
| 238 | - MSG_TYPE_QUE => array( |
|
| 239 | - 'name' => 'mnl_buildlist', |
|
| 240 | - 'switchable' => true, |
|
| 241 | - 'email' => true, |
|
| 242 | - ), |
|
| 243 | - MSG_TYPE_OUTBOX => array( |
|
| 244 | - 'name' => 'mnl_outbox', |
|
| 245 | - 'switchable' => false, |
|
| 246 | - 'email' => false, |
|
| 247 | - ), |
|
| 192 | + MSG_TYPE_NEW => array( |
|
| 193 | + 'name' => 'new_message', |
|
| 194 | + 'switchable' => false, |
|
| 195 | + 'email' => false, |
|
| 196 | + ), |
|
| 197 | + MSG_TYPE_ADMIN => array( |
|
| 198 | + 'name' => 'msg_admin', |
|
| 199 | + 'switchable' => false, |
|
| 200 | + 'email' => true, |
|
| 201 | + ), |
|
| 202 | + MSG_TYPE_PLAYER => array( |
|
| 203 | + 'name' => 'mnl_joueur', |
|
| 204 | + 'switchable' => false, |
|
| 205 | + 'email' => true, |
|
| 206 | + ), |
|
| 207 | + MSG_TYPE_ALLIANCE => array( |
|
| 208 | + 'name' => 'mnl_alliance', |
|
| 209 | + 'switchable' => false, |
|
| 210 | + 'email' => true, |
|
| 211 | + ), |
|
| 212 | + MSG_TYPE_SPY => array( |
|
| 213 | + 'name' => 'mnl_spy', |
|
| 214 | + 'switchable' => true, |
|
| 215 | + 'email' => true, |
|
| 216 | + ), |
|
| 217 | + MSG_TYPE_COMBAT => array( |
|
| 218 | + 'name' => 'mnl_attaque', |
|
| 219 | + 'switchable' => true, |
|
| 220 | + 'email' => true, |
|
| 221 | + ), |
|
| 222 | + MSG_TYPE_TRANSPORT => array( |
|
| 223 | + 'name' => 'mnl_transport', |
|
| 224 | + 'switchable' => true, |
|
| 225 | + 'email' => true, |
|
| 226 | + ), |
|
| 227 | + MSG_TYPE_RECYCLE => array( |
|
| 228 | + 'name' => 'mnl_exploit', |
|
| 229 | + 'switchable' => true, |
|
| 230 | + 'email' => true, |
|
| 231 | + ), |
|
| 232 | + MSG_TYPE_EXPLORE => array( |
|
| 233 | + 'name' => 'mnl_expedition', |
|
| 234 | + 'switchable' => true, |
|
| 235 | + 'email' => true, |
|
| 236 | + ), |
|
| 237 | + // 97 => 'mnl_general', |
|
| 238 | + MSG_TYPE_QUE => array( |
|
| 239 | + 'name' => 'mnl_buildlist', |
|
| 240 | + 'switchable' => true, |
|
| 241 | + 'email' => true, |
|
| 242 | + ), |
|
| 243 | + MSG_TYPE_OUTBOX => array( |
|
| 244 | + 'name' => 'mnl_outbox', |
|
| 245 | + 'switchable' => false, |
|
| 246 | + 'email' => false, |
|
| 247 | + ), |
|
| 248 | 248 | ); |
| 249 | 249 | |
| 250 | 250 | $sn_message_groups = array( |
@@ -1096,7 +1096,7 @@ discard block |
||
| 1096 | 1096 | SHIP_HUGE_DEATH_STAR => SHIP_HUGE_DEATH_STAR, SHIP_HUGE_SUPERNOVA => SHIP_HUGE_SUPERNOVA, |
| 1097 | 1097 | SHIP_CARGO_SMALL => SHIP_CARGO_SMALL, SHIP_CARGO_BIG => SHIP_CARGO_BIG, SHIP_CARGO_SUPER => SHIP_CARGO_SUPER, SHIP_CARGO_HYPER => SHIP_CARGO_HYPER, |
| 1098 | 1098 | SHIP_RECYCLER => SHIP_RECYCLER, SHIP_COLONIZER => SHIP_COLONIZER, SHIP_SPY => SHIP_SPY, SHIP_SATTELITE_SOLAR => SHIP_SATTELITE_SOLAR |
| 1099 | - ), |
|
| 1099 | + ), |
|
| 1100 | 1100 | // Defensive building list |
| 1101 | 1101 | 'defense' => array (UNIT_DEF_TURRET_MISSILE => UNIT_DEF_TURRET_MISSILE, UNIT_DEF_TURRET_LASER_SMALL => UNIT_DEF_TURRET_LASER_SMALL, |
| 1102 | 1102 | UNIT_DEF_TURRET_LASER_BIG => UNIT_DEF_TURRET_LASER_BIG, UNIT_DEF_TURRET_GAUSS => UNIT_DEF_TURRET_GAUSS, |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | protected $_repository; |
| 31 | 31 | |
| 32 | - /** |
|
| 32 | + /** |
|
| 33 | 33 | * @var ContainerPlus $_oldRepo |
| 34 | 34 | */ |
| 35 | 35 | protected $_oldRepo; |