X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FStreamFile.php;h=ef82705988944e351290d8c8a11c3c35db3a0a89;hb=0bc583af2cf5aef63e006288ab9fbfa61994e9a9;hp=b0e6c12ec2967b8d01971ae9f581dada2c523733;hpb=b0096bfe2cf02e6de0f7095f6cdb92263ad1a273;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/StreamFile.php b/includes/StreamFile.php index b0e6c12ec2..ef82705988 100644 --- a/includes/StreamFile.php +++ b/includes/StreamFile.php @@ -32,9 +32,9 @@ class StreamFile { * Headers sent include: Content-type, Content-Length, Last-Modified, * and Content-Disposition. * - * @param $fname string Full name and path of the file to stream - * @param $headers array Any additional headers to send - * @param $sendErrors bool Send error messages if errors occur (like 404) + * @param string $fname Full name and path of the file to stream + * @param array $headers Any additional headers to send + * @param bool $sendErrors Send error messages if errors occur (like 404) * @throws MWException * @return bool Success */ @@ -42,6 +42,7 @@ class StreamFile { wfProfileIn( __METHOD__ ); if ( FileBackend::isStoragePath( $fname ) ) { // sanity + wfProfileOut( __METHOD__ ); throw new MWException( __FUNCTION__ . " given storage path '$fname'." ); } @@ -71,10 +72,10 @@ class StreamFile { * (b) cancels any PHP output buffering and automatic gzipping of output * (c) sends Content-Length header based on HTTP_IF_MODIFIED_SINCE check * - * @param $path string Storage path or file system path - * @param $info Array|bool File stat info with 'mtime' and 'size' fields - * @param $headers Array Additional headers to send - * @param $sendErrors bool Send error messages if errors occur (like 404) + * @param string $path Storage path or file system path + * @param array|bool $info File stat info with 'mtime' and 'size' fields + * @param array $headers Additional headers to send + * @param bool $sendErrors Send error messages if errors occur (like 404) * @return int|bool READY_STREAM, NOT_MODIFIED, or false on failure */ public static function prepareForStream( @@ -143,8 +144,8 @@ class StreamFile { /** * Determine the file type of a file based on the path * - * @param $filename string Storage path or file system path - * @param $safe bool Whether to do retroactive upload blacklist checks + * @param string $filename Storage path or file system path + * @param bool $safe Whether to do retroactive upload blacklist checks * @return null|string */ public static function contentTypeFromPath( $filename, $safe = true ) { @@ -184,8 +185,8 @@ class StreamFile { return 'unknown/unknown'; } if ( $wgCheckFileExtensions && $wgStrictFileExtensions - && !UploadBase::checkFileExtensionList( $extList, $wgFileExtensions ) ) - { + && !UploadBase::checkFileExtensionList( $extList, $wgFileExtensions ) + ) { return 'unknown/unknown'; } if ( $wgVerifyMimeType && in_array( strtolower( $type ), $wgMimeTypeBlacklist ) ) {