MediaWiki
1.23.0
|
Class for viewing MediaWiki file description pages. More...
Public Member Functions | |
delete () | |
Delete the file, or an earlier version of it. More... | |
getContentObject () | |
Overloading Article's getContentObject method. More... | |
getDisplayedFile () | |
getImageLimitsFromOption ( $user, $optionName) | |
Returns the corresponding $wgImageLimits entry for the selected user option. More... | |
getUploadUrl () | |
render () | |
Handler for action=render Include body text only; none of the image extras. More... | |
setFile ( $file) | |
showError ( $description) | |
Display an error with a wikitext description. More... | |
view () | |
This is the default action of the index.php entry point: just view the page of the given title. More... | |
Public Member Functions inherited from Article | |
__call ( $fname, $args) | |
Use PHP's magic __call handler to transform instance calls to WikiPage functions for backwards compatibility. More... | |
__construct (Title $title, $oldId=null) | |
Constructor and clear the article. More... | |
__get ( $fname) | |
Use PHP's magic __get handler to handle accessing of raw WikiPage fields for backwards compatibility. More... | |
__set ( $fname, $fvalue) | |
Use PHP's magic __set handler to handle setting of raw WikiPage fields for backwards compatibility. More... | |
adjustDisplayTitle (ParserOutput $pOutput) | |
Adjust title for pages with displaytitle, -{T|}- or language conversion. More... | |
clear () | |
Clear the object. More... | |
commitRollback ( $fromP, $summary, $bot, &$resultDetails, User $guser=null) | |
confirmDelete ( $reason) | |
Output deletion confirmation dialog. More... | |
doDelete ( $reason, $suppress=false) | |
Perform a deletion and output success or failure messages. More... | |
doDeleteArticle ( $reason, $suppress=false, $id=0, $commit=true, &$error='') | |
doRollback ( $fromP, $summary, $token, $bot, &$resultDetails, User $user=null) | |
doUpdateRestrictions (array $limit, array $expiry, &$cascade, $reason, User $user) | |
fetchContent () | |
Get text of an article from database Does NOT follow redirects. More... | |
generateReason (&$hasHistory) | |
getContent () | |
Note that getContent/loadContent do not follow redirects anymore. More... | |
getContext () | |
Gets the context this Article is executed in. More... | |
getOldID () | |
getOldIDFromRequest () | |
Sets $this->mRedirectUrl to a correct URL if the query parameters are incorrect. More... | |
getPage () | |
Get the WikiPage object of this instance. More... | |
getParserOptions () | |
Get parser options suitable for rendering the primary article wikitext. More... | |
getParserOutput ( $oldid=null, User $user=null) | |
#- More... | |
getRevIdFetched () | |
Use this to fetch the rev ID used on page views. More... | |
getRevisionFetched () | |
Get the fetched Revision object depending on request parameters or null on failure. More... | |
getRobotPolicy ( $action, $pOutput=null) | |
Get the robot policy to be used for the current view. More... | |
getTitle () | |
Get the title object of the article. More... | |
info () | |
Info about this page. More... | |
isCurrent () | |
Returns true if the currently-referenced revision is the current edit to this page (and it exists). More... | |
isFileCacheable () | |
Check if the page can be cached. More... | |
loadContent () | |
Load the revision (including text) into this object. More... | |
protect () | |
action=protect handler More... | |
purge () | |
Handle action=purge. More... | |
revert () | |
Handle action=revert. More... | |
rollback () | |
Handle action=rollback. More... | |
setContext ( $context) | |
Sets the context this Article is executed in. More... | |
setOldSubtitle ( $oldid=0) | |
Generate the navigation links when browsing through an article revisions It shows the information as: Revision as of <date>; view current revision <- Previous version | Next Version -> More... | |
setParserOptions (ParserOptions $options) | |
Override the ParserOptions used to render the primary article wikitext. More... | |
setRedirectedFrom (Title $from) | |
Tell the page view functions that this view was redirected from another page on the wiki. More... | |
showDeletedRevisionHeader () | |
If the revision requested for view is deleted, check permissions. More... | |
showDiffPage () | |
Show a diff page according to current request variables. More... | |
showMissingArticle () | |
Show the error text for a missing article. More... | |
showNamespaceHeader () | |
Show a header specific to the namespace currently being viewed, like [[MediaWiki:Talkpagetext]]. More... | |
showPatrolFooter () | |
If patrol is possible, output a patrol UI box. More... | |
showRedirectedFromHeader () | |
If this request is a redirect view, send "redirected from" subtitle to the output. More... | |
showViewFooter () | |
Show the footer section of an ordinary page view. More... | |
unprotect () | |
action=unprotect handler (alias) More... | |
updateRestrictions ( $limit=array(), $reason='', &$cascade=0, $expiry=array()) | |
viewRedirect ( $target, $appendSubtitle=true, $forceKnown=false) | |
View redirect. More... | |
Static Public Member Functions | |
static | newFromID ( $id) |
Constructor from a page id. More... | |
Static Public Member Functions inherited from Article | |
static | formatRobotPolicy ( $policy) |
Converts a String robot policy into an associative array, to allow merging of several policies using array_merge(). More... | |
static | getAutosummary ( $oldtext, $newtext, $flags) |
static | newFromTitle ( $title, IContextSource $context) |
Create an Article object of the appropriate class for the given page. More... | |
static | newFromWikiPage (WikiPage $page, IContextSource $context) |
Create an Article object of the appropriate class for the given page. More... | |
static | onArticleCreate ( $title) |
static | onArticleDelete ( $title) |
static | onArticleEdit ( $title) |
static | selectFields () |
Public Attributes | |
$mExtraDescription = false | |
Public Attributes inherited from Article | |
ParserOptions | $mParserOptions |
ParserOptions object for $wgUser articles $mParserOptions. More... | |
string | $mContent |
Text of the revision we are working on $mContent. More... | |
Content | $mContentObject |
Content of the revision we are working on. More... | |
bool | $mContentLoaded = false |
Is the content ($mContent) already loaded? $mContentLoaded. More... | |
int null | $mOldId |
The oldid of the article that is to be shown, 0 for the current revision $mOldId. More... | |
Title | $mRedirectedFrom = null |
Title from which we were redirected here $mRedirectedFrom. More... | |
string false | $mRedirectUrl = false |
URL to redirect to or false if none $mRedirectUrl. More... | |
int | $mRevIdFetched = 0 |
Revision ID of revision we are working on $mRevIdFetched. More... | |
Revision | $mRevision = null |
Revision we are working on $mRevision. More... | |
ParserOutput | $mParserOutput |
ParserOutput object $mParserOutput. More... | |
Protected Member Functions | |
closeShowImage () | |
compare ( $a, $b) | |
Callback for usort() to do link sorts by (namespace, title) Function copied from Title::compare() More... | |
doRenderLangOpt (array $langChoices, $curLang, $defaultLang) | |
Output a drop-down box for language options for the file. More... | |
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. More... | |
imageLinks () | |
loadFile () | |
makeMetadataTable ( $metadata) | |
Make a table with metadata to be shown in the output page. More... | |
newPage (Title $title) | |
openShowImage () | |
printSharedImageText () | |
Show a notice that the file is from a shared repository. More... | |
queryImageLinks ( $target, $limit) | |
showTOC ( $metadata) | |
Create the TOC. More... | |
uploadLinksBox () | |
Print out the various links at the bottom of the image page, e.g. More... | |
Protected Member Functions inherited from Article | |
fetchContentObject () | |
Get text content object Does NOT follow redirects. More... | |
showCssOrJsPage ( $showCacheHint=true) | |
Show a page view for a page formatted as CSS or JavaScript. More... | |
tryFileCache () | |
checkLastModified returns true if it has taken care of all output to the client that is necessary for this request. More... | |
Private Member Functions | |
makeSizeLink ( $params, $width, $height) | |
Creates an thumbnail of specified size and returns an HTML link to it. More... | |
Private Attributes | |
File | $displayImg |
$fileLoaded | |
FileRepo | $repo |
Additional Inherited Members | |
Protected Attributes inherited from Article | |
IContextSource | $mContext |
The context this Article is executed in $mContext. More... | |
WikiPage | $mPage |
The WikiPage object of this instance $mPage. More... | |
Class for viewing MediaWiki file description pages.
Definition at line 28 of file ImagePage.php.
|
protected |
Definition at line 701 of file ImagePage.php.
Referenced by view().
|
protected |
Callback for usort() to do link sorts by (namespace, title) Function copied from Title::compare()
$a | object page to compare with |
$b | object page to compare with |
Definition at line 930 of file ImagePage.php.
ImagePage::delete | ( | ) |
Delete the file, or an earlier version of it.
Reimplemented from Article.
Definition at line 896 of file ImagePage.php.
References $file.
|
protected |
Output a drop-down box for language options for the file.
Array | $langChoices | Array of string language codes |
String | $curLang | Language code file is being viewed in. |
String | $defaultLang | Language code that image is rendered in by default |
Definition at line 974 of file ImagePage.php.
References $name, array(), as, Language\fetchLanguageName(), Article\getContext(), Article\getTitle(), global, Html\hidden(), Xml\option(), Html\rawElement(), Xml\submitButton(), text, wfBCP47(), and wfMessage().
Referenced by openShowImage().
ImagePage::getContentObject | ( | ) |
Overloading Article's getContentObject method.
Omit noarticletext if sharedupload; text will be fetched from the shared upload server if possible.
Reimplemented from Article.
Definition at line 283 of file ImagePage.php.
References loadFile().
ImagePage::getDisplayedFile | ( | ) |
ImagePage::getImageLimitsFromOption | ( | $user, | |
$optionName | |||
) |
Returns the corresponding $wgImageLimits entry for the selected user option.
$user | User | |
string | $optionName | Name of a option to check, typically imagesize or thumbsize |
Definition at line 946 of file ImagePage.php.
References $user, array(), User\getDefaultOption(), and global.
Referenced by openShowImage().
ImagePage::getUploadUrl | ( | ) |
Definition at line 661 of file ImagePage.php.
References array(), SpecialPage\getTitleFor(), and loadFile().
Referenced by uploadLinksBox().
|
protected |
Definition at line 861 of file ImagePage.php.
References $file, $link, $out, as, Article\getContext(), Article\getTitle(), Linker\linkKnown(), loadFile(), Linker\makeExternalLink(), text, and wfMessage().
Referenced by view().
|
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 707 of file ImagePage.php.
References $out, Article\getContext(), loadFile(), and uploadLinksBox().
Referenced by view().
|
protected |
Definition at line 740 of file ImagePage.php.
References $count, $limit, $link, $out, $query, $res, $ul, array(), as, Html\closeElement(), Article\getContext(), Article\getTitle(), Linker\linkKnown(), Title\makeTitle(), Html\openElement(), queryImageLinks(), Html\rawElement(), and wfMessage().
Referenced by view().
|
protected |
Definition at line 71 of file ImagePage.php.
References array(), Article\getTitle(), wfFindFile(), wfLocalFile(), and wfRunHooks().
Referenced by getContentObject(), getDisplayedFile(), getUploadUrl(), imageDupes(), imageHistory(), openShowImage(), printSharedImageText(), uploadLinksBox(), and view().
|
protected |
Make a table with metadata to be shown in the output page.
array | $metadata | the array containing the Exif data |
Definition at line 254 of file ImagePage.php.
References $type, as, Sanitizer\escapeId(), and wfMessage().
Referenced by view().
|
private |
Creates an thumbnail of specified size and returns an HTML link to it.
array | $params | Scaler parameters |
$width | int | |
$height | int |
Definition at line 614 of file ImagePage.php.
References $params, array(), Html\rawElement(), and wfMessage().
Referenced by openShowImage().
|
static |
Constructor from a page id.
int | $id | article ID to load |
Reimplemented from Article.
Definition at line 54 of file ImagePage.php.
References $t, and Title\newFromID().
|
protected |
$title | Title |
Reimplemented from Article.
Definition at line 44 of file ImagePage.php.
References $title.
|
protected |
Definition at line 291 of file ImagePage.php.
References $count, $ext, $link, $options, $out, $params, $size, $user, array(), as, Xml\closeElement(), doRenderLangOpt(), Article\getContext(), getImageLimitsFromOption(), Article\getTitle(), SpecialPage\getTitleFor(), global, Html\hidden(), Linker\linkKnown(), loadFile(), makeSizeLink(), Linker\makeThumbLinkObj(), Xml\openElement(), Xml\option(), printSharedImageText(), Linker\processResponsiveImages(), Html\rawElement(), LogEventsList\showLogExtract(), Xml\submitButton(), Xml\tags(), text, wfEscapeWikiText(), wfMessage(), wfMessageFallback(), and wfRunHooks().
Referenced by view().
|
protected |
Show a notice that the file is from a shared repository.
Definition at line 633 of file ImagePage.php.
References $out, $repo, array(), Article\getContext(), FileRepo\getDisplayName(), loadFile(), and wfMessage().
Referenced by openShowImage().
|
protected |
$target | |
$limit |
Definition at line 728 of file ImagePage.php.
References $dbr, $limit, array(), DB_SLAVE, and wfGetDB().
Referenced by imageLinks().
ImagePage::render | ( | ) |
Handler for action=render Include body text only; none of the image extras.
Reimplemented from Article.
Definition at line 96 of file ImagePage.php.
References Article\getContext(), and view().
ImagePage::setFile | ( | $file | ) |
ImagePage::showError | ( | $description | ) |
Display an error with a wikitext description.
$description | String |
Definition at line 913 of file ImagePage.php.
References $out, Article\getContext(), and wfMessage().
|
protected |
Create the TOC.
$metadata | Boolean: whether or not to show the metadata link |
Definition at line 231 of file ImagePage.php.
References array(), wfMessage(), and wfRunHooks().
Referenced by view().
|
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 674 of file ImagePage.php.
References $out, Article\getContext(), Article\getTitle(), getUploadUrl(), global, loadFile(), Linker\makeExternalLink(), text, UploadBase\userCanReUpload(), and wfMessage().
Referenced by imageHistory().
ImagePage::view | ( | ) |
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.
References $css, $html, $out, array(), Xml\closeElement(), closeShowImage(), Xml\element(), Article\getContext(), Article\getOldID(), Article\getTitle(), global, imageDupes(), imageHistory(), imageLinks(), loadFile(), makeMetadataTable(), Title\makeTitle(), NS_FILE, Xml\openElement(), openShowImage(), showTOC(), text, view(), Article\viewRedirect(), wfMessage(), and wfRunHooks().
|
private |
Definition at line 32 of file ImagePage.php.
Referenced by getDisplayedFile().
|
private |
Definition at line 36 of file ImagePage.php.
ImagePage::$mExtraDescription = false |
Definition at line 38 of file ImagePage.php.
|
private |
Definition at line 35 of file ImagePage.php.
Referenced by printSharedImageText().