Index: trunk/phase3/languages/Language.php |
— | — | @@ -2395,10 +2395,15 @@ |
2396 | 2396 | } |
2397 | 2397 | $eLength = $adjustLength ? strlen( $ellipsis ) : 0; |
2398 | 2398 | # Check if there is no need to truncate |
2399 | | - if ( $length == 0 || strlen( $ellipsis ) >= abs( $length ) ) { |
| 2399 | + if ( $length == 0 ) { |
2400 | 2400 | return $ellipsis; |
2401 | 2401 | } elseif ( strlen( $string ) <= abs( $length ) ) { |
2402 | 2402 | return $string; |
| 2403 | + } elseif ( strlen( $ellipsis ) >= abs( $length ) ) { |
| 2404 | + // Not combined with first (length == 0) if statement, since |
| 2405 | + // we want to return the string instead of ellipsis if both |
| 2406 | + // this and the proceeding elseif are true. |
| 2407 | + return $ellipsis; |
2403 | 2408 | } |
2404 | 2409 | $stringOriginal = $string; |
2405 | 2410 | if ( $length > 0 ) { |