[phpMP-CVS] CVS: phpMP/core template.php,1.6,1.7
Status: Pre-Alpha
Brought to you by:
heimidal
From: Brian R. <hei...@us...> - 2003-09-15 07:05:46
|
Update of /cvsroot/phpmp/phpMP/core In directory sc8-pr-cvs1:/tmp/cvs-serv9608/core Modified Files: template.php Log Message: Template fix. Index: template.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/core/template.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** template.php 15 Sep 2003 06:58:19 -0000 1.6 --- template.php 15 Sep 2003 07:05:40 -0000 1.7 *************** *** 393,407 **** // This will handle the remaining root-level varrefs ! if (!$this->static_lang) ! { ! global $User; ! $text_blocks = preg_replace('#\{L_([a-z0-9\-_]*?)\}#is', "<?php echo ((isset(\$this->_tpldata['.'][0]['L_\\1'])) ? \$this->_tpldata['.'][0]['L_\\1'] : ((isset(\$User->lang['\\1'])) ? \$User->lang['\\1'] : ucfirst(strtolower(str_replace('_', ' ', '\\1'))))); ?>", $text_blocks); ! } ! else ! { ! global $User; ! $text_blocks = preg_replace('#\{L_([A-Z0-9\-_]*?)\}#e', "'<?php echo ((isset(\$this->_tpldata[\'.\'][0][\'L_\\1\'])) ? \$this->_tpldata[\'.\'][0][\'L_\\1\'] : \'' . ((isset(\$User->lang['\\1'])) ? \$User->lang['\\1'] : '') . '\'); ?>'" , $text_blocks); ! } $text_blocks = preg_replace('#\{([a-z0-9\-_]*?)\}#is', "<?php echo \$this->_tpldata['.'][0]['\\1']; ?>", $text_blocks); --- 393,399 ---- // This will handle the remaining root-level varrefs ! global $User; ! $text_blocks = preg_replace('#\{L_([A-Z0-9\-_]*?)\}#e', "'<?php echo ((isset(\$this->_tpldata[\'.\'][0][\'L_\\1\'])) ? \$this->_tpldata[\'.\'][0][\'L_\\1\'] : \'' . ((isset(\$User->lang['\\1'])) ? \$User->lang['\\1'] : '') . '\'); ?>'" , $text_blocks); $text_blocks = preg_replace('#\{([a-z0-9\-_]*?)\}#is', "<?php echo \$this->_tpldata['.'][0]['\\1']; ?>", $text_blocks); |