Matthias Mullie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/283189
Change subject: Check for global blocks
......................................................................
Check for global blocks
Copy-paste from I627c4a3c8ddca2429e61a05eef933ddc22b5e5a3
Bug: T111229
Change-Id: I23d29c1a0e016de4e82d5b51afa94ae9afd70ee4
---
M includes/specials/SpecialUpload.php
1 file changed, 11 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/89/283189/1
diff --git a/includes/specials/SpecialUpload.php
b/includes/specials/SpecialUpload.php
index 82e07fd..aec4f2d 100644
--- a/includes/specials/SpecialUpload.php
+++ b/includes/specials/SpecialUpload.php
@@ -180,6 +180,17 @@
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 );
+ }
+ }
+
# Check whether we actually want to allow changing stuff
$this->checkReadOnly();
--
To view, visit https://gerrit.wikimedia.org/r/283189
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I23d29c1a0e016de4e82d5b51afa94ae9afd70ee4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits