X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUploadStash.php;h=a00b031c9c6b7ad861b3a9e24c3aec940c50faab;hb=4df0c71911500466a6330b8fe29c623ef5b51e41;hp=c8b1578fe5df9bc65313efac36bd4007497625b3;hpb=11ee7f78da9776db26098642a151a288f98bea14;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUploadStash.php b/includes/specials/SpecialUploadStash.php index c8b1578fe5..a00b031c9c 100644 --- a/includes/specials/SpecialUploadStash.php +++ b/includes/specials/SpecialUploadStash.php @@ -130,7 +130,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { if ( $type !== 'file' && $type !== 'thumb' ) { throw new UploadStashBadPathException( - wfMessage( 'uploadstash-bad-path-unknown-type', $type ) + $this->msg( 'uploadstash-bad-path-unknown-type', $type ) ); } $fileName = strtok( '/' ); @@ -140,7 +140,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { $srcNamePos = strrpos( $thumbPart, $fileName ); if ( $srcNamePos === false || $srcNamePos < 1 ) { throw new UploadStashBadPathException( - wfMessage( 'uploadstash-bad-path-unrecognized-thumb-name' ) + $this->msg( 'uploadstash-bad-path-unrecognized-thumb-name' ) ); } $paramString = substr( $thumbPart, 0, $srcNamePos - 1 ); @@ -152,7 +152,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { return [ 'file' => $file, 'type' => $type, 'params' => $params ]; } else { throw new UploadStashBadPathException( - wfMessage( 'uploadstash-bad-path-no-handler', $file->getMimeType(), $file->getPath() ) + $this->msg( 'uploadstash-bad-path-no-handler', $file->getMimeType(), $file->getPath() ) ); } } @@ -200,14 +200,14 @@ class SpecialUploadStash extends UnlistedSpecialPage { $thumbnailImage = $file->transform( $params, $flags ); if ( !$thumbnailImage ) { throw new UploadStashFileNotFoundException( - wfMessage( 'uploadstash-file-not-found-no-thumb' ) + $this->msg( 'uploadstash-file-not-found-no-thumb' ) ); } // we should have just generated it locally if ( !$thumbnailImage->getStoragePath() ) { throw new UploadStashFileNotFoundException( - wfMessage( 'uploadstash-file-not-found-no-local-path' ) + $this->msg( 'uploadstash-file-not-found-no-local-path' ) ); } @@ -217,7 +217,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { $this->stash->repo, $thumbnailImage->getStoragePath(), false ); if ( !$thumbFile ) { throw new UploadStashFileNotFoundException( - wfMessage( 'uploadstash-file-not-found-no-object' ) + $this->msg( 'uploadstash-file-not-found-no-object' ) ); } @@ -273,7 +273,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { if ( !$status->isOK() ) { $errors = $status->getErrorsArray(); throw new UploadStashFileNotFoundException( - wfMessage( + $this->msg( 'uploadstash-file-not-found-no-remote-thumb', print_r( $errors, 1 ), $scalerThumbUrl @@ -283,7 +283,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { $contentType = $req->getResponseHeader( "content-type" ); if ( !$contentType ) { throw new UploadStashFileNotFoundException( - wfMessage( 'uploadstash-file-not-found-missing-content-type' ) + $this->msg( 'uploadstash-file-not-found-missing-content-type' ) ); } @@ -302,7 +302,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { private function outputLocalFile( File $file ) { if ( $file->getSize() > self::MAX_SERVE_BYTES ) { throw new SpecialUploadStashTooLargeException( - wfMessage( 'uploadstash-file-too-large', self::MAX_SERVE_BYTES ) + $this->msg( 'uploadstash-file-too-large', self::MAX_SERVE_BYTES ) ); } @@ -324,7 +324,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { $size = strlen( $content ); if ( $size > self::MAX_SERVE_BYTES ) { throw new SpecialUploadStashTooLargeException( - wfMessage( 'uploadstash-file-too-large', self::MAX_SERVE_BYTES ) + $this->msg( 'uploadstash-file-too-large', self::MAX_SERVE_BYTES ) ); } // Cancel output buffering and gzipping if set