From fd626022ec02ef47b9142bba08180502babbd0ca Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 3 Jul 2012 22:23:08 -0700 Subject: add smarty engine, remove some obsolete zot1 stuff --- .../Smarty/libs/plugins/modifiercompiler.upper.php | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 library/Smarty/libs/plugins/modifiercompiler.upper.php (limited to 'library/Smarty/libs/plugins/modifiercompiler.upper.php') diff --git a/library/Smarty/libs/plugins/modifiercompiler.upper.php b/library/Smarty/libs/plugins/modifiercompiler.upper.php new file mode 100644 index 000000000..f368e37dc --- /dev/null +++ b/library/Smarty/libs/plugins/modifiercompiler.upper.php @@ -0,0 +1,30 @@ + + * Name: lower
+ * Purpose: convert string to uppercase + * + * @link http://smarty.php.net/manual/en/language.modifier.upper.php lower (Smarty online manual) + * @author Uwe Tews + * @param array $params parameters + * @return string with compiled code + */ +function smarty_modifiercompiler_upper($params, $compiler) +{ + if (Smarty::$_MBSTRING) { + return 'mb_strtoupper(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')' ; + } + // no MBString fallback + return 'strtoupper(' . $params[0] . ')'; +} + +?> \ No newline at end of file -- cgit v1.2.3