From 45a8b5676a8d59ff21a0bcdab5ecf126ae30ed73 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Fri, 7 Feb 2014 13:29:03 +0100 Subject: [PATCH] Improved tpl class from master --- server/lib/classes/tpl.inc.php | 80 ++++++++++++---------------------- 1 file changed, 29 insertions(+), 51 deletions(-) diff --git a/server/lib/classes/tpl.inc.php b/server/lib/classes/tpl.inc.php index 6dc49132a3..2a91b0654b 100644 --- a/server/lib/classes/tpl.inc.php +++ b/server/lib/classes/tpl.inc.php @@ -932,7 +932,7 @@ if (!defined('vlibTemplateClassLoaded')) { $regex = '/(<|<\/|{|{\/|){1}'; $regex.= '/i'; - //$regex.= '([\r\n|\n|\r])?/ie'; $data = preg_replace_callback($regex, array($this, '_parseTag'), $data); if ($this->_cache) { // add cache if need be @@ -1300,28 +1269,37 @@ if (!defined('vlibTemplateClassLoaded')) { $wholetag = $args[0]; $openclose = $args[1]; $tag = strtolower($args[2]); - $newline = $args[11]; - //echo "1#$newline#2"; - - if ($tag == 'else') return ''.$newline; + + if ($tag == 'else') return ''; if ($tag == 'tmpl_include') return $wholetag; // ignore tmpl_include tags if (preg_match("/^<\/|{\/|