MediaWiki
REL1_23
|
Class to represent a file in the oldimage table. More...
Public Member Functions | |
__construct ($title, $repo, $time, $archiveName) | |
getArchiveName () | |
getCacheFields ($prefix= 'img_') | |
getCacheKey () | |
getRel () | |
getUrlRel () | |
getVisibility () | |
Returns bitfield value. | |
isDeleted ($field) | |
isOld () | |
isVisible () | |
loadFromDB () | |
Load file metadata from the DB. | |
recordOldUpload ($srcPath, $archiveName, $timestamp, $comment, $user) | |
Record a file upload in the oldimage table, without adding log entries. | |
upgradeRow () | |
Fix assorted version-related problems with the image row by reloading it from the file. | |
uploadOld ($srcPath, $archiveName, $timestamp, $comment, $user, $flags=0) | |
Upload a file directly into archive. | |
userCan ($field, User $user=null) | |
Determine if the current user is allowed to view a particular field of this image file, if it's marked as deleted. | |
Static Public Member Functions | |
static | newFromArchiveName ($title, $repo, $archiveName) |
static | newFromKey ($sha1, $repo, $timestamp=false) |
Create a OldLocalFile from a SHA-1 key Do not call this except from inside a repo class. | |
static | newFromRow ($row, $repo) |
static | newFromTitle ($title, $repo, $time=null) |
static | selectFields () |
Fields in the oldimage table. | |
Public Attributes | |
const | CACHE_VERSION = 1 |
const | MAX_CACHE_ROWS = 20 |
Protected Member Functions | |
loadExtraFromDB () | |
Load lazy file metadata from the DB. | |
Protected Attributes | |
string | $archive_name |
Archive name *. | |
string | $requestedTime |
Timestamp *. |
Class to represent a file in the oldimage table.
Definition at line 29 of file OldLocalFile.php.
OldLocalFile::__construct | ( | $ | title, |
$ | repo, | ||
$ | time, | ||
$ | archiveName | ||
) |
Title | $title | |
FileRepo | $repo | |
string | $time | Timestamp or null to load by archive name |
string | $archiveName | archive name or null to load by timestamp |
MWException |
Definition at line 134 of file OldLocalFile.php.
Definition at line 153 of file OldLocalFile.php.
OldLocalFile::getCacheFields | ( | $ | prefix = 'img_' | ) |
string | $prefix |
Reimplemented from LocalFile.
Definition at line 237 of file OldLocalFile.php.
Returns bitfield value.
Reimplemented from File.
Definition at line 309 of file OldLocalFile.php.
OldLocalFile::isDeleted | ( | $ | field | ) |
int | $field | One of DELETED_* bitfield constants for file or revision rows |
Reimplemented from File.
Definition at line 299 of file OldLocalFile.php.
OldLocalFile::loadExtraFromDB | ( | ) | [protected] |
Load lazy file metadata from the DB.
Reimplemented from LocalFile.
Definition at line 200 of file OldLocalFile.php.
Load file metadata from the DB.
Reimplemented from LocalFile.
Definition at line 175 of file OldLocalFile.php.
static OldLocalFile::newFromArchiveName | ( | $ | title, |
$ | repo, | ||
$ | archiveName | ||
) | [static] |
Definition at line 59 of file OldLocalFile.php.
static OldLocalFile::newFromKey | ( | $ | sha1, |
$ | repo, | ||
$ | timestamp = false |
||
) | [static] |
Create a OldLocalFile from a SHA-1 key Do not call this except from inside a repo class.
string | $sha1 | base-36 SHA-1 |
LocalRepo | $repo | |
string | bool | $timestamp | MW_timestamp (optional) |
Reimplemented from LocalFile.
Definition at line 86 of file OldLocalFile.php.
static OldLocalFile::newFromRow | ( | $ | row, |
$ | repo | ||
) | [static] |
stdClass | $row | |
FileRepo | $repo |
Reimplemented from LocalFile.
Definition at line 68 of file OldLocalFile.php.
static OldLocalFile::newFromTitle | ( | $ | title, |
$ | repo, | ||
$ | time = null |
||
) | [static] |
MWException |
Reimplemented from LocalFile.
Definition at line 44 of file OldLocalFile.php.
OldLocalFile::recordOldUpload | ( | $ | srcPath, |
$ | archiveName, | ||
$ | timestamp, | ||
$ | comment, | ||
$ | user | ||
) |
Record a file upload in the oldimage table, without adding log entries.
string | $srcPath | File system path to the source file |
string | $archiveName | The archive name of the file |
string | $timestamp | |
string | $comment | Upload comment |
User | $user | User who did this upload |
Definition at line 370 of file OldLocalFile.php.
static OldLocalFile::selectFields | ( | ) | [static] |
Fields in the oldimage table.
Reimplemented from LocalFile.
Definition at line 106 of file OldLocalFile.php.
Referenced by RevDel_FileList\doQuery().
Fix assorted version-related problems with the image row by reloading it from the file.
Reimplemented from LocalFile.
Definition at line 259 of file OldLocalFile.php.
OldLocalFile::uploadOld | ( | $ | srcPath, |
$ | archiveName, | ||
$ | timestamp, | ||
$ | comment, | ||
$ | user, | ||
$ | flags = 0 |
||
) |
Upload a file directly into archive.
Generally for Special:Import.
string | $srcPath | File system path of the source file |
string | $archiveName | Full archive name of the file, in the form $timestamp!$filename, where $filename must match $this->getName() |
string | $timestamp | |
string | $comment | |
User | $user | |
int | $flags |
Definition at line 341 of file OldLocalFile.php.
OldLocalFile::userCan | ( | $ | field, |
User $ | user = null |
||
) |
Determine if the current user is allowed to view a particular field of this image file, if it's marked as deleted.
Reimplemented from File.
Definition at line 323 of file OldLocalFile.php.
string OldLocalFile::$archive_name [protected] |
Archive name *.
Definition at line 32 of file OldLocalFile.php.
string OldLocalFile::$requestedTime [protected] |
Timestamp *.
Definition at line 30 of file OldLocalFile.php.
const OldLocalFile::CACHE_VERSION = 1 |
Definition at line 34 of file OldLocalFile.php.
const OldLocalFile::MAX_CACHE_ROWS = 20 |
Definition at line 35 of file OldLocalFile.php.