From c1f9b1f7b1b77776192048005dcc66dcf3df2bfb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 27 Dec 2014 15:41:37 +0100 Subject: Update to MediaWiki 1.24.1 --- includes/Fallback.php | 50 ++++++++++++++------------------------------------ 1 file changed, 14 insertions(+), 36 deletions(-) (limited to 'includes/Fallback.php') diff --git a/includes/Fallback.php b/includes/Fallback.php index cdf6c88e..8e7f4b7e 100644 --- a/includes/Fallback.php +++ b/includes/Fallback.php @@ -25,28 +25,6 @@ */ class Fallback { - /** - * @param $from - * @param $to - * @param $string - * @return string - */ - public static function iconv( $from, $to, $string ) { - if ( substr( $to, -8 ) == '//IGNORE' ) { - $to = substr( $to, 0, strlen( $to ) - 8 ); - } - if ( strcasecmp( $from, $to ) == 0 ) { - return $string; - } - if ( strcasecmp( $from, 'utf-8' ) == 0 ) { - return utf8_decode( $string ); - } - if ( strcasecmp( $to, 'utf-8' ) == 0 ) { - return utf8_encode( $string ); - } - return $string; - } - /** * Fallback implementation for mb_substr, hardcoded to UTF-8. * Attempts to be at least _moderately_ efficient; best optimized @@ -57,9 +35,9 @@ class Fallback { * can be up to 100x slower than native if the text is heavily * multibyte and we have to slog through a few hundred kb. * - * @param $str - * @param $start - * @param $count string + * @param string $str + * @param int $start + * @param string $count * * @return string */ @@ -78,8 +56,8 @@ class Fallback { } /** - * @param $str - * @param $splitPos + * @param string $str + * @param int $splitPos * @return int */ public static function mb_substr_split_unicode( $str, $splitPos ) { @@ -130,7 +108,7 @@ class Fallback { /** * Fallback implementation of mb_strlen, hardcoded to UTF-8. * @param string $str - * @param string $enc optional encoding; ignored + * @param string $enc Optional encoding; ignored * @return int */ public static function mb_strlen( $str, $enc = '' ) { @@ -151,10 +129,10 @@ class Fallback { /** * Fallback implementation of mb_strpos, hardcoded to UTF-8. - * @param $haystack String - * @param $needle String - * @param string $offset optional start position - * @param string $encoding optional encoding; ignored + * @param string $haystack + * @param string $needle + * @param string $offset Optional start position + * @param string $encoding Optional encoding; ignored * @return int */ public static function mb_strpos( $haystack, $needle, $offset = 0, $encoding = '' ) { @@ -172,10 +150,10 @@ class Fallback { /** * Fallback implementation of mb_strrpos, hardcoded to UTF-8. - * @param $haystack String - * @param $needle String - * @param string $offset optional start position - * @param string $encoding optional encoding; ignored + * @param string $haystack + * @param string $needle + * @param string $offset Optional start position + * @param string $encoding Optional encoding; ignored * @return int */ public static function mb_strrpos( $haystack, $needle, $offset = 0, $encoding = '' ) { -- cgit v1.2.2