diff options
author | jenkins-bot <jenkins-bot@gerrit.wikimedia.org> | 2020-04-29 18:20:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@wikimedia.org> | 2020-04-29 18:20:38 +0000 |
commit | 9b245450f0e5c47d250557032432b1ebae122564 (patch) | |
tree | f94979eadb468ab54a635d61614c7a1e72329149 /includes/specials | |
parent | 7b08cbf765d7a19a2864a28ed522b4732337252a (diff) | |
parent | 05a04ef54a4a0cde4e7334aee6cc67aaedacb23e (diff) | |
download | mediawikicore-9b245450f0e5c47d250557032432b1ebae122564.tar.gz mediawikicore-9b245450f0e5c47d250557032432b1ebae122564.zip |
Merge "Pass a user to ArchivedFile::userCan in UploadBase"
Diffstat (limited to 'includes/specials')
-rw-r--r-- | includes/specials/SpecialUpload.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index ccaf12ad9fca..4f09d4a3e987 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -525,7 +525,8 @@ class SpecialUpload extends SpecialPage { } // Verify permissions for this title - $permErrors = $this->mUpload->verifyTitlePermissions( $this->getUser() ); + $user = $this->getUser(); + $permErrors = $this->mUpload->verifyTitlePermissions( $user ); if ( $permErrors !== true ) { $code = array_shift( $permErrors[0] ); $this->showRecoverableUploadError( $this->msg( $code, $permErrors[0] )->parse() ); @@ -537,14 +538,14 @@ class SpecialUpload extends SpecialPage { // Check warnings if necessary if ( !$this->mIgnoreWarning ) { - $warnings = $this->mUpload->checkWarnings(); + $warnings = $this->mUpload->checkWarnings( $user ); if ( $this->showUploadWarning( $warnings ) ) { return; } } // This is as late as we can throttle, after expected issues have been handled - if ( UploadBase::isThrottled( $this->getUser() ) ) { + if ( UploadBase::isThrottled( $user ) ) { $this->showRecoverableUploadError( $this->msg( 'actionthrottledtext' )->escaped() ); @@ -568,7 +569,7 @@ class SpecialUpload extends SpecialPage { if ( $changeTags ) { $changeTagsStatus = ChangeTags::canAddTagsAccompanyingChange( - $changeTags, $this->getUser() ); + $changeTags, $user ); if ( !$changeTagsStatus->isOK() ) { $this->showUploadError( $this->getOutput()->parseAsInterface( $changeTagsStatus->getWikiText( false, false, $this->getLanguage() ) @@ -582,7 +583,7 @@ class SpecialUpload extends SpecialPage { $this->mComment, $pageText, $this->mWatchthis, - $this->getUser(), + $user, $changeTags ); |