jenkins-bot has submitted this change and it was merged.
Change subject: Simplify GlobalBlocking code
......................................................................
Simplify GlobalBlocking code
Depends-On: I23d29c1a0e016de4e82d5b51afa94ae9afd70ee4
Change-Id: I714684a95eb239a027ee9acc8edc6155e6935823
---
M includes/specials/SpecialUploadWizard.php
1 file changed, 3 insertions(+), 9 deletions(-)
Approvals:
Alex Monk: Looks good to me, but someone else must approve
Jforrester: Looks good to me, but someone else must approve
Matthias Mullie: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specials/SpecialUploadWizard.php
b/includes/specials/SpecialUploadWizard.php
index ab1e4dc..02491fb 100644
--- a/includes/specials/SpecialUploadWizard.php
+++ b/includes/specials/SpecialUploadWizard.php
@@ -315,18 +315,12 @@
// Check blocks
if ( $user->isBlocked() ) {
- throw new UserBlockedError( $this->getUser()->mBlock );
+ throw new UserBlockedError( $user->getBlock() );
}
// Global blocks
- if ( class_exists( 'GlobalBlocking' ) ) {
- $error = GlobalBlocking::getUserBlockErrors(
- $user,
- $this->getRequest()->getIP()
- );
- if ( count( $error ) ) {
- throw new ErrorPageError( 'blockedtitle',
array_shift( $error ), $error );
- }
+ if ( $user->isBlockedGlobally() ) {
+ throw new UserBlockedError( $user->getGlobalBlock() );
}
// we got all the way here, so it must be okay to upload
--
To view, visit https://gerrit.wikimedia.org/r/285292
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I714684a95eb239a027ee9acc8edc6155e6935823
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoĆski <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits