These changes mean you no longer have to assign L_ vars values (unless you want/need to) ... the relevant entry in the lang array will automatically be used if a var isn't assigned

git-svn-id: file:///svn/phpbb/trunk@3016 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2002-11-07 23:21:14 +00:00
parent 021929b31f
commit 4092e36cca

View file

@ -409,6 +409,7 @@ class Template {
} }
// This will handle the remaining root-level varrefs // This will handle the remaining root-level varrefs
$text_blocks = preg_replace('#\{L_([a-z0-9\-_]*?)\}#is', '\' . ((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', '\' . ((isset($this->_tpldata[\'.\'][0][\'\1\'])) ? $this->_tpldata[\'.\'][0][\'\1\'] : \'\') . \'', $text_blocks); $text_blocks = preg_replace('#\{([a-z0-9\-_]*?)\}#is', '\' . ((isset($this->_tpldata[\'.\'][0][\'\1\'])) ? $this->_tpldata[\'.\'][0][\'\1\'] : \'\') . \'', $text_blocks);
return; return;
@ -679,7 +680,7 @@ class Template {
// //
function compile_load(&$_str, &$handle, $do_echo) function compile_load(&$_str, &$handle, $do_echo)
{ {
global $phpEx; global $phpEx, $user;
$filename = $this->cachedir . $this->filename[$handle] . '.' . $phpEx; $filename = $this->cachedir . $this->filename[$handle] . '.' . $phpEx;