Merge "Add columns option to Special:PrefixIndex"
[lhc/web/wiklou.git] / includes / filerepo / file / OldLocalFile.php
index a655b39..d6c6a3c 100644 (file)
  * @ingroup FileAbstraction
  */
 class OldLocalFile extends LocalFile {
-       var $requestedTime, $archive_name;
+       /** @var string Timestamp */
+       protected $requestedTime;
+
+       /** @var string Archive name */
+       protected $archive_name;
 
        const CACHE_VERSION = 1;
        const MAX_CACHE_ROWS = 20;
 
        /**
-        * @param $title Title
-        * @param $repo FileRepo
-        * @param $time null
+        * @param Title $title
+        * @param FileRepo $repo
+        * @param null|int $time Timestamp or null
         * @return OldLocalFile
         * @throws MWException
         */
@@ -49,9 +53,9 @@ class OldLocalFile extends LocalFile {
        }
 
        /**
-        * @param $title Title
-        * @param $repo FileRepo
-        * @param $archiveName
+        * @param Title $title
+        * @param FileRepo $repo
+        * @param string $archiveName
         * @return OldLocalFile
         */
        static function newFromArchiveName( $title, $repo, $archiveName ) {
@@ -59,8 +63,8 @@ class OldLocalFile extends LocalFile {
        }
 
        /**
-        * @param $row
-        * @param $repo FileRepo
+        * @param stdClass $row
+        * @param FileRepo $repo
         * @return OldLocalFile
         */
        static function newFromRow( $row, $repo ) {
@@ -76,7 +80,7 @@ class OldLocalFile extends LocalFile {
         * Do not call this except from inside a repo class.
         *
         * @param string $sha1 base-36 SHA-1
-        * @param $repo LocalRepo
+        * @param LocalRepo $repo
         * @param string|bool $timestamp MW_timestamp (optional)
         *
         * @return bool|OldLocalFile
@@ -123,9 +127,9 @@ class OldLocalFile extends LocalFile {
        }
 
        /**
-        * @param $title Title
-        * @param $repo FileRepo
-        * @param string $time timestamp or null to load by archive name
+        * @param Title $title
+        * @param FileRepo $repo
+        * @param string $time Timestamp or null to load by archive name
         * @param string $archiveName archive name or null to load by timestamp
         * @throws MWException
         */
@@ -146,7 +150,7 @@ class OldLocalFile extends LocalFile {
        }
 
        /**
-        * @return String
+        * @return string
         */
        function getArchiveName() {
                if ( !isset( $this->archive_name ) ) {
@@ -229,7 +233,7 @@ class OldLocalFile extends LocalFile {
        }
 
        /**
-        * @param $prefix string
+        * @param string $prefix
         * @return array
         */
        function getCacheFields( $prefix = 'img_' ) {
@@ -290,8 +294,8 @@ class OldLocalFile extends LocalFile {
        }
 
        /**
-        * @param $field Integer: one of DELETED_* bitfield constants
-        *               for file or revision rows
+        * @param int $field One of DELETED_* bitfield constants for file or
+        *   revision rows
         * @return bool
         */
        function isDeleted( $field ) {
@@ -314,8 +318,8 @@ class OldLocalFile extends LocalFile {
         * Determine if the current user is allowed to view a particular
         * field of this image file, if it's marked as deleted.
         *
-        * @param $field Integer
-        * @param $user User object to check, or null to use $wgUser
+        * @param int $field
+        * @param User|null $user User object to check, or null to use $wgUser
         * @return bool
         */
        function userCan( $field, User $user = null ) {
@@ -329,12 +333,11 @@ class OldLocalFile extends LocalFile {
         *
         * @param string $srcPath File system path of the source file
         * @param string $archiveName Full archive name of the file, in the form
-        *     $timestamp!$filename, where $filename must match $this->getName()
-        *
-        * @param $timestamp string
-        * @param $comment string
-        * @param $user
-        * @param $flags int
+        *   $timestamp!$filename, where $filename must match $this->getName()
+        * @param string $timestamp
+        * @param string $comment
+        * @param User $user
+        * @param int $flags
         * @return FileRepoStatus
         */
        function uploadOld( $srcPath, $archiveName, $timestamp, $comment, $user, $flags = 0 ) {
@@ -361,9 +364,9 @@ class OldLocalFile extends LocalFile {
         *
         * @param string $srcPath File system path to the source file
         * @param string $archiveName The archive name of the file
-        * @param $timestamp string
+        * @param string $timestamp
         * @param string $comment Upload comment
-        * @param $user User User who did this upload
+        * @param User $user User who did this upload
         * @return bool
         */
        function recordOldUpload( $srcPath, $archiveName, $timestamp, $comment, $user ) {