Merge "Measure commitMasterChanges() run time"
[lhc/web/wiklou.git] / includes / specials / SpecialUpload.php
index ad44076..6692bb6 100644 (file)
@@ -475,6 +475,14 @@ class SpecialUpload extends SpecialPage {
                        }
                }
 
+               // This is as late as we can throttle, after expected issues have been handled
+               if ( UploadBase::isThrottled( $this->getUser() ) ) {
+                       $this->showRecoverableUploadError(
+                               $this->msg( 'actionthrottledtext' )->escaped()
+                       );
+                       return;
+               }
+
                // Get the page text if this is not a reupload
                if ( !$this->mForReUpload ) {
                        $pageText = self::getInitialPageText( $this->mComment, $this->mLicense,
@@ -819,6 +827,7 @@ class UploadForm extends HTMLForm {
 
                # Add a link to edit MediaWik:Licenses
                if ( $this->getUser()->isAllowed( 'editinterface' ) ) {
+                       $this->getOutput()->addModuleStyles( 'mediawiki.special' );
                        $licensesLink = Linker::linkKnown(
                                $this->msg( 'licenses' )->inContentLanguage()->getTitle(),
                                $this->msg( 'licenses-edit' )->escaped(),