MediaWiki  REL1_19
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.
 getContent ()
 Overloading Article's getContent method.
 getDisplayedFile ()
 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

 $displayImg
 $fileLoaded
 $repo

Detailed Description

Class for viewing MediaWiki file description pages.

Definition at line 7 of file ImagePage.php.


Member Function Documentation

ImagePage::closeShowImage ( ) [protected]

Definition at line 605 of file ImagePage.php.

Referenced by view().

Here is the caller graph for this function:

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 825 of file ImagePage.php.

Delete the file, or an earlier version of it.

Reimplemented from Article.

Definition at line 791 of file ImagePage.php.

References $file.

Overloading Article's getContent method.

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

Returns:
string

Reimplemented from Article.

Definition at line 253 of file ImagePage.php.

References loadFile().

Here is the call graph for this function:

Returns:
File

Definition at line 192 of file ImagePage.php.

References loadFile().

Here is the call graph for this function:

Definition at line 549 of file ImagePage.php.

References SpecialPage\getTitleFor(), and loadFile().

Referenced by uploadLinksBox().

Here is the call graph for this function:

Here is the caller graph for this function:

ImagePage::imageDupes ( ) [protected]

Definition at line 749 of file ImagePage.php.

References $file, $wgLang, $wgOut, Article\getTitle(), Linker\link(), loadFile(), Linker\makeExternalLink(), and wfMsg().

Referenced by view().

Here is the call graph for this function:

Here is the caller graph for this function:

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 611 of file ImagePage.php.

References $wgOut, loadFile(), and uploadLinksBox().

Referenced by view().

Here is the call graph for this function:

Here is the caller graph for this function:

ImagePage::imageLinks ( ) [protected]

Definition at line 645 of file ImagePage.php.

References $count, $limit, $res, $rows, $ul, $wgLang, $wgOut, Html\closeElement(), Article\getTitle(), Linker\linkKnown(), Title\makeTitle(), Html\openElement(), queryImageLinks(), Html\rawElement(), and wfMessage().

Referenced by view().

Here is the call graph for this function:

Here is the caller graph for this function:

ImagePage::loadFile ( ) [protected]

Definition at line 51 of file ImagePage.php.

References Article\getTitle(), wfFindFile(), wfLocalFile(), and wfRunHooks().

Referenced by getContent(), getDisplayedFile(), getUploadUrl(), imageDupes(), imageHistory(), openShowImage(), printSharedImageText(), uploadLinksBox(), and view().

Here is the call graph for this function:

Here is the caller graph for this function:

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:
$metadataArray: the array containing the EXIF data
Returns:
String The metadata table. This is treated as Wikitext (!)

Definition at line 226 of file ImagePage.php.

References Sanitizer\escapeId(), and wfMsgNoTrans().

Referenced by view().

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Parameters:
$paramsarray Scaler parameters
$widthint
$heightint
Returns:
string

Definition at line 501 of file ImagePage.php.

References Html\rawElement(), and wfMessage().

Referenced by openShowImage().

Here is the call graph for this function:

Here is the caller graph for this function:

static ImagePage::newFromID ( id) [static]

Constructor from a page id.

Parameters:
$idInt article ID to load

Reimplemented from Article.

Definition at line 34 of file ImagePage.php.

References $t.

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

Reimplemented from Article.

Definition at line 25 of file ImagePage.php.

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

Definition at line 520 of file ImagePage.php.

References $repo, $wgOut, loadFile(), and wfMsgNoTrans().

Referenced by openShowImage().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 633 of file ImagePage.php.

References $dbr, $limit, and wfGetDB().

Referenced by imageLinks().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented from Article.

Definition at line 76 of file ImagePage.php.

References $wgOut, and view().

Here is the call graph for this function:

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

Definition at line 45 of file ImagePage.php.

References $file.

ImagePage::showError ( description)

Display an error with a wikitext description.

Parameters:
$descriptionString

Definition at line 808 of file ImagePage.php.

References $wgOut, and wfMessage().

Here is the call graph for this function:

ImagePage::showTOC ( metadata) [protected]

Create the TOC.

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

Definition at line 203 of file ImagePage.php.

References wfMsgHtml(), and wfRunHooks().

Referenced by view().

Here is the call graph for this function:

Here is the caller graph for this function:

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 562 of file ImagePage.php.

References $wgEnableUploads, $wgOut, $wgUseExternalEditor, $wgUser, Article\getTitle(), getUploadUrl(), Linker\link(), loadFile(), Linker\makeExternalLink(), UploadBase\userCanReUpload(), wfMsg(), wfMsgExt(), and wfMsgHtml().

Referenced by imageHistory().

Here is the call graph for this function:

Here is the caller graph for this function:

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 82 of file ImagePage.php.

References $wgOut, $wgShowEXIF, $wgUser, Xml\closeElement(), closeShowImage(), Xml\element(), Article\getContext(), Article\getTitle(), imageDupes(), imageHistory(), imageLinks(), loadFile(), makeMetadataTable(), Title\makeTitle(), Xml\openElement(), openShowImage(), showTOC(), Article\viewRedirect(), wfMessage(), wfMsg(), and wfRunHooks().

Referenced by render().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

ImagePage::$displayImg [private]

Definition at line 12 of file ImagePage.php.

ImagePage::$fileLoaded [private]

Definition at line 17 of file ImagePage.php.

ImagePage::$mExtraDescription = false

Definition at line 19 of file ImagePage.php.

ImagePage::$repo [private]

Definition at line 16 of file ImagePage.php.

Referenced by printSharedImageText().


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