From 3415ca658c65aa352f259ad707a6deca5ec903ab Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 21 Aug 2004 20:57:47 +0000 Subject: [PATCH] * Fix notice from uninitialized variable in date() * Call up to LanguageUtf8::stripForSearch to do the actual case folding/armoring. Reduces code duplication and works when using mb_* mode --- languages/LanguageJa.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/languages/LanguageJa.php b/languages/LanguageJa.php index 0297ba53c0..a6146892c2 100644 --- a/languages/LanguageJa.php +++ b/languages/LanguageJa.php @@ -979,7 +979,7 @@ class LanguageJa extends LanguageUtf8 { global $wgWeekdayAbbreviationsJa; if ( $adj ) { $ts = $this->userAdjust( $ts ); } - $x = getdate(mktime(( (int)substr( $ts, 8, 2) ) + $diff, + $x = getdate(mktime(( (int)substr( $ts, 8, 2) ), (int)substr( $ts, 10, 2 ), (int)substr( $ts, 12, 2 ), (int)substr( $ts, 4, 2 ), (int)substr( $ts, 6, 2 ), (int)substr( $ts, 0, 4 ))); @@ -1055,11 +1055,8 @@ class LanguageJa extends LanguageUtf8 { $s = preg_replace( '/\xef\xbc([\x80-\xbf])/e', 'chr((ord("$1") & 0x3f) + 0x20)', $s ); $s = preg_replace( '/\xef\xbd([\x80-\x99])/e', 'chr((ord("$1") & 0x3f) + 0x60)', $s ); - return trim( preg_replace( - "/([\\xc0-\\xff][\\x80-\\xbf]*)/e", - "'U8' . bin2hex( strtr( \"\$1\", \$wikiLowerChars ) )", - $s ) ); - return $s; + # Do general case folding and UTF-8 armoring + return LanguageUtf8::stripForSearch( $s ); } # Italic is not appropriate for Japanese script -- 2.20.1