r62326 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62325‎ | r62326 | r62327 >
Date:21:21, 11 February 2010
Author:raymond
Status:ok
Tags:
Comment:
Modified paths:
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/Language.php
@@ -2178,12 +2178,7 @@
21792179 # We chopped in the middle of a character; remove it
21802180 $string = $m[1];
21812181 }
2182 - # Do not truncate if the ellipsis actually make the string longer. Bug 22181
2183 - if ( strlen( $string ) + strlen( $ellipsis ) < strlen( $stringOriginal ) ) {
2184 - return $string . $ellipsis;
2185 - } else {
2186 - return $stringOriginal;
2187 - }
 2182+ $string = $string . $ellipsis;
21882183
21892184 } else {
21902185 $string = substr( $string, $length );
@@ -2192,13 +2187,14 @@
21932188 # We chopped in the middle of a character; remove the whole thing
21942189 $string = preg_replace( '/^[\x80-\xbf]+/', '', $string );
21952190 }
2196 - # Do not truncate if the ellipsis actually make the string longer. Bug 22181
2197 - if ( strlen( $string ) + strlen( $ellipsis ) < strlen( $stringOriginal ) ) {
2198 - return $ellipsis . $string;
2199 - } else {
2200 - return $stringOriginal;
2201 - }
 2191+ $string = $ellipsis . $string;
22022192 }
 2193+ # Do not truncate if the ellipsis actually make the string longer. Bug 22181
 2194+ if ( strlen( $string ) < strlen( $stringOriginal ) ) {
 2195+ return $string;
 2196+ } else {
 2197+ return $stringOriginal;
 2198+ }
22032199 }
22042200
22052201 /**

Status & tagging log