Merge "registration: Support Change/RemoveCredentialsBlacklist in extension.json"
[lhc/web/wiklou.git] / includes / specials / SpecialUpload.php
index 82e07fd..4b731cb 100644 (file)
@@ -180,6 +180,11 @@ class SpecialUpload extends SpecialPage {
                        throw new UserBlockedError( $user->getBlock() );
                }
 
+               // Global blocks
+               if ( $user->isBlockedGlobally() ) {
+                       throw new UserBlockedError( $user->getGlobalBlock() );
+               }
+
                # Check whether we actually want to allow changing stuff
                $this->checkReadOnly();
 
@@ -362,8 +367,11 @@ class SpecialUpload extends SpecialPage {
 
                $sessionKey = $this->mUpload->stashSession();
 
+               // Add styles for the warning, reused from the live preview
+               $this->getOutput()->addModuleStyles( 'mediawiki.special.upload.styles' );
+
                $warningHtml = '<h2>' . $this->msg( 'uploadwarning' )->escaped() . "</h2>\n"
-                       . '<div class="warningbox"><ul>';
+                       . '<div class="mw-destfile-warning"><ul>';
                foreach ( $warnings as $warning => $args ) {
                        if ( $warning == 'badfilename' ) {
                                $this->mDesiredDestName = Title::makeTitle( NS_FILE, $args )->getText();