From fa10e0945ecd45bfe78a2c8fb015a43092b4944b Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 10 Dec 2015 14:02:22 +0100 Subject: bug #385 update to smarty-3.1.28-dev (from Github) --- include/smarty/libs/plugins/modifiercompiler.indent.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'include/smarty/libs/plugins/modifiercompiler.indent.php') diff --git a/include/smarty/libs/plugins/modifiercompiler.indent.php b/include/smarty/libs/plugins/modifiercompiler.indent.php index 26094b7ca..e3ca20821 100644 --- a/include/smarty/libs/plugins/modifiercompiler.indent.php +++ b/include/smarty/libs/plugins/modifiercompiler.indent.php @@ -1,24 +1,26 @@ * Name: indent
* Purpose: indent lines of text * - * @link http://www.smarty.net/manual/en/language.modifier.indent.php indent (Smarty online manual) + * @link http://www.smarty.net/manual/en/language.modifier.indent.php indent (Smarty online manual) * @author Uwe Tews + * * @param array $params parameters + * * @return string with compiled code */ -function smarty_modifiercompiler_indent($params, $compiler) +function smarty_modifiercompiler_indent($params) { if (!isset($params[1])) { $params[1] = 4; @@ -26,7 +28,6 @@ function smarty_modifiercompiler_indent($params, $compiler) if (!isset($params[2])) { $params[2] = "' '"; } + return 'preg_replace(\'!^!m\',str_repeat(' . $params[2] . ',' . $params[1] . '),' . $params[0] . ')'; } - -?> \ No newline at end of file -- cgit v1.2.3