X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fupload%2FUploadFromChunks.php;h=ee6f250a7664c662c909f7bbde5df4128973008e;hb=138298b397b308ad6e4bfc7088884d90e8ac1e37;hp=3dabc0d4b65b929760150dcae61fe06377939ab1;hpb=a2fadd06195cad8458c4815c555ca1e96aa3719f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/upload/UploadFromChunks.php b/includes/upload/UploadFromChunks.php index 3dabc0d4b6..ee6f250a76 100644 --- a/includes/upload/UploadFromChunks.php +++ b/includes/upload/UploadFromChunks.php @@ -64,7 +64,7 @@ class UploadFromChunks extends UploadFromFile { } /** - * {@inheritdoc} + * @inheritDoc */ public function tryStashFile( User $user, $isPartial = false ) { try { @@ -77,7 +77,7 @@ class UploadFromChunks extends UploadFromFile { } /** - * {@inheritdoc} + * @inheritDoc * @throws UploadChunkVerificationException * @deprecated since 1.28 Use tryStashFile() instead */ @@ -88,7 +88,7 @@ class UploadFromChunks extends UploadFromFile { } /** - * {@inheritdoc} + * @inheritDoc * @throws UploadChunkVerificationException * @deprecated since 1.28 */ @@ -99,7 +99,7 @@ class UploadFromChunks extends UploadFromFile { } /** - * {@inheritdoc} + * @inheritDoc * @throws UploadChunkVerificationException * @deprecated since 1.28 */ @@ -158,7 +158,7 @@ class UploadFromChunks extends UploadFromFile { /** * Append the final chunk and ready file for parent::performUpload() - * @return FileRepoStatus + * @return Status */ public function concatenateChunks() { $chunkIndex = $this->getChunkIndex(); @@ -210,7 +210,7 @@ class UploadFromChunks extends UploadFromFile { // override doStashFile() with completely different functionality in this class... $error = $this->runUploadStashFileHook( $this->user ); if ( $error ) { - call_user_func_array( [ $status, 'fatal' ], $error ); + $status->fatal( ...$error ); return $status; } try { @@ -358,7 +358,7 @@ class UploadFromChunks extends UploadFromFile { * * @param string $chunkPath * @throws UploadChunkFileException - * @return FileRepoStatus + * @return Status */ private function outputChunk( $chunkPath ) { // Key is fileKey + chunk index @@ -422,9 +422,9 @@ class UploadChunkFileException extends MWException { class UploadChunkVerificationException extends MWException { public $msg; - public function __construct( $res ) { - $this->msg = call_user_func_array( 'wfMessage', $res ); - parent::__construct( call_user_func_array( 'wfMessage', $res ) + public function __construct( array $res ) { + $this->msg = wfMessage( ...$res ); + parent::__construct( wfMessage( ...$res ) ->inLanguage( 'en' )->useDatabase( false )->text() ); } }