From 31564a5ee2b9b967d52fefc94f7a0ba28c104218 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Tue, 8 Nov 2011 12:07:45 +0000 Subject: [PATCH] add quick comment from r102334 cr --- includes/specials/SpecialEditWatchlist.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/specials/SpecialEditWatchlist.php b/includes/specials/SpecialEditWatchlist.php index ac47946685..0408d8233d 100644 --- a/includes/specials/SpecialEditWatchlist.php +++ b/includes/specials/SpecialEditWatchlist.php @@ -410,8 +410,11 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { $this->toc = Linker::tocIndent(); $tocLength = 0; foreach( $fields as $key => $data ) { + + # strip out the 'ns-' prefix from the section name: $ns = substr( $data['section'], 2 ); - $nsText = $ns == NS_MAIN + + $nsText = ($ns == NS_MAIN) ? wfMsgHtml( 'blanknamespace' ) : htmlspecialchars( $wgContLang->getFormattedNsText( $ns ) ); $this->toc .= Linker::tocLine( "mw-htmlform-{$data['section']}", $nsText, ++$tocLength, 1 ) . Linker::tocLineEnd(); @@ -574,4 +577,4 @@ class EditWatchlistCheckboxSeriesField extends HTMLMultiSelectField { // Need to call into grandparent to be a good citizen. :) return HTMLFormField::validate( $value, $alldata ); } -} \ No newline at end of file +} -- 2.20.1