Public Member Functions | |
__construct () | |
Constructor Initialise private variables. | |
redirect ($url, $responsecode= '302') | |
Redirect to $url rather than displaying the normal page. | |
getRedirect () | |
Get the URL to redirect to, or an empty string if not redirect URL set. | |
setStatusCode ($statusCode) | |
Set the HTTP status code to send with the output. | |
addMeta ($name, $val) | |
Add a new <meta> tag To add an http-equiv meta tag, precede the name with "http:". | |
addKeyword ($text) | |
Add a keyword or a list of keywords in the page header. | |
addLink ($linkarr) | |
Add a new <link> tag to the page header. | |
addMetadataLink ($linkarr) | |
Add a new <link> with "rel" attribute set to "meta". | |
addScript ($script) | |
Add raw HTML to the list of scripts (including <script> tag, etc. | |
addExtensionStyle ($url) | |
Register and add a stylesheet from an extension directory. | |
getExtStyle () | |
Get all links added by extensions. | |
addScriptFile ($file) | |
Add a JavaScript file out of skins/common, or a given relative path. | |
addInlineScript ($script) | |
Add a self-contained script tag with the given contents. | |
getScript () | |
Get all registered JS and CSS tags for the header. | |
getHeadItems () | |
Get all header items in a string. | |
addHeadItem ($name, $value) | |
Add or replace an header item to the output. | |
hasHeadItem ($name) | |
Check if the header item $name is already set. | |
setETag ($tag) | |
Set the value of the ETag HTTP header, only used if $wgUseETag is true. | |
setArticleBodyOnly ($only) | |
Set whether the output should only contain the body of the article, without any skin, sidebar, etc. | |
getArticleBodyOnly () | |
Return whether the output will contain only the body of the article. | |
checkLastModified ($timestamp) | |
checkLastModified tells the client to use the client-cached page if possible. | |
setRobotPolicy ($policy) | |
Set the robot policy for the page: <http://www.robotstxt.org/meta.html>. | |
setIndexPolicy ($policy) | |
Set the index policy for the page, but leave the follow policy un- touched. | |
setFollowPolicy ($policy) | |
Set the follow policy for the page, but leave the index policy un- touched. | |
setPageTitleActionText ($text) | |
Set the new value of the "action text", this will be added to the "HTML title", separated from it with " - ". | |
getPageTitleActionText () | |
Get the value of the "action text". | |
setHTMLTitle ($name, $frompagetitle=false) | |
"HTML title" means the contents of <title>. | |
getHTMLTitle () | |
Return the "HTML title", i.e. | |
setPageTitle ($name) | |
"Page title" means the contents of <h1>. | |
getPageTitle () | |
Return the "page title", i.e. | |
setTitle ($t) | |
Set the Title object to use. | |
getTitle () | |
Get the Title object used in this instance. | |
setSubtitle ($str) | |
Replace the subtile with $str. | |
appendSubtitle ($str) | |
Add $str to the subtitle. | |
getSubtitle () | |
Get the subtitle. | |
setPrintable () | |
Set the page as printable, i.e. | |
isPrintable () | |
Return whether the page is "printable". | |
disable () | |
Disable output completely, i.e. | |
isDisabled () | |
Return whether the output will be completely disabled. | |
showNewSectionLink () | |
Show an "add new section" link? | |
forceHideNewSectionLink () | |
Forcibly hide the new section link? | |
setSyndicated ($show=true) | |
Add or remove feed links in the page header This is mainly kept for backward compatibility, see OutputPage::addFeedLink() for the new version. | |
setFeedAppendQuery ($val) | |
Add default feeds to the page header This is mainly kept for backward compatibility, see OutputPage::addFeedLink() for the new version. | |
addFeedLink ($format, $href) | |
Add a feed link to the page header. | |
isSyndicated () | |
Should we output feed links for this page? | |
getSyndicationLinks () | |
Return URLs for each supported syndication format for this page. | |
getFeedAppendQuery () | |
Will currently always return null. | |
setArticleFlag ($v) | |
Set whether the displayed content is related to the source of the corresponding article on the wiki Setting true will cause the change "article related" toggle to true. | |
isArticle () | |
Return whether the content displayed page is related to the source of the corresponding article on the wiki. | |
setArticleRelated ($v) | |
Set whether this page is related an article on the wiki Setting false will cause the change of "article flag" toggle to false. | |
isArticleRelated () | |
Return whether this page is related an article on the wiki. | |
addLanguageLinks ($newLinkArray) | |
Add new language links. | |
setLanguageLinks ($newLinkArray) | |
Reset the language links and add new language links. | |
getLanguageLinks () | |
Get the list of language links. | |
addCategoryLinks ($categories) | |
Add an array of categories, with names in the keys. | |
setCategoryLinks ($categories) | |
Reset the category links (but not the category list) and add $categories. | |
getCategoryLinks () | |
Get the list of category links, in a 2-D array with the following format: $arr[$type][] = $link, where $type is either "normal" or "hidden" (for hidden categories) and $link a HTML fragment with a link to the category page. | |
getCategories () | |
Get the list of category names this page belongs to. | |
suppressQuickbar () | |
Suppress the quickbar from the output, only for skin supporting the quickbar. | |
isQuickbarSuppressed () | |
Return whether the quickbar should be suppressed from the output. | |
disallowUserJs () | |
Remove user JavaScript from scripts to load. | |
isUserJsAllowed () | |
Return whether user JavaScript is allowed for this page. | |
prependHTML ($text) | |
Prepend $text to the body HTML. | |
addHTML ($text) | |
Append $text to the body HTML. | |
clearHTML () | |
Clear the body HTML. | |
getHTML () | |
Get the body HTML. | |
debug ($text) | |
Add $text to the debug output. | |
setParserOptions ($options) | |
parserOptions ($options=null) | |
Get/set the ParserOptions object to use for wikitext parsing. | |
setRevisionId ($revid) | |
Set the revision ID which will be seen by the wiki text parser for things such as embedded {{REVISIONID}} variable use. | |
getRevisionId () | |
Get the current revision ID. | |
addWikiText ($text, $linestart=true) | |
Convert wikitext to HTML and add it to the buffer Default assumes that the current page title will be used. | |
addWikiTextWithTitle ($text, &$title, $linestart=true) | |
Add wikitext with a custom Title object. | |
addWikiTextTitleTidy ($text, &$title, $linestart=true) | |
Add wikitext with a custom Title object and. | |
addWikiTextTidy ($text, $linestart=true) | |
Add wikitext with tidy enabled. | |
addWikiTextTitle ($text, &$title, $linestart, $tidy=false) | |
Add wikitext with a custom Title object. | |
addPrimaryWikiText ($text, $article, $cache=true) | |
Add wikitext to the buffer, assuming that this is the primary text for a page view Saves the text into the parser cache if possible. | |
addSecondaryWikiText ($text, $linestart=true) | |
addParserOutputNoText (&$parserOutput) | |
Add a ParserOutput object, but without Html. | |
addParserOutput (&$parserOutput) | |
Add a ParserOutput object. | |
addTemplate (&$template) | |
Add the output of a QuickTemplate to the output buffer. | |
parse ($text, $linestart=true, $interface=false) | |
Parse wikitext and return the HTML. | |
parseInline ($text, $linestart=true, $interface=false) | |
Parse wikitext, strip paragraphs, and return the HTML. | |
tryParserCache (&$article) | |
setSquidMaxage ($maxage) | |
Set the value of the "s-maxage" part of the "Cache-control" HTTP header. | |
enableClientCache ($state) | |
Use enableClientCache(false) to force it to send nocache headers. | |
getCacheVaryCookies () | |
Get the list of cookies that will influence on the cache. | |
uncacheableBecauseRequestVars () | |
Return whether this page is not cacheable because "useskin" or "uselang" url parameters were passed. | |
haveCacheVaryCookies () | |
Check if the request has a cache-varying cookie header If it does, it's very important that we don't allow public caching. | |
addVaryHeader ($header, $option=null) | |
Add an HTTP header that will influence on the cache. | |
getXVO () | |
Get a complete X-Vary-Options header. | |
addAcceptLanguage () | |
bug 21672: Add Accept-Language to Vary and XVO headers if there's no 'variant' parameter existed in GET. | |
preventClickjacking ($enable=true) | |
Set a flag which will cause an X-Frame-Options header appropriate for edit pages to be sent. | |
allowClickjacking () | |
Turn off frame-breaking. | |
getFrameOptions () | |
Get the X-Frame-Options header value (without the name part), or false if there isn't one. | |
sendCacheControl () | |
Send cache control HTTP headers. | |
output () | |
Finally, all the text has been munged and accumulated into the object, let's actually output it:. | |
out ($ins) | |
Actually output something with print(). | |
reportTime () | |
blockedPage ($return=true) | |
Produce a "user is blocked" page. | |
showErrorPage ($title, $msg, $params=array()) | |
Output a standard error page. | |
showPermissionsErrorPage ($errors, $action=null) | |
Output a standard permission error page. | |
versionRequired ($version) | |
Display an error page indicating that a given version of MediaWiki is required to use it. | |
permissionRequired ($permission) | |
Display an error page noting that a given permission bit is required. | |
sysopRequired () | |
developerRequired () | |
loginToUse () | |
Produce the stock "please login to use the wiki" page. | |
formatPermissionsErrorMessage ($errors, $action=null) | |
Format a list of error messages. | |
readOnlyPage ($source=null, $protected=false, $reasons=array(), $action=null) | |
Display a page stating that the Wiki is in read-only mode, and optionally show the source of the page that the user was trying to edit. | |
errorpage ($title, $msg) | |
databaseError ($fname, $sql, $error, $errno) | |
fatalError ($message) | |
unexpectedValueError ($name, $val) | |
fileCopyError ($old, $new) | |
fileRenameError ($old, $new) | |
fileDeleteError ($name) | |
fileNotFoundError ($name) | |
showFatalError ($message) | |
showUnexpectedValueError ($name, $val) | |
showFileCopyError ($old, $new) | |
showFileRenameError ($old, $new) | |
showFileDeleteError ($name) | |
showFileNotFoundError ($name) | |
addReturnTo ($title, $query=array()) | |
Add a "return to" link pointing to a specified title. | |
returnToMain ($unused=null, $returnto=null, $returntoquery=null) | |
Add a "return to" link pointing to a specified title, or the title indicated in the request, or else the main page. | |
headElement (Skin $sk, $includeStyle=true) | |
getHeadScripts (Skin $sk) | |
Gets the global variables and mScripts; also adds userjs to the end if enabled. | |
getHeadLinks () | |
addStyle ($style, $media='', $condition='', $dir='') | |
Add a local or specified stylesheet, with the given media options. | |
addInlineStyle ($style_css) | |
Adds inline CSS styles. | |
buildCssLinks () | |
Build a set of <link>s for the stylesheets specified in the $this->styles array. | |
transformCssMedia ($media) | |
Transform "media" attribute based on request parameters. | |
rateLimited () | |
Turn off regular page output and return an error reponse for when rate limiting has triggered. | |
showLagWarning ($lag) | |
Show a warning about slave lag. | |
addWikiMsg () | |
Add a wikitext-formatted message to the output. | |
addWikiMsgArray ($name, $args, $options=array()) | |
Add a wikitext-formatted message to the output. | |
wrapWikiMsg ($wrap) | |
This function takes a number of message/argument specifications, wraps them in some overall structure, and then parses the result and adds it to the output. | |
includeJQuery ($modules=array()) | |
Include jQuery core. | |
Static Public Member Functions | |
static | getStatusMessage ($code) |
Get the message associed with the HTTP response code $code. | |
static | setEncodings () |
Public Attributes | |
$mMetatags = array() | |
$mKeywords = array() | |
$mLinktags = array() | |
$mExtStyles = array() | |
$mPagetitle = '' | |
$mBodytext = '' | |
$mDebugtext = '' | |
$mHTMLtitle = '' | |
$mHTMLtitleFromPagetitle = true | |
$mIsarticle = true | |
$mPrintable = false | |
$mSubtitle = '' | |
$mRedirect = '' | |
$mStatusCode | |
$mLastModified = '' | |
$mETag = false | |
$mCategoryLinks = array() | |
$mCategories = array() | |
$mLanguageLinks = array() | |
$mScripts = '' | |
$mLinkColours | |
$mPageLinkTitle = '' | |
$mHeadItems = array() | |
$mInlineMsg = array() | |
$mTemplateIds = array() | |
$mAllowUserJs | |
$mSuppressQuickbar = false | |
$mDoNothing = false | |
$mContainsOldMagic = 0 | |
$mContainsNewMagic = 0 | |
$mIsArticleRelated = true | |
$mFeedLinks = array() | |
$mEnableClientCache = true | |
$mArticleBodyOnly = false | |
$mNewSectionLink = false | |
$mHideNewSectionLink = false | |
$mNoGallery = false | |
$mPageTitleActionText = '' | |
$mParseWarnings = array() | |
$mSquidMaxage = 0 | |
$mPreventClickjacking = true | |
$mRevisionId = null | |
$styles = array() | |
An array of stylesheet filenames (relative from skins path), with options for CSS media, IE conditions, and RTL/LTR direction. | |
Protected Member Functions | |
addDefaultMeta () | |
Add default <meta> tags. | |
styleLink ($style, $options) | |
Generate <link> tags for stylesheets. | |
Protected Attributes | |
$mParserOptions = null | |
$mTitle = null | |
$mJQueryDone = false | |
Whether to load jQuery core. | |
Private Member Functions | |
feedLink ($type, $url, $text) | |
Generate a <link rel/>=""> for a feed. | |
Private Attributes | |
$mIndexPolicy = 'index' | |
$mFollowPolicy = 'follow' | |
$mVaryHeader |
Definition at line 8 of file OutputPage.php.
OutputPage::__construct | ( | ) |
Constructor Initialise private variables.
Definition at line 66 of file OutputPage.php.
References $wgAllowUserJs.
OutputPage::addAcceptLanguage | ( | ) |
bug 21672: Add Accept-Language to Vary and XVO headers if there's no 'variant' parameter existed in GET.
For example: /w/index.php?title=Main_page should always be served; but /w/index.php?title=Main_page&variant=zh-cn should never be served.
patched by Liangent and Philip
Definition at line 1336 of file OutputPage.php.
References $wgContLang, $wgRequest, and addVaryHeader().
Referenced by sendCacheControl().
OutputPage::addCategoryLinks | ( | $ | categories | ) |
Add an array of categories, with names in the keys.
$categories | Associative array mapping category name to its sort key |
Definition at line 755 of file OutputPage.php.
References $dbr, $res, $title, $wgContLang, $wgUser, Title::makeTitleSafe(), LinkCache::singleton(), wfGetDB(), and wfRunHooks().
Referenced by addParserOutputNoText(), and setCategoryLinks().
OutputPage::addDefaultMeta | ( | ) | [protected] |
Add default <meta> tags.
Definition at line 2272 of file OutputPage.php.
References $wgHtml5, $wgVersion, and addMeta().
Referenced by getHeadLinks().
OutputPage::addExtensionStyle | ( | $ | url | ) |
Register and add a stylesheet from an extension directory.
$url | String path to sheet. Provide either a full url (beginning with 'http', etc) or a relative path from the document root (beginning with '/'). Otherwise it behaves identically to addStyle() and draws from the /skins folder. |
Definition at line 169 of file OutputPage.php.
References $url.
OutputPage::addFeedLink | ( | $ | format, | |
$ | href | |||
) |
Add a feed link to the page header.
$format | String: feed type, should be a key of $wgFeedClasses | |
$href | String: URL |
Definition at line 644 of file OutputPage.php.
OutputPage::addHeadItem | ( | $ | name, | |
$ | value | |||
) |
Add or replace an header item to the output.
$name | String: item name | |
$value | String: raw HTML |
Definition at line 235 of file OutputPage.php.
References $name.
OutputPage::addHTML | ( | $ | text | ) |
Append $text to the body HTML.
$text | String: HTML |
Definition at line 888 of file OutputPage.php.
Referenced by addParserOutput(), addReturnTo(), addTemplate(), addWikiMsgArray(), loginToUse(), readOnlyPage(), showErrorPage(), and wrapWikiMsg().
OutputPage::addInlineScript | ( | $ | script | ) |
Add a self-contained script tag with the given contents.
$script | String: JavaScript text, no <script> tags |
Definition at line 203 of file OutputPage.php.
References Html::inlineScript().
Referenced by getHeadScripts().
OutputPage::addInlineStyle | ( | $ | style_css | ) |
Adds inline CSS styles.
$style_css | Mixed: inline CSS |
Definition at line 2417 of file OutputPage.php.
References Html::inlineStyle().
Referenced by SkinTemplate::outputPage(), and setupUserCss().
OutputPage::addKeyword | ( | $ | text | ) |
Add a keyword or a list of keywords in the page header.
$text | String or array of strings |
Definition at line 119 of file OutputPage.php.
OutputPage::addLanguageLinks | ( | $ | newLinkArray | ) |
Add new language links.
$newLinkArray | Associative array mapping language code to the page name |
Definition at line 726 of file OutputPage.php.
OutputPage::addLink | ( | $ | linkarr | ) |
Add a new <link> tag to the page header.
$linkarr | Array: associative array of attributes. |
Definition at line 132 of file OutputPage.php.
Referenced by addMetadataLink(), Skin::addMetadataLinks(), addReturnTo(), Skin::initPage(), and output().
OutputPage::addMeta | ( | $ | name, | |
$ | val | |||
) |
Add a new <meta> tag To add an http-equiv meta tag, precede the name with "http:".
$name | tag name | |
$val | tag value |
Definition at line 110 of file OutputPage.php.
References $name.
Referenced by addDefaultMeta(), and headElement().
OutputPage::addMetadataLink | ( | $ | linkarr | ) |
Add a new <link> with "rel" attribute set to "meta".
$linkarr | Array: associative array mapping attribute names to their values, both keys and values will be escaped, and the "rel" attribute will be automatically added |
Definition at line 143 of file OutputPage.php.
References addLink().
Referenced by Skin::addMetadataLinks().
OutputPage::addParserOutput | ( | &$ | parserOutput | ) |
Add a ParserOutput object.
$parserOutput | ParserOutput |
Definition at line 1121 of file OutputPage.php.
References addHTML(), addParserOutputNoText(), and wfRunHooks().
Referenced by addPrimaryWikiText(), addWikiTextTitle(), and tryParserCache().
OutputPage::addParserOutputNoText | ( | &$ | parserOutput | ) |
Add a ParserOutput object, but without Html.
$parserOutput | ParserOutput object |
Definition at line 1076 of file OutputPage.php.
References $title, $wgContentNamespaces, $wgExemptFromUserRobotsControl, $wgParserOutputHooks, addCategoryLinks(), enableClientCache(), setPageTitle(), and wfRunHooks().
Referenced by addParserOutput().
OutputPage::addPrimaryWikiText | ( | $ | text, | |
$ | article, | |||
$ | cache = true | |||
) |
Add wikitext to the buffer, assuming that this is the primary text for a page view Saves the text into the parser cache if possible.
$text | String: wikitext | |
$article | Article object | |
$cache | Boolean |
Definition at line 1044 of file OutputPage.php.
References $wgParser, addParserOutput(), parserOptions(), ParserCache::singleton(), and wfDeprecated().
OutputPage::addReturnTo | ( | $ | title, | |
$ | query = array() | |||
) |
Add a "return to" link pointing to a specified title.
$title | Title to link | |
$query | String: query string |
Definition at line 2073 of file OutputPage.php.
References $title, $wgUser, addHTML(), addLink(), and wfMsgHtml().
Referenced by returnToMain().
OutputPage::addScript | ( | $ | script | ) |
Add raw HTML to the list of scripts (including <script> tag, etc.
)
$script | String: raw HTML |
Definition at line 157 of file OutputPage.php.
References $script.
Referenced by addScriptFile(), and SkinVector::initPage().
OutputPage::addScriptFile | ( | $ | file | ) |
Add a JavaScript file out of skins/common, or a given relative path.
$file | String: filename in skins/common or complete on-server path (/foo/bar.js) |
Definition at line 188 of file OutputPage.php.
References $path, $wgStylePath, $wgStyleVersion, addScript(), Html::linkedScript(), and wfAppendQuery().
Referenced by getHeadScripts(), and output().
OutputPage::addSecondaryWikiText | ( | $ | text, | |
$ | linestart = true | |||
) |
Definition at line 1065 of file OutputPage.php.
References addWikiTextTitleTidy(), getTitle(), and wfDeprecated().
OutputPage::addStyle | ( | $ | style, | |
$ | media = '' , |
|||
$ | condition = '' , |
|||
$ | dir = '' | |||
) |
Add a local or specified stylesheet, with the given media options.
Meant primarily for internal use...
$style | String: URL to the file | |
$media | String: to specify a media type, 'screen', 'printable', 'handheld' or any. | |
$condition | String: for IE conditional comments, specifying an IE version | |
$dir | String: set to 'rtl' or 'ltr' for direction-specific sheets |
Definition at line 2400 of file OutputPage.php.
References $options.
Referenced by headElement(), SkinVector::initPage(), SkinStandard::setupSkinUserCss(), SkinSimple::setupSkinUserCss(), SkinMonoBook::setupSkinUserCss(), SkinModern::setupSkinUserCss(), SkinChick::setupSkinUserCss(), SkinTemplate::setupSkinUserCss(), setupSkinUserCss(), and setupUserCss().
OutputPage::addTemplate | ( | &$ | template | ) |
Add the output of a QuickTemplate to the output buffer.
$template | QuickTemplate |
Definition at line 1134 of file OutputPage.php.
References addHTML().
OutputPage::addVaryHeader | ( | $ | header, | |
$ | option = null | |||
) |
Add an HTTP header that will influence on the cache.
$header | String: header name | |
$option | either an Array or null |
Definition at line 1285 of file OutputPage.php.
Referenced by addAcceptLanguage(), and getXVO().
OutputPage::addWikiMsg | ( | ) |
Add a wikitext-formatted message to the output.
This is equivalent to:
$wgOut->addWikiText( wfMsgNoTrans( ... ) )
Definition at line 2563 of file OutputPage.php.
References $name, and addWikiMsgArray().
Referenced by blockedPage(), permissionRequired(), rateLimited(), readOnlyPage(), SpecialRecentchangeslinked::setBottomText(), and versionRequired().
OutputPage::addWikiMsgArray | ( | $ | name, | |
$ | args, | |||
$ | options = array() | |||
) |
Add a wikitext-formatted message to the output.
Like addWikiMsg() except the parameters are taken as an array instead of a variable argument list.
$options is passed through to wfMsgExt(), see that function for details.
Definition at line 2576 of file OutputPage.php.
References $name, $options, addHTML(), and wfMsgExt().
Referenced by addWikiMsg().
OutputPage::addWikiText | ( | $ | text, | |
$ | linestart = true | |||
) |
Convert wikitext to HTML and add it to the buffer Default assumes that the current page title will be used.
$text | String | |
$linestart | Boolean: is this the start of a line? |
Definition at line 969 of file OutputPage.php.
References $title, addWikiTextTitle(), and getTitle().
Referenced by readOnlyPage(), SpecialRecentChanges::setTopText(), and showPermissionsErrorPage().
OutputPage::addWikiTextTidy | ( | $ | text, | |
$ | linestart = true | |||
) |
Add wikitext with tidy enabled.
$text | String: wikitext | |
$linestart | Boolean: is this the start of a line? |
Definition at line 1002 of file OutputPage.php.
References $title, addWikiTextTitleTidy(), and getTitle().
OutputPage::addWikiTextTitle | ( | $ | text, | |
&$ | title, | |||
$ | linestart, | |||
$ | tidy = false | |||
) |
Add wikitext with a custom Title object.
$text | String: wikitext | |
$title | Title object | |
$linestart | Boolean: is this the start of a line? | |
$tidy | Boolean: whether to use tidy |
Definition at line 1015 of file OutputPage.php.
References $title, $wgParser, addParserOutput(), parserOptions(), wfIncrStats(), wfProfileIn(), and wfProfileOut().
Referenced by addWikiText(), addWikiTextTitleTidy(), and addWikiTextWithTitle().
OutputPage::addWikiTextTitleTidy | ( | $ | text, | |
&$ | title, | |||
$ | linestart = true | |||
) |
Add wikitext with a custom Title object and.
$text | String: wikitext | |
$title | Title object | |
$linestart | Boolean: is this the start of a line? |
Definition at line 992 of file OutputPage.php.
References $title, and addWikiTextTitle().
Referenced by addSecondaryWikiText(), and addWikiTextTidy().
OutputPage::addWikiTextWithTitle | ( | $ | text, | |
&$ | title, | |||
$ | linestart = true | |||
) |
Add wikitext with a custom Title object.
$text | String: wikitext | |
$title | Title object | |
$linestart | Boolean: is this the start of a line? |
Definition at line 981 of file OutputPage.php.
References $title, and addWikiTextTitle().
OutputPage::allowClickjacking | ( | ) |
Turn off frame-breaking.
Alias for $this->preventClickjacking(false). This can be called from pages which do not contain any CSRF-protected HTML form.
Definition at line 1368 of file OutputPage.php.
OutputPage::appendSubtitle | ( | $ | str | ) |
Add $str to the subtitle.
$str | String to add to the subtitle |
Definition at line 531 of file OutputPage.php.
OutputPage::blockedPage | ( | $ | return = true |
) |
Produce a "user is blocked" page.
$return | Boolean: whether to have a "return to $wgTitle" message or not. |
Definition at line 1674 of file OutputPage.php.
References $msg, $name, $wgContLang, $wgLang, $wgUser, addWikiMsg(), getTitle(), returnToMain(), setArticleRelated(), setPageTitle(), setRobotPolicy(), wfGetIP(), wfMsg(), wfTimestamp(), and User::whoIs().
OutputPage::buildCssLinks | ( | ) |
Build a set of <link>s for the stylesheets specified in the $this->styles array.
These will be applied to various media & IE conditionals.
Definition at line 2425 of file OutputPage.php.
References $options, and styleLink().
Referenced by headElement(), and SkinTemplate::outputPage().
OutputPage::checkLastModified | ( | $ | timestamp | ) |
checkLastModified tells the client to use the client-cached page if possible.
If sucessful, the OutputPage is disabled so that any future call to OutputPage->output() have no effect.
Side effect: sets mLastModified for Last-Modified header
Definition at line 288 of file OutputPage.php.
References $name, $wgCacheEpoch, $wgCachePages, $wgRequest, $wgUser, disable(), sendCacheControl(), wfClearOutputBuffers(), wfDebug(), wfRestoreWarnings(), wfRunHooks(), wfSuppressWarnings(), and wfTimestamp().
OutputPage::clearHTML | ( | ) |
OutputPage::databaseError | ( | $ | fname, | |
$ | sql, | |||
$ | error, | |||
$ | errno | |||
) |
OutputPage::debug | ( | $ | text | ) |
Add $text to the debug output.
$text | String: debug text |
Definition at line 914 of file OutputPage.php.
OutputPage::developerRequired | ( | ) |
OutputPage::disable | ( | ) |
Disable output completely, i.e.
calling output() will have no effect
Definition at line 566 of file OutputPage.php.
Referenced by checkLastModified().
OutputPage::disallowUserJs | ( | ) |
OutputPage::enableClientCache | ( | $ | state | ) |
Use enableClientCache(false) to force it to send nocache headers.
$state | ?? |
Definition at line 1217 of file OutputPage.php.
References wfSetVar().
Referenced by addParserOutputNoText(), rateLimited(), showErrorPage(), showFatalError(), and showPermissionsErrorPage().
OutputPage::errorpage | ( | $ | title, | |
$ | msg | |||
) |
OutputPage::fatalError | ( | $ | message | ) |
OutputPage::feedLink | ( | $ | type, | |
$ | url, | |||
$ | text | |||
) | [private] |
Generate a <link rel/>=""> for a feed.
$type | String: feed type | |
$url | String: URL to the feed | |
$text | String: value of the "title" attribute |
Definition at line 2383 of file OutputPage.php.
References $url, and Html::element().
Referenced by getHeadLinks().
OutputPage::fileCopyError | ( | $ | old, | |
$ | new | |||
) |
OutputPage::fileDeleteError | ( | $ | name | ) |
OutputPage::fileNotFoundError | ( | $ | name | ) |
OutputPage::fileRenameError | ( | $ | old, | |
$ | new | |||
) |
OutputPage::forceHideNewSectionLink | ( | ) |
OutputPage::formatPermissionsErrorMessage | ( | $ | errors, | |
$ | action = null | |||
) |
Format a list of error messages.
$errors | An array of arrays returned by Title::getUserPermissionsErrors | |
$action | String: action that was denied or null if unknown |
Definition at line 1875 of file OutputPage.php.
References $action, $wgLang, and wfMsgNoTrans().
Referenced by readOnlyPage(), and showPermissionsErrorPage().
OutputPage::getArticleBodyOnly | ( | ) |
Return whether the output will contain only the body of the article.
Definition at line 274 of file OutputPage.php.
OutputPage::getCacheVaryCookies | ( | ) |
Get the list of cookies that will influence on the cache.
Definition at line 1226 of file OutputPage.php.
References $wgCacheVaryCookies, $wgCookiePrefix, and wfRunHooks().
Referenced by getXVO(), and haveCacheVaryCookies().
OutputPage::getCategories | ( | ) |
Get the list of category names this page belongs to.
Definition at line 834 of file OutputPage.php.
OutputPage::getCategoryLinks | ( | ) |
Get the list of category links, in a 2-D array with the following format: $arr[$type][] = $link, where $type is either "normal" or "hidden" (for hidden categories) and $link a HTML fragment with a link to the category page.
Definition at line 825 of file OutputPage.php.
OutputPage::getExtStyle | ( | ) |
Get all links added by extensions.
Definition at line 178 of file OutputPage.php.
Referenced by setupUserCss().
OutputPage::getFeedAppendQuery | ( | ) |
OutputPage::getFrameOptions | ( | ) |
Get the X-Frame-Options header value (without the name part), or false if there isn't one.
This is used by Skin to determine whether to enable JavaScript frame-breaking, for clients that don't support X-Frame-Options.
Definition at line 1377 of file OutputPage.php.
References $wgBreakFrames, and $wgEditPageFrameOptions.
Referenced by output().
OutputPage::getHeadItems | ( | ) |
Get all header items in a string.
Definition at line 221 of file OutputPage.php.
References $s.
Referenced by getScript(), and headElement().
OutputPage::getHeadLinks | ( | ) |
Definition at line 2306 of file OutputPage.php.
References $wgAdvertisedFeedTypes, $wgFeed, $wgOverrideSiteFeed, $wgRequest, $wgSitename, addDefaultMeta(), Html::element(), feedLink(), getSyndicationLinks(), getTitle(), SpecialPage::getTitleFor(), and wfMsg().
Referenced by headElement(), and SkinTemplate::outputPage().
OutputPage::getHeadScripts | ( | Skin $ | sk | ) |
Gets the global variables and mScripts; also adds userjs to the end if enabled.
$sk | Skin object to use |
Definition at line 2229 of file OutputPage.php.
References $action, $wgJsMimeType, $wgRequest, $wgStylePath, $wgStyleVersion, $wgUser, $wgUseSiteJs, addInlineScript(), addScriptFile(), Skin::getSkinName(), isUserJsAllowed(), Html::linkedScript(), Skin::makeGlobalVariablesScript(), Title::makeTitleSafe(), makeUrl(), and Skin::userCanPreview().
Referenced by headElement().
OutputPage::getHTML | ( | ) |
OutputPage::getHTMLTitle | ( | ) |
Return the "HTML title", i.e.
the content of the <title> tag.
Definition at line 459 of file OutputPage.php.
Referenced by headElement(), and SkinTemplate::outputPage().
OutputPage::getLanguageLinks | ( | ) |
Get the list of language links.
Definition at line 745 of file OutputPage.php.
Referenced by SkinTemplate::outputPage().
OutputPage::getPageTitle | ( | ) |
Return the "page title", i.e.
the content of the <h1> tag.
Definition at line 489 of file OutputPage.php.
Referenced by headElement(), and SkinTemplate::outputPage().
OutputPage::getPageTitleActionText | ( | ) |
Get the value of the "action text".
Definition at line 432 of file OutputPage.php.
Referenced by setPageTitle().
OutputPage::getRedirect | ( | ) |
Get the URL to redirect to, or an empty string if not redirect URL set.
Definition at line 88 of file OutputPage.php.
OutputPage::getRevisionId | ( | ) |
OutputPage::getScript | ( | ) |
Get all registered JS and CSS tags for the header.
Definition at line 212 of file OutputPage.php.
References getHeadItems().
Referenced by SkinTemplate::outputPage().
static OutputPage::getStatusMessage | ( | $ | code | ) | [static] |
Get the message associed with the HTTP response code $code.
$code | Integer: status code |
Definition at line 1458 of file OutputPage.php.
References $code.
Referenced by output().
OutputPage::getSubtitle | ( | ) |
Get the subtitle.
Definition at line 540 of file OutputPage.php.
Referenced by SkinTemplate::outputPage().
OutputPage::getSyndicationLinks | ( | ) |
Return URLs for each supported syndication format for this page.
Definition at line 660 of file OutputPage.php.
Referenced by getHeadLinks(), and SkinTemplate::outputPage().
OutputPage::getTitle | ( | ) |
Get the Title object used in this instance.
Definition at line 507 of file OutputPage.php.
References $wgTitle, and wfDebug().
Referenced by addSecondaryWikiText(), addWikiText(), addWikiTextTidy(), blockedPage(), getHeadLinks(), headElement(), loginToUse(), output(), SkinTemplate::outputPage(), parse(), rateLimited(), readOnlyPage(), setFeedAppendQuery(), showErrorPage(), and showPermissionsErrorPage().
OutputPage::getXVO | ( | ) |
Get a complete X-Vary-Options header.
Definition at line 1305 of file OutputPage.php.
References addVaryHeader(), and getCacheVaryCookies().
Referenced by sendCacheControl().
OutputPage::hasHeadItem | ( | $ | name | ) |
Check if the header item $name is already set.
$name | String: item name |
Definition at line 245 of file OutputPage.php.
References $name.
OutputPage::haveCacheVaryCookies | ( | ) |
Check if the request has a cache-varying cookie header If it does, it's very important that we don't allow public caching.
Definition at line 1261 of file OutputPage.php.
References $wgRequest, getCacheVaryCookies(), and wfDebug().
Referenced by sendCacheControl().
OutputPage::headElement | ( | Skin $ | sk, | |
$ | includeStyle = true | |||
) |
Definition at line 2121 of file OutputPage.php.
References $action, $wgContLang, $wgContLanguageCode, $wgDocType, $wgDTD, $wgHtml5, $wgHtml5Version, $wgLang, $wgMimeType, $wgOutputEncoding, $wgRequest, $wgStyleVersion, $wgUser, $wgUseTrackbacks, $wgWellFormedXml, $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces, addMeta(), addStyle(), buildCssLinks(), Sanitizer::escapeClass(), Xml::escapeJsString(), getHeadItems(), getHeadLinks(), getHeadScripts(), getHTMLTitle(), getPageTitle(), getTitle(), Html::inlineStyle(), isArticleRelated(), Html::openElement(), setHTMLTitle(), and wfMsg().
Referenced by SkinTemplate::outputPage(), and Skin::outputPage().
OutputPage::includeJQuery | ( | $ | modules = array() |
) |
Include jQuery core.
Use this to avoid loading it multiple times before we get a usable script loader.
$modules | Array: list of jQuery modules which should be loaded |
Definition at line 2636 of file OutputPage.php.
References $wgJsMimeType, $wgStylePath, $wgStyleVersion, and Html::element().
OutputPage::isArticle | ( | ) |
Return whether the content displayed page is related to the source of the corresponding article on the wiki.
Definition at line 693 of file OutputPage.php.
Referenced by SkinTemplate::outputPage().
OutputPage::isArticleRelated | ( | ) |
Return whether this page is related an article on the wiki.
Definition at line 715 of file OutputPage.php.
Referenced by Skin::addMetadataLinks(), headElement(), and SkinTemplate::outputPage().
OutputPage::isDisabled | ( | ) |
Return whether the output will be completely disabled.
Definition at line 575 of file OutputPage.php.
OutputPage::isPrintable | ( | ) |
Return whether the page is "printable".
Definition at line 558 of file OutputPage.php.
Referenced by SkinTemplate::outputPage(), and sendCacheControl().
OutputPage::isQuickbarSuppressed | ( | ) |
Return whether the quickbar should be suppressed from the output.
Definition at line 852 of file OutputPage.php.
OutputPage::isSyndicated | ( | ) |
Should we output feed links for this page?
Definition at line 652 of file OutputPage.php.
Referenced by SkinTemplate::outputPage().
OutputPage::isUserJsAllowed | ( | ) |
Return whether user JavaScript is allowed for this page.
Definition at line 869 of file OutputPage.php.
Referenced by getHeadScripts(), and SkinTemplate::outputPage().
OutputPage::loginToUse | ( | ) |
Produce the stock "please login to use the wiki" page.
Definition at line 1835 of file OutputPage.php.
References $wgContLang, $wgUser, addHTML(), getTitle(), SpecialPage::getTitleFor(), Title::newMainPage(), permissionRequired(), returnToMain(), setArticleFlag(), setPageTitle(), setRobotPolicy(), wfMsg(), wfMsgHtml(), and wfMsgWikiHtml().
OutputPage::out | ( | $ | ins | ) |
Actually output something with print().
Performs an iconv to the output encoding, if needed.
$ins | String: the string to output |
Definition at line 1630 of file OutputPage.php.
References $wgContLang, $wgInputEncoding, $wgOutputEncoding, and print.
Referenced by output(), and Skin::outputPage().
OutputPage::output | ( | ) |
Finally, all the text has been munged and accumulated into the object, let's actually output it:.
Definition at line 1514 of file OutputPage.php.
References $msg, $url, $wgAjaxWatch, $wgArticle, $wgContLanguageCode, $wgDebugRedirects, $wgEnableMWSuggest, $wgMimeType, $wgOutputEncoding, $wgRequest, $wgUniversalEditButton, $wgUseAjax, $wgUser, addLink(), addScriptFile(), getFrameOptions(), getStatusMessage(), getTitle(), out(), print, sendCacheControl(), wfExpandUrl(), wfMsg(), wfProfileIn(), wfProfileOut(), wfRunHooks(), and wfTimestamp().
OutputPage::parse | ( | $ | text, | |
$ | linestart = true , |
|||
$ | interface = false | |||
) |
Parse wikitext and return the HTML.
$text | String | |
$linestart | Boolean: is this the start of a line? | |
$interface | Boolean: use interface language ($wgLang instead of $wgContLang) while parsing language sensitive magic words like GRAMMAR and PLURAL |
Definition at line 1151 of file OutputPage.php.
References $wgParser, getTitle(), and parserOptions().
Referenced by parseInline(), and wrapWikiMsg().
OutputPage::parseInline | ( | $ | text, | |
$ | linestart = true , |
|||
$ | interface = false | |||
) |
Parse wikitext, strip paragraphs, and return the HTML.
$text | String | |
$linestart | Boolean: is this the start of a line? | |
$interface | Boolean: use interface language ($wgLang instead of $wgContLang) while parsing language sensitive magic words like GRAMMAR and PLURAL |
Definition at line 1174 of file OutputPage.php.
References parse().
OutputPage::parserOptions | ( | $ | options = null |
) |
Get/set the ParserOptions object to use for wikitext parsing.
$options | either the ParserOption to use or null to only get the current ParserOption object |
Definition at line 934 of file OutputPage.php.
References $options, and wfSetVar().
Referenced by addPrimaryWikiText(), addWikiTextTitle(), parse(), and setParserOptions().
OutputPage::permissionRequired | ( | $ | permission | ) |
Display an error page noting that a given permission bit is required.
$permission | String: key required |
Definition at line 1797 of file OutputPage.php.
References $wgLang, addWikiMsg(), User::getGroupsWithPermission(), returnToMain(), setArticleRelated(), setHTMLTitle(), setPageTitle(), setRobotPolicy(), and wfMsg().
Referenced by loginToUse().
OutputPage::prependHTML | ( | $ | text | ) |
Prepend $text to the body HTML.
$text | String: HTML |
Definition at line 879 of file OutputPage.php.
OutputPage::preventClickjacking | ( | $ | enable = true |
) |
Set a flag which will cause an X-Frame-Options header appropriate for edit pages to be sent.
The header value is controlled by $wgEditPageFrameOptions.
This is the default for special pages. If you display a CSRF-protected form on an ordinary view page, then you need to call this function.
Definition at line 1359 of file OutputPage.php.
OutputPage::rateLimited | ( | ) |
Turn off regular page output and return an error reponse for when rate limiting has triggered.
Definition at line 2524 of file OutputPage.php.
References addWikiMsg(), clearHTML(), enableClientCache(), getTitle(), returnToMain(), setArticleRelated(), setPageTitle(), setRobotPolicy(), setStatusCode(), and wfMsg().
OutputPage::readOnlyPage | ( | $ | source = null , |
|
$ | protected = false , |
|||
$ | reasons = array() , |
|||
$ | action = null | |||
) |
Display a page stating that the Wiki is in read-only mode, and optionally show the source of the page that the user was trying to edit.
Should only be called (for this purpose) after wfReadOnly() has returned true.
For historical reasons, this function is _also_ used to show the error message when a user tries to edit a page they are not allowed to edit. (Unless it's because they're blocked, then we show blockedPage() instead.) In this case, the second parameter should be set to true and a list of reasons supplied as the third parameter.
$source | String: source code to show (or null). | |
$protected | Boolean: is this a permissions error? | |
$reasons | Array: list of reasons for this error, as returned by Title::getUserPermissionsErrors(). | |
$action | String: action that was denied or null if unknown |
Definition at line 1921 of file OutputPage.php.
References $action, $wgUser, addHTML(), addWikiMsg(), addWikiText(), Html::element(), formatPermissionsErrorMessage(), getTitle(), returnToMain(), setArticleRelated(), setPageTitle(), setRobotPolicy(), setSubtitle(), wfMsg(), wfReadOnlyReason(), and wrapWikiMsg().
OutputPage::redirect | ( | $ | url, | |
$ | responsecode = '302' | |||
) |
Redirect to $url rather than displaying the normal page.
$url | String: URL | |
$responsecode | String: HTTP status code |
Definition at line 77 of file OutputPage.php.
References $url.
OutputPage::reportTime | ( | ) |
Definition at line 1662 of file OutputPage.php.
References wfDeprecated(), and wfReportTime().
OutputPage::returnToMain | ( | $ | unused = null , |
|
$ | returnto = null , |
|||
$ | returntoquery = null | |||
) |
Add a "return to" link pointing to a specified title, or the title indicated in the request, or else the main page.
$unused | No longer used | |
$returnto | Title or String to return to | |
$returntoquery | String: query string for the return to link |
Definition at line 2089 of file OutputPage.php.
References $wgRequest, addReturnTo(), Title::newFromText(), and Title::newMainPage().
Referenced by blockedPage(), loginToUse(), permissionRequired(), rateLimited(), readOnlyPage(), showErrorPage(), and versionRequired().
OutputPage::sendCacheControl | ( | ) |
Send cache control HTTP headers.
Definition at line 1389 of file OutputPage.php.
References $wgRequest, $wgSquidMaxage, $wgUseESI, $wgUseETag, $wgUseSquid, $wgUseXVO, addAcceptLanguage(), getXVO(), haveCacheVaryCookies(), isPrintable(), uncacheableBecauseRequestVars(), and wfDebug().
Referenced by checkLastModified(), and output().
OutputPage::setArticleBodyOnly | ( | $ | only | ) |
Set whether the output should only contain the body of the article, without any skin, sidebar, etc.
Used e.g. when calling with "action=render".
$only | Boolean: whether to output only the body of the article |
Definition at line 265 of file OutputPage.php.
OutputPage::setArticleFlag | ( | $ | v | ) |
Set whether the displayed content is related to the source of the corresponding article on the wiki Setting true will cause the change "article related" toggle to true.
$v | Boolean |
Definition at line 680 of file OutputPage.php.
Referenced by loginToUse().
OutputPage::setArticleRelated | ( | $ | v | ) |
Set whether this page is related an article on the wiki Setting false will cause the change of "article flag" toggle to false.
$v | Boolean |
Definition at line 703 of file OutputPage.php.
Referenced by blockedPage(), permissionRequired(), rateLimited(), readOnlyPage(), showErrorPage(), showFatalError(), showPermissionsErrorPage(), and versionRequired().
OutputPage::setCategoryLinks | ( | $ | categories | ) |
Reset the category links (but not the category list) and add $categories.
$categories | Associative array mapping category name to its sort key |
Definition at line 812 of file OutputPage.php.
References addCategoryLinks().
static OutputPage::setEncodings | ( | ) | [static] |
Definition at line 1644 of file OutputPage.php.
References $wgContLang, $wgInputEncoding, and $wgOutputEncoding.
Referenced by RebuildFileCache::execute().
OutputPage::setETag | ( | $ | tag | ) |
Set the value of the ETag HTTP header, only used if $wgUseETag is true.
$tag | String: value of "ETag" header |
Definition at line 254 of file OutputPage.php.
OutputPage::setFeedAppendQuery | ( | $ | val | ) |
Add default feeds to the page header This is mainly kept for backward compatibility, see OutputPage::addFeedLink() for the new version.
$val | String: query to append to feed links or false to output default links |
Definition at line 624 of file OutputPage.php.
References $wgAdvertisedFeedTypes, and getTitle().
Referenced by setSyndicated().
OutputPage::setFollowPolicy | ( | $ | policy | ) |
Set the follow policy for the page, but leave the index policy un- touched.
$policy | String: either 'follow' or 'nofollow'. |
Definition at line 409 of file OutputPage.php.
Referenced by setRobotPolicy().
OutputPage::setHTMLTitle | ( | $ | name, | |
$ | frompagetitle = false | |||
) |
"HTML title" means the contents of <title>.
It is stored as plain, unescaped text and will be run through htmlspecialchars in the skin file. If $name is from page title, it can only override names which are also from page title, but if it is not from page title, it can override all other names.
Definition at line 444 of file OutputPage.php.
References $name.
Referenced by headElement(), permissionRequired(), setPageTitle(), showErrorPage(), showPermissionsErrorPage(), and versionRequired().
OutputPage::setIndexPolicy | ( | $ | policy | ) |
Set the index policy for the page, but leave the follow policy un- touched.
$policy | string Either 'index' or 'noindex'. |
Definition at line 395 of file OutputPage.php.
Referenced by setRobotPolicy().
OutputPage::setLanguageLinks | ( | $ | newLinkArray | ) |
Reset the language links and add new language links.
$newLinkArray | Associative array mapping language code to the page name |
Definition at line 736 of file OutputPage.php.
OutputPage::setPageTitle | ( | $ | name | ) |
"Page title" means the contents of <h1>.
It is stored as a valid HTML fragment. This function allows good tags like <sup> in the <h1> tag, but not bad tags like <script>. This function automatically sets <title> to the same content as <h1> but with all tags removed. Bad tags that were escaped in <h1> will still be escaped in <title>, and good tags like <i> will be dropped entirely.
Definition at line 469 of file OutputPage.php.
References $name, getPageTitleActionText(), Sanitizer::normalizeCharReferences(), Sanitizer::removeHTMLtags(), setHTMLTitle(), Sanitizer::stripAllTags(), and wfMsg().
Referenced by addParserOutputNoText(), blockedPage(), loginToUse(), permissionRequired(), rateLimited(), readOnlyPage(), showErrorPage(), showFatalError(), showPermissionsErrorPage(), and versionRequired().
OutputPage::setPageTitleActionText | ( | $ | text | ) |
Set the new value of the "action text", this will be added to the "HTML title", separated from it with " - ".
$text | String: new value of the "action text" |
Definition at line 423 of file OutputPage.php.
OutputPage::setParserOptions | ( | $ | options | ) |
Definition at line 922 of file OutputPage.php.
References $options, parserOptions(), and wfDeprecated().
OutputPage::setPrintable | ( | ) |
Set the page as printable, i.e.
it'll be displayed with with all print styles included
Definition at line 549 of file OutputPage.php.
OutputPage::setRevisionId | ( | $ | revid | ) |
Set the revision ID which will be seen by the wiki text parser for things such as embedded {{REVISIONID}} variable use.
$revid | Mixed: an positive integer, or null |
Definition at line 948 of file OutputPage.php.
References wfSetVar().
OutputPage::setRobotPolicy | ( | $ | policy | ) |
Set the robot policy for the page: <http://www.robotstxt.org/meta.html>.
$policy | String: the literal string to output as the contents of the meta tag. Will be parsed according to the spec and output in standardized form. |
Definition at line 377 of file OutputPage.php.
References Article::formatRobotPolicy(), setFollowPolicy(), and setIndexPolicy().
Referenced by blockedPage(), loginToUse(), permissionRequired(), rateLimited(), readOnlyPage(), showErrorPage(), showFatalError(), showPermissionsErrorPage(), and versionRequired().
OutputPage::setSquidMaxage | ( | $ | maxage | ) |
Set the value of the "s-maxage" part of the "Cache-control" HTTP header.
$maxage | Integer: maximum cache time on the Squid, in seconds. |
Definition at line 1208 of file OutputPage.php.
Referenced by SkinTemplate::outputPage().
OutputPage::setStatusCode | ( | $ | statusCode | ) |
Set the HTTP status code to send with the output.
$statusCode | Integer |
Definition at line 98 of file OutputPage.php.
Referenced by rateLimited().
OutputPage::setSubtitle | ( | $ | str | ) |
Replace the subtile with $str.
$str | String: new value of the subtitle |
Definition at line 522 of file OutputPage.php.
Referenced by readOnlyPage(), and SpecialRecentchangeslinked::setTopText().
OutputPage::setSyndicated | ( | $ | show = true |
) |
Add or remove feed links in the page header This is mainly kept for backward compatibility, see OutputPage::addFeedLink() for the new version.
$show | Boolean: true: add default feeds, false: remove all feeds |
Definition at line 607 of file OutputPage.php.
References setFeedAppendQuery().
OutputPage::setTitle | ( | $ | t | ) |
Set the Title object to use.
$t | Title object |
Definition at line 498 of file OutputPage.php.
References $t.
OutputPage::showErrorPage | ( | $ | title, | |
$ | msg, | |||
$ | params = array() | |||
) |
Output a standard error page.
$title | String: message key for page title | |
$msg | String: message key for page text | |
$params | Array: message parameters |
Definition at line 1737 of file OutputPage.php.
References $msg, $title, addHTML(), enableClientCache(), getTitle(), returnToMain(), setArticleRelated(), setHTMLTitle(), setPageTitle(), setRobotPolicy(), and wfMsg().
OutputPage::showFatalError | ( | $ | message | ) |
Definition at line 2038 of file OutputPage.php.
References enableClientCache(), setArticleRelated(), setPageTitle(), setRobotPolicy(), and wfMsg().
Referenced by showFileCopyError(), showFileDeleteError(), showFileNotFoundError(), showFileRenameError(), and showUnexpectedValueError().
OutputPage::showFileCopyError | ( | $ | old, | |
$ | new | |||
) |
OutputPage::showFileDeleteError | ( | $ | name | ) |
OutputPage::showFileNotFoundError | ( | $ | name | ) |
OutputPage::showFileRenameError | ( | $ | old, | |
$ | new | |||
) |
OutputPage::showLagWarning | ( | $ | lag | ) |
Show a warning about slave lag.
If the lag is higher than $wgSlaveLagCritical seconds, then the warning is a bit more obvious. If the lag is lower than $wgSlaveLagWarning, then no warning is shown.
$lag | Integer: slave lag |
Definition at line 2546 of file OutputPage.php.
References $wgLang, $wgSlaveLagCritical, $wgSlaveLagWarning, Html::rawElement(), and wrapWikiMsg().
OutputPage::showNewSectionLink | ( | ) |
OutputPage::showPermissionsErrorPage | ( | $ | errors, | |
$ | action = null | |||
) |
Output a standard permission error page.
$errors | Array: error message keys | |
$action | String: action that was denied or null if unknown |
Definition at line 1762 of file OutputPage.php.
References $action, addWikiText(), enableClientCache(), formatPermissionsErrorMessage(), getTitle(), setArticleRelated(), setHTMLTitle(), setPageTitle(), setRobotPolicy(), and wfMsg().
OutputPage::showUnexpectedValueError | ( | $ | name, | |
$ | val | |||
) |
OutputPage::styleLink | ( | $ | style, | |
$ | options | |||
) | [protected] |
Generate <link> tags for stylesheets.
$style | String: URL to the file | |
$options | Array: option, can contain 'condition', 'dir', 'media' keys |
Definition at line 2444 of file OutputPage.php.
References $options, $url, $wgContLang, $wgRequest, $wgStylePath, $wgStyleVersion, Html::linkedStyle(), and transformCssMedia().
Referenced by buildCssLinks().
OutputPage::suppressQuickbar | ( | ) |
Suppress the quickbar from the output, only for skin supporting the quickbar.
Definition at line 843 of file OutputPage.php.
OutputPage::sysopRequired | ( | ) |
OutputPage::transformCssMedia | ( | $ | media | ) |
Transform "media" attribute based on request parameters.
$media | String: current value of the "media" attribute |
Definition at line 2487 of file OutputPage.php.
References $wgHandheldForIPhone, and $wgRequest.
Referenced by styleLink().
OutputPage::tryParserCache | ( | &$ | article | ) |
$article | Article |
Definition at line 1191 of file OutputPage.php.
References addParserOutput(), ParserCache::singleton(), and wfDeprecated().
OutputPage::uncacheableBecauseRequestVars | ( | ) |
Return whether this page is not cacheable because "useskin" or "uselang" url parameters were passed.
Definition at line 1249 of file OutputPage.php.
References $wgRequest.
Referenced by sendCacheControl().
OutputPage::unexpectedValueError | ( | $ | name, | |
$ | val | |||
) |
OutputPage::versionRequired | ( | $ | version | ) |
Display an error page indicating that a given version of MediaWiki is required to use it.
$version | Mixed: the version of MediaWiki needed to use the page |
Definition at line 1781 of file OutputPage.php.
References $version, addWikiMsg(), returnToMain(), setArticleRelated(), setHTMLTitle(), setPageTitle(), setRobotPolicy(), and wfMsg().
OutputPage::wrapWikiMsg | ( | $ | wrap | ) |
This function takes a number of message/argument specifications, wraps them in some overall structure, and then parses the result and adds it to the output.
In the $wrap, $1 is replaced with the first message, $2 with the second, and so on. The subsequent arguments may either be strings, in which case they are the message names, or arrays, in which case the first element is the message name, and subsequent elements are the parameters to that message.
The special named parameter 'options' in a message specification array is passed through to the $options parameter of wfMsgExt().
Don't use this for messages that are not in users interface language.
For example:
$wgOut->wrapWikiMsg( "<div class='error'>\n$1</div>", 'some-error' );
Is equivalent to:
$wgOut->addWikiText( "<div class='error'>\n" . wfMsgNoTrans( 'some-error' ) . "</div>" );
The newline after opening div is needed in some wikitext. See bug 19226.
Definition at line 2606 of file OutputPage.php.
References $n, $name, $options, $s, addHTML(), parse(), and wfMsgExt().
Referenced by readOnlyPage(), and showLagWarning().
OutputPage::$mAllowUserJs |
Definition at line 22 of file OutputPage.php.
OutputPage::$mArticleBodyOnly = false |
Definition at line 32 of file OutputPage.php.
OutputPage::$mBodytext = '' |
Definition at line 11 of file OutputPage.php.
OutputPage::$mCategories = array() |
Definition at line 15 of file OutputPage.php.
OutputPage::$mCategoryLinks = array() |
Definition at line 15 of file OutputPage.php.
OutputPage::$mContainsNewMagic = 0 |
Definition at line 25 of file OutputPage.php.
OutputPage::$mContainsOldMagic = 0 |
Definition at line 25 of file OutputPage.php.
OutputPage::$mDebugtext = '' |
Definition at line 11 of file OutputPage.php.
OutputPage::$mDoNothing = false |
Definition at line 24 of file OutputPage.php.
OutputPage::$mEnableClientCache = true |
Definition at line 31 of file OutputPage.php.
OutputPage::$mETag = false |
Definition at line 14 of file OutputPage.php.
OutputPage::$mExtStyles = array() |
Definition at line 10 of file OutputPage.php.
OutputPage::$mFeedLinks = array() |
Definition at line 29 of file OutputPage.php.
OutputPage::$mFollowPolicy = 'follow' [private] |
Definition at line 57 of file OutputPage.php.
OutputPage::$mHeadItems = array() |
Definition at line 17 of file OutputPage.php.
OutputPage::$mHideNewSectionLink = false |
Definition at line 35 of file OutputPage.php.
OutputPage::$mHTMLtitle = '' |
Definition at line 12 of file OutputPage.php.
OutputPage::$mHTMLtitleFromPagetitle = true |
Definition at line 12 of file OutputPage.php.
OutputPage::$mIndexPolicy = 'index' [private] |
Definition at line 56 of file OutputPage.php.
OutputPage::$mInlineMsg = array() |
Definition at line 18 of file OutputPage.php.
OutputPage::$mIsarticle = true |
Definition at line 12 of file OutputPage.php.
OutputPage::$mIsArticleRelated = true |
Definition at line 26 of file OutputPage.php.
OutputPage::$mJQueryDone = false [protected] |
OutputPage::$mKeywords = array() |
Definition at line 9 of file OutputPage.php.
OutputPage::$mLanguageLinks = array() |
Definition at line 15 of file OutputPage.php.
OutputPage::$mLastModified = '' |
Definition at line 14 of file OutputPage.php.
OutputPage::$mLinkColours |
Definition at line 17 of file OutputPage.php.
OutputPage::$mLinktags = array() |
Definition at line 9 of file OutputPage.php.
OutputPage::$mMetatags = array() |
Definition at line 9 of file OutputPage.php.
OutputPage::$mNewSectionLink = false |
Definition at line 34 of file OutputPage.php.
OutputPage::$mNoGallery = false |
Definition at line 36 of file OutputPage.php.
OutputPage::$mPageLinkTitle = '' |
Definition at line 17 of file OutputPage.php.
OutputPage::$mPagetitle = '' |
Definition at line 11 of file OutputPage.php.
OutputPage::$mPageTitleActionText = '' |
Definition at line 37 of file OutputPage.php.
OutputPage::$mParserOptions = null [protected] |
Definition at line 27 of file OutputPage.php.
OutputPage::$mParseWarnings = array() |
Definition at line 38 of file OutputPage.php.
OutputPage::$mPreventClickjacking = true |
Definition at line 40 of file OutputPage.php.
OutputPage::$mPrintable = false |
Definition at line 12 of file OutputPage.php.
OutputPage::$mRedirect = '' |
Definition at line 13 of file OutputPage.php.
OutputPage::$mRevisionId = null |
Definition at line 41 of file OutputPage.php.
OutputPage::$mScripts = '' |
Definition at line 17 of file OutputPage.php.
OutputPage::$mSquidMaxage = 0 |
Definition at line 39 of file OutputPage.php.
OutputPage::$mStatusCode |
Definition at line 13 of file OutputPage.php.
OutputPage::$mSubtitle = '' |
Definition at line 13 of file OutputPage.php.
OutputPage::$mSuppressQuickbar = false |
Definition at line 23 of file OutputPage.php.
OutputPage::$mTemplateIds = array() |
Definition at line 20 of file OutputPage.php.
OutputPage::$mTitle = null [protected] |
Definition at line 42 of file OutputPage.php.
OutputPage::$mVaryHeader [private] |
Initial value:
array( 'Accept-Encoding' => array('list-contains=gzip'), 'Cookie' => null )
Definition at line 58 of file OutputPage.php.
OutputPage::$styles = array() |
An array of stylesheet filenames (relative from skins path), with options for CSS media, IE conditions, and RTL/LTR direction.
For internal use; add settings in the skin via $this->addStyle()
Definition at line 49 of file OutputPage.php.