aboutsummaryrefslogtreecommitdiffstats
path: root/includes/filebackend/FSFile.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/filebackend/FSFile.php')
-rw-r--r--includes/filebackend/FSFile.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/includes/filebackend/FSFile.php b/includes/filebackend/FSFile.php
index 8f0a13347e43..97ce593114c0 100644
--- a/includes/filebackend/FSFile.php
+++ b/includes/filebackend/FSFile.php
@@ -82,6 +82,7 @@ class FSFile {
if ( $timestamp !== false ) {
$timestamp = wfTimestamp( TS_MW, $timestamp );
}
+
return $timestamp;
}
@@ -98,7 +99,7 @@ class FSFile {
* Get an associative array containing information about
* a file with the given storage path.
*
- * @param Mixed $ext: the file extension, or true to extract it from the filename.
+ * @param mixed $ext The file extension, or true to extract it from the filename.
* Set it to false to ignore the extension.
*
* @return array
@@ -147,6 +148,7 @@ class FSFile {
}
wfProfileOut( __METHOD__ );
+
return $info;
}
@@ -165,6 +167,7 @@ class FSFile {
$info['width'] = 0;
$info['height'] = 0;
$info['bits'] = 0;
+
return $info;
}
@@ -184,6 +187,7 @@ class FSFile {
} else {
$info['bits'] = 0;
}
+
return $info;
}
@@ -202,6 +206,7 @@ class FSFile {
if ( $this->sha1Base36 !== null && !$recache ) {
wfProfileOut( __METHOD__ );
+
return $this->sha1Base36;
}
@@ -214,6 +219,7 @@ class FSFile {
}
wfProfileOut( __METHOD__ );
+
return $this->sha1Base36;
}
@@ -225,6 +231,7 @@ class FSFile {
*/
public static function extensionFromPath( $path ) {
$i = strrpos( $path, '.' );
+
return strtolower( $i ? substr( $path, $i + 1 ) : '' );
}
@@ -232,12 +239,13 @@ class FSFile {
* Get an associative array containing information about a file in the local filesystem.
*
* @param string $path absolute local filesystem path
- * @param Mixed $ext: the file extension, or true to extract it from the filename.
+ * @param mixed $ext The file extension, or true to extract it from the filename.
* Set it to false to ignore the extension.
* @return array
*/
public static function getPropsFromPath( $path, $ext = true ) {
$fsFile = new self( $path );
+
return $fsFile->getProps( $ext );
}
@@ -253,6 +261,7 @@ class FSFile {
*/
public static function getSha1Base36FromPath( $path ) {
$fsFile = new self( $path );
+
return $fsFile->getSha1Base36();
}
}