add quick comment from r102334 cr
authorAntoine Musso <hashar@users.mediawiki.org>
Tue, 8 Nov 2011 12:07:45 +0000 (12:07 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Tue, 8 Nov 2011 12:07:45 +0000 (12:07 +0000)
includes/specials/SpecialEditWatchlist.php

index ac47946..0408d82 100644 (file)
@@ -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
+}