MediaWiki  REL1_22
ImagePage Class Reference

Class for viewing MediaWiki file description pages. More...

Inheritance diagram for ImagePage:
Collaboration diagram for ImagePage:

List of all members.

Public Member Functions

 delete ()
 Delete the file, or an earlier version of it.
 getContentObject ()
 Overloading Article's getContentObject method.
 getDisplayedFile ()
 getImageLimitsFromOption ($user, $optionName)
 Returns the corresponding $wgImageLimits entry for the selected user option.
 getUploadUrl ()
 render ()
 Handler for action=render Include body text only; none of the image extras.
 setFile ($file)
 showError ($description)
 Display an error with a wikitext description.
 view ()
 This is the default action of the index.php entry point: just view the page of the given title.

Static Public Member Functions

static newFromID ($id)
 Constructor from a page id.

Public Attributes

 $mExtraDescription = false

Protected Member Functions

 closeShowImage ()
 compare ($a, $b)
 Callback for usort() to do link sorts by (namespace, title) Function copied from Title::compare()
 imageDupes ()
 imageHistory ()
 If the page we've just displayed is in the "Image" namespace, we follow it with an upload history of the image and its usage.
 imageLinks ()
 loadFile ()
 makeMetadataTable ($metadata)
 Make a table with metadata to be shown in the output page.
 newPage (Title $title)
 openShowImage ()
 printSharedImageText ()
 Show a notice that the file is from a shared repository.
 queryImageLinks ($target, $limit)
 showTOC ($metadata)
 Create the TOC.
 uploadLinksBox ()
 Print out the various links at the bottom of the image page, e.g.

Private Member Functions

 makeSizeLink ($params, $width, $height)
 Creates an thumbnail of specified size and returns an HTML link to it.

Private Attributes

File $displayImg
 $fileLoaded
FileRepo $repo

Detailed Description

Class for viewing MediaWiki file description pages.

Definition at line 28 of file ImagePage.php.


Member Function Documentation

ImagePage::closeShowImage ( ) [protected]

Definition at line 666 of file ImagePage.php.

ImagePage::compare ( a,
b 
) [protected]

Callback for usort() to do link sorts by (namespace, title) Function copied from Title::compare()

Parameters:
$aobject page to compare with
$bobject page to compare with
Returns:
Integer: result of string comparison, or namespace comparison

Definition at line 895 of file ImagePage.php.

Delete the file, or an earlier version of it.

Reimplemented from Article.

Definition at line 861 of file ImagePage.php.

Overloading Article's getContentObject method.

Omit noarticletext if sharedupload; text will be fetched from the shared upload server if possible.

Returns:
string

Reimplemented from Article.

Definition at line 281 of file ImagePage.php.

Returns:
File

Definition at line 220 of file ImagePage.php.

Referenced by ImageHistoryList\__construct().

ImagePage::getImageLimitsFromOption ( user,
optionName 
)

Returns the corresponding $wgImageLimits entry for the selected user option.

Parameters:
$userUser
string$optionNameName of a option to check, typically imagesize or thumbsize
Returns:
array
Since:
1.21

Definition at line 911 of file ImagePage.php.

Definition at line 626 of file ImagePage.php.

ImagePage::imageDupes ( ) [protected]

Definition at line 826 of file ImagePage.php.

ImagePage::imageHistory ( ) [protected]

If the page we've just displayed is in the "Image" namespace, we follow it with an upload history of the image and its usage.

Definition at line 672 of file ImagePage.php.

ImagePage::imageLinks ( ) [protected]

Definition at line 705 of file ImagePage.php.

ImagePage::loadFile ( ) [protected]

Definition at line 71 of file ImagePage.php.

ImagePage::makeMetadataTable ( metadata) [protected]

Make a table with metadata to be shown in the output page.

Todo:
FIXME: Bad interface, see note on MediaHandler::formatMetadata().
Parameters:
array$metadatathe array containing the Exif data
Returns:
String The metadata table. This is treated as Wikitext (!)

Definition at line 254 of file ImagePage.php.

ImagePage::makeSizeLink ( params,
width,
height 
) [private]

Creates an thumbnail of specified size and returns an HTML link to it.

Parameters:
array$paramsScaler parameters
$widthint
$heightint
Returns:
string

Definition at line 579 of file ImagePage.php.

static ImagePage::newFromID ( id) [static]

Constructor from a page id.

Parameters:
int$idarticle ID to load
Returns:
ImagePage|null

Reimplemented from Article.

Definition at line 54 of file ImagePage.php.

ImagePage::newPage ( Title title) [protected]
Parameters:
$titleTitle
Returns:
WikiFilePage

Reimplemented from Article.

Definition at line 44 of file ImagePage.php.

ImagePage::openShowImage ( ) [protected]

Definition at line 289 of file ImagePage.php.

Show a notice that the file is from a shared repository.

Definition at line 598 of file ImagePage.php.

ImagePage::queryImageLinks ( target,
limit 
) [protected]
Parameters:
$target
$limit
Returns:
ResultWrapper

Definition at line 693 of file ImagePage.php.

Handler for action=render Include body text only; none of the image extras.

Reimplemented from Article.

Definition at line 96 of file ImagePage.php.

ImagePage::setFile ( file)
Parameters:
$fileFile:
Returns:
void

Definition at line 65 of file ImagePage.php.

ImagePage::showError ( description)

Display an error with a wikitext description.

Parameters:
$descriptionString

Definition at line 878 of file ImagePage.php.

ImagePage::showTOC ( metadata) [protected]

Create the TOC.

Parameters:
$metadataBoolean: whether or not to show the metadata link
Returns:
String

Definition at line 231 of file ImagePage.php.

ImagePage::uploadLinksBox ( ) [protected]

Print out the various links at the bottom of the image page, e.g.

reupload, external editing (and instructions link) etc.

Definition at line 639 of file ImagePage.php.

This is the default action of the index.php entry point: just view the page of the given title.

Reimplemented from Article.

Definition at line 101 of file ImagePage.php.


Member Data Documentation

File ImagePage::$displayImg [private]

Definition at line 32 of file ImagePage.php.

ImagePage::$fileLoaded [private]

Definition at line 36 of file ImagePage.php.

ImagePage::$mExtraDescription = false

Definition at line 38 of file ImagePage.php.

FileRepo ImagePage::$repo [private]

Definition at line 35 of file ImagePage.php.


The documentation for this class was generated from the following file: