]> git.mxchange.org Git - friendica.git/blob - library/Smarty/libs/plugins/modifiercompiler.lower.php
reverting tinymce changes, updating smarty to 3.1.19
[friendica.git] / library / Smarty / libs / plugins / modifiercompiler.lower.php
1 <?php
2 /**
3  * Smarty plugin
4  *
5  * @package    Smarty
6  * @subpackage PluginsModifierCompiler
7  */
8
9 /**
10  * Smarty lower modifier plugin
11  * Type:     modifier<br>
12  * Name:     lower<br>
13  * Purpose:  convert string to lowercase
14  *
15  * @link   http://www.smarty.net/manual/en/language.modifier.lower.php lower (Smarty online manual)
16  * @author Monte Ohrt <monte at ohrt dot com>
17  * @author Uwe Tews
18  *
19  * @param array $params parameters
20  *
21  * @return string with compiled code
22  */
23
24 function smarty_modifiercompiler_lower($params)
25 {
26     if (Smarty::$_MBSTRING) {
27         return 'mb_strtolower(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')';
28     }
29     // no MBString fallback
30     return 'strtolower(' . $params[0] . ')';
31 }