Index: trunk/phase3/includes/specials/SpecialAllpages.php |
— | — | @@ -48,6 +48,11 @@ |
49 | 49 | * Maximum number of pages to show on single index subpage. |
50 | 50 | */ |
51 | 51 | protected $maxLineCount = 200; |
| 52 | + |
| 53 | + /** |
| 54 | + * Maximum number of chars to show for an entry. |
| 55 | + */ |
| 56 | + protected $maxPageLength = 70; |
52 | 57 | |
53 | 58 | /** |
54 | 59 | * Name of this special page. Used to make title objects that reference back |
— | — | @@ -225,12 +230,15 @@ |
226 | 231 | $align = $wgContLang->isRtl() ? 'left' : 'right'; |
227 | 232 | $inpointf = htmlspecialchars( str_replace( '_', ' ', $inpoint ) ); |
228 | 233 | $outpointf = htmlspecialchars( str_replace( '_', ' ', $outpoint ) ); |
| 234 | + // Don't let the length runaway |
| 235 | + $inpointf = $wgContLang->truncate( $inpointf, $this->maxPageLength, '...' ); |
| 236 | + $outpointf = $wgContLang->truncate( $outpointf, $this->maxPageLength, '...' ); |
| 237 | + |
229 | 238 | $queryparams = $namespace ? "namespace=$namespace&" : ''; |
230 | 239 | $special = SpecialPage::getTitleFor( $this->name ); |
231 | 240 | $link = $special->escapeLocalUrl( $queryparams . 'from=' . urlencode($inpoint) . '&to=' . urlencode($outpoint) ); |
232 | 241 | |
233 | | - $out = wfMsgHtml( |
234 | | - 'alphaindexline', |
| 242 | + $out = wfMsgHtml( 'alphaindexline', |
235 | 243 | "<a href=\"$link\">$inpointf</a></td><td>", |
236 | 244 | "</td><td><a href=\"$link\">$outpointf</a>" |
237 | 245 | ); |