Inherits LocalFile.
Public Member Functions | |
| __construct ($title, $repo, $time, $archiveName) | |
| getCacheKey () | |
| Get the memcached key. | |
| getArchiveName () | |
| isOld () | |
| Returns true if the image is an old version STUB. | |
| isVisible () | |
| Returns true if file exists in the repository and can be included in a page. | |
| loadFromDB () | |
| Load file metadata from the DB. | |
| getCacheFields ($prefix= 'img_') | |
| getRel () | |
| Get the path of the file relative to the public zone root. | |
| getUrlRel () | |
| Get urlencoded relative path of the file. | |
| upgradeRow () | |
| Fix assorted version-related problems with the image row by reloading it from the file. | |
| isDeleted ($field) | |
| int $field one of DELETED_* bitfield constants for file or revision rows | |
| userCan ($field) | |
| Determine if the current user is allowed to view a particular field of this FileStore image file, if it's marked as deleted. | |
Static Public Member Functions | |
| static | newFromTitle ($title, $repo, $time=null) |
| #@- | |
| static | newFromArchiveName ($title, $repo, $archiveName) |
| static | newFromRow ($row, $repo) |
| Create a LocalFile from a title Do not call this except from inside a repo class. | |
| static | newFromKey ($sha1, $repo, $timestamp=false) |
| Create a LocalFile from a SHA-1 key Do not call this except from inside a repo class. | |
| static | selectFields () |
| Fields in the oldimage table. | |
Public Attributes | |
| $requestedTime | |
| $archive_name | |
| const | CACHE_VERSION = 1 |
| const | MAX_CACHE_ROWS = 20 |
Definition at line 8 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 |
Definition at line 78 of file OldLocalFile.php.
References File::$repo, and File::$title.
| OldLocalFile::getArchiveName | ( | ) |
Definition at line 91 of file OldLocalFile.php.
References LocalFile::load().
Referenced by getRel(), and getUrlRel().
| OldLocalFile::getCacheFields | ( | $ | prefix = 'img_' |
) |
Reimplemented from LocalFile.
Definition at line 126 of file OldLocalFile.php.
References $fields, and $prefix.
Referenced by loadFromDB(), and newFromKey().
| OldLocalFile::getCacheKey | ( | ) |
Get the memcached key.
Reimplemented from LocalFile.
Definition at line 87 of file OldLocalFile.php.
| OldLocalFile::getRel | ( | ) |
Get the path of the file relative to the public zone root.
Reimplemented from File.
Definition at line 133 of file OldLocalFile.php.
References getArchiveName(), and File::getHashPath().
| OldLocalFile::getUrlRel | ( | ) |
Get urlencoded relative path of the file.
Reimplemented from File.
Definition at line 137 of file OldLocalFile.php.
References getArchiveName(), and File::getHashPath().
| OldLocalFile::isDeleted | ( | $ | field | ) |
int $field one of DELETED_* bitfield constants for file or revision rows
Reimplemented from File.
Definition at line 179 of file OldLocalFile.php.
Referenced by isVisible().
| OldLocalFile::isOld | ( | ) |
Returns true if the image is an old version STUB.
Reimplemented from File.
Definition at line 98 of file OldLocalFile.php.
| OldLocalFile::isVisible | ( | ) |
Returns true if file exists in the repository and can be included in a page.
It would be unsafe to include private images, making public thumbnails inadvertently
Reimplemented from File.
Definition at line 102 of file OldLocalFile.php.
References File::DELETED_FILE, LocalFile::exists(), and isDeleted().
| OldLocalFile::loadFromDB | ( | ) |
Load file metadata from the DB.
Reimplemented from LocalFile.
Definition at line 106 of file OldLocalFile.php.
References $conds, $dbr, $row, getCacheFields(), File::getName(), LocalFile::loadFromRow(), wfProfileIn(), and wfProfileOut().
| static OldLocalFile::newFromArchiveName | ( | $ | title, | |
| $ | repo, | |||
| $ | archiveName | |||
| ) | [static] |
| static OldLocalFile::newFromKey | ( | $ | sha1, | |
| $ | repo, | |||
| $ | timestamp = false | |||
| ) | [static] |
Create a LocalFile from a SHA-1 key Do not call this except from inside a repo class.
Reimplemented from LocalFile.
Definition at line 32 of file OldLocalFile.php.
References $conds, $dbr, $fname, File::$repo, $row, LocalFile::$sha1, LocalFile::$timestamp, getCacheFields(), and newFromRow().
| static OldLocalFile::newFromRow | ( | $ | row, | |
| $ | repo | |||
| ) | [static] |
Create a LocalFile from a title Do not call this except from inside a repo class.
Reimplemented from LocalFile.
Definition at line 25 of file OldLocalFile.php.
References $file, File::$repo, $row, File::$title, and Title::makeTitle().
Referenced by LocalFile::getHistory(), and newFromKey().
| static OldLocalFile::newFromTitle | ( | $ | title, | |
| $ | repo, | |||
| $ | unused = null | |||
| ) | [static] |
#@-
Create a LocalFile from a title Do not call this except from inside a repo class.
Note: $unused param is only here to avoid an E_STRICT
Reimplemented from LocalFile.
Definition at line 14 of file OldLocalFile.php.
References File::$repo, and File::$title.
| static OldLocalFile::selectFields | ( | ) | [static] |
Fields in the oldimage table.
Reimplemented from LocalFile.
Definition at line 51 of file OldLocalFile.php.
Referenced by LocalFile::getHistory().
| OldLocalFile::upgradeRow | ( | ) |
Fix assorted version-related problems with the image row by reloading it from the file.
Reimplemented from LocalFile.
Definition at line 141 of file OldLocalFile.php.
References $dbw, $minor, File::getName(), LocalFile::loadFromFile(), File::splitMime(), wfDebug(), wfProfileIn(), and wfProfileOut().
| OldLocalFile::userCan | ( | $ | field | ) |
Determine if the current user is allowed to view a particular field of this FileStore image file, if it's marked as deleted.
| int | $field |
Reimplemented from File.
Definition at line 189 of file OldLocalFile.php.
References $wgUser, File::DELETED_RESTRICTED, and wfDebug().
| OldLocalFile::$archive_name |
Definition at line 9 of file OldLocalFile.php.
| OldLocalFile::$requestedTime |
Definition at line 9 of file OldLocalFile.php.
| const OldLocalFile::CACHE_VERSION = 1 |
Definition at line 11 of file OldLocalFile.php.
| const OldLocalFile::MAX_CACHE_ROWS = 20 |
Definition at line 12 of file OldLocalFile.php.
1.5.9