Siebrand has uploaded a new change for review.
https://gerrit.wikimedia.org/r/97350
Change subject: Set visibility for class properties in LocalFile.php
......................................................................
Set visibility for class properties in LocalFile.php
Change-Id: Ibab58651bb147433bd99046013e11f8c773bef70
---
M includes/filerepo/file/LocalFile.php
1 file changed, 120 insertions(+), 54 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/50/97350/1
diff --git a/includes/filerepo/file/LocalFile.php
b/includes/filerepo/file/LocalFile.php
index 3c15449..2f71ba4 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -46,43 +46,83 @@
class LocalFile extends File {
const CACHE_FIELD_MAX_LEN = 1000;
- /**#@+
- * @private
- */
- var
- $fileExists, # does the file exist on disk? (loadFromXxx)
- $historyLine, # Number of line to return by
nextHistoryLine() (constructor)
- $historyRes, # result of the query for the file's history
(nextHistoryLine)
- $width, # \
- $height, # |
- $bits, # --- returned by getimagesize
(loadFromXxx)
- $attr, # /
- $media_type, # MEDIATYPE_xxx (bitmap, drawing, audio...)
- $mime, # MIME type, determined by
MimeMagic::guessMimeType
- $major_mime, # Major mime type
- $minor_mime, # Minor mime type
- $size, # Size in bytes (loadFromXxx)
- $metadata, # Handler-specific metadata
- $timestamp, # Upload timestamp
- $sha1, # SHA-1 base 36 content hash
- $user, $user_text, # User, who uploaded the file
- $description, # Description of current revision of the file
- $dataLoaded, # Whether or not core data has been loaded
from the database (loadFromXxx)
- $extraDataLoaded, # Whether or not lazy-loaded data has been
loaded from the database
- $upgraded, # Whether the row was upgraded on load
- $locked, # True if the image row is locked
- $lockedOwnTrx, # True if the image row is locked with a
lock initiated transaction
- $missing, # True if file is not present in file
system. Not to be cached in memcached
- $deleted; # Bitfield akin to rev_deleted
+ /** @var bool Does the file exist on disk? (loadFromXxx) */
+ protected $fileExists;
- /**#@-*/
+ /** @var int image width */
+ protected $width;
- /**
- * @var LocalRepo
- */
- var $repo;
+ /** @var int image height */
+ protected $height;
+ /** @var int Returned by getimagesize (loadFromXxx) */
+ protected $bits;
+
+ /** @var string MEDIATYPE_xxx (bitmap, drawing, audio...) */
+ protected $media_type;
+
+ /** @var string MIME type, determined by MimeMagic::guessMimeType */
+ protected $mime;
+
+ /** @var int Size in bytes (loadFromXxx) */
+ protected $size;
+
+ /** @var string Handler-specific metadata */
+ protected $metadata;
+
+ /** @var string SHA-1 base 36 content hash */
+ protected $sha1;
+
+ /** @var bool Whether or not core data has been loaded from the
database (loadFromXxx) */
+ protected $dataLoaded;
+
+ /** @var bool Whether or not lazy-loaded data has been loaded from the
database */
+ protected $extraDataLoaded;
+
+ /** @var int Bitfield akin to rev_deleted */
+ protected $deleted;
+
+ /** @var LocalRepo */
+ protected $repo;
+
+ /** @var string */
protected $repoClass = 'LocalRepo';
+
+ /** @var int Number of line to return by nextHistoryLine()
(constructor) */
+ private $historyLine;
+
+ /** @var int Result of the query for the file's history
(nextHistoryLine) */
+ private $historyRes;
+
+ /** @var string Major mime type */
+ private $major_mime;
+
+ /** @var string Minor mime type */
+ private $minor_mime;
+
+ /** @var string Upload timestamp */
+ private $timestamp;
+
+ /** @var int User ID of uploader */
+ private $user;
+
+ /** @var string User name of uploader */
+ private $user_text;
+
+ /** @var string Description of current revision of the file */
+ private $description;
+
+ /** @var bool Whether the row was upgraded on load */
+ private $upgraded;
+
+ /** @var bool True if the image row is locked */
+ private $locked;
+
+ /** @var bool True if the image row is locked with a lock initiated
transaction */
+ private $lockedOwnTrx;
+
+ /** @var bool True if file is not present in file system. Not to be
cached in memcached */
+ private $missing;
const LOAD_ALL = 1; // integer; load all the lazy fields too (like
metadata)
@@ -1856,13 +1896,26 @@
*/
class LocalFileDeleteBatch {
- /**
- * @var LocalFile
- */
- var $file;
+ /** @var LocalFile */
+ private $file;
- var $reason, $srcRels = array(), $archiveUrls = array(),
$deletionBatch, $suppress;
- var $status;
+ /** @var string */
+ private $reason;
+
+ /** @var array */
+ private $srcRels = array();
+
+ /** @var array */
+ private $archiveUrls = array();
+
+ /** @var array Items to be processed in the deletion batch */
+ private $deletionBatch;
+
+ /** @var bool Wether to suppress all suppressable fields when deleting
*/
+ private $suppress;
+
+ /** @var FileRepoStatus */
+ private $status;
/**
* @param $file File
@@ -2201,12 +2254,20 @@
* @ingroup FileAbstraction
*/
class LocalFileRestoreBatch {
- /**
- * @var LocalFile
- */
- var $file;
+ /** @var LocalFile */
+ private $file;
- var $cleanupBatch, $ids, $all, $unsuppress = false;
+ /** @var array List of file IDs to restore */
+ private $cleanupBatch;
+
+ /** @var array List of file IDs to restore */
+ private $ids;
+
+ /** @var bool Add all revisions of the file */
+ private $all;
+
+ /** @var bool Wether to remove all settings for suppressed fields */
+ private $unsuppress = false;
/**
* @param $file File
@@ -2567,23 +2628,28 @@
* @ingroup FileAbstraction
*/
class LocalFileMoveBatch {
+ /** @var LocalFile */
+ protected $file;
- /**
- * @var LocalFile
- */
- var $file;
+ /** @var Title */
+ protected $target;
- /**
- * @var Title
- */
- var $target;
+ /** @var */
+ protected $cur;
- var $cur, $olds, $oldCount, $archive;
+ /** @var */
+ protected $olds;
+
+ /** @var */
+ protected $oldCount;
+
+ /** @var */
+ protected $archive;
/**
* @var DatabaseBase
*/
- var $db;
+ protected $db;
/**
* @param File $file
--
To view, visit https://gerrit.wikimedia.org/r/97350
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibab58651bb147433bd99046013e11f8c773bef70
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits