jenkins-bot has submitted this change and it was merged.
Change subject: Don't test against redirect targets
......................................................................
Don't test against redirect targets
There was never any use-case given for this, nor was there a bug report
about it, and it doesn't seem useful in any way, so remove it. Also, add
comments so that it's obvious when grepping that the messages aren't
unused now.
Change-Id: I80079fb4822fbc4f47df592119b1b1f8a367927c
---
M TitleBlacklist.hooks.php
M TitleBlacklist.list.php
2 files changed, 3 insertions(+), 17 deletions(-)
Approvals:
Hoo man: Looks good to me, approved
jenkins-bot: Verified
diff --git a/TitleBlacklist.hooks.php b/TitleBlacklist.hooks.php
index 6050641..c82b32d 100644
--- a/TitleBlacklist.hooks.php
+++ b/TitleBlacklist.hooks.php
@@ -183,23 +183,6 @@
Html::element( 'br', array( 'clear' => 'all' )
) . "\n";
// $error will be displayed by the edit class
- return true;
- } elseif ( !$section ) {
- # Block redirects to nonexistent blacklisted titles
- $retitle = Title::newFromRedirect( $text );
- if ( $retitle !== null && !$retitle->exists() ) {
- $blacklisted =
TitleBlacklist::singleton()->userCannot( $retitle, $wgUser, 'create' );
- if ( $blacklisted instanceof
TitleBlacklistEntry ) {
- $error = Html::openElement( 'div',
array( 'class' => 'errorbox' ) ) .
- wfMessage(
'titleblacklist-forbidden-edit',
- $blacklisted->getRaw(),
- $retitle->getFullText()
)->escaped() .
- Html::closeElement( 'div' ) .
"\n" .
- Html::element( 'br', array(
'clear' => 'all' ) ) . "\n";
- }
- }
-
- return true;
}
return true;
}
diff --git a/TitleBlacklist.list.php b/TitleBlacklist.list.php
index 3947e8a..b903c04 100644
--- a/TitleBlacklist.list.php
+++ b/TitleBlacklist.list.php
@@ -528,6 +528,9 @@
*/
public function getErrorMessage( $operation ) {
$message = $this->getCustomMessage();
+ // For grep:
+ // titleblacklist-forbidden-edit, titleblacklist-forbidden-move,
+ // titleblacklist-forbidden-upload,
titleblacklist-forbidden-new-account
return $message ? $message :
"titleblacklist-forbidden-{$operation}";
}
}
--
To view, visit https://gerrit.wikimedia.org/r/162607
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I80079fb4822fbc4f47df592119b1b1f8a367927c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TitleBlacklist
Gerrit-Branch: master
Gerrit-Owner: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: CSteipp <[email protected]>
Gerrit-Reviewer: Fran McCrory <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits