@@ -55,9 +55,9 @@ discard block |
||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | - * Load template source from file |
|
| 59 | - * @access private |
|
| 60 | - */ |
|
| 58 | + * Load template source from file |
|
| 59 | + * @access private |
|
| 60 | + */ |
|
| 61 | 61 | function _tpl_load_file($handle, $store_in_db = false) |
| 62 | 62 | { |
| 63 | 63 | // Try and open template for read |
@@ -100,10 +100,10 @@ discard block |
||
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
| 103 | - * Remove any PHP tags that do not belong, these regular expressions are derived from |
|
| 104 | - * the ones that exist in zend_language_scanner.l |
|
| 105 | - * @access private |
|
| 106 | - */ |
|
| 103 | + * Remove any PHP tags that do not belong, these regular expressions are derived from |
|
| 104 | + * the ones that exist in zend_language_scanner.l |
|
| 105 | + * @access private |
|
| 106 | + */ |
|
| 107 | 107 | function remove_php_tags(&$code) |
| 108 | 108 | { |
| 109 | 109 | // This matches the information gathered from the internal PHP lexer |
@@ -117,9 +117,9 @@ discard block |
||
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | /** |
| 120 | - * The all seeing all doing compile method. Parts are inspired by or directly from Smarty |
|
| 121 | - * @access private |
|
| 122 | - */ |
|
| 120 | + * The all seeing all doing compile method. Parts are inspired by or directly from Smarty |
|
| 121 | + * @access private |
|
| 122 | + */ |
|
| 123 | 123 | function compile($code, $no_echo = false, $echo_var = '') |
| 124 | 124 | { |
| 125 | 125 | global $config; |
@@ -290,9 +290,9 @@ discard block |
||
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 | /** |
| 293 | - * Compile variables |
|
| 294 | - * @access private |
|
| 295 | - */ |
|
| 293 | + * Compile variables |
|
| 294 | + * @access private |
|
| 295 | + */ |
|
| 296 | 296 | function compile_var_tags(&$text_blocks) |
| 297 | 297 | { |
| 298 | 298 | // including $lang variable |
@@ -365,9 +365,9 @@ discard block |
||
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | /** |
| 368 | - * Compile blocks |
|
| 369 | - * @access private |
|
| 370 | - */ |
|
| 368 | + * Compile blocks |
|
| 369 | + * @access private |
|
| 370 | + */ |
|
| 371 | 371 | function compile_tag_block($tag_args) |
| 372 | 372 | { |
| 373 | 373 | $no_nesting = false; |
@@ -453,14 +453,14 @@ discard block |
||
| 453 | 453 | $tag_template_php .= 'if ($_' . $tag_args . '_count) {'; |
| 454 | 454 | |
| 455 | 455 | /** |
| 456 | - * 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 |
|
| 457 | - * <code> |
|
| 458 | - * if (!$offset) |
|
| 459 | - * { |
|
| 460 | - * $tag_template_php .= 'foreach (' . $varref . ' as $_' . $tag_args . '_i => $_' . $tag_args . '_val){'; |
|
| 461 | - * } |
|
| 462 | - * </code> |
|
| 463 | - */ |
|
| 456 | + * 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 |
|
| 457 | + * <code> |
|
| 458 | + * if (!$offset) |
|
| 459 | + * { |
|
| 460 | + * $tag_template_php .= 'foreach (' . $varref . ' as $_' . $tag_args . '_i => $_' . $tag_args . '_val){'; |
|
| 461 | + * } |
|
| 462 | + * </code> |
|
| 463 | + */ |
|
| 464 | 464 | |
| 465 | 465 | $tag_template_php .= 'for ($_' . $tag_args . '_i = ' . $loop_start . '; $_' . $tag_args . '_i < ' . $loop_end . '; ++$_' . $tag_args . '_i){'; |
| 466 | 466 | // $tag_template_php .= '$this->_block_counter["'. $tag_args . '"] = $_' . $tag_args . '_i;'; |
@@ -471,10 +471,10 @@ discard block |
||
| 471 | 471 | } |
| 472 | 472 | |
| 473 | 473 | /** |
| 474 | - * Compile IF tags - much of this is from Smarty with |
|
| 475 | - * some adaptions for our block level methods |
|
| 476 | - * @access private |
|
| 477 | - */ |
|
| 474 | + * Compile IF tags - much of this is from Smarty with |
|
| 475 | + * some adaptions for our block level methods |
|
| 476 | + * @access private |
|
| 477 | + */ |
|
| 478 | 478 | function compile_tag_if($tag_args, $elseif) |
| 479 | 479 | { |
| 480 | 480 | // Tokenize args for 'if' tag. |
@@ -629,9 +629,9 @@ discard block |
||
| 629 | 629 | } |
| 630 | 630 | |
| 631 | 631 | /** |
| 632 | - * Compile DEFINE tags |
|
| 633 | - * @access private |
|
| 634 | - */ |
|
| 632 | + * Compile DEFINE tags |
|
| 633 | + * @access private |
|
| 634 | + */ |
|
| 635 | 635 | function compile_tag_define($tag_args, $op) |
| 636 | 636 | { |
| 637 | 637 | preg_match('#^((?:[a-z0-9\-_]+\.)+)?\$(?=[A-Z])([A-Z0-9_\-]*)(?: = (\'?)([^\']*)(\'?))?$#', $tag_args, $match); |
@@ -682,9 +682,9 @@ discard block |
||
| 682 | 682 | } |
| 683 | 683 | |
| 684 | 684 | /** |
| 685 | - * Compile INCLUDE tag |
|
| 686 | - * @access private |
|
| 687 | - */ |
|
| 685 | + * Compile INCLUDE tag |
|
| 686 | + * @access private |
|
| 687 | + */ |
|
| 688 | 688 | function compile_tag_include($tag_args) |
| 689 | 689 | { |
| 690 | 690 | // Process dynamic includes |
@@ -697,19 +697,19 @@ discard block |
||
| 697 | 697 | } |
| 698 | 698 | |
| 699 | 699 | /** |
| 700 | - * Compile INCLUDE_PHP tag |
|
| 701 | - * @access private |
|
| 702 | - */ |
|
| 700 | + * Compile INCLUDE_PHP tag |
|
| 701 | + * @access private |
|
| 702 | + */ |
|
| 703 | 703 | function compile_tag_include_php($tag_args) |
| 704 | 704 | { |
| 705 | 705 | return "\$this->_php_include('$tag_args');"; |
| 706 | 706 | } |
| 707 | 707 | |
| 708 | 708 | /** |
| 709 | - * parse expression |
|
| 710 | - * This is from Smarty |
|
| 711 | - * @access private |
|
| 712 | - */ |
|
| 709 | + * parse expression |
|
| 710 | + * This is from Smarty |
|
| 711 | + * @access private |
|
| 712 | + */ |
|
| 713 | 713 | function _parse_is_expr($is_arg, $tokens) |
| 714 | 714 | { |
| 715 | 715 | $expr_end = 0; |
@@ -802,14 +802,14 @@ discard block |
||
| 802 | 802 | } |
| 803 | 803 | |
| 804 | 804 | /** |
| 805 | - * Generates a reference to the array of data values for the given |
|
| 806 | - * (possibly nested) block namespace. This is a string of the form: |
|
| 807 | - * $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN'] |
|
| 808 | - * |
|
| 809 | - * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. |
|
| 810 | - * NOTE: does not expect a trailing "." on the blockname. |
|
| 811 | - * @access private |
|
| 812 | - */ |
|
| 805 | + * Generates a reference to the array of data values for the given |
|
| 806 | + * (possibly nested) block namespace. This is a string of the form: |
|
| 807 | + * $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN'] |
|
| 808 | + * |
|
| 809 | + * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. |
|
| 810 | + * NOTE: does not expect a trailing "." on the blockname. |
|
| 811 | + * @access private |
|
| 812 | + */ |
|
| 813 | 813 | function generate_block_data_ref($blockname, $include_last_iterator, $defop = false) |
| 814 | 814 | { |
| 815 | 815 | // Get an array of the blocks involved. |
@@ -845,9 +845,9 @@ discard block |
||
| 845 | 845 | } |
| 846 | 846 | |
| 847 | 847 | /** |
| 848 | - * Write compiled file to cache directory |
|
| 849 | - * @access private |
|
| 850 | - */ |
|
| 848 | + * Write compiled file to cache directory |
|
| 849 | + * @access private |
|
| 850 | + */ |
|
| 851 | 851 | function compile_write($handle, $data) |
| 852 | 852 | { |
| 853 | 853 | $filename = $this->template->cachepath . str_replace('/', '.', $this->template->filename[$handle]) . DOT_PHP_EX; |
@@ -870,9 +870,9 @@ discard block |
||
| 870 | 870 | |
| 871 | 871 | // Gorlum's minifier BOF |
| 872 | 872 | /** |
| 873 | - * Minifies template w/i PHP code by removing extra spaces |
|
| 874 | - * @access private |
|
| 875 | - */ |
|
| 873 | + * Minifies template w/i PHP code by removing extra spaces |
|
| 874 | + * @access private |
|
| 875 | + */ |
|
| 876 | 876 | function minify($html) |
| 877 | 877 | { |
| 878 | 878 | global $config; |