update smarty to 3.1.28-dev which fixes a bug where changes in a template are only visible on the second pageload which is annoying for developing

This commit is contained in:
Mario Vavti
2015-12-06 21:09:58 +01:00
parent f2d7083183
commit 26c465ad0c
89 changed files with 5582 additions and 7114 deletions

View File

@@ -19,10 +19,11 @@
* @param string $string input string
* @param string|array $search regular expression(s) to search for
* @param string|array $replace string(s) that should be replaced
* @param int $limit the maximum number of replacements
*
* @return string
*/
function smarty_modifier_regex_replace($string, $search, $replace)
function smarty_modifier_regex_replace($string, $search, $replace, $limit = -1)
{
if (is_array($search)) {
foreach ($search as $idx => $s) {
@@ -32,7 +33,7 @@ function smarty_modifier_regex_replace($string, $search, $replace)
$search = _smarty_regex_replace_check($search);
}
return preg_replace($search, $replace, $string);
return preg_replace($search, $replace, $string, $limit);
}
/**