/**
* Fields in the image table
+ * @return array
*/
static function selectFields() {
return array(
/**
* Get the memcached key for the main data for this file, or false if
* there is no access to the shared cache.
+ * @return bool
*/
function getCacheKey() {
$hashedName = md5( $this->getName() );
/**
* Try to load file metadata from memcached. Returns true on success.
+ * @return bool
*/
function loadFromCache() {
global $wgMemc;
/**
* Decode a row from the database (either object or array) to an array
* with timestamps and MIME types decoded, and the field prefix removed.
+ * @return array
*/
function decodeRow( $row, $prefix = 'img_' ) {
$array = (array)$row;
* Return the width of the image
*
* Returns false on error
+ * @return bool
*/
public function getWidth( $page = 1 ) {
$this->load();
* Return the height of the image
*
* Returns false on error
+ * @return bool
*/
public function getHeight( $page = 1 ) {
$this->load();
/**
* Get handler-specific metadata
+ * @return string
*/
function getMetadata() {
$this->load();
* 0 return line for current version
* 1 query for old versions, return first one
* 2, ... return next old version from above query
+ * @return bool
*/
public function nextHistoryLine() {
# Polymorphic function name to distinguish foreign and local fetches
/**
* Record a file upload in the upload log and the image table
+ * @return bool
*/
function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '',
$watch = false, $timestamp = false )
/**
* Record a file upload in the upload log and the image table
+ * @return bool
*/
function recordUpload2(
$oldver, $comment, $pageText, $props = false, $timestamp = false, $user = null
/**
* Get the URL of the file description page.
+ * @return String
*/
function getDescriptionUrl() {
return $this->title->getLocalUrl();
* Get the HTML text of the description page
* This is not used by ImagePage for local files, since (among other things)
* it skips the parser cache.
+ * @return bool|mixed
*/
function getDescriptionText() {
global $wgParser;
/**
* Run the transaction
+ * @return \FileRepoStatus
*/
function execute() {
global $wgUseSquid;
/**
* Removes non-existent files from a deletion batch.
+ * @return array
*/
function removeNonexistentFiles( $batch ) {
$files = $newBatch = array();
* rows and there's no need to keep the image row locked while it's acquiring those locks
* The caller may have its own transaction open.
* So we save the batch and let the caller call cleanup()
+ * @return \FileRepoStatus
*/
function execute() {
global $wgLang;
/**
* Removes non-existent files from a store batch.
+ * @return array
*/
function removeNonexistentFiles( $triplets ) {
$files = $filteredTriplets = array();
/**
* Removes non-existent files from a cleanup batch.
+ * @return array
*/
function removeNonexistentFromCleanup( $batch ) {
$files = $newBatch = array();
/**
* Delete unused files in the deleted zone.
* This should be called from outside the transaction in which execute() was called.
+ * @return \FileRepoStatus|void
*/
function cleanup() {
if ( !$this->cleanupBatch ) {
/**
* Perform the move.
+ * @return \FileRepoStatus
*/
function execute() {
$repo = $this->file->repo;
/**
* Generate triplets for FileRepo::storeBatch().
+ * @return array
*/
function getMoveTriplets() {
$moves = array_merge( array( $this->cur ), $this->olds );
/**
* Removes non-existent files from move batch.
+ * @return array
*/
function removeNonexistentFiles( $triplets ) {
$files = array();