Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/75294
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(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage refs/changes/94/75294/1 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: newchange Gerrit-Change-Id: I9434fd171cfd7ce362a2577c0d5b77c69b63e792 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MassMessage Gerrit-Branch: master Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits