Merge "SpecialListgrouprights: Fix "Namespace restrictions" header ID"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 12 Dec 2017 13:17:23 +0000 (13:17 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 12 Dec 2017 13:17:23 +0000 (13:17 +0000)
includes/specials/SpecialListgrouprights.php

index 2ca4190..cc62d61 100644 (file)
@@ -137,7 +137,7 @@ class SpecialListGroupRights extends SpecialPage {
        }
 
        private function outputNamespaceProtectionInfo() {
-               global $wgParser, $wgContLang;
+               global $wgContLang;
                $out = $this->getOutput();
                $namespaceProtection = $this->getConfig()->get( 'NamespaceProtection' );
 
@@ -145,11 +145,11 @@ class SpecialListGroupRights extends SpecialPage {
                        return;
                }
 
-               $header = $this->msg( 'listgrouprights-namespaceprotection-header' )->parse();
+               $header = $this->msg( 'listgrouprights-namespaceprotection-header' )->text();
                $out->addHTML(
                        Html::rawElement( 'h2', [], Html::element( 'span', [
                                'class' => 'mw-headline',
-                               'id' => $wgParser->guessSectionNameFromWikiText( $header )
+                               'id' => substr( Parser::guessSectionNameFromStrippedText( $header ), 1 )
                        ], $header ) ) .
                        Xml::openElement( 'table', [ 'class' => 'wikitable' ] ) .
                        Html::element(