@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | // Search array to get correct position |
587 | 587 | list($search_key, $search_value) = @each($key); |
588 | 588 | |
589 | - $key = NULL; |
|
589 | + $key = null; |
|
590 | 590 | foreach ($this->_tpldata[$blockname] as $i => $val_ary) |
591 | 591 | { |
592 | 592 | if ($val_ary[$search_key] === $search_value) |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | } |
598 | 598 | |
599 | 599 | // key/value pair not found |
600 | - if ($key === NULL) |
|
600 | + if ($key === null) |
|
601 | 601 | { |
602 | 602 | return false; |
603 | 603 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | { |
87 | 87 | global $user; |
88 | 88 | |
89 | - if (file_exists($this->rootPhysical. 'styles/' . $user->theme['template_path'] . '/template')) |
|
89 | + if (file_exists($this->rootPhysical . 'styles/' . $user->theme['template_path'] . '/template')) |
|
90 | 90 | { |
91 | 91 | $this->root = $this->rootPhysical . 'styles/' . $user->theme['template_path'] . '/template'; |
92 | 92 | $this->cachepath = $this->rootPhysical . 'cache/tpl_' . str_replace('_', '-', $user->theme['template_path']) . '_'; |
@@ -645,7 +645,7 @@ discard block |
||
645 | 645 | // Re-position template blocks |
646 | 646 | for ($i = sizeof($this->_tpldata[$blockname]); $i > $key; $i--) |
647 | 647 | { |
648 | - $this->_tpldata[$blockname][$i] = $this->_tpldata[$blockname][$i-1]; |
|
648 | + $this->_tpldata[$blockname][$i] = $this->_tpldata[$blockname][$i - 1]; |
|
649 | 649 | $this->_tpldata[$blockname][$i]['S_ROW_COUNT'] = $i; |
650 | 650 | } |
651 | 651 | |
@@ -725,13 +725,13 @@ discard block |
||
725 | 725 | */ |
726 | 726 | function assign_recursive($values, $name = '') |
727 | 727 | { |
728 | - if(isset($values['.'])) |
|
728 | + if (isset($values['.'])) |
|
729 | 729 | { |
730 | 730 | $values_extra = $values['.']; |
731 | 731 | unset($values['.']); |
732 | 732 | } |
733 | 733 | |
734 | - if(!$name) |
|
734 | + if (!$name) |
|
735 | 735 | { |
736 | 736 | $this->assign_vars($values); |
737 | 737 | } |
@@ -740,12 +740,12 @@ discard block |
||
740 | 740 | $this->assign_block_vars($name, $values); |
741 | 741 | } |
742 | 742 | |
743 | - if(isset($values_extra)) |
|
743 | + if (isset($values_extra)) |
|
744 | 744 | { |
745 | - foreach($values_extra as $sub_array_name => $sub_array) |
|
745 | + foreach ($values_extra as $sub_array_name => $sub_array) |
|
746 | 746 | { |
747 | 747 | $new_name = $name . ($name ? '.' : '') . $sub_array_name; |
748 | - foreach($sub_array as $sub_element) |
|
748 | + foreach ($sub_array as $sub_element) |
|
749 | 749 | { |
750 | 750 | $this->assign_recursive($sub_element, $new_name); |
751 | 751 | } |
@@ -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,9 +231,9 @@ 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 | /** |
@@ -275,9 +275,9 @@ discard block |
||
275 | 275 | } |
276 | 276 | |
277 | 277 | /** |
278 | - * Display the handle and assign the output to a template variable or return the compiled result. |
|
279 | - * @access public |
|
280 | - */ |
|
278 | + * Display the handle and assign the output to a template variable or return the compiled result. |
|
279 | + * @access public |
|
280 | + */ |
|
281 | 281 | function assign_display($handle, $template_var = '', $return_content = true, $include_once = false) |
282 | 282 | { |
283 | 283 | ob_start(); |
@@ -295,9 +295,9 @@ discard block |
||
295 | 295 | } |
296 | 296 | |
297 | 297 | /** |
298 | - * Load a compiled template if possible, if not, recompile it |
|
299 | - * @access private |
|
300 | - */ |
|
298 | + * Load a compiled template if possible, if not, recompile it |
|
299 | + * @access private |
|
300 | + */ |
|
301 | 301 | function _tpl_load(&$handle) |
302 | 302 | { |
303 | 303 | global $user, $config; |
@@ -475,9 +475,9 @@ discard block |
||
475 | 475 | } |
476 | 476 | |
477 | 477 | /** |
478 | - * Assign key variable pairs from an array |
|
479 | - * @access public |
|
480 | - */ |
|
478 | + * Assign key variable pairs from an array |
|
479 | + * @access public |
|
480 | + */ |
|
481 | 481 | function assign_vars($vararray) |
482 | 482 | { |
483 | 483 | foreach ($vararray as $key => $val) |
@@ -489,9 +489,9 @@ discard block |
||
489 | 489 | } |
490 | 490 | |
491 | 491 | /** |
492 | - * Assign a single variable to a single key |
|
493 | - * @access public |
|
494 | - */ |
|
492 | + * Assign a single variable to a single key |
|
493 | + * @access public |
|
494 | + */ |
|
495 | 495 | function assign_var($varname, $varval) |
496 | 496 | { |
497 | 497 | $this->_rootref[$varname] = $varval; |
@@ -500,9 +500,9 @@ discard block |
||
500 | 500 | } |
501 | 501 | |
502 | 502 | /** |
503 | - * Assign key variable pairs from an array to a specified block |
|
504 | - * @access public |
|
505 | - */ |
|
503 | + * Assign key variable pairs from an array to a specified block |
|
504 | + * @access public |
|
505 | + */ |
|
506 | 506 | function assign_block_vars($blockname, $vararray) |
507 | 507 | { |
508 | 508 | if (strpos($blockname, '.') !== false) |
@@ -567,33 +567,33 @@ discard block |
||
567 | 567 | } |
568 | 568 | |
569 | 569 | /** |
570 | - * Change already assigned key variable pair (one-dimensional - single loop entry) |
|
571 | - * |
|
572 | - * An example of how to use this function: |
|
573 | - * {@example alter_block_array.php} |
|
574 | - * |
|
575 | - * @param string $blockname the blockname, for example 'loop' |
|
576 | - * @param array $vararray the var array to insert/add or merge |
|
577 | - * @param mixed $key Key to search for |
|
578 | - * |
|
579 | - * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position] |
|
580 | - * |
|
581 | - * int: Position [the position to change or insert at directly given] |
|
582 | - * |
|
583 | - * If key is false the position is set to 0 |
|
584 | - * If key is true the position is set to the last entry |
|
585 | - * |
|
586 | - * @param string $mode Mode to execute (valid modes are 'insert' and 'change') |
|
587 | - * |
|
588 | - * If insert, the vararray is inserted at the given position (position counting from zero). |
|
589 | - * 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). |
|
590 | - * |
|
591 | - * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array) |
|
592 | - * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars) |
|
593 | - * |
|
594 | - * @return bool false on error, true on success |
|
595 | - * @access public |
|
596 | - */ |
|
570 | + * Change already assigned key variable pair (one-dimensional - single loop entry) |
|
571 | + * |
|
572 | + * An example of how to use this function: |
|
573 | + * {@example alter_block_array.php} |
|
574 | + * |
|
575 | + * @param string $blockname the blockname, for example 'loop' |
|
576 | + * @param array $vararray the var array to insert/add or merge |
|
577 | + * @param mixed $key Key to search for |
|
578 | + * |
|
579 | + * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position] |
|
580 | + * |
|
581 | + * int: Position [the position to change or insert at directly given] |
|
582 | + * |
|
583 | + * If key is false the position is set to 0 |
|
584 | + * If key is true the position is set to the last entry |
|
585 | + * |
|
586 | + * @param string $mode Mode to execute (valid modes are 'insert' and 'change') |
|
587 | + * |
|
588 | + * If insert, the vararray is inserted at the given position (position counting from zero). |
|
589 | + * 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). |
|
590 | + * |
|
591 | + * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array) |
|
592 | + * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars) |
|
593 | + * |
|
594 | + * @return bool false on error, true on success |
|
595 | + * @access public |
|
596 | + */ |
|
597 | 597 | function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert') |
598 | 598 | { |
599 | 599 | if (strpos($blockname, '.') !== false) |
@@ -677,9 +677,9 @@ discard block |
||
677 | 677 | } |
678 | 678 | |
679 | 679 | /** |
680 | - * Include a separate template |
|
681 | - * @access private |
|
682 | - */ |
|
680 | + * Include a separate template |
|
681 | + * @access private |
|
682 | + */ |
|
683 | 683 | function _tpl_include($filename, $include = true) |
684 | 684 | { |
685 | 685 | // This is used to access global vars |
@@ -709,9 +709,9 @@ discard block |
||
709 | 709 | } |
710 | 710 | |
711 | 711 | /** |
712 | - * Include a php-file |
|
713 | - * @access private |
|
714 | - */ |
|
712 | + * Include a php-file |
|
713 | + * @access private |
|
714 | + */ |
|
715 | 715 | function _php_include($filename) |
716 | 716 | { |
717 | 717 | $file = $this->rootPhysical . $filename; |
@@ -726,9 +726,9 @@ discard block |
||
726 | 726 | } |
727 | 727 | |
728 | 728 | /** |
729 | - * Assign key variable pairs from an array with block support |
|
730 | - * @access public |
|
731 | - */ |
|
729 | + * Assign key variable pairs from an array with block support |
|
730 | + * @access public |
|
731 | + */ |
|
732 | 732 | function assign_recursive($values, $name = '') |
733 | 733 | { |
734 | 734 | if(isset($values['.'])) |
@@ -22,8 +22,7 @@ discard block |
||
22 | 22 | * Base Template class. |
23 | 23 | * @package phpBB3 |
24 | 24 | */ |
25 | -class template |
|
26 | -{ |
|
25 | +class template { |
|
27 | 26 | /** variable that holds all the data we'll be substituting into |
28 | 27 | * the compiled templates. Takes form: |
29 | 28 | * --> $this->_tpldata[block][iteration#][child][iteration#][child2][iteration#][variablename] == value |
@@ -82,8 +81,7 @@ discard block |
||
82 | 81 | * Set template location |
83 | 82 | * @access public |
84 | 83 | */ |
85 | - function set_template() |
|
86 | - { |
|
84 | + function set_template() { |
|
87 | 85 | global $user; |
88 | 86 | |
89 | 87 | if (file_exists($this->rootPhysical. 'styles/' . $user->theme['template_path'] . '/template')) |
@@ -108,8 +106,7 @@ discard block |
||
108 | 106 | { |
109 | 107 | $this->inherit_root = $this->rootPhysical . 'styles/' . $user->theme['template_inherit_path'] . '/template'; |
110 | 108 | } |
111 | - } |
|
112 | - else |
|
109 | + } else |
|
113 | 110 | { |
114 | 111 | trigger_error('Template path could not be found: styles/' . $user->theme['template_path'] . '/template', E_USER_ERROR); |
115 | 112 | } |
@@ -123,8 +120,7 @@ discard block |
||
123 | 120 | * Set custom template location (able to use directory outside of phpBB) |
124 | 121 | * @access public |
125 | 122 | */ |
126 | - function set_custom_template($template_path, $template_name, $fallback_template_path = false) |
|
127 | - { |
|
123 | + function set_custom_template($template_path, $template_name, $fallback_template_path = false) { |
|
128 | 124 | global $user; |
129 | 125 | |
130 | 126 | // Make sure $template_path has no ending slash |
@@ -145,8 +141,7 @@ discard block |
||
145 | 141 | |
146 | 142 | $this->inherit_root = $fallback_template_path; |
147 | 143 | $this->orig_tpl_inherits_id = true; |
148 | - } |
|
149 | - else |
|
144 | + } else |
|
150 | 145 | { |
151 | 146 | $this->orig_tpl_inherits_id = false; |
152 | 147 | } |
@@ -165,8 +160,7 @@ discard block |
||
165 | 160 | * should be a hash of handle => filename pairs. |
166 | 161 | * @access public |
167 | 162 | */ |
168 | - function set_filenames($filename_array) |
|
169 | - { |
|
163 | + function set_filenames($filename_array) { |
|
170 | 164 | if (!is_array($filename_array)) |
171 | 165 | { |
172 | 166 | return false; |
@@ -194,8 +188,7 @@ discard block |
||
194 | 188 | * Destroy template data set |
195 | 189 | * @access public |
196 | 190 | */ |
197 | - function destroy() |
|
198 | - { |
|
191 | + function destroy() { |
|
199 | 192 | $this->_tpldata = array('.' => array(0 => array())); |
200 | 193 | $this->_rootref = &$this->_tpldata['.'][0]; |
201 | 194 | } |
@@ -204,8 +197,7 @@ discard block |
||
204 | 197 | * Reset/empty complete block |
205 | 198 | * @access public |
206 | 199 | */ |
207 | - function destroy_block_vars($blockname) |
|
208 | - { |
|
200 | + function destroy_block_vars($blockname) { |
|
209 | 201 | if (strpos($blockname, '.') !== false) |
210 | 202 | { |
211 | 203 | // Nested block. |
@@ -220,8 +212,7 @@ discard block |
||
220 | 212 | } |
221 | 213 | |
222 | 214 | unset($str[$blocks[$blockcount]]); |
223 | - } |
|
224 | - else |
|
215 | + } else |
|
225 | 216 | { |
226 | 217 | // Top-level block. |
227 | 218 | unset($this->_tpldata[$blockname]); |
@@ -234,8 +225,7 @@ discard block |
||
234 | 225 | * Display handle |
235 | 226 | * @access public |
236 | 227 | */ |
237 | - function display($handle, $include_once = true) |
|
238 | - { |
|
228 | + function display($handle, $include_once = true) { |
|
239 | 229 | /** |
240 | 230 | * @var phpbb_hook $phpbb_hook |
241 | 231 | */ |
@@ -264,8 +254,7 @@ discard block |
||
264 | 254 | if ($filename = $this->_tpl_load($handle)) |
265 | 255 | { |
266 | 256 | ($include_once) ? include_once($filename) : include($filename); |
267 | - } |
|
268 | - else |
|
257 | + } else |
|
269 | 258 | { |
270 | 259 | $this->evaluate($this->compiled_code[$handle]); |
271 | 260 | } |
@@ -277,8 +266,7 @@ discard block |
||
277 | 266 | * Display the handle and assign the output to a template variable or return the compiled result. |
278 | 267 | * @access public |
279 | 268 | */ |
280 | - function assign_display($handle, $template_var = '', $return_content = true, $include_once = false) |
|
281 | - { |
|
269 | + function assign_display($handle, $template_var = '', $return_content = true, $include_once = false) { |
|
282 | 270 | ob_start(); |
283 | 271 | $this->display($handle, $include_once); |
284 | 272 | $contents = ob_get_clean(); |
@@ -297,8 +285,7 @@ discard block |
||
297 | 285 | * Load a compiled template if possible, if not, recompile it |
298 | 286 | * @access private |
299 | 287 | */ |
300 | - function _tpl_load(&$handle) |
|
301 | - { |
|
288 | + function _tpl_load(&$handle) { |
|
302 | 289 | global $user, $config; |
303 | 290 | |
304 | 291 | if (!isset($this->filename[$handle])) |
@@ -319,8 +306,7 @@ discard block |
||
319 | 306 | if (!file_exists($filename) || @filesize($filename) === 0) |
320 | 307 | { |
321 | 308 | $recompile = true; |
322 | - } |
|
323 | - else if ($config->load_tplcompile) |
|
309 | + } else if ($config->load_tplcompile) |
|
324 | 310 | { |
325 | 311 | // No way around it: we need to check inheritance here |
326 | 312 | if ($user->theme['template_inherits_id'] && !file_exists($this->files[$handle])) |
@@ -403,15 +389,13 @@ discard block |
||
403 | 389 | $this->files[$row['template_filename']] = $file; |
404 | 390 | $this->files_inherit[$row['template_filename']] = $file; |
405 | 391 | $this->files_template[$row['template_filename']] = $user->theme['template_inherits_id']; |
406 | - } |
|
407 | - else if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id']) |
|
392 | + } else if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id']) |
|
408 | 393 | { |
409 | 394 | // Ok, we have a situation. There is a file in the subtemplate, but nothing in the DB. We have to fix that. |
410 | 395 | $force_reload = true; |
411 | 396 | $this->files_template[$row['template_filename']] = $user->theme['template_inherits_id']; |
412 | 397 | } |
413 | - } |
|
414 | - else |
|
398 | + } else |
|
415 | 399 | { |
416 | 400 | $this->files_template[$row['template_filename']] = $user->theme['template_id']; |
417 | 401 | } |
@@ -421,8 +405,7 @@ discard block |
||
421 | 405 | if ($row['template_filename'] == $this->filename[$handle]) |
422 | 406 | { |
423 | 407 | $compile->_tpl_load_file($handle, true); |
424 | - } |
|
425 | - else |
|
408 | + } else |
|
426 | 409 | { |
427 | 410 | $this->files[$row['template_filename']] = $file; |
428 | 411 | $this->filename[$row['template_filename']] = $row['template_filename']; |
@@ -437,8 +420,7 @@ discard block |
||
437 | 420 | { |
438 | 421 | $this->compiled_code[$handle] = $compile->compile(trim($row['template_data'])); |
439 | 422 | $compile->compile_write($handle, $this->compiled_code[$handle]); |
440 | - } |
|
441 | - else |
|
423 | + } else |
|
442 | 424 | { |
443 | 425 | // Only bother compiling if it doesn't already exist |
444 | 426 | if (!file_exists($this->cachepath . str_replace('/', '.', $row['template_filename']) . DOT_PHP_EX)) |
@@ -449,8 +431,7 @@ discard block |
||
449 | 431 | } |
450 | 432 | } |
451 | 433 | } |
452 | - } |
|
453 | - else |
|
434 | + } else |
|
454 | 435 | { |
455 | 436 | $file = $this->root . '/' . $row['template_filename']; |
456 | 437 | |
@@ -477,8 +458,7 @@ discard block |
||
477 | 458 | * Assign key variable pairs from an array |
478 | 459 | * @access public |
479 | 460 | */ |
480 | - function assign_vars($vararray) |
|
481 | - { |
|
461 | + function assign_vars($vararray) { |
|
482 | 462 | foreach ($vararray as $key => $val) |
483 | 463 | { |
484 | 464 | $this->_rootref[$key] = $val; |
@@ -491,8 +471,7 @@ discard block |
||
491 | 471 | * Assign a single variable to a single key |
492 | 472 | * @access public |
493 | 473 | */ |
494 | - function assign_var($varname, $varval) |
|
495 | - { |
|
474 | + function assign_var($varname, $varval) { |
|
496 | 475 | $this->_rootref[$varname] = $varval; |
497 | 476 | |
498 | 477 | return true; |
@@ -502,8 +481,7 @@ discard block |
||
502 | 481 | * Assign key variable pairs from an array to a specified block |
503 | 482 | * @access public |
504 | 483 | */ |
505 | - function assign_block_vars($blockname, $vararray) |
|
506 | - { |
|
484 | + function assign_block_vars($blockname, $vararray) { |
|
507 | 485 | if (strpos($blockname, '.') !== false) |
508 | 486 | { |
509 | 487 | // Nested block. |
@@ -538,8 +516,7 @@ discard block |
||
538 | 516 | // We're adding a new iteration to this block with the given |
539 | 517 | // variable assignments. |
540 | 518 | $str[$blocks[$blockcount]][] = $vararray; |
541 | - } |
|
542 | - else |
|
519 | + } else |
|
543 | 520 | { |
544 | 521 | // Top-level block. |
545 | 522 | $s_row_count = (isset($this->_tpldata[$blockname])) ? sizeof($this->_tpldata[$blockname]) : 0; |
@@ -593,8 +570,7 @@ discard block |
||
593 | 570 | * @return bool false on error, true on success |
594 | 571 | * @access public |
595 | 572 | */ |
596 | - function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert') |
|
597 | - { |
|
573 | + function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert') { |
|
598 | 574 | if (strpos($blockname, '.') !== false) |
599 | 575 | { |
600 | 576 | // Nested blocks are not supported |
@@ -639,8 +615,7 @@ discard block |
||
639 | 615 | $key = sizeof($this->_tpldata[$blockname]); |
640 | 616 | unset($this->_tpldata[$blockname][($key - 1)]['S_LAST_ROW']); |
641 | 617 | $vararray['S_LAST_ROW'] = true; |
642 | - } |
|
643 | - else if ($key === 0) |
|
618 | + } else if ($key === 0) |
|
644 | 619 | { |
645 | 620 | unset($this->_tpldata[$blockname][0]['S_FIRST_ROW']); |
646 | 621 | $vararray['S_FIRST_ROW'] = true; |
@@ -679,8 +654,7 @@ discard block |
||
679 | 654 | * Include a separate template |
680 | 655 | * @access private |
681 | 656 | */ |
682 | - function _tpl_include($filename, $include = true) |
|
683 | - { |
|
657 | + function _tpl_include($filename, $include = true) { |
|
684 | 658 | // This is used to access global vars |
685 | 659 | global $lang, $config, $user; |
686 | 660 | |
@@ -710,8 +684,7 @@ discard block |
||
710 | 684 | * Include a php-file |
711 | 685 | * @access private |
712 | 686 | */ |
713 | - function _php_include($filename) |
|
714 | - { |
|
687 | + function _php_include($filename) { |
|
715 | 688 | $file = $this->rootPhysical . $filename; |
716 | 689 | |
717 | 690 | if (!file_exists($file)) |
@@ -727,8 +700,7 @@ discard block |
||
727 | 700 | * Assign key variable pairs from an array with block support |
728 | 701 | * @access public |
729 | 702 | */ |
730 | - function assign_recursive($values, $name = '') |
|
731 | - { |
|
703 | + function assign_recursive($values, $name = '') { |
|
732 | 704 | if(isset($values['.'])) |
733 | 705 | { |
734 | 706 | $values_extra = $values['.']; |
@@ -738,8 +710,7 @@ discard block |
||
738 | 710 | if(!$name) |
739 | 711 | { |
740 | 712 | $this->assign_vars($values); |
741 | - } |
|
742 | - else |
|
713 | + } else |
|
743 | 714 | { |
744 | 715 | $this->assign_block_vars($name, $values); |
745 | 716 | } |
@@ -32,8 +32,7 @@ |
||
32 | 32 | * @author Fabien Potencier |
33 | 33 | * @author Dominik Zogg |
34 | 34 | */ |
35 | -interface ServiceProviderInterface |
|
36 | -{ |
|
35 | +interface ServiceProviderInterface { |
|
37 | 36 | /** |
38 | 37 | * Registers services on the given container. |
39 | 38 | * |
@@ -26,7 +26,9 @@ |
||
26 | 26 | * DO NOT CHANGE |
27 | 27 | */ |
28 | 28 | |
29 | -if (!defined('INSIDE')) die(); |
|
29 | +if (!defined('INSIDE')) { |
|
30 | + die(); |
|
31 | +} |
|
30 | 32 | |
31 | 33 | |
32 | 34 | $a_lang_array = (array( |
@@ -26,7 +26,9 @@ |
||
26 | 26 | * DO NOT CHANGE |
27 | 27 | */ |
28 | 28 | |
29 | -if (!defined('INSIDE')) die(); |
|
29 | +if (!defined('INSIDE')) { |
|
30 | + die(); |
|
31 | +} |
|
30 | 32 | |
31 | 33 | |
32 | 34 | $a_lang_array = (array( |
@@ -26,7 +26,9 @@ |
||
26 | 26 | * DO NOT CHANGE |
27 | 27 | */ |
28 | 28 | |
29 | -if (!defined('INSIDE')) die(); |
|
29 | +if (!defined('INSIDE')) { |
|
30 | + die(); |
|
31 | +} |
|
30 | 32 | |
31 | 33 | |
32 | 34 | $a_lang_array = (array( |
@@ -26,7 +26,9 @@ |
||
26 | 26 | * DO NOT CHANGE |
27 | 27 | */ |
28 | 28 | |
29 | -if (!defined('INSIDE')) die(); |
|
29 | +if (!defined('INSIDE')) { |
|
30 | + die(); |
|
31 | +} |
|
30 | 32 | |
31 | 33 | |
32 | 34 | $a_lang_array = (array( |
@@ -26,7 +26,9 @@ |
||
26 | 26 | * DO NOT CHANGE |
27 | 27 | */ |
28 | 28 | |
29 | -if (!defined('INSIDE')) die(); |
|
29 | +if (!defined('INSIDE')) { |
|
30 | + die(); |
|
31 | +} |
|
30 | 32 | |
31 | 33 | |
32 | 34 | $a_lang_array = (array( |
@@ -26,7 +26,9 @@ |
||
26 | 26 | * DO NOT CHANGE |
27 | 27 | */ |
28 | 28 | |
29 | -if (!defined('INSIDE')) die(); |
|
29 | +if (!defined('INSIDE')) { |
|
30 | + die(); |
|
31 | +} |
|
30 | 32 | |
31 | 33 | |
32 | 34 | $a_lang_array = array( |
@@ -26,7 +26,9 @@ |
||
26 | 26 | * DO NOT CHANGE |
27 | 27 | */ |
28 | 28 | |
29 | -if (!defined('INSIDE')) die(); |
|
29 | +if (!defined('INSIDE')) { |
|
30 | + die(); |
|
31 | +} |
|
30 | 32 | |
31 | 33 | |
32 | 34 | $a_lang_array = array( |