[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Old file in the oldimage table. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 421 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
OldLocalFile:: (22 methods):
newFromTitle()
newFromArchiveName()
newFromRow()
newFromKey()
selectFields()
__construct()
getCacheKey()
getArchiveName()
isOld()
isVisible()
loadFromDB()
loadExtraFromDB()
getCacheFields()
getRel()
getUrlRel()
upgradeRow()
isDeleted()
getVisibility()
userCan()
uploadOld()
recordOldUpload()
exists()
Class: OldLocalFile - X-Ref
Class to represent a file in the oldimage tablenewFromTitle( $title, $repo, $time = null ) X-Ref |
param: Title $title param: FileRepo $repo param: null|int $time Timestamp or null return: OldLocalFile |
newFromArchiveName( $title, $repo, $archiveName ) X-Ref |
param: Title $title param: FileRepo $repo param: string $archiveName return: OldLocalFile |
newFromRow( $row, $repo ) X-Ref |
param: stdClass $row param: FileRepo $repo return: OldLocalFile |
newFromKey( $sha1, $repo, $timestamp = false ) X-Ref |
Create a OldLocalFile from a SHA-1 key Do not call this except from inside a repo class. param: string $sha1 Base-36 SHA-1 param: LocalRepo $repo param: string|bool $timestamp MW_timestamp (optional) return: bool|OldLocalFile |
selectFields() X-Ref |
Fields in the oldimage table return: array |
__construct( $title, $repo, $time, $archiveName ) X-Ref |
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 |
getCacheKey() X-Ref |
return: bool |
getArchiveName() X-Ref |
return: string |
isOld() X-Ref |
return: bool |
isVisible() X-Ref |
return: bool |
loadFromDB( $flags = 0 ) X-Ref |
No description |
loadExtraFromDB() X-Ref |
Load lazy file metadata from the DB |
getCacheFields( $prefix = 'img_' ) X-Ref |
param: string $prefix return: array |
getRel() X-Ref |
return: string |
getUrlRel() X-Ref |
return: string |
upgradeRow() X-Ref |
No description |
isDeleted( $field ) X-Ref |
param: int $field One of DELETED_* bitfield constants for file or return: bool |
getVisibility() X-Ref |
Returns bitfield value return: int |
userCan( $field, User $user = null ) X-Ref |
Determine if the current user is allowed to view a particular field of this image file, if it's marked as deleted. param: int $field param: User|null $user User object to check, or null to use $wgUser return: bool |
uploadOld( $srcPath, $archiveName, $timestamp, $comment, $user, $flags = 0 ) X-Ref |
Upload a file directly into archive. Generally for Special:Import. param: string $srcPath File system path of the source file param: string $archiveName Full archive name of the file, in the form param: string $timestamp param: string $comment param: User $user param: int $flags return: FileRepoStatus |
recordOldUpload( $srcPath, $archiveName, $timestamp, $comment, $user ) X-Ref |
Record a file upload in the oldimage table, without adding log entries. param: string $srcPath File system path to the source file param: string $archiveName The archive name of the file param: string $timestamp param: string $comment Upload comment param: User $user User who did this upload return: bool |
exists() X-Ref |
If archive name is an empty string, then file does not "exist" This is the case for a couple files on Wikimedia servers where the old version is "lost". |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |