Code

Updated integrated smarty
[gosa.git] / gosa-core / include / smarty / plugins / modifiercompiler.upper.php
1 <?php\r
2 /**\r
3  * Smarty plugin\r
4  *\r
5  * @package Smarty\r
6  * @subpackage PluginsModifierCompiler\r
7  */\r
8 \r
9 /**\r
10  * Smarty upper modifier plugin\r
11  * \r
12  * Type:     modifier<br>\r
13  * Name:     lower<br>\r
14  * Purpose:  convert string to uppercase\r
15  * \r
16  * @link http://smarty.php.net/manual/en/language.modifier.upper.php lower (Smarty online manual)\r
17  * @author Uwe Tews \r
18  * @param array $params parameters\r
19  * @return string with compiled code\r
20  */\r
21 function smarty_modifiercompiler_upper($params, $compiler)\r
22 {\r
23     if (SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {\r
24         return 'mb_strtoupper(' . $params[0] . ',SMARTY_RESOURCE_CHAR_SET)' ;\r
25     }\r
26     // no MBString fallback\r
27     return 'strtoupper(' . $params[0] . ')';\r
28\r
29 \r
30 ?>