X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Ffilerepo%2FFileRepo.php;h=0e4b2f0b50eb6189aad5194a1b0cf39dbac5f329;hb=1a2299c74908501bd2b21bc5129d68737aaef004;hp=66dab992172fb94af3e8e2aaef44b24287d77bf0;hpb=c8d361a38027ef5d808225b8a83f15417248aa67;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 66dab99217..0e4b2f0b50 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -99,7 +99,7 @@ class FileRepo { */ protected $pathDisclosureProtection = 'simple'; - /** @var bool Public zone URL. */ + /** @var string|false Public zone URL. */ protected $url; /** @var string The base thumbnail URL. Defaults to "/thumb". */ @@ -309,7 +309,7 @@ class FileRepo { * @return bool Whether non-ASCII path characters are allowed */ public function backendSupportsUnicodePaths() { - return ( $this->getBackend()->getFeatures() & FileBackend::ATTR_UNICODE_PATHS ); + return (bool)( $this->getBackend()->getFeatures() & FileBackend::ATTR_UNICODE_PATHS ); } /** @@ -737,7 +737,7 @@ class FileRepo { * constructor, whereas local repositories use the local Title functions. * * @param string $name - * @return string + * @return string|false */ public function getDescriptionUrl( $name ) { $encName = wfUrlencode( $name ); @@ -771,7 +771,7 @@ class FileRepo { * * @param string $name Name of image to fetch * @param string $lang Language to fetch it in, if any. - * @return string + * @return string|false */ public function getDescriptionRenderUrl( $name, $lang = null ) { $query = 'action=render'; @@ -1059,7 +1059,7 @@ class FileRepo { /** * Pick a random name in the temp zone and store a file to it. - * Returns a FileRepoStatus object with the file Virtual URL in the value, + * Returns a Status object with the file Virtual URL in the value, * file can later be disposed using FileRepo::freeTemp(). * * @param string $originalName The base name of the file as specified @@ -1143,7 +1143,7 @@ class FileRepo { * Copy or move a file either from a storage path, virtual URL, * or file system path, into this repository at the specified destination location. * - * Returns a FileRepoStatus object. On success, the value contains "new" or + * Returns a Status object. On success, the value contains "new" or * "archived", to indicate whether the file was new with that name. * * Options to $options include: @@ -1924,12 +1924,3 @@ class FileRepo { return $this->supportsSha1URLs; } } - -/** - * FileRepo for temporary files created via FileRepo::getTempRepo() - */ -class TempFileRepo extends FileRepo { - public function getTempRepo() { - throw new MWException( "Cannot get a temp repo from a temp repo." ); - } -}