@@ -58,52 +58,52 @@ |
||
| 58 | 58 | stat_tpl_assign($who, $template, $who, 'subject', $subject_list, $sn_group_stat_common); |
| 59 | 59 | |
| 60 | 60 | $stat_types = array( |
| 61 | - STAT_TOTAL => array( |
|
| 62 | - 'type' => 'total', |
|
| 63 | - ), |
|
| 61 | + STAT_TOTAL => array( |
|
| 62 | + 'type' => 'total', |
|
| 63 | + ), |
|
| 64 | 64 | |
| 65 | - STAT_FLEET => array( |
|
| 66 | - 'type' => 'fleet', |
|
| 67 | - ), |
|
| 65 | + STAT_FLEET => array( |
|
| 66 | + 'type' => 'fleet', |
|
| 67 | + ), |
|
| 68 | 68 | |
| 69 | - STAT_TECH => array( |
|
| 70 | - 'type' => 'tech', |
|
| 71 | - ), |
|
| 69 | + STAT_TECH => array( |
|
| 70 | + 'type' => 'tech', |
|
| 71 | + ), |
|
| 72 | 72 | |
| 73 | - STAT_BUILDING => array( |
|
| 74 | - 'type' => 'build', |
|
| 75 | - ), |
|
| 73 | + STAT_BUILDING => array( |
|
| 74 | + 'type' => 'build', |
|
| 75 | + ), |
|
| 76 | 76 | |
| 77 | - STAT_DEFENSE => array( |
|
| 78 | - 'type' => 'defs', |
|
| 79 | - ), |
|
| 77 | + STAT_DEFENSE => array( |
|
| 78 | + 'type' => 'defs', |
|
| 79 | + ), |
|
| 80 | 80 | |
| 81 | - STAT_RESOURCE => array( |
|
| 82 | - 'type' => 'res', |
|
| 83 | - ), |
|
| 81 | + STAT_RESOURCE => array( |
|
| 82 | + 'type' => 'res', |
|
| 83 | + ), |
|
| 84 | 84 | |
| 85 | - STAT_RAID_TOTAL => array( |
|
| 86 | - 'type' => 'raids', |
|
| 87 | - ), |
|
| 85 | + STAT_RAID_TOTAL => array( |
|
| 86 | + 'type' => 'raids', |
|
| 87 | + ), |
|
| 88 | 88 | |
| 89 | - STAT_RAID_WON => array( |
|
| 90 | - 'type' => 'raidswin', |
|
| 91 | - ), |
|
| 89 | + STAT_RAID_WON => array( |
|
| 90 | + 'type' => 'raidswin', |
|
| 91 | + ), |
|
| 92 | 92 | |
| 93 | - STAT_RAID_LOST => array( |
|
| 94 | - 'type' => 'raidsloose', |
|
| 95 | - ), |
|
| 93 | + STAT_RAID_LOST => array( |
|
| 94 | + 'type' => 'raidsloose', |
|
| 95 | + ), |
|
| 96 | 96 | |
| 97 | 97 | STAT_LVL_BUILDING => array( |
| 98 | - 'type' => 'lvl_minier', |
|
| 98 | + 'type' => 'lvl_minier', |
|
| 99 | 99 | ), |
| 100 | 100 | |
| 101 | 101 | STAT_LVL_TECH => array( |
| 102 | - 'type' => 'player_rpg_tech_level', |
|
| 102 | + 'type' => 'player_rpg_tech_level', |
|
| 103 | 103 | ), |
| 104 | 104 | |
| 105 | 105 | STAT_LVL_RAID => array( |
| 106 | - 'type' => 'lvl_raid', |
|
| 106 | + 'type' => 'lvl_raid', |
|
| 107 | 107 | ), |
| 108 | 108 | ); |
| 109 | 109 | stat_tpl_assign($who, $template, $type, 'type', $stat_types, $sn_group_stat_common); |
@@ -44,17 +44,17 @@ discard block |
||
| 44 | 44 | var $block_else_level = array(); |
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | - * constuctor |
|
| 48 | - */ |
|
| 47 | + * constuctor |
|
| 48 | + */ |
|
| 49 | 49 | public function template_compile(&$template) |
| 50 | 50 | { |
| 51 | 51 | $this->template = &$template; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | - * Load template source from file |
|
| 56 | - * @access private |
|
| 57 | - */ |
|
| 55 | + * Load template source from file |
|
| 56 | + * @access private |
|
| 57 | + */ |
|
| 58 | 58 | public function _tpl_load_file($handle, $store_in_db = false) |
| 59 | 59 | { |
| 60 | 60 | // Try and open template for read |
@@ -97,10 +97,10 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /** |
| 100 | - * Remove any PHP tags that do not belong, these regular expressions are derived from |
|
| 101 | - * the ones that exist in zend_language_scanner.l |
|
| 102 | - * @access private |
|
| 103 | - */ |
|
| 100 | + * Remove any PHP tags that do not belong, these regular expressions are derived from |
|
| 101 | + * the ones that exist in zend_language_scanner.l |
|
| 102 | + * @access private |
|
| 103 | + */ |
|
| 104 | 104 | public function remove_php_tags(&$code) |
| 105 | 105 | { |
| 106 | 106 | // This matches the information gathered from the internal PHP lexer |
@@ -114,9 +114,9 @@ discard block |
||
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |
| 117 | - * The all seeing all doing compile method. Parts are inspired by or directly from Smarty |
|
| 118 | - * @access private |
|
| 119 | - */ |
|
| 117 | + * The all seeing all doing compile method. Parts are inspired by or directly from Smarty |
|
| 118 | + * @access private |
|
| 119 | + */ |
|
| 120 | 120 | public function compile($code, $no_echo = false, $echo_var = '') |
| 121 | 121 | { |
| 122 | 122 | if ($echo_var) |
@@ -285,9 +285,9 @@ discard block |
||
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | /** |
| 288 | - * Compile variables |
|
| 289 | - * @access private |
|
| 290 | - */ |
|
| 288 | + * Compile variables |
|
| 289 | + * @access private |
|
| 290 | + */ |
|
| 291 | 291 | public function compile_var_tags(&$text_blocks) |
| 292 | 292 | { |
| 293 | 293 | // change template varrefs into PHP varrefs |
@@ -347,9 +347,9 @@ discard block |
||
| 347 | 347 | } |
| 348 | 348 | |
| 349 | 349 | /** |
| 350 | - * Compile blocks |
|
| 351 | - * @access private |
|
| 352 | - */ |
|
| 350 | + * Compile blocks |
|
| 351 | + * @access private |
|
| 352 | + */ |
|
| 353 | 353 | public function compile_tag_block($tag_args) |
| 354 | 354 | { |
| 355 | 355 | $no_nesting = false; |
@@ -435,14 +435,14 @@ discard block |
||
| 435 | 435 | $tag_template_php .= 'if ($_' . $tag_args . '_count) {'; |
| 436 | 436 | |
| 437 | 437 | /** |
| 438 | - * The following uses foreach for iteration instead of a for loop, foreach is faster but requires PHP to make a copy of the contents of the array which uses more memory |
|
| 439 | - * <code> |
|
| 440 | - * if (!$offset) |
|
| 441 | - * { |
|
| 442 | - * $tag_template_php .= 'foreach (' . $varref . ' as $_' . $tag_args . '_i => $_' . $tag_args . '_val){'; |
|
| 443 | - * } |
|
| 444 | - * </code> |
|
| 445 | - */ |
|
| 438 | + * The following uses foreach for iteration instead of a for loop, foreach is faster but requires PHP to make a copy of the contents of the array which uses more memory |
|
| 439 | + * <code> |
|
| 440 | + * if (!$offset) |
|
| 441 | + * { |
|
| 442 | + * $tag_template_php .= 'foreach (' . $varref . ' as $_' . $tag_args . '_i => $_' . $tag_args . '_val){'; |
|
| 443 | + * } |
|
| 444 | + * </code> |
|
| 445 | + */ |
|
| 446 | 446 | |
| 447 | 447 | $tag_template_php .= 'for ($_' . $tag_args . '_i = ' . $loop_start . '; $_' . $tag_args . '_i < ' . $loop_end . '; ++$_' . $tag_args . '_i){'; |
| 448 | 448 | // $tag_template_php .= '$this->_block_counter["'. $tag_args . '"] = $_' . $tag_args . '_i;'; |
@@ -453,10 +453,10 @@ discard block |
||
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | /** |
| 456 | - * Compile IF tags - much of this is from Smarty with |
|
| 457 | - * some adaptions for our block level methods |
|
| 458 | - * @access private |
|
| 459 | - */ |
|
| 456 | + * Compile IF tags - much of this is from Smarty with |
|
| 457 | + * some adaptions for our block level methods |
|
| 458 | + * @access private |
|
| 459 | + */ |
|
| 460 | 460 | public function compile_tag_if($tag_args, $elseif) |
| 461 | 461 | { |
| 462 | 462 | // Tokenize args for 'if' tag. |
@@ -611,9 +611,9 @@ discard block |
||
| 611 | 611 | } |
| 612 | 612 | |
| 613 | 613 | /** |
| 614 | - * Compile DEFINE tags |
|
| 615 | - * @access private |
|
| 616 | - */ |
|
| 614 | + * Compile DEFINE tags |
|
| 615 | + * @access private |
|
| 616 | + */ |
|
| 617 | 617 | public function compile_tag_define($tag_args, $op) |
| 618 | 618 | { |
| 619 | 619 | preg_match('#^((?:[a-z0-9\-_]+\.)+)?\$(?=[A-Z])([A-Z0-9_\-]*)(?: = (\'?)([^\']*)(\'?))?$#', $tag_args, $match); |
@@ -664,9 +664,9 @@ discard block |
||
| 664 | 664 | } |
| 665 | 665 | |
| 666 | 666 | /** |
| 667 | - * Compile INCLUDE tag |
|
| 668 | - * @access private |
|
| 669 | - */ |
|
| 667 | + * Compile INCLUDE tag |
|
| 668 | + * @access private |
|
| 669 | + */ |
|
| 670 | 670 | public function compile_tag_include($tag_args) |
| 671 | 671 | { |
| 672 | 672 | // Process dynamic includes |
@@ -679,19 +679,19 @@ discard block |
||
| 679 | 679 | } |
| 680 | 680 | |
| 681 | 681 | /** |
| 682 | - * Compile INCLUDE_PHP tag |
|
| 683 | - * @access private |
|
| 684 | - */ |
|
| 682 | + * Compile INCLUDE_PHP tag |
|
| 683 | + * @access private |
|
| 684 | + */ |
|
| 685 | 685 | public function compile_tag_include_php($tag_args) |
| 686 | 686 | { |
| 687 | 687 | return "\$this->_php_include('$tag_args');"; |
| 688 | 688 | } |
| 689 | 689 | |
| 690 | 690 | /** |
| 691 | - * parse expression |
|
| 692 | - * This is from Smarty |
|
| 693 | - * @access private |
|
| 694 | - */ |
|
| 691 | + * parse expression |
|
| 692 | + * This is from Smarty |
|
| 693 | + * @access private |
|
| 694 | + */ |
|
| 695 | 695 | public function _parse_is_expr($is_arg, $tokens) |
| 696 | 696 | { |
| 697 | 697 | $expr_end = 0; |
@@ -757,13 +757,13 @@ discard block |
||
| 757 | 757 | } |
| 758 | 758 | |
| 759 | 759 | /** |
| 760 | - * Generates a reference to the given variable inside the given (possibly nested) |
|
| 761 | - * block namespace. This is a string of the form: |
|
| 762 | - * ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . ' |
|
| 763 | - * It's ready to be inserted into an "echo" line in one of the templates. |
|
| 764 | - * NOTE: expects a trailing "." on the namespace. |
|
| 765 | - * @access private |
|
| 766 | - */ |
|
| 760 | + * Generates a reference to the given variable inside the given (possibly nested) |
|
| 761 | + * block namespace. This is a string of the form: |
|
| 762 | + * ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . ' |
|
| 763 | + * It's ready to be inserted into an "echo" line in one of the templates. |
|
| 764 | + * NOTE: expects a trailing "." on the namespace. |
|
| 765 | + * @access private |
|
| 766 | + */ |
|
| 767 | 767 | public function generate_block_varref($namespace, $varname, $echo = true, $defop = false) |
| 768 | 768 | { |
| 769 | 769 | // Strip the trailing period. |
@@ -781,14 +781,14 @@ discard block |
||
| 781 | 781 | } |
| 782 | 782 | |
| 783 | 783 | /** |
| 784 | - * Generates a reference to the array of data values for the given |
|
| 785 | - * (possibly nested) block namespace. This is a string of the form: |
|
| 786 | - * $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN'] |
|
| 787 | - * |
|
| 788 | - * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. |
|
| 789 | - * NOTE: does not expect a trailing "." on the blockname. |
|
| 790 | - * @access private |
|
| 791 | - */ |
|
| 784 | + * Generates a reference to the array of data values for the given |
|
| 785 | + * (possibly nested) block namespace. This is a string of the form: |
|
| 786 | + * $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN'] |
|
| 787 | + * |
|
| 788 | + * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. |
|
| 789 | + * NOTE: does not expect a trailing "." on the blockname. |
|
| 790 | + * @access private |
|
| 791 | + */ |
|
| 792 | 792 | public function generate_block_data_ref($blockname, $include_last_iterator, $defop = false) |
| 793 | 793 | { |
| 794 | 794 | // Get an array of the blocks involved. |
@@ -824,9 +824,9 @@ discard block |
||
| 824 | 824 | } |
| 825 | 825 | |
| 826 | 826 | /** |
| 827 | - * Write compiled file to cache directory |
|
| 828 | - * @access private |
|
| 829 | - */ |
|
| 827 | + * Write compiled file to cache directory |
|
| 828 | + * @access private |
|
| 829 | + */ |
|
| 830 | 830 | public function compile_write($handle, $data) |
| 831 | 831 | { |
| 832 | 832 | $filename = $this->template->cachepath . str_replace('/', '.', $this->template->filename[$handle]) . DOT_PHP_EX; |
@@ -849,8 +849,8 @@ discard block |
||
| 849 | 849 | |
| 850 | 850 | // Gorlum's minifier BOF |
| 851 | 851 | /** |
| 852 | - * Minifies template w/i PHP code by removing extra spaces |
|
| 853 | - */ |
|
| 852 | + * Minifies template w/i PHP code by removing extra spaces |
|
| 853 | + */ |
|
| 854 | 854 | private function minify($html) |
| 855 | 855 | { |
| 856 | 856 | if(!classSupernova::$config->tpl_minifier) |
@@ -19,11 +19,11 @@ discard block |
||
| 19 | 19 | class template |
| 20 | 20 | { |
| 21 | 21 | /** variable that holds all the data we'll be substituting into |
| 22 | - * the compiled templates. Takes form: |
|
| 23 | - * --> $this->_tpldata[block][iteration#][child][iteration#][child2][iteration#][variablename] == value |
|
| 24 | - * if it's a root-level variable, it'll be like this: |
|
| 25 | - * --> $this->_tpldata[.][0][varname] == value |
|
| 26 | - */ |
|
| 22 | + * the compiled templates. Takes form: |
|
| 23 | + * --> $this->_tpldata[block][iteration#][child][iteration#][child2][iteration#][variablename] == value |
|
| 24 | + * if it's a root-level variable, it'll be like this: |
|
| 25 | + * --> $this->_tpldata[.][0][varname] == value |
|
| 26 | + */ |
|
| 27 | 27 | public $_tpldata = array('.' => array(0 => array())); |
| 28 | 28 | public $_rootref; |
| 29 | 29 | // var $_block_counter = array(); |
@@ -54,9 +54,9 @@ discard block |
||
| 54 | 54 | public $parsed = false; |
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | - * Set template location |
|
| 58 | - * @access public |
|
| 59 | - */ |
|
| 57 | + * Set template location |
|
| 58 | + * @access public |
|
| 59 | + */ |
|
| 60 | 60 | public function set_template() |
| 61 | 61 | { |
| 62 | 62 | global $phpbb_root_path, $user; |
@@ -95,9 +95,9 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
| 98 | - * Set custom template location (able to use directory outside of phpBB) |
|
| 99 | - * @access public |
|
| 100 | - */ |
|
| 98 | + * Set custom template location (able to use directory outside of phpBB) |
|
| 99 | + * @access public |
|
| 100 | + */ |
|
| 101 | 101 | public function set_custom_template($template_path, $template_name, $fallback_template_path = false) |
| 102 | 102 | { |
| 103 | 103 | global $phpbb_root_path, $user; |
@@ -136,10 +136,10 @@ discard block |
||
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | /** |
| 139 | - * Sets the template filenames for handles. $filename_array |
|
| 140 | - * should be a hash of handle => filename pairs. |
|
| 141 | - * @access public |
|
| 142 | - */ |
|
| 139 | + * Sets the template filenames for handles. $filename_array |
|
| 140 | + * should be a hash of handle => filename pairs. |
|
| 141 | + * @access public |
|
| 142 | + */ |
|
| 143 | 143 | public function set_filenames($filename_array) |
| 144 | 144 | { |
| 145 | 145 | if (!is_array($filename_array)) |
@@ -166,9 +166,9 @@ discard block |
||
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | /** |
| 169 | - * Destroy template data set |
|
| 170 | - * @access public |
|
| 171 | - */ |
|
| 169 | + * Destroy template data set |
|
| 170 | + * @access public |
|
| 171 | + */ |
|
| 172 | 172 | public function destroy() |
| 173 | 173 | { |
| 174 | 174 | $this->_tpldata = array('.' => array(0 => array())); |
@@ -176,9 +176,9 @@ discard block |
||
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | /** |
| 179 | - * Reset/empty complete block |
|
| 180 | - * @access public |
|
| 181 | - */ |
|
| 179 | + * Reset/empty complete block |
|
| 180 | + * @access public |
|
| 181 | + */ |
|
| 182 | 182 | public function destroy_block_vars($blockname) |
| 183 | 183 | { |
| 184 | 184 | if (strpos($blockname, '.') !== false) |
@@ -206,9 +206,9 @@ discard block |
||
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | /** |
| 209 | - * Display handle |
|
| 210 | - * @access public |
|
| 211 | - */ |
|
| 209 | + * Display handle |
|
| 210 | + * @access public |
|
| 211 | + */ |
|
| 212 | 212 | public function display($handle, $include_once = true) |
| 213 | 213 | { |
| 214 | 214 | global $phpbb_hook; |
@@ -242,9 +242,9 @@ discard block |
||
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | /** |
| 245 | - * Display the handle and assign the output to a template variable or return the compiled result. |
|
| 246 | - * @access public |
|
| 247 | - */ |
|
| 245 | + * Display the handle and assign the output to a template variable or return the compiled result. |
|
| 246 | + * @access public |
|
| 247 | + */ |
|
| 248 | 248 | public function assign_display($handle, $template_var = '', $return_content = true, $include_once = false) |
| 249 | 249 | { |
| 250 | 250 | ob_start(); |
@@ -262,9 +262,9 @@ discard block |
||
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | /** |
| 265 | - * Load a compiled template if possible, if not, recompile it |
|
| 266 | - * @access private |
|
| 267 | - */ |
|
| 265 | + * Load a compiled template if possible, if not, recompile it |
|
| 266 | + * @access private |
|
| 267 | + */ |
|
| 268 | 268 | public function _tpl_load(&$handle) |
| 269 | 269 | { |
| 270 | 270 | global $user; |
@@ -447,9 +447,9 @@ discard block |
||
| 447 | 447 | } |
| 448 | 448 | |
| 449 | 449 | /** |
| 450 | - * Assign key variable pairs from an array |
|
| 451 | - * @access public |
|
| 452 | - */ |
|
| 450 | + * Assign key variable pairs from an array |
|
| 451 | + * @access public |
|
| 452 | + */ |
|
| 453 | 453 | public function assign_vars($vararray) |
| 454 | 454 | { |
| 455 | 455 | foreach ($vararray as $key => $val) |
@@ -461,9 +461,9 @@ discard block |
||
| 461 | 461 | } |
| 462 | 462 | |
| 463 | 463 | /** |
| 464 | - * Assign a single variable to a single key |
|
| 465 | - * @access public |
|
| 466 | - */ |
|
| 464 | + * Assign a single variable to a single key |
|
| 465 | + * @access public |
|
| 466 | + */ |
|
| 467 | 467 | public function assign_var($varname, $varval) |
| 468 | 468 | { |
| 469 | 469 | $this->_rootref[$varname] = $varval; |
@@ -472,9 +472,9 @@ discard block |
||
| 472 | 472 | } |
| 473 | 473 | |
| 474 | 474 | /** |
| 475 | - * Assign key variable pairs from an array to a specified block |
|
| 476 | - * @access public |
|
| 477 | - */ |
|
| 475 | + * Assign key variable pairs from an array to a specified block |
|
| 476 | + * @access public |
|
| 477 | + */ |
|
| 478 | 478 | public function assign_block_vars($blockname, $vararray) |
| 479 | 479 | { |
| 480 | 480 | if (strpos($blockname, '.') !== false) |
@@ -539,33 +539,33 @@ discard block |
||
| 539 | 539 | } |
| 540 | 540 | |
| 541 | 541 | /** |
| 542 | - * Change already assigned key variable pair (one-dimensional - single loop entry) |
|
| 543 | - * |
|
| 544 | - * An example of how to use this function: |
|
| 545 | - * {@example alter_block_array.php} |
|
| 546 | - * |
|
| 547 | - * @param string $blockname the blockname, for example 'loop' |
|
| 548 | - * @param array $vararray the var array to insert/add or merge |
|
| 549 | - * @param mixed $key Key to search for |
|
| 550 | - * |
|
| 551 | - * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position] |
|
| 552 | - * |
|
| 553 | - * int: Position [the position to change or insert at directly given] |
|
| 554 | - * |
|
| 555 | - * If key is false the position is set to 0 |
|
| 556 | - * If key is true the position is set to the last entry |
|
| 557 | - * |
|
| 558 | - * @param string $mode Mode to execute (valid modes are 'insert' and 'change') |
|
| 559 | - * |
|
| 560 | - * If insert, the vararray is inserted at the given position (position counting from zero). |
|
| 561 | - * 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). |
|
| 562 | - * |
|
| 563 | - * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array) |
|
| 564 | - * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars) |
|
| 565 | - * |
|
| 566 | - * @return bool false on error, true on success |
|
| 567 | - * @access public |
|
| 568 | - */ |
|
| 542 | + * Change already assigned key variable pair (one-dimensional - single loop entry) |
|
| 543 | + * |
|
| 544 | + * An example of how to use this function: |
|
| 545 | + * {@example alter_block_array.php} |
|
| 546 | + * |
|
| 547 | + * @param string $blockname the blockname, for example 'loop' |
|
| 548 | + * @param array $vararray the var array to insert/add or merge |
|
| 549 | + * @param mixed $key Key to search for |
|
| 550 | + * |
|
| 551 | + * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position] |
|
| 552 | + * |
|
| 553 | + * int: Position [the position to change or insert at directly given] |
|
| 554 | + * |
|
| 555 | + * If key is false the position is set to 0 |
|
| 556 | + * If key is true the position is set to the last entry |
|
| 557 | + * |
|
| 558 | + * @param string $mode Mode to execute (valid modes are 'insert' and 'change') |
|
| 559 | + * |
|
| 560 | + * If insert, the vararray is inserted at the given position (position counting from zero). |
|
| 561 | + * 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). |
|
| 562 | + * |
|
| 563 | + * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array) |
|
| 564 | + * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars) |
|
| 565 | + * |
|
| 566 | + * @return bool false on error, true on success |
|
| 567 | + * @access public |
|
| 568 | + */ |
|
| 569 | 569 | public function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert') |
| 570 | 570 | { |
| 571 | 571 | if (strpos($blockname, '.') !== false) |
@@ -649,9 +649,9 @@ discard block |
||
| 649 | 649 | } |
| 650 | 650 | |
| 651 | 651 | /** |
| 652 | - * Include a separate template |
|
| 653 | - * @access private |
|
| 654 | - */ |
|
| 652 | + * Include a separate template |
|
| 653 | + * @access private |
|
| 654 | + */ |
|
| 655 | 655 | public function _tpl_include($filename, $include = true) |
| 656 | 656 | { |
| 657 | 657 | $handle = $filename; |
@@ -678,9 +678,9 @@ discard block |
||
| 678 | 678 | } |
| 679 | 679 | |
| 680 | 680 | /** |
| 681 | - * Include a php-file |
|
| 682 | - * @access private |
|
| 683 | - */ |
|
| 681 | + * Include a php-file |
|
| 682 | + * @access private |
|
| 683 | + */ |
|
| 684 | 684 | public function _php_include($filename) |
| 685 | 685 | { |
| 686 | 686 | global $phpbb_root_path; |
@@ -697,9 +697,9 @@ discard block |
||
| 697 | 697 | } |
| 698 | 698 | |
| 699 | 699 | /** |
| 700 | - * Assign key variable pairs from an array with block support |
|
| 701 | - * @access public |
|
| 702 | - */ |
|
| 700 | + * Assign key variable pairs from an array with block support |
|
| 701 | + * @access public |
|
| 702 | + */ |
|
| 703 | 703 | public function assign_recursive($values, $name = '') |
| 704 | 704 | { |
| 705 | 705 | if(isset($values['.'])) |