[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/page/ -> ImagePage.php (summary)

Special handling for file description pages. 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: 1615 lines (49 kb)
Included or required:0 times
Referenced: 3 times
Includes or requires: 0 files

Defines 3 classes

ImagePage:: (27 methods):
  newPage()
  newFromID()
  setFile()
  loadFile()
  render()
  view()
  getDisplayedFile()
  showTOC()
  makeMetadataTable()
  getContentObject()
  openShowImage()
  makeSizeLink()
  printSharedImageText()
  getUploadUrl()
  uploadLinksBox()
  closeShowImage()
  imageHistory()
  queryImageLinks()
  imageLinks()
  imageDupes()
  delete()
  showError()
  compare()
  getImageLimitsFromOption()
  doRenderLangOpt()
  getDisplayWidthHeight()
  getThumbSizes()

ImageHistoryList:: (9 methods):
  __construct()
  getImagePage()
  getFile()
  beginImageHistoryList()
  endImageHistoryList()
  imageHistoryLine()
  getThumbForLine()
  preventClickjacking()
  getPreventClickjacking()

ImageHistoryPseudoPager:: (9 methods):
  __construct()
  getTitle()
  getQueryInfo()
  getIndexField()
  formatRow()
  getBody()
  doQuery()
  preventClickjacking()
  getPreventClickjacking()


Class: ImagePage  - X-Ref

Class for viewing MediaWiki file description pages

newPage( Title $title )   X-Ref

param: Title $title
return: WikiFilePage

newFromID( $id )   X-Ref
Constructor from a page id

param: int $id Article ID to load
return: ImagePage|null

setFile( $file )   X-Ref

param: File $file
return: void

loadFile()   X-Ref
No description

render()   X-Ref
Handler for action=render
Include body text only; none of the image extras


view()   X-Ref
No description

getDisplayedFile()   X-Ref

return: File

showTOC( $metadata )   X-Ref
Create the TOC

param: bool $metadata Whether or not to show the metadata link
return: string

makeMetadataTable( $metadata )   X-Ref
Make a table with metadata to be shown in the output page.

param: array $metadata The array containing the Exif data
return: string The metadata table. This is treated as Wikitext (!)

getContentObject()   X-Ref
Overloading Article's getContentObject method.

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

openShowImage()   X-Ref
No description

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

param: array $params Scaler parameters
param: int $width
param: int $height
return: string

printSharedImageText()   X-Ref
Show a notice that the file is from a shared repository


getUploadUrl()   X-Ref
No description

uploadLinksBox()   X-Ref
Print out the various links at the bottom of the image page, e.g. reupload,
external editing (and instructions link) etc.


closeShowImage()   X-Ref
For overloading


imageHistory()   X-Ref
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.


queryImageLinks( $target, $limit )   X-Ref

param: string $target
param: int $limit
return: ResultWrapper

imageLinks()   X-Ref
No description

imageDupes()   X-Ref
No description

delete()   X-Ref
Delete the file, or an earlier version of it


showError( $description )   X-Ref
Display an error with a wikitext description

param: string $description

compare( $a, $b )   X-Ref
Callback for usort() to do link sorts by (namespace, title)
Function copied from Title::compare()

param: object $a Object page to compare with
param: object $b Object page to compare with
return: int Result of string comparison, or namespace comparison

getImageLimitsFromOption( $user, $optionName )   X-Ref
Returns the corresponding $wgImageLimits entry for the selected user option

param: User $user
param: string $optionName Name of a option to check, typically imagesize or thumbsize
return: array

doRenderLangOpt( array $langChoices, $curLang, $defaultLang )   X-Ref
Output a drop-down box for language options for the file

param: array $langChoices Array of string language codes
param: string $curLang Language code file is being viewed in.
param: string $defaultLang Language code that image is rendered in by default
return: string HTML to insert underneath image.

getDisplayWidthHeight( $maxWidth, $maxHeight, $width, $height )   X-Ref
Get the width and height to display image at.

param: int $maxWidth Max width to display at
param: int $maxHeight Max height to display at
param: int $width Actual width of the image
param: int $height Actual height of the image
return: array Array (width, height)

getThumbSizes( $origWidth, $origHeight )   X-Ref
Get alternative thumbnail sizes.

param: int $origWidth Actual width of image
param: int $origHeight Actual height of image
return: array An array of [width, height] pairs.

Class: ImageHistoryList  - X-Ref

Builds the image revision log shown on image pages

__construct( $imagePage )   X-Ref

param: ImagePage $imagePage

getImagePage()   X-Ref

return: ImagePage

getFile()   X-Ref

return: File

beginImageHistoryList( $navLinks = '' )   X-Ref

param: string $navLinks
return: string

endImageHistoryList( $navLinks = '' )   X-Ref

param: string $navLinks
return: string

imageHistoryLine( $iscur, $file )   X-Ref

param: bool $iscur
param: File $file
return: string

getThumbForLine( $file )   X-Ref

param: File $file
return: string

preventClickjacking( $enable = true )   X-Ref

param: bool $enable

getPreventClickjacking()   X-Ref

return: bool

Class: ImageHistoryPseudoPager  - X-Ref

__construct( $imagePage )   X-Ref

param: ImagePage $imagePage

getTitle()   X-Ref

return: Title

getQueryInfo()   X-Ref
No description

getIndexField()   X-Ref

return: string

formatRow( $row )   X-Ref

param: object $row
return: string

getBody()   X-Ref

return: string

doQuery()   X-Ref
No description

preventClickjacking( $enable = true )   X-Ref

param: bool $enable

getPreventClickjacking()   X-Ref

return: bool



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1