ImagePage Class Reference

Special handling for image description pages. More...

Inherits Article.

List of all members.

Public Member Functions

 __construct ($title)
 setFile ($file)
 render ()
 Handler for action=render Include body text only; none of the image extras.
 view ()
 This is the default action of the script: just view the page of the given title.
 getRedirectTarget ()
 If this page is a redirect, get its target.
 followRedirect ()
 Get the Title object this page redirects to.
 isRedirect ($text=false)
 Tests if the article text represents a redirect.
 isLocal ()
 getFile ()
 getDisplayedFile ()
 getDuplicates ()
 getContent ()
 Overloading Article's getContent method.
 getUploadUrl ()
 delete ()
 Delete the file, or an earlier version of it.
 revert ()
 Revert the file to an earlier version.
 doPurge ()
 Override handling of action=purge.
 showError ($description)
 Display an error with a wikitext description.

Public Attributes

 $img
 $displayImg
 $repo
 $fileLoaded
 $mExtraDescription = false
 $dupes

Protected Member Functions

 loadFile ()
 showTOC ($metadata)
 Create the TOC.
 makeMetadataTable ($metadata)
 Make a table with metadata to be shown in the output page.
 openShowImage ()
 printSharedImageText ()
 Show a notice that the file is from a shared repository.
 uploadLinksBox ()
 Print out the various links at the bottom of the image page, e.g.
 closeShowImage ()
 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 ()
 imageRedirects ()
 imageDupes ()


Detailed Description

Special handling for image description pages.

Definition at line 11 of file ImagePage.php.


Constructor & Destructor Documentation

ImagePage::__construct ( title  ) 

Definition at line 20 of file ImagePage.php.

References $title.


Member Function Documentation

ImagePage::closeShowImage (  )  [protected]

Definition at line 540 of file ImagePage.php.

Referenced by view().

ImagePage::delete (  ) 

Delete the file, or an earlier version of it.

Reimplemented from Article.

Definition at line 668 of file ImagePage.php.

References loadFile().

ImagePage::doPurge (  ) 

Override handling of action=purge.

Reimplemented from Article.

Definition at line 691 of file ImagePage.php.

References loadFile(), and wfDebug().

ImagePage::followRedirect (  ) 

Get the Title object this page redirects to.

Returns:
mixed false, Title of in-wiki target, or string with URL

Reimplemented from Article.

Definition at line 159 of file ImagePage.php.

References loadFile(), and Title::makeTitle().

ImagePage::getContent (  ) 

Overloading Article's getContent method.

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

Reimplemented from Article.

Definition at line 268 of file ImagePage.php.

References Article::getID(), and loadFile().

ImagePage::getDisplayedFile (  ) 

Definition at line 189 of file ImagePage.php.

References loadFile().

ImagePage::getDuplicates (  ) 

Definition at line 194 of file ImagePage.php.

References $dupes, $file, $key, $self, $size, loadFile(), and RepoGroup::singleton().

Referenced by imageDupes().

ImagePage::getFile (  ) 

Definition at line 184 of file ImagePage.php.

References loadFile().

ImagePage::getRedirectTarget (  ) 

If this page is a redirect, get its target.

The target will be fetched from the redirect table if possible. If this page doesn't have an entry there, call insertRedirect()

Returns:
mixed Title object, or null if this page is not a redirect

Reimplemented from Article.

Definition at line 146 of file ImagePage.php.

References loadFile(), and Title::makeTitle().

ImagePage::getUploadUrl (  ) 

Definition at line 506 of file ImagePage.php.

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

Referenced by uploadLinksBox().

ImagePage::imageDupes (  )  [protected]

Definition at line 636 of file ImagePage.php.

References $dupes, $file, $wgLang, $wgOut, $wgUser, getDuplicates(), loadFile(), and wfMsg().

Referenced by view().

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

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

Referenced by view().

ImagePage::imageLinks (  )  [protected]

Definition at line 562 of file ImagePage.php.

References $count, $dbr, $name, $res, $s, $wgLang, $wgOut, $wgUser, Title::makeTitle(), and wfGetDB().

Referenced by view().

ImagePage::imageRedirects (  )  [protected]

Definition at line 615 of file ImagePage.php.

References $title, $wgLang, $wgOut, $wgUser, and Article::getTitle().

Referenced by view().

ImagePage::isLocal (  ) 

Definition at line 179 of file ImagePage.php.

References loadFile().

ImagePage::isRedirect ( text = false  ) 

Tests if the article text represents a redirect.

Parameters:
$text String: FIXME
Returns:
bool

Reimplemented from Article.

Definition at line 171 of file ImagePage.php.

References $text, and loadFile().

ImagePage::loadFile (  )  [protected]

ImagePage::makeMetadataTable ( metadata  )  [protected]

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

FIXME: bad interface, see note on MediaHandler::formatMetadata().

Parameters:
array $exif The array containing the EXIF data
Returns:
string

Definition at line 243 of file ImagePage.php.

References $type, Sanitizer::escapeId(), and wfMsg().

Referenced by view().

ImagePage::openShowImage (  )  [protected]

ImagePage::printSharedImageText (  )  [protected]

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

Definition at line 479 of file ImagePage.php.

References $msg, $s, $wgOut, $wgUser, loadFile(), wfMsg(), wfMsgExt(), and wfMsgWikiHtml().

Referenced by openShowImage().

ImagePage::render (  ) 

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

Reimplemented from Article.

Definition at line 56 of file ImagePage.php.

References $wgOut, and view().

ImagePage::revert (  ) 

Revert the file to an earlier version.

Reimplemented from Article.

Definition at line 682 of file ImagePage.php.

References loadFile().

ImagePage::setFile ( file  ) 

Definition at line 26 of file ImagePage.php.

References $file.

ImagePage::showError ( description  ) 

Display an error with a wikitext description.

Definition at line 708 of file ImagePage.php.

References $wgOut, and wfMsg().

ImagePage::showTOC ( metadata  )  [protected]

Create the TOC.

Parameters:
bool $metadata Whether or not to show the metadata link
Returns:
string

Definition at line 224 of file ImagePage.php.

References $wgLang, and wfMsgHtml().

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

References $wgOut, $wgUser, getUploadUrl(), loadFile(), UploadForm::userCanReUpload(), wfMsg(), wfMsgExt(), and wfMsgHtml().

Referenced by imageHistory().

ImagePage::view (  ) 


Member Data Documentation

ImagePage::$displayImg

Definition at line 14 of file ImagePage.php.

ImagePage::$dupes

Definition at line 18 of file ImagePage.php.

Referenced by getDuplicates(), and imageDupes().

ImagePage::$fileLoaded

Definition at line 16 of file ImagePage.php.

ImagePage::$img

Definition at line 13 of file ImagePage.php.

ImagePage::$mExtraDescription = false

Definition at line 17 of file ImagePage.php.

ImagePage::$repo

Definition at line 15 of file ImagePage.php.


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

Generated on Sat Sep 5 02:08:38 2009 for MediaWiki by  doxygen 1.5.9