diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2004-09-16 18:33:22 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2004-09-16 18:33:22 +0000 |
| commit | 2fa463cdeb5d8e4f2373aa834154ca27ea21c97a (patch) | |
| tree | 87059418d9b487f76bf1c99ae7ec3184a62cd8ef /phpBB/includes/template.php | |
| parent | d80f8d577ebdc1489b2dcf49bdb9a266d29d1ef1 (diff) | |
| download | forums-2fa463cdeb5d8e4f2373aa834154ca27ea21c97a.tar forums-2fa463cdeb5d8e4f2373aa834154ca27ea21c97a.tar.gz forums-2fa463cdeb5d8e4f2373aa834154ca27ea21c97a.tar.bz2 forums-2fa463cdeb5d8e4f2373aa834154ca27ea21c97a.tar.xz forums-2fa463cdeb5d8e4f2373aa834154ca27ea21c97a.zip | |
- more updates, mostly bugfixes to the bbcode parser
- changed current_user in sessions (please review)
- give more flexibility to style authors in regard to the pagination elements
- profile fields updates (included a sample constuct into viewtopic_body.html - have to be documented extensivly)
- code optimizations (use of strpos, sizeof, loops not iterating functions on every call, memory savings...)
- and last but not least --- hopefully not introduced more bugs than healthy (*cough*)
git-svn-id: file:///svn/phpbb/trunk@4984 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/template.php')
| -rw-r--r-- | phpBB/includes/template.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 60cab6bd6c..71ab2bbc45 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -350,7 +350,7 @@ class template } $compile_blocks = array(); - for ($curr_tb = 0; $curr_tb < count($text_blocks); $curr_tb++) + for ($curr_tb = 0, $tb_size = sizeof($text_blocks); $curr_tb < $tb_size; $curr_tb++) { switch ($blocks[1][$curr_tb]) { @@ -427,7 +427,7 @@ class template } $template_php = ''; - for ($i = 0; $i < count($text_blocks); $i++) + for ($i = 0, $size = sizeof($text_blocks); $i < $size; $i++) { $trim_check_text = trim($text_blocks[$i]); $trim_check_block = trim($compile_blocks[$i]); @@ -450,7 +450,7 @@ class template // This one will handle varrefs WITH namespaces preg_match_all('#\{(([a-z0-9\-_]+?\.)+?)(\$)?([A-Z0-9\-_]+?)\}#', $text_blocks, $varrefs); - for ($j = 0; $j < sizeof($varrefs[1]); $j++) + for ($j = 0, $size = sizeof($varrefs[1]); $j < $size; $j++) { $namespace = $varrefs[1][$j]; $varname = $varrefs[4][$j]; @@ -541,7 +541,7 @@ class template $tokens = $match[0]; $is_arg_stack = array(); - for ($i = 0; $i < count($tokens); $i++) + for ($i = 0, $size = sizeof($tokens); $i < $size; $i++) { $token = &$tokens[$i]; |
