mirror of
https://github.com/smarty-php/smarty.git
synced 2026-04-08 15:52:09 +02:00
commit 3.1 into the trunk
This commit is contained in:
@@ -20,11 +20,11 @@
|
||||
*/
|
||||
function smarty_modifiercompiler_upper($params, $compiler)
|
||||
{
|
||||
if (function_exists('mb_strtoupper')) {
|
||||
return '((mb_detect_encoding(' . $params[0] . ', \'UTF-8, ISO-8859-1\') === \'UTF-8\') ? mb_strtoupper(' . $params[0] . ',SMARTY_RESOURCE_CHAR_SET) : strtoupper(' . $params[0] . '))' ;
|
||||
} else {
|
||||
return 'strtoupper(' . $params[0] . ')';
|
||||
}
|
||||
if (SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
|
||||
return 'mb_strtoupper(' . $params[0] . ',SMARTY_RESOURCE_CHAR_SET)' ;
|
||||
}
|
||||
// no MBString fallback
|
||||
return 'strtoupper(' . $params[0] . ')';
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user