Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialMediaSearch.php |
— | — | @@ -675,12 +675,12 @@ |
676 | 676 | continue; |
677 | 677 | } |
678 | 678 | -- $contextlines; |
679 | | - $pre = $wgContLang->truncate( $m[1], - $contextchars ); |
| 679 | + $pre = $wgContLang->truncate( $m[1], - $contextchars, '...', false ); |
680 | 680 | |
681 | 681 | if ( count( $m ) < 3 ) { |
682 | 682 | $post = ''; |
683 | 683 | } else { |
684 | | - $post = $wgContLang->truncate( $m[3], $contextchars ); |
| 684 | + $post = $wgContLang->truncate( $m[3], $contextchars, '...', false ); |
685 | 685 | } |
686 | 686 | |
687 | 687 | $found = $m[2]; |
— | — | @@ -694,7 +694,7 @@ |
695 | 695 | } |
696 | 696 | // if we found no matches just return the first line: |
697 | 697 | if ( $extract == '' ) |
698 | | - return ' ' . $wgContLang->truncate( $text, ( $contextchars * 2 ) ) . ''; |
| 698 | + return ' ' . $wgContLang->truncate( $text, ( $contextchars * 2 ), '...', false ) . ''; |
699 | 699 | // wfProfileOut( "$fname-extract" ); |
700 | 700 | // wfProfileOut( $fname ); |
701 | 701 | // return "<li>{$link} ({$size}){$extract}</li>\n"; |
— | — | @@ -1160,4 +1160,4 @@ |
1161 | 1161 | $start_day |
1162 | 1162 | ), 'ed' => date( 'm/d/Y', $end_day ), 'sdays' => $sDays ), $obj_name ); |
1163 | 1163 | } |
1164 | | -} |
\ No newline at end of file |
| 1164 | +} |
Index: trunk/extensions/ImageTagging/ImageTagging.php |
— | — | @@ -319,12 +319,12 @@ |
320 | 320 | continue; |
321 | 321 | } |
322 | 322 | $contextlines--; |
323 | | - $pre = $wgContLang->truncate( $m[1], -$contextchars ); |
| 323 | + $pre = $wgContLang->truncate( $m[1], -$contextchars, '...', false ); |
324 | 324 | |
325 | 325 | if ( count( $m ) < 3 ) { |
326 | 326 | $post = ''; |
327 | 327 | } else { |
328 | | - $post = $wgContLang->truncate( $m[3], $contextchars ); |
| 328 | + $post = $wgContLang->truncate( $m[3], $contextchars, '...', false ); |
329 | 329 | } |
330 | 330 | |
331 | 331 | $found = $m[2]; |
— | — | @@ -434,4 +434,4 @@ |
435 | 435 | |
436 | 436 | wfProfileOut( __METHOD__ ); |
437 | 437 | return true; |
438 | | -} |
\ No newline at end of file |
| 438 | +} |
Index: trunk/extensions/ReplaceText/SpecialReplaceText.php |
— | — | @@ -485,7 +485,9 @@ |
486 | 486 | $context = ''; |
487 | 487 | foreach ( $cuts as $_ ) { |
488 | 488 | list( $index, $len, ) = $_; |
489 | | - $context .= self::convertWhiteSpaceToHTML( $wgLang->truncate( substr( $text, 0, $index ), - $cw ) ); |
| 489 | + $context .= self::convertWhiteSpaceToHTML( |
| 490 | + $wgLang->truncate( substr( $text, 0, $index ), - $cw, '...', false ) |
| 491 | + ); |
490 | 492 | $snippet = self::convertWhiteSpaceToHTML( substr( $text, $index, $len ) ); |
491 | 493 | if ( $use_regex ) { |
492 | 494 | $targetStr = "/$target/U"; |
— | — | @@ -495,7 +497,9 @@ |
496 | 498 | } |
497 | 499 | $context .= preg_replace( $targetStr, '<span class="searchmatch">\0</span>', $snippet ); |
498 | 500 | |
499 | | - $context .= self::convertWhiteSpaceToHTML( $wgLang->truncate( substr( $text, $index + $len ), $cw ) ); |
| 501 | + $context .= self::convertWhiteSpaceToHTML( |
| 502 | + $wgLang->truncate( substr( $text, $index + $len ), $cw, '...', false ) |
| 503 | + ); |
500 | 504 | } |
501 | 505 | return $context; |
502 | 506 | } |