jenkins-bot has submitted this change and it was merged.
Change subject: Don't claim a global block has been modified if it hasn't
......................................................................
Don't claim a global block has been modified if it hasn't
To ensure that, check whether the given address is currently
blocked.
Relevant in case someone global blocks an IP, then goes back
to the blocking form in their browser and enters another IP
into the modify block form.
Change-Id: I85e80e8f5a6cb53bd7b745ae671a8a9e042a32e9
---
M includes/specials/SpecialGlobalBlock.php
1 file changed, 9 insertions(+), 2 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specials/SpecialGlobalBlock.php
b/includes/specials/SpecialGlobalBlock.php
index b9f9f4d..cdbc7e2 100644
--- a/includes/specials/SpecialGlobalBlock.php
+++ b/includes/specials/SpecialGlobalBlock.php
@@ -95,7 +95,10 @@
return $errorstr;
}
- function loadParameters( $par ) {
+ /**
+ * @param string $par
+ */
+ private function loadParameters( $par ) {
$request = $this->getRequest();
$this->mAddress = trim( $request->getText( 'wpAddress' ) );
@@ -111,7 +114,11 @@
}
$this->mAnonOnly = $request->getBool( 'wpAnonOnly' );
$this->mAlsoLocal = $request->getBool( 'wpAlsoLocal' );
- $this->mModify = $request->getBool( 'wpModify' );
+
+ $this->mModify = $request->getBool( 'wpModify' )
+ && $this->mAddress
+ && GlobalBlocking::getGlobalBlockId( $this->mAddress );
+
$this->mModifyForm = $request->getCheck( 'modify' );
}
--
To view, visit https://gerrit.wikimedia.org/r/181813
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I85e80e8f5a6cb53bd7b745ae671a8a9e042a32e9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalBlocking
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: CSteipp <[email protected]>
Gerrit-Reviewer: Hoo man <[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