MediaWiki
1.27.4
|
Class for viewing MediaWiki article and history. More...
Public Member Functions | |
__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... | |
addHelpLink ($to, $overrideBaseUrl=false) | |
Adds help link with an icon via page indicators. More... | |
adjustDisplayTitle (ParserOutput $pOutput) | |
Adjust title for pages with displaytitle, -{T|}- or language conversion. More... | |
checkFlags ($flags) | |
Call to WikiPage function for backwards compatibility. More... | |
checkTouched () | |
Call to WikiPage function for backwards compatibility. More... | |
clear () | |
Clear the object. More... | |
clearPreparedEdit () | |
Call to WikiPage function for backwards compatibility. More... | |
commitRollback ($fromP, $summary, $bot, &$resultDetails, User $guser=null) | |
confirmDelete ($reason) | |
Output deletion confirmation dialog. More... | |
delete () | |
UI entry point for page deletion. More... | |
doDelete ($reason, $suppress=false) | |
Perform a deletion and output success or failure messages. More... | |
doDeleteArticle ($reason, $suppress=false, $u1=null, $u2=null, &$error= '') | |
doDeleteArticleReal ($reason, $suppress=false, $u1=null, $u2=null, &$error= '', User $user=null) | |
Call to WikiPage function for backwards compatibility. More... | |
doDeleteUpdates ($id, Content $content=null) | |
Call to WikiPage function for backwards compatibility. More... | |
doEdit ($text, $summary, $flags=0, $baseRevId=false, $user=null) | |
Call to WikiPage function for backwards compatibility. More... | |
doEditContent (Content $content, $summary, $flags=0, $baseRevId=false, User $user=null, $serialFormat=null) | |
Call to WikiPage function for backwards compatibility. More... | |
doEditUpdates (Revision $revision, User $user, array $options=[]) | |
Call to WikiPage function for backwards compatibility. More... | |
doPurge () | |
Call to WikiPage function for backwards compatibility. More... | |
doQuickEditContent (Content $content, User $user, $comment= '', $minor=false, $serialFormat=null) | |
Call to WikiPage function for backwards compatibility. More... | |
doRollback ($fromP, $summary, $token, $bot, &$resultDetails, User $user=null) | |
doUpdateRestrictions (array $limit, array $expiry, &$cascade, $reason, User $user) | |
doViewUpdates (User $user, $oldid=0) | |
Call to WikiPage function for backwards compatibility. More... | |
exists () | |
Call to WikiPage function for backwards compatibility. More... | |
fetchContent () | |
Get text of an article from database Does NOT follow redirects. More... | |
followRedirect () | |
Call to WikiPage function for backwards compatibility. More... | |
generateReason (&$hasHistory) | |
getActionOverrides () | |
Call to WikiPage function for backwards compatibility. More... | |
getAutoDeleteReason (&$hasHistory) | |
Call to WikiPage function for backwards compatibility. More... | |
getCategories () | |
Call to WikiPage function for backwards compatibility. More... | |
getComment ($audience=Revision::FOR_PUBLIC, User $user=null) | |
Call to WikiPage function for backwards compatibility. More... | |
getContent () | |
Note that getContent does not follow redirects anymore. More... | |
getContentHandler () | |
Call to WikiPage function for backwards compatibility. More... | |
getContentModel () | |
Call to WikiPage function for backwards compatibility. More... | |
getContext () | |
Gets the context this Article is executed in. More... | |
getContributors () | |
Call to WikiPage function for backwards compatibility. More... | |
getCreator ($audience=Revision::FOR_PUBLIC, User $user=null) | |
Call to WikiPage function for backwards compatibility. More... | |
getDeletionUpdates (Content $content=null) | |
Call to WikiPage function for backwards compatibility. More... | |
getHiddenCategories () | |
Call to WikiPage function for backwards compatibility. More... | |
getId () | |
Call to WikiPage function for backwards compatibility. More... | |
getLatest () | |
Call to WikiPage function for backwards compatibility. More... | |
getLinksTimestamp () | |
Call to WikiPage function for backwards compatibility. More... | |
getMinorEdit () | |
Call to WikiPage function for backwards compatibility. More... | |
getOldestRevision () | |
Call to WikiPage function for backwards compatibility. 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... | |
getRedirectTarget () | |
Call to WikiPage function for backwards compatibility. More... | |
getRedirectURL ($rt) | |
Call to WikiPage function for backwards compatibility. More... | |
getRevIdFetched () | |
Use this to fetch the rev ID used on page views. More... | |
getRevision () | |
Call to WikiPage function for backwards compatibility. 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... | |
getText ($audience=Revision::FOR_PUBLIC, User $user=null) | |
Call to WikiPage function for backwards compatibility. More... | |
getTimestamp () | |
Call to WikiPage function for backwards compatibility. More... | |
getTitle () | |
Get the title object of the article. More... | |
getTouched () | |
Call to WikiPage function for backwards compatibility. More... | |
getUndoContent (Revision $undo, Revision $undoafter=null) | |
Call to WikiPage function for backwards compatibility. More... | |
getUser ($audience=Revision::FOR_PUBLIC, User $user=null) | |
Call to WikiPage function for backwards compatibility. More... | |
getUserText ($audience=Revision::FOR_PUBLIC, User $user=null) | |
Call to WikiPage function for backwards compatibility. More... | |
hasViewableContent () | |
Call to WikiPage function for backwards compatibility. More... | |
insertOn ($dbw, $pageId=null) | |
Call to WikiPage function for backwards compatibility. More... | |
insertProtectNullRevision ($revCommentMsg, array $limit, array $expiry, $cascade, $reason, $user=null) | |
Call to WikiPage function for backwards compatibility. More... | |
insertRedirect () | |
Call to WikiPage function for backwards compatibility. More... | |
insertRedirectEntry (Title $rt, $oldLatest=null) | |
Call to WikiPage function for backwards compatibility. More... | |
isCountable ($editInfo=false) | |
Call to WikiPage function for backwards compatibility. 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... | |
isRedirect () | |
Call to WikiPage function for backwards compatibility. More... | |
loadFromRow ($data, $from) | |
Call to WikiPage function for backwards compatibility. More... | |
loadPageData ($from= 'fromdb') | |
Call to WikiPage function for backwards compatibility. More... | |
lockAndGetLatest () | |
Call to WikiPage function for backwards compatibility. More... | |
makeParserOptions ($context) | |
Call to WikiPage function for backwards compatibility. More... | |
pageDataFromId ($dbr, $id, $options=[]) | |
Call to WikiPage function for backwards compatibility. More... | |
pageDataFromTitle ($dbr, $title, $options=[]) | |
Call to WikiPage function for backwards compatibility. More... | |
prepareContentForEdit (Content $content, $revision=null, User $user=null, $serialFormat=null, $useCache=true) | |
Call to WikiPage function for backwards compatibility. More... | |
prepareTextForEdit ($text, $revid=null, User $user=null) | |
Call to WikiPage function for backwards compatibility. More... | |
protect () | |
action=protect handler More... | |
protectDescription (array $limit, array $expiry) | |
Call to WikiPage function for backwards compatibility. More... | |
protectDescriptionLog (array $limit, array $expiry) | |
Call to WikiPage function for backwards compatibility. More... | |
render () | |
Handle action=render. More... | |
replaceSectionAtRev ($sectionId, Content $sectionContent, $sectionTitle= '', $baseRevId=null) | |
Call to WikiPage function for backwards compatibility. More... | |
replaceSectionContent ($sectionId, Content $sectionContent, $sectionTitle= '', $edittime=null) | |
Call to WikiPage function for backwards compatibility. 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... | |
setTimestamp ($ts) | |
Call to WikiPage function for backwards compatibility. More... | |
shouldCheckParserCache (ParserOptions $parserOptions, $oldId) | |
Call to WikiPage function for backwards compatibility. More... | |
showDeletedRevisionHeader () | |
If the revision requested for view is deleted, check permissions. 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... | |
supportsSections () | |
Call to WikiPage function for backwards compatibility. More... | |
triggerOpportunisticLinksUpdate (ParserOutput $parserOutput) | |
Call to WikiPage function for backwards compatibility. More... | |
unprotect () | |
action=unprotect handler (alias) More... | |
updateCategoryCounts (array $added, array $deleted) | |
Call to WikiPage function for backwards compatibility. More... | |
updateIfNewerOn ($dbw, $revision) | |
Call to WikiPage function for backwards compatibility. More... | |
updateRedirectOn ($dbw, $redirectTitle, $lastRevIsRedirect=null) | |
Call to WikiPage function for backwards compatibility. More... | |
updateRestrictions ($limit=[], $reason= '', &$cascade=0, $expiry=[]) | |
updateRevisionOn ($dbw, $revision, $lastRevision=null, $lastRevIsRedirect=null) | |
Call to WikiPage function for backwards compatibility. More... | |
view () | |
This is the default action of the index.php entry point: just view the page of the given title. More... | |
viewRedirect ($target, $appendSubtitle=true, $forceKnown=false) | |
Return the HTML for the top of a redirect page. More... | |
Static Public Member Functions | |
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 | getRedirectHeaderHtml (Language $lang, $target, $forceKnown=false) |
Return the HTML for the top of a redirect page. More... | |
static | newFromID ($id) |
Constructor from a page id. More... | |
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 | purgePatrolFooterCache ($articleID) |
Purge the cache used to check if it is worth showing the patrol footer For example, it is done during re-uploads when file patrol is used. More... | |
static | selectFields () |
Public Attributes | |
string | $mContent |
Text of the revision we are working on. More... | |
bool | $mContentLoaded = false |
Is the content ($mContent) already loaded? More... | |
Content | $mContentObject |
Content of the revision we are working on. More... | |
int null | $mOldId |
The oldid of the article that is to be shown, 0 for the current revision. More... | |
ParserOptions | $mParserOptions |
ParserOptions object for $wgUser articles. More... | |
ParserOutput | $mParserOutput |
Title | $mRedirectedFrom = null |
Title from which we were redirected here. More... | |
string bool | $mRedirectUrl = false |
URL to redirect to or false if none. More... | |
int | $mRevIdFetched = 0 |
Revision ID of revision we are working on. More... | |
Revision | $mRevision = null |
Revision we are working on. More... | |
Protected Member Functions | |
fetchContentObject () | |
Get text content object Does NOT follow redirects. More... | |
getContentObject () | |
Returns a Content object representing the pages effective display content, not necessarily the revision's content! More... | |
newPage (Title $title) | |
showCssOrJsPage ($showCacheHint=true) | |
Show a page view for a page formatted as CSS or JavaScript. More... | |
showDiffPage () | |
Show a diff page according to current request variables. More... | |
tryFileCache () | |
checkLastModified returns true if it has taken care of all output to the client that is necessary for this request. More... | |
Protected Attributes | |
IContextSource | $mContext |
The context this Article is executed in. More... | |
WikiPage | $mPage |
The WikiPage object of this instance. More... | |
Class for viewing MediaWiki article and history.
This maintains WikiPage functions for backwards compatibility.
See design.txt for an overview. Note: edit user interface and cache support functions have been moved to separate EditPage and HTMLFileCache classes.
Definition at line 34 of file Article.php.
Article::__construct | ( | Title | $title, |
$oldId = null |
|||
) |
Article::__get | ( | $fname | ) |
Use PHP's magic __get handler to handle accessing of raw WikiPage fields for backwards compatibility.
string | $fname | Field name |
Definition at line 2076 of file Article.php.
References $fname.
Article::__set | ( | $fname, | |
$fvalue | |||
) |
Use PHP's magic __set handler to handle setting of raw WikiPage fields for backwards compatibility.
string | $fname | Field name |
mixed | $fvalue | New value |
Definition at line 2091 of file Article.php.
References $fname.
Article::addHelpLink | ( | $to, | |
$overrideBaseUrl = false |
|||
) |
Adds help link with an icon via page indicators.
Link target can be overridden by a local message containing a wikilink: the message key is: 'namespace-' + namespace number + '-helppage'.
string | $to | Target MediaWiki.org page title or encoded URL. |
bool | $overrideBaseUrl | Whether $url is a full URL, to avoid MW.o. |
Definition at line 1611 of file Article.php.
References $out, getContext(), getTitle(), Skin\makeUrl(), and wfMessage().
Referenced by CategoryPage\closeShowCategory().
Article::adjustDisplayTitle | ( | ParserOutput | $pOutput | ) |
Adjust title for pages with displaytitle, -{T|}- or language conversion.
ParserOutput | $pOutput |
Definition at line 747 of file Article.php.
References getContext(), and ParserOutput\getTitleText().
Referenced by view().
Article::checkFlags | ( | $flags | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2107 of file Article.php.
References $flags.
Article::checkTouched | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2115 of file Article.php.
Article::clear | ( | ) |
Article::clearPreparedEdit | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2123 of file Article.php.
Article::commitRollback | ( | $fromP, | |
$summary, | |||
$bot, | |||
& | $resultDetails, | ||
User | $guser = null |
||
) |
string | $fromP | |
string | $summary | |
bool | $bot | |
array | $resultDetails | |
User | null | $guser |
Definition at line 2720 of file Article.php.
References $summary, and getContext().
Article::confirmDelete | ( | $reason | ) |
Output deletion confirmation dialog.
string | $reason | Prefilled reason |
Definition at line 1781 of file Article.php.
References $link, $title, $user, Xml\checkLabel(), Xml\closeElement(), Html\closeElement(), Xml\element(), Html\element(), getContext(), getTitle(), Html\hidden(), Html\input(), Html\label(), Linker\linkKnown(), Xml\listDropDown(), Html\openElement(), Hooks\run(), LogEventsList\showLogExtract(), Xml\submitButton(), text, wfDebug(), and wfMessage().
Referenced by delete().
Article::delete | ( | ) |
UI entry point for page deletion.
Definition at line 1653 of file Article.php.
References $context, $dbr, $e, $request, $title, $user, confirmDelete(), DB_SLAVE, doDelete(), WatchAction\doWatchOrUnwatch(), Xml\element(), generateReason(), getContext(), getTitle(), global, Linker\linkKnown(), IDBAccessObject\READ_LATEST, IDBAccessObject\READ_NORMAL, LogEventsList\showLogExtract(), wfDebug(), wfEscapeWikiText(), wfGetDB(), wfMessage(), and wfReadOnly().
Article::doDelete | ( | $reason, | |
$suppress = false |
|||
) |
Perform a deletion and output success or failure messages.
string | $reason | |
bool | $suppress |
Definition at line 1891 of file Article.php.
References $context, $status, $user, Xml\element(), getContext(), getTitle(), Hooks\run(), LogEventsList\showLogExtract(), wfEscapeWikiText(), and wfMessage().
Referenced by delete().
Article::doDeleteArticle | ( | $reason, | |
$suppress = false , |
|||
$u1 = null , |
|||
$u2 = null , |
|||
& | $error = '' |
||
) |
string | $reason | |
bool | $suppress | |
int | $u1 | Unused |
bool | $u2 | Unused |
string | $error |
Definition at line 2692 of file Article.php.
Article::doDeleteArticleReal | ( | $reason, | |
$suppress = false , |
|||
$u1 = null , |
|||
$u2 = null , |
|||
& | $error = '' , |
||
User | $user = null |
||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2131 of file Article.php.
References $user.
Article::doDeleteUpdates | ( | $id, | |
Content | $content = null |
||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2143 of file Article.php.
References $content.
Article::doEdit | ( | $text, | |
$summary, | |||
$flags = 0 , |
|||
$baseRevId = false , |
|||
$user = null |
|||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2151 of file Article.php.
References $flags, $summary, $user, and ContentHandler\deprecated().
Article::doEditContent | ( | Content | $content, |
$summary, | |||
$flags = 0 , |
|||
$baseRevId = false , |
|||
User | $user = null , |
||
$serialFormat = null |
|||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2160 of file Article.php.
Call to WikiPage function for backwards compatibility.
Definition at line 2172 of file Article.php.
References $options.
Article::doPurge | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2180 of file Article.php.
Article::doQuickEditContent | ( | Content | $content, |
User | $user, | ||
$comment = '' , |
|||
$minor = false , |
|||
$serialFormat = null |
|||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2188 of file Article.php.
References $comment.
Article::doRollback | ( | $fromP, | |
$summary, | |||
$token, | |||
$bot, | |||
& | $resultDetails, | ||
User | $user = null |
||
) |
string | $fromP | |
string | $summary | |
string | $token | |
bool | $bot | |
array | $resultDetails | |
User | null | $user |
Definition at line 2707 of file Article.php.
References $summary, $user, and getContext().
array | $limit | |
array | $expiry | |
bool | $cascade | |
string | $reason | |
User | $user |
Definition at line 2659 of file Article.php.
Article::doViewUpdates | ( | User | $user, |
$oldid = 0 |
|||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2200 of file Article.php.
Article::exists | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2208 of file Article.php.
Article::fetchContent | ( | ) |
Get text of an article from database Does NOT follow redirects.
Definition at line 326 of file Article.php.
References $content, $mContent, ContentHandler\deprecated(), fetchContentObject(), ContentHandler\getContentText(), and ContentHandler\runLegacyHooks().
|
protected |
Get text content object Does NOT follow redirects.
Definition at line 363 of file Article.php.
References $content, $mContentObject, Revision\FOR_THIS_USER, getContext(), getOldID(), getTitle(), getUser(), Revision\newFromId(), Hooks\run(), and wfDebug().
Referenced by fetchContent(), getContentObject(), getRevisionFetched(), showCssOrJsPage(), and view().
Article::followRedirect | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2216 of file Article.php.
|
static |
Converts a String robot policy into an associative array, to allow merging of several policies using array_merge().
array | string | $policy | Returns empty array on null/false/'', transparent to already-converted arrays, converts string. |
Definition at line 930 of file Article.php.
References as.
Referenced by OutputPage\setRobotPolicy().
Article::generateReason | ( | & | $hasHistory | ) |
bool | $hasHistory |
Definition at line 2729 of file Article.php.
References $handler, $title, and ContentHandler\getForTitle().
Referenced by delete().
Article::getActionOverrides | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2224 of file Article.php.
Article::getAutoDeleteReason | ( | & | $hasHistory | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2232 of file Article.php.
|
static |
string | $oldtext | |
string | $newtext | |
int | $flags |
Definition at line 2782 of file Article.php.
References $flags, and WikiPage\getAutosummary().
Referenced by ArticleTest\testStaticFunctions().
Article::getCategories | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2240 of file Article.php.
Article::getComment | ( | $audience = Revision::FOR_PUBLIC , |
|
User | $user = null |
||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2248 of file Article.php.
References $user.
Article::getContent | ( | ) |
Note that getContent does not follow redirects anymore.
If you need to fetch redirectable content easily, try the shortcut in WikiPage::getRedirectTarget()
This function has side effects! Do not use this function if you only want the real revision text if any.
Definition at line 205 of file Article.php.
References $content, ContentHandler\deprecated(), getContentObject(), and ContentHandler\getContentText().
Article::getContentHandler | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2256 of file Article.php.
Article::getContentModel | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2264 of file Article.php.
|
protected |
Returns a Content object representing the pages effective display content, not necessarily the revision's content!
Note that getContent does not follow redirects anymore. If you need to fetch redirectable content easily, try the shortcut in WikiPage::getRedirectTarget()
This function has side effects! Do not use this function if you only want the real revision text if any.
Definition at line 226 of file Article.php.
References $content, $mContentObject, fetchContentObject(), getContext(), getTitle(), ContentHandler\makeContent(), and NS_MEDIAWIKI.
Referenced by getContent(), showMissingArticle(), and view().
Article::getContext | ( | ) |
Gets the context this Article is executed in.
Definition at line 2059 of file Article.php.
References $mContext, RequestContext\getMain(), and wfDebug().
Referenced by ImageHistoryList\__construct(), ProtectionForm\__construct(), addHelpLink(), adjustDisplayTitle(), CategoryPage\closeShowCategory(), commitRollback(), confirmDelete(), delete(), doDelete(), ImagePage\doRenderLangOpt(), doRollback(), fetchContentObject(), getContentObject(), getOldIDFromRequest(), getParserOptions(), getRobotPolicy(), ImagePage\getThumbPrevText(), ImagePage\getThumbSizes(), ImagePage\imageDupes(), ImagePage\imageHistory(), ImagePage\imageLinks(), isFileCacheable(), ImagePage\makeMetadataTable(), ImagePage\makeSizeLink(), ImagePage\openShowImage(), ImagePage\printSharedImageText(), ImagePage\render(), render(), setOldSubtitle(), showCssOrJsPage(), showDeletedRevisionHeader(), showDiffPage(), ImagePage\showError(), showMissingArticle(), showNamespaceHeader(), showPatrolFooter(), showRedirectedFromHeader(), ImagePage\showTOC(), showViewFooter(), tryFileCache(), updateRestrictions(), ImagePage\uploadLinksBox(), CategoryPage\view(), ImagePage\view(), view(), and viewRedirect().
Article::getContributors | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2272 of file Article.php.
Article::getCreator | ( | $audience = Revision::FOR_PUBLIC , |
|
User | $user = null |
||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2280 of file Article.php.
References $user.
Article::getDeletionUpdates | ( | Content | $content = null | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2288 of file Article.php.
References $content.
Article::getHiddenCategories | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2296 of file Article.php.
Article::getId | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2304 of file Article.php.
Referenced by ImagePage\getContentObject(), and ImagePage\openShowImage().
Article::getLatest | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2312 of file Article.php.
Article::getLinksTimestamp | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2320 of file Article.php.
Article::getMinorEdit | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2328 of file Article.php.
Article::getOldestRevision | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2336 of file Article.php.
Article::getOldID | ( | ) |
Definition at line 253 of file Article.php.
References $mOldId, and getOldIDFromRequest().
Referenced by fetchContentObject(), getRobotPolicy(), isCurrent(), showDeletedRevisionHeader(), showDiffPage(), showMissingArticle(), ImagePage\view(), and view().
Article::getOldIDFromRequest | ( | ) |
Sets $this->mRedirectUrl to a correct URL if the query parameters are incorrect.
Definition at line 266 of file Article.php.
References $request, getContext(), getTitle(), and Revision\newFromId().
Referenced by getOldID().
Article::getPage | ( | ) |
Get the WikiPage object of this instance.
Definition at line 176 of file Article.php.
References $mPage.
Referenced by ImageHistoryList\__construct(), EditPage\__construct(), and view().
Article::getParserOptions | ( | ) |
Get parser options suitable for rendering the primary article wikitext.
Definition at line 2035 of file Article.php.
References $mParserOptions, and getContext().
Referenced by getParserOutput(), and view().
Article::getParserOutput | ( | $oldid = null , |
|
User | $user = null |
||
) |
#@-
Lightweight method to get the parser output for a page, checking the parser cache and so on. Doesn't consider most of the stuff that WikiPage::view is forced to consider, so it's not appropriate to use there.
Definition at line 2004 of file Article.php.
References $user, and getParserOptions().
Referenced by showMissingArticle().
Return the HTML for the top of a redirect page.
Chances are you should just be using the ParserOutput from WikitextContent::getParserOutput instead of calling this for redirects.
Language | $lang | |
Title | array | $target | Destination(s) to redirect |
bool | $forceKnown | Should the image be shown as a bluelink regardless of existence? |
Definition at line 1576 of file Article.php.
References $html, $title, as, Linker\link(), and wfMessage().
Referenced by WikitextContent\fillParserOutput().
Article::getRedirectTarget | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2344 of file Article.php.
Article::getRedirectURL | ( | $rt | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2352 of file Article.php.
Article::getRevIdFetched | ( | ) |
Use this to fetch the rev ID used on page views.
Definition at line 462 of file Article.php.
References $mRevIdFetched.
Referenced by view().
Article::getRevision | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2360 of file Article.php.
Article::getRevisionFetched | ( | ) |
Get the fetched Revision object depending on request parameters or null on failure.
Definition at line 451 of file Article.php.
References $mRevision, and fetchContentObject().
Referenced by showDiffPage().
Article::getRobotPolicy | ( | $action, | |
$pOutput = null |
|||
) |
Get the robot policy to be used for the current view.
string | $action | The action= GET parameter |
ParserOutput | null | $pOutput |
Definition at line 850 of file Article.php.
References getContext(), getOldID(), getTitle(), global, IP\isValid(), Block\newFromTarget(), NS_USER, and NS_USER_TALK.
Referenced by showMissingArticle(), and view().
Article::getText | ( | $audience = Revision::FOR_PUBLIC , |
|
User | $user = null |
||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2368 of file Article.php.
References $user, and ContentHandler\deprecated().
Referenced by showViewFooter().
Article::getTimestamp | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2377 of file Article.php.
Article::getTitle | ( | ) |
Get the title object of the article.
Definition at line 166 of file Article.php.
Referenced by ImageHistoryList\__construct(), ProtectionForm\__construct(), EditPage\__construct(), addHelpLink(), CategoryPage\closeShowCategory(), confirmDelete(), delete(), doDelete(), ImagePage\doRenderLangOpt(), fetchContentObject(), getContentObject(), getOldIDFromRequest(), getRobotPolicy(), ImagePage\imageDupes(), ImagePage\imageLinks(), isFileCacheable(), ImagePage\loadFile(), ImagePage\openShowImage(), setOldSubtitle(), showCssOrJsPage(), showDeletedRevisionHeader(), showMissingArticle(), showNamespaceHeader(), showPatrolFooter(), showRedirectedFromHeader(), showViewFooter(), tryFileCache(), ImagePage\uploadLinksBox(), CategoryPage\view(), ImagePage\view(), view(), and viewRedirect().
Article::getTouched | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2385 of file Article.php.
Call to WikiPage function for backwards compatibility.
Definition at line 2393 of file Article.php.
Article::getUser | ( | $audience = Revision::FOR_PUBLIC , |
|
User | $user = null |
||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2401 of file Article.php.
References $user.
Referenced by fetchContentObject(), ImagePage\getThumbSizes(), updateRestrictions(), ImagePage\uploadLinksBox(), CategoryPage\view(), and ImagePage\view().
Article::getUserText | ( | $audience = Revision::FOR_PUBLIC , |
|
User | $user = null |
||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2409 of file Article.php.
References $user.
Article::hasViewableContent | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2417 of file Article.php.
Article::insertOn | ( | $dbw, | |
$pageId = null |
|||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2425 of file Article.php.
Article::insertProtectNullRevision | ( | $revCommentMsg, | |
array | $limit, | ||
array | $expiry, | ||
$cascade, | |||
$reason, | |||
$user = null |
|||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2433 of file Article.php.
References $user.
Article::insertRedirect | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2445 of file Article.php.
Article::insertRedirectEntry | ( | Title | $rt, |
$oldLatest = null |
|||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2453 of file Article.php.
Article::isCountable | ( | $editInfo = false | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2461 of file Article.php.
Article::isCurrent | ( | ) |
Returns true if the currently-referenced revision is the current edit to this page (and it exists).
Definition at line 435 of file Article.php.
References getOldID().
Referenced by view().
Article::isFileCacheable | ( | ) |
Check if the page can be cached.
Definition at line 1974 of file Article.php.
References getContext(), getTitle(), Hooks\run(), and HTMLFileCache\useFileCache().
Referenced by tryFileCache().
Article::isRedirect | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2469 of file Article.php.
Referenced by showRedirectedFromHeader().
Article::loadFromRow | ( | $data, | |
$from | |||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2477 of file Article.php.
References $from.
Article::loadPageData | ( | $from = 'fromdb' | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2485 of file Article.php.
References $from.
Article::lockAndGetLatest | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2493 of file Article.php.
Article::makeParserOptions | ( | $context | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2501 of file Article.php.
References $context.
|
static |
Constructor from a page id.
int | $id | Article ID to load |
Definition at line 100 of file Article.php.
References $t, and Title\newFromID().
|
static |
Create an Article object of the appropriate class for the given page.
Title | $title | |
IContextSource | $context |
Definition at line 114 of file Article.php.
References $page, $title, Title\makeTitle(), NS_CATEGORY, NS_FILE, NS_MEDIA, and Hooks\run().
Referenced by ApiParse\execute(), and RebuildFileCache\execute().
|
static |
Create an Article object of the appropriate class for the given page.
WikiPage | $page | |
IContextSource | $context |
Definition at line 146 of file Article.php.
References $article, $context, $page, and WikiPage\getTitle().
Referenced by ApiEditPage\execute(), and MediaWiki\initializeArticle().
|
protected |
Title | $title |
Definition at line 91 of file Article.php.
Referenced by __construct().
|
static |
Title | $title |
Definition at line 2750 of file Article.php.
References $title, WikiPage\onArticleCreate(), and wfDeprecated().
|
static |
Title | $title |
Definition at line 2760 of file Article.php.
References $title, WikiPage\onArticleDelete(), and wfDeprecated().
|
static |
Title | $title |
Definition at line 2770 of file Article.php.
References $title, WikiPage\onArticleEdit(), and wfDeprecated().
Article::pageDataFromId | ( | $dbr, | |
$id, | |||
$options = [] |
|||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2509 of file Article.php.
Article::pageDataFromTitle | ( | $dbr, | |
$title, | |||
$options = [] |
|||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2517 of file Article.php.
Article::prepareContentForEdit | ( | Content | $content, |
$revision = null , |
|||
User | $user = null , |
||
$serialFormat = null , |
|||
$useCache = true |
|||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2525 of file Article.php.
References $user.
Article::prepareTextForEdit | ( | $text, | |
$revid = null , |
|||
User | $user = null |
||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2539 of file Article.php.
References $user.
Article::protect | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2547 of file Article.php.
Call to WikiPage function for backwards compatibility.
Definition at line 2555 of file Article.php.
|
static |
Purge the cache used to check if it is worth showing the patrol footer For example, it is done during re-uploads when file patrol is used.
int | $articleID | ID of the article to purge |
Definition at line 1243 of file Article.php.
References $cache, ObjectCache\getMainWANInstance(), and wfMemcKey().
Referenced by LocalFile\recordUpload2().
Article::render | ( | ) |
Handle action=render.
Definition at line 1628 of file Article.php.
References getContext(), and view().
Article::replaceSectionAtRev | ( | $sectionId, | |
Content | $sectionContent, | ||
$sectionTitle = '' , |
|||
$baseRevId = null |
|||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2563 of file Article.php.
Article::replaceSectionContent | ( | $sectionId, | |
Content | $sectionContent, | ||
$sectionTitle = '' , |
|||
$edittime = null |
|||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2575 of file Article.php.
|
static |
Definition at line 2740 of file Article.php.
References WikiPage\selectFields(), and wfDeprecated().
Referenced by ArticleTest\testStaticFunctions().
Article::setContext | ( | $context | ) |
Sets the context this Article is executed in.
IContextSource | $context |
Definition at line 2049 of file Article.php.
References $context.
Article::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 -\>
int | $oldid | Revision ID of this article revision |
Definition at line 1417 of file Article.php.
References $context, $mRevision, $timestamp, $unhide, $user, getContext(), Linker\getRevDeleteLink(), getTitle(), Linker\linkKnown(), Revision\newFromId(), Linker\revComment(), Linker\revUserTools(), and Hooks\run().
Referenced by view().
Article::setParserOptions | ( | ParserOptions | $options | ) |
Override the ParserOptions used to render the primary article wikitext.
ParserOptions | $options |
MWException | If the parser options where already initialized. |
Definition at line 2022 of file Article.php.
References $options.
Article::setRedirectedFrom | ( | Title | $from | ) |
Tell the page view functions that this view was redirected from another page on the wiki.
Title | $from |
Definition at line 157 of file Article.php.
References $from.
Article::setTimestamp | ( | $ts | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2587 of file Article.php.
Article::shouldCheckParserCache | ( | ParserOptions | $parserOptions, |
$oldId | |||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2595 of file Article.php.
|
protected |
Show a page view for a page formatted as CSS or JavaScript.
To be called by Article::view() only.
This exists mostly to serve the deprecated ShowRawCssJs hook (used to customize these views). It has been replaced by the ContentGetParserOutput hook, which lets you do the same but with more flexibility.
bool | $showCacheHint | Whether to show a message telling the user to clear the browser cache (default: true). |
Definition at line 814 of file Article.php.
References $dir, $lang, fetchContentObject(), getContext(), getTitle(), and ContentHandler\runLegacyHooks().
Referenced by view().
Article::showDeletedRevisionHeader | ( | ) |
If the revision requested for view is deleted, check permissions.
Send either an error message or a warning header to the output.
Definition at line 1374 of file Article.php.
References $link, $user, Revision\DELETED_RESTRICTED, Revision\DELETED_TEXT, getContext(), getOldID(), and getTitle().
Referenced by view().
|
protected |
Show a diff page according to current request variables.
For use within Article::view() only, other callers should use the DifferenceEngine class.
Definition at line 760 of file Article.php.
References $request, $rev, $unhide, $user, getContext(), getOldID(), getRevisionFetched(), list, and wfMessage().
Referenced by view().
Article::showMissingArticle | ( | ) |
Show the error text for a missing article.
For articles in the MediaWiki namespace, show the default message text. To be called from Article::view().
Definition at line 1252 of file Article.php.
References $cache, $dir, $key, $lang, $title, $user, $wgSend404Code, MWNamespace\getCanonicalName(), getContentObject(), getContext(), ObjectCache\getMainStashInstance(), getOldID(), getParserOutput(), getRobotPolicy(), getTitle(), global, in, User\isIP(), User\newFromName(), Block\newFromTarget(), NS_MEDIAWIKI, NS_USER, NS_USER_TALK, Xml\openElement(), Hooks\run(), LogEventsList\showLogExtract(), Block\TYPE_AUTO, wfEscapeWikiText(), wfMemcKey(), and wfMessage().
Referenced by view().
Article::showNamespaceHeader | ( | ) |
Show a header specific to the namespace currently being viewed, like [[MediaWiki:Talkpagetext]].
For Article::view().
Definition at line 1036 of file Article.php.
References getContext(), getTitle(), and wfMessage().
Referenced by view().
Article::showPatrolFooter | ( | ) |
If patrol is possible, output a patrol UI box.
This is called from the footer section of ordinary page views. If patrol is not possible or not desired, does nothing. Side effect: When the patrol link is build, this method will call OutputPage::preventClickjacking() and load mediawiki.page.patrol.ajax.
Definition at line 1073 of file Article.php.
References $cache, $dbr, $key, $link, $title, $user, DB_SLAVE, getContext(), ObjectCache\getMainWANInstance(), getTitle(), global, RecentChange\isInRCLifespan(), Linker\linkKnown(), RecentChange\newFromConds(), NS_FILE, RC_LOG, wfGetDB(), wfMemcKey(), and wfMessage().
Referenced by showViewFooter().
Article::showRedirectedFromHeader | ( | ) |
If this request is a redirect view, send "redirected from" subtitle to the output.
Returns true if the header was needed, false if this is not a redirect view. Handles both local and remote redirects.
Definition at line 959 of file Article.php.
References $context, $query, $request, $wgRedirectSources, getContext(), getTitle(), global, isRedirect(), Linker\linkKnown(), Linker\makeExternalLink(), and Hooks\run().
Referenced by view().
Article::showViewFooter | ( | ) |
Show the footer section of an ordinary page view.
Definition at line 1050 of file Article.php.
References getContext(), getText(), getTitle(), IP\isValid(), NS_USER_TALK, Hooks\run(), and showPatrolFooter().
Referenced by view().
Article::supportsSections | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2603 of file Article.php.
Article::triggerOpportunisticLinksUpdate | ( | ParserOutput | $parserOutput | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2611 of file Article.php.
|
protected |
checkLastModified returns true if it has taken care of all output to the client that is necessary for this request.
(that is, it has sent a cached version of the page)
Definition at line 1944 of file Article.php.
References $cache, getContext(), getTitle(), isFileCacheable(), and wfDebug().
Referenced by view().
Article::unprotect | ( | ) |
Call to WikiPage function for backwards compatibility.
Definition at line 2619 of file Article.php.
Article::updateIfNewerOn | ( | $dbw, | |
$revision | |||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2627 of file Article.php.
Article::updateRedirectOn | ( | $dbw, | |
$redirectTitle, | |||
$lastRevIsRedirect = null |
|||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2635 of file Article.php.
Article::updateRestrictions | ( | $limit = [] , |
|
$reason = '' , |
|||
& | $cascade = 0 , |
||
$expiry = [] |
|||
) |
array | $limit | |
string | $reason | |
int | $cascade | |
array | $expiry |
Definition at line 2672 of file Article.php.
References $limit, getContext(), and getUser().
Article::updateRevisionOn | ( | $dbw, | |
$revision, | |||
$lastRevision = null , |
|||
$lastRevIsRedirect = null |
|||
) |
Call to WikiPage function for backwards compatibility.
Definition at line 2643 of file Article.php.
Article::view | ( | ) |
This is the default action of the index.php entry point: just view the page of the given title.
Definition at line 474 of file Article.php.
References $content, $timestamp, $title, $titles, $user, $wgUseETag, $wgUseFileCache, adjustDisplayTitle(), as, Title\compare(), fetchContentObject(), Revision\FOR_THIS_USER, getContentObject(), getContext(), getOldID(), getPage(), getParserOptions(), getRevIdFetched(), getRobotPolicy(), getTitle(), global, isCurrent(), Revision\newFromTitle(), Hooks\run(), ContentHandler\runLegacyHooks(), setOldSubtitle(), showCssOrJsPage(), showDeletedRevisionHeader(), showDiffPage(), showMissingArticle(), showNamespaceHeader(), showRedirectedFromHeader(), showViewFooter(), ParserCache\singleton(), text, tryFileCache(), wfDebug(), and wfMessage().
Referenced by render().
Return the HTML for the top of a redirect page.
Chances are you should just be using the ParserOutput from WikitextContent::getParserOutput instead of calling this for redirects.
Title | array | $target | Destination(s) to redirect |
bool | $appendSubtitle | [optional] |
bool | $forceKnown | Should the image be shown as a bluelink regardless of existence? |
Definition at line 1554 of file Article.php.
References $lang, $out, getContext(), getTitle(), and wfMessage().
Referenced by ImagePage\view().
string Article::$mContent |
Text of the revision we are working on.
Definition at line 48 of file Article.php.
Referenced by fetchContent().
bool Article::$mContentLoaded = false |
Is the content ($mContent) already loaded?
Definition at line 57 of file Article.php.
Content Article::$mContentObject |
Content of the revision we are working on.
Definition at line 54 of file Article.php.
Referenced by fetchContentObject(), and getContentObject().
|
protected |
The context this Article is executed in.
Definition at line 36 of file Article.php.
Referenced by getContext().
int null Article::$mOldId |
The oldid of the article that is to be shown, 0 for the current revision.
Definition at line 60 of file Article.php.
Referenced by getOldID().
|
protected |
The WikiPage object of this instance.
Definition at line 39 of file Article.php.
Referenced by getPage().
ParserOptions Article::$mParserOptions |
ParserOptions object for $wgUser articles.
Definition at line 42 of file Article.php.
Referenced by getParserOptions().
ParserOutput Article::$mParserOutput |
Definition at line 75 of file Article.php.
Title Article::$mRedirectedFrom = null |
Title from which we were redirected here.
Definition at line 63 of file Article.php.
URL to redirect to or false if none.
Definition at line 66 of file Article.php.
int Article::$mRevIdFetched = 0 |
Revision ID of revision we are working on.
Definition at line 69 of file Article.php.
Referenced by getRevIdFetched().
Revision Article::$mRevision = null |
Revision we are working on.
Definition at line 72 of file Article.php.
Referenced by getRevisionFetched(), and setOldSubtitle().