- check if mb string functions available otherwise fallback to normal string functions

This commit is contained in:
Uwe.Tews
2009-04-10 15:52:59 +00:00
parent 1262b7d873
commit ba61f12384
12 changed files with 224 additions and 150 deletions

View File

@@ -38,7 +38,12 @@ function smarty_modifier_replace($string, $search, $replace)
return $haystack;
}
}
return mb_str_replace($search, $replace, $string);
$smarty = Smarty::instance();
if ($smarty->has_mb) {
return mb_str_replace($search, $replace, $string);
} else {
return str_replace($search, $replace, $string);
}
}
?>