/** @var string Relative path including trailing slash */
protected $hashPath;
- /** @var string number of pages of a multipage document, or false for
+ /** @var string Number of pages of a multipage document, or false for
* documents which aren't multipage documents
*/
protected $pageCount;
*
* Currently used to add a warning to the image description page
*
- * @return bool false if the main image is both animated
+ * @return bool False if the main image is both animated
* and the thumbnail is not. In all other cases must return
* true. If image is not renderable whatsoever, should
* return true.
return false;
}
- $this->tmpBucketedThumbCache[ $bucket ] = $tmpFile->getPath();
+ $this->tmpBucketedThumbCache[$bucket] = $tmpFile->getPath();
// For the caching to work, we need to make the tmp file survive as long as
// this object exists
$tmpFile->bind( $this );
/**
* Returns the most appropriate source image for the thumbnail, given a target thumbnail size
* @param array $params
- * @return array source path and width/height of the source
+ * @return array Source path and width/height of the source
*/
public function getThumbnailSource( $params ) {
if ( $this->repo
}
// Try to avoid reading from storage if the file was generated by this script
- if ( isset( $this->tmpBucketedThumbCache[ $bucket ] ) ) {
- $tmpPath = $this->tmpBucketedThumbCache[ $bucket ];
+ if ( isset( $this->tmpBucketedThumbCache[$bucket] ) ) {
+ $tmpPath = $this->tmpBucketedThumbCache[$bucket];
if ( file_exists( $tmpPath ) ) {
return array(
*
* @param string $zone Name of requested zone
* @param bool|string $suffix If not false, the name of a file in zone
- * @return string path
+ * @return string Path
*/
function getZoneUrl( $zone, $suffix = false ) {
$this->assertRepoDefined();
* Get the URL of the thumbnail directory, or a particular file if $suffix is specified
*
* @param bool|string $suffix If not false, the name of a thumbnail file
- * @return string path
+ * @return string Path
*/
function getThumbUrl( $suffix = false ) {
return $this->getZoneUrl( 'thumb', $suffix );
* Get the URL of the transcoded directory, or a particular file if $suffix is specified
*
* @param bool|string $suffix If not false, the name of a media file
- * @return string path
+ * @return string Path
*/
function getTranscodedUrl( $suffix = false ) {
return $this->getZoneUrl( 'transcoded', $suffix );
* @param int $flags A bitwise combination of:
* File::DELETE_SOURCE Delete the source file, i.e. move rather than copy
* @param array $options Optional additional parameters
- * @return FileRepoStatus object. On success, the value member contains the
+ * @return FileRepoStatus On success, the value member contains the
* archive name, or an empty string if it was a new file.
*
* STUB
return $fsFile->getProps();
}
- /**
- * Get a SHA-1 hash of a file in the local filesystem, in base-36 lower case
- * encoding, zero padded to 31 digits.
- *
- * 160 log 2 / log 36 = 30.95, so the 160-bit hash fills 31 digits in base 36
- * fairly neatly.
- *
- * @param string $path
- * @return bool|string False on failure
- * @deprecated since 1.19
- */
- static function sha1Base36( $path ) {
- wfDeprecated( __METHOD__, '1.19' );
-
- $fsFile = new FSFile( $path );
-
- return $fsFile->getSha1Base36();
- }
-
/**
* @return array HTTP header name/value map to use for HEAD/GET request responses
*/