diff options
| author | David M <davidmj@users.sourceforge.net> | 2007-01-27 13:36:50 +0000 |
|---|---|---|
| committer | David M <davidmj@users.sourceforge.net> | 2007-01-27 13:36:50 +0000 |
| commit | 14e209a487abc134812147907ef4e03d2850a767 (patch) | |
| tree | 04d5ad62786554d3a708f764dee67126dbbff5c9 /phpBB | |
| parent | 3c5c5154abddff39ec270ca82495a7923e4b254c (diff) | |
| download | forums-14e209a487abc134812147907ef4e03d2850a767.tar forums-14e209a487abc134812147907ef4e03d2850a767.tar.gz forums-14e209a487abc134812147907ef4e03d2850a767.tar.bz2 forums-14e209a487abc134812147907ef4e03d2850a767.tar.xz forums-14e209a487abc134812147907ef4e03d2850a767.zip | |
- generate fewer opcodes, make a smaller cache, a bit more readable
git-svn-id: file:///svn/phpbb/trunk@6935 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
| -rw-r--r-- | phpBB/includes/functions_template.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php index dc7507add6..4e5b46c3f7 100644 --- a/phpBB/includes/functions_template.php +++ b/phpBB/includes/functions_template.php @@ -242,14 +242,14 @@ class template_compile // transform vars prefixed by L_ into their language variable pendant if nothing is set within the tpldata array if (strpos($text_blocks, '{L_') !== false) { - $text_blocks = preg_replace('#\{L_([a-z0-9\-_]*)\}#is', "<?php echo ((isset(\$this->_rootref['L_\\1'])) ? \$this->_rootref['L_\\1'] : ((isset(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '{ ' . ucfirst(strtolower(str_replace('_', ' ', '\\1'))) . ' }')); ?>", $text_blocks); + $text_blocks = preg_replace('#\{L_([a-z0-9\-_]*)\}#is', "<?php echo ((isset(\$this->_rootref['L_\\1'])) ? \$this->_rootref['L_\\1'] : ((isset(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '{ \\1 }')); ?>", $text_blocks); } // Handle addslashed language variables prefixed with LA_ // If a template variable already exist, it will be used in favor of it... if (strpos($text_blocks, '{LA_') !== false) { - $text_blocks = preg_replace('#\{LA_([a-z0-9\-_]*)\}#is', "<?php echo ((isset(\$this->_rootref['LA_\\1'])) ? \$this->_rootref['LA_\\1'] : ((isset(\$this->_rootref['L_\\1'])) ? addslashes(\$this->_rootref['L_\\1']) : ((isset(\$user->lang['\\1'])) ? addslashes(\$user->lang['\\1']) : '{ ' . ucfirst(strtolower(str_replace('_', ' ', '\\1'))) . ' }'))); ?>", $text_blocks); + $text_blocks = preg_replace('#\{LA_([a-z0-9\-_]*)\}#is', "<?php echo ((isset(\$this->_rootref['LA_\\1'])) ? \$this->_rootref['LA_\\1'] : ((isset(\$this->_rootref['L_\\1'])) ? addslashes(\$this->_rootref['L_\\1']) : ((isset(\$user->lang['\\1'])) ? addslashes(\$user->lang['\\1']) : '{ \\1 }'))); ?>", $text_blocks); } // Handle remaining varrefs |
