Legoktm has submitted this change and it was merged.
Change subject: If the page doesn't exist or is invalid, don't bother checking
redirects
......................................................................
If the page doesn't exist or is invalid, don't bother checking redirects
Change-Id: I9434fd171cfd7ce362a2577c0d5b77c69b63e792
---
M SpecialMassMessage.php
1 file changed, 8 insertions(+), 7 deletions(-)
Approvals:
Legoktm: Verified; Looks good to me, approved
diff --git a/SpecialMassMessage.php b/SpecialMassMessage.php
index 19fbc2e..ff0fce5 100644
--- a/SpecialMassMessage.php
+++ b/SpecialMassMessage.php
@@ -149,15 +149,16 @@
$errors = array();
if ( $spamlist === null || !$spamlist->exists() ) {
$status->fatal( 'massmessage-spamlist-doesnotexist' );
+ } else {
+ // Page exists, follow a redirect if possible
+ $target = MassMessage::followRedirect( $spamlist );
+ if ( $target === null || !$target->exists() ) {
+ $status->fatal(
'massmessage-spamlist-doesnotexist' ); // Interwiki redirect or non-existent
page.
+ } else {
+ $spamlist = $target;
+ }
}
- // Follow a redirect if possible
- $target = MassMessage::followRedirect( $spamlist );
- if ( $target === null || !$target->exists() ) {
- $status->fatal( 'massmessage-spamlist-doesnotexist' );
// Interwiki redirect or non-existent page.
- } else {
- $spamlist = $target;
- }
// Check that our account hasn't been blocked.
$user = MassMessage::getMessengerUser();
--
To view, visit https://gerrit.wikimedia.org/r/75294
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9434fd171cfd7ce362a2577c0d5b77c69b63e792
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits