Jack Phoenix has submitted this change and it was merged.
Change subject: i18n is a thing and not taking it into account can lead into
"fun" bugs
......................................................................
i18n is a thing and not taking it into account can lead into "fun" bugs
"MediaWiki" (as in the namespace name) is not necessarily the same in
foreign languages (like in Finnish the equivalent translation is
Järjestelmäviesti, "system message").
Hence trying to whitelist blocked URLs or whatever on a wiki where the content
language's
translation for NS_MEDIAWIKI was something else than "MediaWiki" would
actually trigger Phalanx when it shouldn't have done that.
Change-Id: Iaf54a4c0d90f1b0c38331b9c27d388d194c15234
---
M blocks/ContentBlock.class.php
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Jack Phoenix: Verified; Looks good to me, approved
diff --git a/blocks/ContentBlock.class.php b/blocks/ContentBlock.class.php
index 82509d5..0d791bd 100644
--- a/blocks/ContentBlock.class.php
+++ b/blocks/ContentBlock.class.php
@@ -24,7 +24,11 @@
$title = $editpage->getTitle();
// allow blocked words to be added to whitelist
- if ( $title->getPrefixedText() == 'MediaWiki:Spam-whitelist' ) {
+ if (
+ $title->inNamespace( NS_MEDIAWIKI ) &&
+ $title->getText() == 'Spam-whitelist'
+ )
+ {
wfProfileOut( __METHOD__ );
return true;
}
--
To view, visit https://gerrit.wikimedia.org/r/169749
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf54a4c0d90f1b0c38331b9c27d388d194c15234
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Phalanx
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits