jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/392988 )
Change subject: SpecialListgrouprights: Fix "Namespace restrictions" header ID
......................................................................
SpecialListgrouprights: Fix "Namespace restrictions" header ID
* Strip the '#' from the start of the <h2>'s id attribute
* Don't parse the header message. It doesn't contain HTML, and it's used
as plain text anyway.
* Use guessSectionNameFromStrippedText() because we are now feeding it
plain text. Previously we were calling guessSectionNameFromWikitext()
but passing in HTML.
Change-Id: I380c20293437dbcd3419f83ea8b7a7ee0bb504f1
---
M includes/specials/SpecialListgrouprights.php
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
jenkins-bot: Verified
Anomie: Looks good to me, approved
diff --git a/includes/specials/SpecialListgrouprights.php
b/includes/specials/SpecialListgrouprights.php
index 2315887..a299933 100644
--- a/includes/specials/SpecialListgrouprights.php
+++ b/includes/specials/SpecialListgrouprights.php
@@ -141,7 +141,7 @@
}
private function outputNamespaceProtectionInfo() {
- global $wgParser, $wgContLang;
+ global $wgContLang;
$out = $this->getOutput();
$namespaceProtection = $this->getConfig()->get(
'NamespaceProtection' );
@@ -149,11 +149,11 @@
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(
--
To view, visit https://gerrit.wikimedia.org/r/392988
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I380c20293437dbcd3419f83ea8b7a7ee0bb504f1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits