mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
- retaining newlines at registered functions and function plugins
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
02/02/2010
|
||||
- retaining newlines at registered functions and function plugins
|
||||
|
||||
01/25/2010
|
||||
- bugfix cache resource was not loaded when caching was globally off but enabled at a template object
|
||||
- added test that $_SERVER['SCRIPT_NAME'] does exist in Smarty.class.php
|
||||
|
@@ -66,7 +66,7 @@ class Smarty_Internal_Compile_Private_Block_Plugin extends Smarty_Internal_Compi
|
||||
$output = '<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo ' . $function . '(' . $_params . ', $_block_content, $_smarty_tpl->smarty, $_block_repeat, $_smarty_tpl); }?>';
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
return $output."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -42,9 +42,9 @@ class Smarty_Internal_Compile_Private_Function_Plugin extends Smarty_Internal_Co
|
||||
$_params = 'array(' . implode(",", $_paramsArray) . ')';
|
||||
// compile code
|
||||
if (is_array($function)) {
|
||||
$output = '<?php echo call_user_func_array(array(\'' . $function[0] . '\',\'' . $function[1] . '\'),(array(' . $_params . ',$_smarty_tpl->smarty,$_smarty_tpl));?>';
|
||||
$output = "<?php echo call_user_func_array(array('{$function[0]}','{$function[1]}'),(array({$_params},\$_smarty_tpl->smarty,\$_smarty_tpl));?>\n";
|
||||
} else {
|
||||
$output = '<?php echo ' . $function . '(' . $_params . ',$_smarty_tpl->smarty,$_smarty_tpl);?>';
|
||||
$output = "<?php echo {$function}({$_params},\$_smarty_tpl->smarty,\$_smarty_tpl);?>\n";
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ class Smarty_Internal_Compile_Private_Object_Block_Function extends Smarty_Inter
|
||||
// compile code
|
||||
$output = '<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_objects[\'' . substr($tag, 0, -5) . '\'][0]->' . $methode . '(' . $_params . ', $_block_content, $_smarty_tpl->smarty, $_block_repeat, $_smarty_tpl); }?>';
|
||||
}
|
||||
return $output;
|
||||
return $output."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -42,10 +42,10 @@ class Smarty_Internal_Compile_Private_Object_Function extends Smarty_Internal_Co
|
||||
}
|
||||
}
|
||||
$_params = 'array(' . implode(",", $_paramsArray) . ')';
|
||||
$output = "<?php echo \$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$methode}({$_params},\$_smarty_tpl->smarty,\$_smarty_tpl);?>";
|
||||
$output = "<?php echo \$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$methode}({$_params},\$_smarty_tpl->smarty,\$_smarty_tpl);?>\n";
|
||||
} else {
|
||||
$_params = implode(",", $_attr);
|
||||
$output = "<?php echo \$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$methode}({$_params});?>";
|
||||
$output = "<?php echo \$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$methode}({$_params});?>\n";
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
@@ -72,7 +72,7 @@ class Smarty_Internal_Compile_Private_Registered_Block extends Smarty_Internal_C
|
||||
$output = '<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo call_user_func_array(array(\'' . $function[0] . '\',\'' . $function[1] . '\'),array(' . $_params . ', $_block_content, $_smarty_tpl->smarty, $_block_repeat, $_smarty_tpl)); }?>';
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
return $output."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -43,7 +43,7 @@ class Smarty_Internal_Compile_Private_Registered_Function extends Smarty_Interna
|
||||
}
|
||||
$_params = 'array(' . implode(",", $_paramsArray) . ')';
|
||||
// compile code
|
||||
$output = '<?php echo call_user_func_array($_smarty_tpl->smarty->registered_plugins[\'function\'][\'' . $tag . '\'][0],array(' . $_params . ',$_smarty_tpl->smarty,$_smarty_tpl));?>';
|
||||
$output = "<?php echo call_user_func_array(\$_smarty_tpl->smarty->registered_plugins['function']['{$tag}'][0],array({$_params},\$_smarty_tpl->smarty,\$_smarty_tpl));?>\n";
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user