X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUploadStash.php;h=3f9851ed336f5426da59ed1f65868afb3c2be4ab;hb=346b2ff04695f9482d17afa19addc4fa827081eb;hp=1a00d7313b4071db0063e0de21834fd704a12479;hpb=d87135d706004373b2cfdc4c588ce6d80358631f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUploadStash.php b/includes/specials/SpecialUploadStash.php index 1a00d7313b..3f9851ed33 100644 --- a/includes/specials/SpecialUploadStash.php +++ b/includes/specials/SpecialUploadStash.php @@ -74,6 +74,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { * n.b. Most sanity checking done in UploadStashLocalFile, so this is straightforward. * * @param $key String: the key of a particular requested file + * @throws HttpError * @return bool */ public function showUpload( $key ) { @@ -113,6 +114,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { * application the transform parameters * * @param string $key + * @throws UploadStashBadPathException * @return array */ private function parseKey( $key ) { @@ -164,10 +166,11 @@ class SpecialUploadStash extends UnlistedSpecialPage { /** * Scale a file (probably with a locally installed imagemagick, or similar) and output it to STDOUT. - * @param $file: File object - * @param $params: scaling parameters ( e.g. array( width => '50' ) ); - * @param $flags: scaling flags ( see File:: constants ) + * @param $file File + * @param $params array Scaling parameters ( e.g. array( width => '50' ) ); + * @param $flags int Scaling flags ( see File:: constants ) * @throws MWException + * @throws UploadStashFileNotFoundException * @return boolean success */ private function outputLocallyScaledThumb( $file, $params, $flags ) { @@ -189,7 +192,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { // now we should construct a File, so we can get mime and other such info in a standard way // n.b. mimetype may be different from original (ogx original -> jpeg thumb) - $thumbFile = new UnregisteredLocalFile( false, + $thumbFile = new UnregisteredLocalFile( false, $this->stash->repo, $thumbnailImage->getStoragePath(), false ); if ( !$thumbFile ) { throw new UploadStashFileNotFoundException( "couldn't create local file object for thumbnail" ); @@ -258,6 +261,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { * Side effect: writes HTTP response to STDOUT. * * @param $file File object with a local path (e.g. UnregisteredLocalFile, LocalFile. Oddly these don't share an ancestor!) + * @throws SpecialUploadStashTooLargeException * @return bool */ private function outputLocalFile( File $file ) { @@ -275,6 +279,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { * Side effect: writes HTTP response to STDOUT. * @param $content String content * @param $contentType String mime type + * @throws SpecialUploadStashTooLargeException * @return bool */ private function outputContents( $content, $contentType ) {