mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-02 21:31:48 +01:00
- changed internals to use Smarty::$_MBSTRING ($_CHARSET, $_DATE_FORMAT) for better unit testing
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
function smarty_modifiercompiler_from_charset($params, $compiler)
|
||||
{
|
||||
if (!SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
|
||||
if (!Smarty::$_MBSTRING) {
|
||||
// FIXME: (rodneyrehm) shouldn't this throw an error?
|
||||
return $params[0];
|
||||
}
|
||||
@@ -28,7 +28,7 @@ function smarty_modifiercompiler_from_charset($params, $compiler)
|
||||
$params[1] = '"ISO-8859-1"';
|
||||
}
|
||||
|
||||
return 'mb_convert_encoding(' . $params[0] . ', SMARTY_RESOURCE_CHAR_SET, ' . $params[1] . ')';
|
||||
return 'mb_convert_encoding(' . $params[0] . ', "' . addslashes(Smarty::$_CHARSET) . '", ' . $params[1] . ')';
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user