From 9cb4021e229dedb983c76a2134419adab37c021b Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 26 May 2004 20:18:54 +0000 Subject: [PATCH] don't hurt me... just very small things git-svn-id: file:///svn/phpbb/trunk@4896 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/template.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 0caa1b304b..831f455f35 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -469,6 +469,7 @@ class template $text_blocks = preg_replace('#\{L_([A-Z0-9\-_]*?)\}#e', "'_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', "_tpldata['.'][0]['\\1']; ?>", $text_blocks); $text_blocks = preg_replace('#\{\$([a-z0-9\-_]*?)\}#is', "_tpldata['DEFINE']['.']['\\1']; ?>", $text_blocks); @@ -780,7 +781,7 @@ class template // Append the variable reference. $varref .= "['$varname']"; - $varref = ($echo) ? "" : $varref; + $varref = ($echo) ? "" : ((isset($varref)) ? $varref : ''); return $varref; } @@ -793,7 +794,7 @@ class template * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. * NOTE: does not expect a trailing "." on the blockname. */ - function generate_block_data_ref($blockname, $include_last_iterator, $defop) + function generate_block_data_ref($blockname, $include_last_iterator, $defop = false) { // Get an array of the blocks involved. $blocks = explode('.', $blockname);