X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=library%2FSmarty%2Flibs%2Fplugins%2Fmodifiercompiler.from_charset.php;h=dab43e9c3b9f2463fc236f408155e070a46e6bce;hb=395be3dcde55d16c8e23dbe9137d1279b58442a4;hp=93b568a5a87f11a4b14b4e9bfe6e56985145755e;hpb=ba4db236ecff1ffdb56adc2715b3f53515f8cb34;p=friendica.git diff --git a/library/Smarty/libs/plugins/modifiercompiler.from_charset.php b/library/Smarty/libs/plugins/modifiercompiler.from_charset.php index 93b568a5a8..dab43e9c3b 100644 --- a/library/Smarty/libs/plugins/modifiercompiler.from_charset.php +++ b/library/Smarty/libs/plugins/modifiercompiler.from_charset.php @@ -1,34 +1,33 @@ - - * Name: from_charset
- * Purpose: convert character encoding from $charset to internal encoding - * - * @author Rodney Rehm - * @param array $params parameters - * @return string with compiled code - */ -function smarty_modifiercompiler_from_charset($params, $compiler) -{ - if (!Smarty::$_MBSTRING) { - // FIXME: (rodneyrehm) shouldn't this throw an error? - return $params[0]; - } - - if (!isset($params[1])) { - $params[1] = '"ISO-8859-1"'; - } - - return 'mb_convert_encoding(' . $params[0] . ', "' . addslashes(Smarty::$_CHARSET) . '", ' . $params[1] . ')'; -} - -?> \ No newline at end of file + + * Name: from_charset
+ * Purpose: convert character encoding from $charset to internal encoding + * + * @author Rodney Rehm + * + * @param array $params parameters + * + * @return string with compiled code + */ +function smarty_modifiercompiler_from_charset($params) +{ + if (!Smarty::$_MBSTRING) { + // FIXME: (rodneyrehm) shouldn't this throw an error? + return $params[0]; + } + + if (!isset($params[1])) { + $params[1] = '"ISO-8859-1"'; + } + + return 'mb_convert_encoding(' . $params[0] . ', "' . addslashes(Smarty::$_CHARSET) . '", ' . $params[1] . ')'; +}