MediaWiki  REL1_19
OutputPage Class Reference

This class should be covered by a general architecture document which does not exist as of January 2011. More...

Inheritance diagram for OutputPage:
Collaboration diagram for OutputPage:

List of all members.

Public Member Functions

 __construct (IContextSource $context=null)
 Constructor for OutputPage.
 addAcceptLanguage ()
 bug 21672: Add Accept-Language to Vary and XVO headers if there's no 'variant' parameter existed in GET.
 addBacklinkSubtitle (Title $title)
 Add a subtitle containing a backlink to a page.
 addCategoryLinks ($categories)
 Add an array of categories, with names in the keys.
 addElement ($element, $attribs=array(), $contents= '')
 Shortcut for adding an Html::element via addHTML.
 addExtensionStyle ($url)
 Register and add a stylesheet from an extension directory.
 addFeedLink ($format, $href)
 Add a feed link to the page header.
 addHeadItem ($name, $value)
 Add or replace an header item to the output.
 addHTML ($text)
 Append $text to the body HTML.
 addInlineScript ($script)
 Add a self-contained script tag with the given contents.
 addInlineStyle ($style_css, $flip= 'noflip')
 Adds inline CSS styles.
 addJsConfigVars ($keys, $value=null)
 Add one or more variables to be set in mw.config in JavaScript.
 addKeyword ($text)
 Add a keyword or a list of keywords in the page header.
 addLanguageLinks ($newLinkArray)
 Add new language links.
 addLink ($linkarr)
 Add a new <link> tag to the page header.
 addMeta ($name, $val)
 Add a new <meta> tag To add an http-equiv meta tag, precede the name with "http:".
 addMetadataLink ($linkarr)
 Add a new <link> with "rel" attribute set to "meta".
 addModuleMessages ($modules)
 Add only messages of one or more modules recognized by the resource loader.
 addModules ($modules)
 Add one or more modules recognized by the resource loader.
 addModuleScripts ($modules)
 Add only JS of one or more modules recognized by the resource loader.
 addModuleStyles ($modules)
 Add only CSS of one or more modules recognized by the resource loader.
 addParserOutput (&$parserOutput)
 Add a ParserOutput object.
 addParserOutputNoText (&$parserOutput)
 Add a ParserOutput object, but without Html.
 addReturnTo ($title, $query=array(), $text=null)
 Add a "return to" link pointing to a specified title.
 addScript ($script)
 Add raw HTML to the list of scripts (including <script> tag, etc.)
 addScriptFile ($file, $version=null)
 Add a JavaScript file out of skins/common, or a given relative path.
 addStyle ($style, $media= '', $condition= '', $dir= '')
 Add a local or specified stylesheet, with the given media options.
 addSubtitle ($str)
 Add $str to the subtitle.
 addTemplate (&$template)
 Add the output of a QuickTemplate to the output buffer.
 addVaryHeader ($header, $option=null)
 Add an HTTP header that will influence on the cache.
 addWikiMsg ()
 Add a wikitext-formatted message to the output.
 addWikiMsgArray ($name, $args)
 Add a wikitext-formatted message to the output.
 addWikiText ($text, $linestart=true, $interface=true)
 Convert wikitext to HTML and add it to the buffer Default assumes that the current page title will be used.
 addWikiTextTidy ($text, $linestart=true)
 Add wikitext with tidy enabled.
 addWikiTextTitle ($text, &$title, $linestart, $tidy=false, $interface=false)
 Add wikitext with a custom Title object.
 addWikiTextTitleTidy ($text, &$title, $linestart=true)
 Add wikitext with a custom Title object and tidy enabled.
 addWikiTextWithTitle ($text, &$title, $linestart=true)
 Add wikitext with a custom Title object.
 allowClickjacking ()
 Turn off frame-breaking.
 appendSubtitle ($str)
 Add $str to the subtitle.
 blockedPage ()
 Produce a "user is blocked" page.
 buildCssLinks ()
 Build a set of <link>s for the stylesheets specified in the $this->styles array.
 buildCssLinksArray ()
 checkLastModified ($timestamp)
 checkLastModified tells the client to use the client-cached page if possible.
 clearHTML ()
 Clear the body HTML.
 clearSubtitle ()
 Clear the subtitles.
 debug ($text)
 Add $text to the debug output.
 disable ()
 Disable output completely, i.e.
 disallowUserJs ()
 Restrict the page to loading modules bundled the software.
 enableClientCache ($state)
 Use enableClientCache(false) to force it to send nocache headers.
 forceHideNewSectionLink ()
 Forcibly hide the new section link?
 formatPermissionsErrorMessage ($errors, $action=null)
 Format a list of error messages.
 getAllowedModules ($type=null)
 Get the level of JavaScript / CSS untrustworthiness allowed on this page.
 getArticleBodyOnly ()
 Return whether the output will contain only the body of the article.
 getBottomScripts ()
 JS stuff to put at the bottom of the <body>
 getCacheVaryCookies ()
 Get the list of cookies that will influence on the cache.
 getCategories ()
 Get the list of category names this page belongs to.
 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.
 getExtStyle ()
 Get all styles added by extensions.
 getFeedAppendQuery ()
 Will currently always return null.
 getFileSearchOptions ()
 Get the files used on this page.
 getFileVersion ()
 Get the displayed file version.
 getFrameOptions ()
 Get the X-Frame-Options header value (without the name part), or false if there isn't one.
 getHeadItems ()
 Get all header items in a string.
 getHeadItemsArray ()
 Get an array of head items.
 getHeadLinks ($unused=null, $addContentType=false)
 getHeadScripts ()
 JS stuff to put in the <head>.
 getHTML ()
 Get the body HTML.
 getHTMLTitle ()
 Return the "HTML title", i.e.
 getJSVars ()
 Get an array containing the variables to be set in mw.config in JavaScript.
 getLanguageLinks ()
 Get the list of language links.
 getMetadataAttribute ()
 Get the value of the "rel" attribute for metadata links.
 getModuleMessages ($filter=false, $position=null)
 Get the list of module messages to include on this page.
 getModules ($filter=false, $position=null, $param= 'mModules')
 Get the list of modules to include on this page.
 getModuleScripts ($filter=false, $position=null)
 Get the list of module JS to include on this page.
 getModuleStyles ($filter=false, $position=null)
 Get the list of module CSS to include on this page.
 getPageTitle ()
 Return the "page title", i.e.
 getPageTitleActionText ()
 Get the value of the "action text".
 getPreventClickjacking ()
 Get the prevent-clickjacking flag.
 getRedirect ()
 Get the URL to redirect to, or an empty string if not redirect URL set.
 getResourceLoader ()
 Get a ResourceLoader object associated with this OutputPage.
 getRevisionId ()
 Get the displayed revision ID.
 getRevisionTimestamp ()
 Get the timestamp of displayed revision.
 getScript ()
 Get all registered JS and CSS tags for the header.
 getScriptsForBottomQueue ($inHead)
 JS stuff to put at the 'bottom', which can either be the bottom of the <body> or the bottom of the <head> depending on $wgResourceLoaderExperimentalAsyncLoading: modules marked with position 'bottom', legacy scripts ($this->mScripts), user preferences, site JS and user JS.
 getSubtitle ()
 Get the subtitle.
 getSyndicationLinks ()
 Return URLs for each supported syndication format for this page.
 getTemplateIds ()
 Get the templates used on this page.
 getXVO ()
 Get a complete X-Vary-Options header.
 hasHeadItem ($name)
 Check if the header item $name is already set.
 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.
 headElement (Skin $sk, $includeStyle=true)
 includeJQuery ($modules=array())
 Include jQuery core.
 isArticle ()
 Return whether the content displayed page is related to the source of the corresponding article on the wiki.
 isArticleRelated ()
 Return whether this page is related an article on the wiki.
 isDisabled ()
 Return whether the output will be completely disabled.
 isPrintable ()
 Return whether the page is "printable".
 isSyndicated ()
 Should we output feed links for this page?
 isUserJsAllowed ()
 Return whether user JavaScript is allowed for this page.
 loginToUse ()
 Produce the stock "please login to use the wiki" page.
 out ($ins)
 Actually output something with print().
 output ()
 Finally, all the text has been munged and accumulated into the object, let's actually output it:
 parse ($text, $linestart=true, $interface=false, $language=null)
 Parse wikitext and return the HTML.
 parseInline ($text, $linestart=true, $interface=false)
 Parse wikitext, strip paragraphs, and return the HTML.
 parserOptions ($options=null)
 Get/set the ParserOptions object to use for wikitext parsing.
 permissionRequired ($permission)
 Display an error page noting that a given permission bit is required.
 prepareErrorPage ($pageTitle, $htmlTitle=false)
 Prepare this object to display an error page; disable caching and indexing, clear the current text and redirect, set the page's title and optionally an custom HTML title (content of the <title> tag).
 prependHTML ($text)
 Prepend $text to the body HTML.
 preventClickjacking ($enable=true)
 Set a flag which will cause an X-Frame-Options header appropriate for edit pages to be sent.
 rateLimited ()
 Turn off regular page output and return an error reponse for when rate limiting has triggered.
 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.
 redirect ($url, $responsecode= '302')
 Redirect to $url rather than displaying the normal page.
 reduceAllowedModuleOrigin ($level)
 Limit the highest level of CSS/JS untrustworthiness allowed.
 reduceAllowedModules ($type, $level)
 Limit the highest level of CSS/JS untrustworthiness allowed.
 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.
 sendCacheControl ()
 Send cache control HTTP headers.
 setAllowedModules ($type, $level)
 Set the highest level of CSS/JS untrustworthiness allowed.
 setArticleBodyOnly ($only)
 Set whether the output should only contain the body of the article, without any skin, sidebar, etc.
 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.
 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.
 setCategoryLinks ($categories)
 Reset the category links (but not the category list) and add $categories.
 setETag ($tag)
 Set the value of the ETag HTTP header, only used if $wgUseETag is true.
 setFeedAppendQuery ($val)
 Add default feeds to the page header This is mainly kept for backward compatibility, see OutputPage::addFeedLink() for the new version.
 setFileVersion ($file)
 Set the displayed file version.
 setFollowPolicy ($policy)
 Set the follow policy for the page, but leave the index policy un- touched.
 setHTMLTitle ($name)
 "HTML title" means the contents of <title>.
 setIndexPolicy ($policy)
 Set the index policy for the page, but leave the follow policy un- touched.
 setLanguageLinks ($newLinkArray)
 Reset the language links and add new language links.
 setLastModified ($timestamp)
 Override the last modified timestamp.
 setPageTitle ($name)
 "Page title" means the contents of <h1>.
 setPageTitleActionText ($text)
 Set the new value of the "action text", this will be added to the "HTML title", separated from it with " - ".
 setPrintable ()
 Set the page as printable, i.e.
 setRedirectedFrom ($t)
 Set $mRedirectedFrom, the Title of the page which redirected us to the current page.
 setRevisionId ($revid)
 Set the revision ID which will be seen by the wiki text parser for things such as embedded {{REVISIONID}} variable use.
 setRevisionTimestamp ($timestmap)
 Set the timestamp of the revision which will be displayed.
 setRobotPolicy ($policy)
 Set the robot policy for the page: <http://www.robotstxt.org/meta.html>
 setSquidMaxage ($maxage)
 Set the value of the "s-maxage" part of the "Cache-control" HTTP header.
 setStatusCode ($statusCode)
 Set the HTTP status code to send with the output.
 setSubtitle ($str)
 Replace the subtile with $str.
 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.
 setTitle (Title $t)
 Set the Title object to use.
 showErrorPage ($title, $msg, $params=array())
 Output a standard error page.
 showFatalError ($message)
 showFileCopyError ($old, $new)
 showFileDeleteError ($name)
 showFileNotFoundError ($name)
 showFileRenameError ($old, $new)
 showLagWarning ($lag)
 Show a warning about slave lag.
 showNewSectionLink ()
 Show an "add new section" link?
 showPermissionsErrorPage ($errors, $action=null)
 Output a standard permission error page.
 showUnexpectedValueError ($name, $val)
 uncacheableBecauseRequestVars ()
 Return whether this page is not cacheable because "useskin" or "uselang" URL parameters were passed.
 userCanPreview ()
 To make it harder for someone to slip a user a fake user-JavaScript or user-CSS preview, a random token is associated with the login session.
 versionRequired ($version)
 Display an error page indicating that a given version of MediaWiki is required to use it.
 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.

Static Public Member Functions

static getStatusMessage ($code)
 Get the message associed with the HTTP response code $code.
static transformCssMedia ($media)
 Transform "media" attribute based on request parameters.

Public Attributes

 $mArticleBodyOnly = false
 Flag if output should only contain the body of the article.
 $mBodytext = ''
 Contains all of the <body> content. Should be private we got set/get accessors and the append() method.
 $mCategories = array()
 $mCategoryLinks = array()
 $mContainsNewMagic = 0
 $mContainsOldMagic = 0
 $mDebugtext = ''
 Holds the debug lines that will be output as comments in page source if $wgDebugComments is enabled.
 $mDoNothing = false
 I just love the name for this self documenting variable.
 $mEnableClientCache = true
 $mETag = false
 Should be private.
 $mExtStyles = array()
 Additional stylesheets. Looks like this is for extensions. Might be replaced by resource loader.
 $mFeedLinks = array()
 Handles the atom / rss links.
 $mFeedLinksAppendQuery = null
 $mFileVersion = null
 $mHeadItems = array()
 Array of elements in <head>. Parser might add its own headers!
 $mHideNewSectionLink = false
 $mHTMLtitle = ''
 Should be private. Stores contents of <title> tag.
 $mImageTimeKeys = array()
 $mInlineMsg = array()
 $mInlineStyles = ''
 Inline CSS styles.
 $mIsarticle = false
 Should be private. Is the displayed content related to the source of the corresponding wiki article.
 $mIsArticleRelated = true
 Should be private.
 $mJsConfigVars = array()
 $mKeywords = array()
 <meta keyworkds="stuff"> most of the time the first 10 links to an article
 $mLanguageLinks = array()
 Should be private. Array of Interwiki Prefixed (non DB key) Titles (e.g. 'fr:Test page')
 $mLastModified = ''
 mLastModified and mEtag are used for sending cache control.
 $mLinkColours
 $mLinktags = array()
 $mMetatags = array()
 Should be private. Used with addMeta() which adds <meta>
 $mModuleMessages = array()
 $mModules = array()
 $mModuleScripts = array()
 $mModuleStyles = array()
 $mNewSectionLink = false
 $mNoGallery = false
 Comes from the parser.
 $mPageLinkTitle = ''
 Used by skin template.
 $mPagetitle = ''
 Should be private - has getter and setter. Contains the HTML title.
 $mPageTitleActionText = ''
 $mParseWarnings = array()
 $mPreventClickjacking = true
 $mPrintable = false
 Should be private.
 $mRedirect = ''
 $mRedirectCode = ''
 $mResourceLoader
 $mRevisionId = null
 should be private. To include the variable {{REVISIONID}}
 $mScripts = ''
 Should be private.
 $mSquidMaxage = 0
 $mStatusCode
 $mTemplateIds = array()
 $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

 filterModules ($modules, $position=null, $type=ResourceLoaderModule::TYPE_COMBINED)
 Filter an array of modules to remove insufficiently trustworthy members, and modules which are no longer registered (eg a page is cached before an extension is disabled)
 makeResourceLoaderLink ($modules, $only, $useESI=false, array $extraQuery=array(), $loadCall=false)
 TODO: Document.
 styleLink ($style, $options)
 Generate <link> tags for stylesheets.

Protected Attributes

 $mAllowedModuleOrigin = ResourceLoaderModule::ORIGIN_ALL
 $mJQueryDone = false
 Whether jQuery is already handled.
 $mParserOptions = null

Private Member Functions

 addDefaultModules ()
 Add the default ResourceLoader modules to this object.
 feedLink ($type, $url, $text)
 Generate a <link rel/>=""> for a feed.

Private Attributes

 $mFollowPolicy = 'follow'
 $mIndexPolicy = 'index'
 $mRedirectedFrom = null
 $mRevisionTimestamp = null
 $mSubtitle = array()
 Should be private.
 $mVaryHeader

Detailed Description

This class should be covered by a general architecture document which does not exist as of January 2011.

This is one of the Core classes and should be read at least once by any new developers.

This class is used to prepare the final rendering. A skin is then applied to the output parameters (links, javascript, html, categories ...).

Todo:
FIXME: Another class handles sending the whole page to the client.

Some comments comes from a pairing session between Zak Greant and Antoine Musso in November 2010.

Todo:
document

Definition at line 21 of file OutputPage.php.


Constructor & Destructor Documentation

OutputPage::__construct ( IContextSource context = null)

Constructor for OutputPage.

This should not be called directly. Instead a new RequestContext should be created and it will implicitly create a OutputPage tied to that context.

Definition at line 239 of file OutputPage.php.

References ContextSource\$context, ContextSource\setContext(), and wfDeprecated().

Here is the call graph for this function:


Member Function Documentation

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.

Definition at line 1774 of file OutputPage.php.

References addVaryHeader(), ContextSource\getRequest(), and ContextSource\getTitle().

Referenced by sendCacheControl().

Here is the call graph for this function:

Here is the caller graph for this function:

Add a subtitle containing a backlink to a page.

Parameters:
$titleTitle to link to

Definition at line 876 of file OutputPage.php.

References addSubtitle(), Title\isRedirect(), Linker\link(), and ContextSource\msg().

Referenced by readOnlyPage().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::addCategoryLinks ( categories)

Add an array of categories, with names in the keys.

Parameters:
$categoriesArray mapping category name => sort key

Definition at line 1109 of file OutputPage.php.

References $dbr, $lb, $res, $title, $wgContLang, Linker\link(), Title\makeTitleSafe(), LinkCache\singleton(), wfGetDB(), and wfRunHooks().

Referenced by addParserOutputNoText(), and setCategoryLinks().

Here is the call graph for this function:

Here is the caller graph for this function:

Add the default ResourceLoader modules to this object.

Definition at line 2470 of file OutputPage.php.

References $wgAjaxWatch, $wgEnableMWSuggest, $wgIncludeLegacyJavaScript, $wgPreloadJavaScriptMwUtil, $wgUseAjax, addModules(), ContextSource\getUser(), isArticle(), and wfRunHooks().

Referenced by output().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::addElement ( element,
attribs = array(),
contents = '' 
)

Shortcut for adding an Html::element via addHTML.

Since:
1.19
Parameters:
$elementstring
$attribsarray
$contentsstring

Definition at line 1297 of file OutputPage.php.

References addHTML(), and Html\element().

Here is the call graph for this function:

Register and add a stylesheet from an extension directory.

Parameters:
$urlString 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 356 of file OutputPage.php.

References $url.

OutputPage::addFeedLink ( format,
href 
)

Add a feed link to the page header.

Parameters:
$formatString: feed type, should be a key of $wgFeedClasses
$hrefString: URL

Definition at line 996 of file OutputPage.php.

References $wgAdvertisedFeedTypes.

OutputPage::addHeadItem ( name,
value 
)

Add or replace an header item to the output.

Parameters:
$nameString: item name
$valueString: raw HTML

Definition at line 553 of file OutputPage.php.

Referenced by SkinVector\initPage().

Here is the caller graph for this function:

OutputPage::addHTML ( text)

Append $text to the body HTML.

Parameters:
$textString: HTML

Definition at line 1284 of file OutputPage.php.

Referenced by addElement(), addParserOutput(), addReturnTo(), addTemplate(), addWikiMsgArray(), readOnlyPage(), showErrorPage(), showFatalError(), and showPermissionsErrorPage().

Here is the caller graph for this function:

Add a self-contained script tag with the given contents.

Parameters:
$scriptString: JavaScript text, no <script> tags

Definition at line 394 of file OutputPage.php.

References Html\inlineScript().

Here is the call graph for this function:

OutputPage::addInlineStyle ( style_css,
flip = 'noflip' 
)

Adds inline CSS styles.

Parameters:
$style_cssMixed: inline CSS
$flipString: Set to 'flip' to flip the CSS if needed

Definition at line 3246 of file OutputPage.php.

References ContextSource\getLanguage(), Html\inlineStyle(), and CSSJanus\transform().

Referenced by SkinStandard\setupSkinUserCss(), SkinCologneBlue\setupSkinUserCss(), and SkinSimple\setupSkinUserCss().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::addJsConfigVars ( keys,
value = null 
)

Add one or more variables to be set in mw.config in JavaScript.

Parameters:
$key{String|Array} Key or array of key/value pars.
$value{Mixed} [optional] Value of the configuration variable.

Definition at line 2837 of file OutputPage.php.

References $keys.

Add a keyword or a list of keywords in the page header.

Parameters:
$textString or array of strings

Definition at line 294 of file OutputPage.php.

OutputPage::addLanguageLinks ( newLinkArray)

Add new language links.

Parameters:
$newLinkArrayAssociative array mapping language code to the page name

Definition at line 1081 of file OutputPage.php.

OutputPage::addLink ( linkarr)

Add a new <link> tag to the page header.

Parameters:
$linkarrArray: associative array of attributes.

Definition at line 307 of file OutputPage.php.

Referenced by addMetadataLink(), and addReturnTo().

Here is the caller graph for this function:

OutputPage::addMeta ( name,
val 
)

Add a new <meta> tag To add an http-equiv meta tag, precede the name with "http:".

Parameters:
$nameString tag name
$valString tag value

Definition at line 285 of file OutputPage.php.

Add a new <link> with "rel" attribute set to "meta".

Parameters:
$linkarrArray: 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 318 of file OutputPage.php.

References addLink(), and getMetadataAttribute().

Here is the call graph for this function:

Add only messages of one or more modules recognized by the resource loader.

Module messages added through this function will be loaded by the resource loader when the page loads.

Parameters:
$modulesMixed: module name (string) or array of module names

Definition at line 521 of file OutputPage.php.

Referenced by addParserOutputNoText().

Here is the caller graph for this function:

OutputPage::addModules ( modules)

Add one or more modules recognized by the resource loader.

Modules added through this function will be loaded by the resource loader when the page loads.

Parameters:
$modulesMixed: module name (string) or array of module names

Definition at line 452 of file OutputPage.php.

Referenced by addDefaultModules(), MWDebug\addModules(), and addParserOutputNoText().

Here is the caller graph for this function:

Add only JS of one or more modules recognized by the resource loader.

Module scripts added through this function will be loaded by the resource loader when the page loads.

Parameters:
$modulesMixed: module name (string) or array of module names

Definition at line 475 of file OutputPage.php.

Referenced by addParserOutputNoText(), and SkinVector\initPage().

Here is the caller graph for this function:

Add only CSS of one or more modules recognized by the resource loader.

Module styles added through this function will be loaded by the resource loader when the page loads.

Parameters:
$modulesMixed: module name (string) or array of module names

Definition at line 498 of file OutputPage.php.

Referenced by addParserOutputNoText(), headElement(), SkinLegacy\setupSkinUserCss(), SkinNostalgia\setupSkinUserCss(), SkinStandard\setupSkinUserCss(), SkinCologneBlue\setupSkinUserCss(), SkinModern\setupSkinUserCss(), SkinSimple\setupSkinUserCss(), SkinChick\setupSkinUserCss(), SkinMonoBook\setupSkinUserCss(), SkinVector\setupSkinUserCss(), and SkinTemplate\setupSkinUserCss().

Here is the caller graph for this function:

OutputPage::addParserOutput ( &$  parserOutput)

Add a ParserOutput object.

Parameters:
$parserOutputParserOutput

Definition at line 1557 of file OutputPage.php.

References addHTML(), addParserOutputNoText(), and wfRunHooks().

Referenced by addWikiTextTitle().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::addParserOutputNoText ( &$  parserOutput)

Add a ParserOutput object, but without Html.

Parameters:
$parserOutputParserOutput object

Definition at line 1508 of file OutputPage.php.

References $wgParserOutputHooks, addCategoryLinks(), addModuleMessages(), addModules(), addModuleScripts(), addModuleStyles(), enableClientCache(), and wfRunHooks().

Referenced by addParserOutput().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::addReturnTo ( title,
query = array(),
text = null 
)

Add a "return to" link pointing to a specified title.

Parameters:
$titleTitle to link
$queryString query string
$textString text of the link (input is not escaped)

Definition at line 2365 of file OutputPage.php.

References $title, addHTML(), addLink(), Linker\link(), and ContextSource\msg().

Referenced by returnToMain().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::addScript ( script)

Add raw HTML to the list of scripts (including <script> tag, etc.)

Parameters:
$scriptString: raw HTML

Definition at line 344 of file OutputPage.php.

Referenced by addScriptFile().

Here is the caller graph for this function:

OutputPage::addScriptFile ( file,
version = null 
)

Add a JavaScript file out of skins/common, or a given relative path.

Parameters:
$fileString: filename in skins/common or complete on-server path (/foo/bar.js)
$versionString: style version of the file. Defaults to $wgStyleVersion

Definition at line 376 of file OutputPage.php.

References $file, $path, $version, $wgStylePath, $wgStyleVersion, addScript(), Html\linkedScript(), and wfAppendQuery().

Here is the call graph for this function:

OutputPage::addStyle ( style,
media = '',
condition = '',
dir = '' 
)

Add a local or specified stylesheet, with the given media options.

Meant primarily for internal use...

Parameters:
$styleString: URL to the file
$mediaString: to specify a media type, 'screen', 'printable', 'handheld' or any.
$conditionString: for IE conditional comments, specifying an IE version
$dirString: set to 'rtl' or 'ltr' for direction-specific sheets

Definition at line 3225 of file OutputPage.php.

References $dir, and $options.

Referenced by buildCssLinksArray(), SkinChick\setupSkinUserCss(), and SkinMonoBook\setupSkinUserCss().

Here is the caller graph for this function:

Add $str to the subtitle.

Parameters:
$strString|Message to add to the subtitle

Definition at line 863 of file OutputPage.php.

References ContextSource\getContext().

Referenced by addBacklinkSubtitle(), appendSubtitle(), and setSubtitle().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::addTemplate ( &$  template)

Add the output of a QuickTemplate to the output buffer.

Parameters:
$templateQuickTemplate

Definition at line 1570 of file OutputPage.php.

References addHTML().

Here is the call graph for this function:

OutputPage::addVaryHeader ( header,
option = null 
)

Add an HTTP header that will influence on the cache.

Parameters:
$headerString: header name
$optionArray|null
Todo:
FIXME: Document the $option parameter; it appears to be for X-Vary-Options but what format is acceptable?

Definition at line 1726 of file OutputPage.php.

Referenced by addAcceptLanguage(), getXVO(), and output().

Here is the caller graph for this function:

Add a wikitext-formatted message to the output.

This is equivalent to:

$wgOut->addWikiText( wfMsgNoTrans( ... ) )

Definition at line 3455 of file OutputPage.php.

References addWikiMsgArray().

Referenced by readOnlyPage(), and versionRequired().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::addWikiMsgArray ( name,
args 
)

Add a wikitext-formatted message to the output.

Like addWikiMsg() except the parameters are taken as an array instead of a variable argument list.

Parameters:
$namestring
$argsarray

Definition at line 3469 of file OutputPage.php.

References addHTML(), and ContextSource\msg().

Referenced by addWikiMsg(), and showErrorPage().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::addWikiText ( text,
linestart = true,
interface = true 
)

Convert wikitext to HTML and add it to the buffer Default assumes that the current page title will be used.

Parameters:
$textString
$linestartBoolean: is this the start of a line?
$interfaceBoolean: is this text in the user interface language?

Definition at line 1434 of file OutputPage.php.

References $title, addWikiTextTitle(), and ContextSource\getTitle().

Referenced by readOnlyPage(), showPermissionsErrorPage(), and wrapWikiMsg().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::addWikiTextTidy ( text,
linestart = true 
)

Add wikitext with tidy enabled.

Parameters:
$textString: wikitext
$linestartBoolean: is this the start of a line?

Definition at line 1467 of file OutputPage.php.

References $title, addWikiTextTitleTidy(), and ContextSource\getTitle().

Here is the call graph for this function:

OutputPage::addWikiTextTitle ( text,
&$  title,
linestart,
tidy = false,
interface = false 
)

Add wikitext with a custom Title object.

Parameters:
$textString: wikitext
$titleTitle object
$linestartBoolean: is this the start of a line?
$tidyBoolean: whether to use tidy
$interfaceBoolean: whether it is an interface message (for example disables conversion)

Definition at line 1482 of file OutputPage.php.

References $title, $wgParser, addParserOutput(), parserOptions(), wfProfileIn(), and wfProfileOut().

Referenced by addWikiText(), addWikiTextTitleTidy(), and addWikiTextWithTitle().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::addWikiTextTitleTidy ( text,
&$  title,
linestart = true 
)

Add wikitext with a custom Title object and tidy enabled.

Parameters:
$textString: wikitext
$titleTitle object
$linestartBoolean: is this the start of a line?

Definition at line 1457 of file OutputPage.php.

References $title, and addWikiTextTitle().

Referenced by addWikiTextTidy().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::addWikiTextWithTitle ( text,
&$  title,
linestart = true 
)

Add wikitext with a custom Title object.

Parameters:
$textString: wikitext
$titleTitle object
$linestartBoolean: is this the start of a line?

Definition at line 1446 of file OutputPage.php.

References $title, and addWikiTextTitle().

Here is the call graph for this function:

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 1819 of file OutputPage.php.

Add $str to the subtitle.

Deprecated:
in 1.19; use addSubtitle() instead
Parameters:
$strString|Message to add to the subtitle

Definition at line 854 of file OutputPage.php.

References addSubtitle().

Here is the call graph for this function:

Produce a "user is blocked" page.

Deprecated:
since 1.18

Definition at line 2033 of file OutputPage.php.

References ContextSource\getUser().

Here is the call graph for this function:

Build a set of <link>s for the stylesheets specified in the $this->styles array.

These will be applied to various media & IE conditionals.

Returns:
string

Definition at line 3260 of file OutputPage.php.

References $resourceLoader, $styles, $wgAllowUserCss, $wgAllowUserCssPrefs, $wgContLang, $wgLang, $wgUseSiteCss, buildCssLinksArray(), Html\element(), getModuleStyles(), ContextSource\getRequest(), getResourceLoader(), ContextSource\getSkin(), ContextSource\getTitle(), ContextSource\getUser(), Html\inlineStyle(), makeResourceLoaderLink(), CSSJanus\transform(), ResourceLoaderModule\TYPE_STYLES, and userCanPreview().

Referenced by headElement().

Here is the call graph for this function:

Here is the caller graph for this function:

Returns:
Array

Definition at line 3350 of file OutputPage.php.

References $file, $options, $url, addStyle(), and styleLink().

Referenced by buildCssLinks().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Parameters:
$timestampstring
Returns:
Boolean: true iff cache-ok headers was sent.

Definition at line 607 of file OutputPage.php.

References $wgCacheEpoch, $wgCachePages, disable(), ContextSource\getRequest(), ContextSource\getUser(), sendCacheControl(), wfClearOutputBuffers(), wfDebug(), wfRestoreWarnings(), wfRunHooks(), wfSuppressWarnings(), and wfTimestamp().

Here is the call graph for this function:

Clear the body HTML.

Definition at line 1304 of file OutputPage.php.

Referenced by prepareErrorPage().

Here is the caller graph for this function:

Clear the subtitles.

Definition at line 887 of file OutputPage.php.

Referenced by prepareErrorPage(), and setSubtitle().

Here is the caller graph for this function:

OutputPage::debug ( text)

Add $text to the debug output.

Parameters:
$textString: debug text

Definition at line 1322 of file OutputPage.php.

Disable output completely, i.e.

calling output() will have no effect

Definition at line 920 of file OutputPage.php.

Referenced by checkLastModified().

Here is the caller graph for this function:

Restrict the page to loading modules bundled the software.

Disallows the queue to contain any modules which can be modified by wiki users to load on this page.

Definition at line 1202 of file OutputPage.php.

References ResourceLoaderModule\ORIGIN_CORE_INDIVIDUAL, and reduceAllowedModuleOrigin().

Here is the call graph for this function:

Use enableClientCache(false) to force it to send nocache headers.

Parameters:
$statebool
Returns:
bool

Definition at line 1657 of file OutputPage.php.

References wfSetVar().

Referenced by addParserOutputNoText(), and prepareErrorPage().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::feedLink ( type,
url,
text 
) [private]

Generate a <link rel/>=""> for a feed.

Parameters:
$typeString: feed type
$urlString: URL to the feed
$textString: value of the "title" attribute
Returns:
String: HTML fragment

Definition at line 3207 of file OutputPage.php.

References $url, and Html\element().

Referenced by getHeadLinks().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::filterModules ( modules,
position = null,
type = ResourceLoaderModule::TYPE_COMBINED 
) [protected]

Filter an array of modules to remove insufficiently trustworthy members, and modules which are no longer registered (eg a page is cached before an extension is disabled)

Parameters:
$modulesArray
$positionString if not null, only return modules with this position
$typestring
Returns:
Array

Definition at line 415 of file OutputPage.php.

References $resourceLoader, getAllowedModules(), ResourceLoaderModule\getOrigin(), and getResourceLoader().

Referenced by getModules().

Here is the call graph for this function:

Here is the caller graph for this function:

Forcibly hide the new section link?

Returns:
Boolean

Definition at line 947 of file OutputPage.php.

OutputPage::formatPermissionsErrorMessage ( errors,
action = null 
)

Format a list of error messages.

Parameters:
$errorsArray of arrays returned by Title::getUserPermissionsErrors
$actionString: action that was denied or null if unknown
Returns:
String: the wikitext error-messages, formatted into a list.

Definition at line 2198 of file OutputPage.php.

References ContextSource\msg().

Referenced by readOnlyPage(), and showPermissionsErrorPage().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::getAllowedModules ( type = null)

Get the level of JavaScript / CSS untrustworthiness allowed on this page.

See also:
ResourceLoaderModule::$origin
Parameters:
string$typeUnused: Module origin allowance used to be fragmented by ResourceLoaderModule TYPE_ constants.
Returns:
Int ResourceLoaderModule ORIGIN_ class constant

Definition at line 1226 of file OutputPage.php.

Referenced by filterModules(), isUserJsAllowed(), and makeResourceLoaderLink().

Here is the caller graph for this function:

Return whether the output will contain only the body of the article.

Returns:
Boolean

Definition at line 592 of file OutputPage.php.

JS stuff to put at the bottom of the <body>

Definition at line 2822 of file OutputPage.php.

References $wgResourceLoaderExperimentalAsyncLoading, and getScriptsForBottomQueue().

Here is the call graph for this function:

Get the list of cookies that will influence on the cache.

Returns:
Array

Definition at line 1666 of file OutputPage.php.

References $wgCacheVaryCookies, $wgCookiePrefix, and wfRunHooks().

Referenced by getXVO(), and haveCacheVaryCookies().

Here is the call graph for this function:

Here is the caller graph for this function:

Get the list of category names this page belongs to.

Returns:
Array of strings

Definition at line 1192 of file OutputPage.php.

Referenced by getJSVars().

Here is the caller graph for this function:

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.

Returns:
Array

Definition at line 1183 of file OutputPage.php.

Get all styles added by extensions.

Returns:
Array

Definition at line 365 of file OutputPage.php.

Will currently always return null.

Returns:
null

Definition at line 1025 of file OutputPage.php.

Get the files used on this page.

Returns:
Array (dbKey => array('time' => MW timestamp or null, 'sha1' => sha1 or ''))
Since:
1.18

Definition at line 1422 of file OutputPage.php.

Get the displayed file version.

Returns:
Array|null ('time' => MW timestamp, 'sha1' => sha1)

Definition at line 1402 of file OutputPage.php.

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.

Returns:
string

Definition at line 1840 of file OutputPage.php.

References $wgBreakFrames, and $wgEditPageFrameOptions.

Referenced by getJSVars(), and output().

Here is the caller graph for this function:

Get all header items in a string.

Returns:
String

Definition at line 539 of file OutputPage.php.

Referenced by getScript(), and headElement().

Here is the caller graph for this function:

Get an array of head items.

Returns:
Array

Definition at line 530 of file OutputPage.php.

Referenced by ParserOutput\addOutputPageMetadata().

Here is the caller graph for this function:

OutputPage::getHeadLinks ( unused = null,
addContentType = false 
)

JS stuff to put in the <head>.

This is the startup module, config vars and modules marked with position 'top'

Returns:
String: HTML fragment

Definition at line 2700 of file OutputPage.php.

References $wgResourceLoaderExperimentalAsyncLoading, Xml\encodeJsCall(), getJSVars(), getModuleMessages(), getModules(), getModuleScripts(), getScriptsForBottomQueue(), Html\inlineScript(), ResourceLoader\makeConfigSetScript(), ResourceLoader\makeLoaderConditionalScript(), makeResourceLoaderLink(), ResourceLoaderModule\TYPE_COMBINED, ResourceLoaderModule\TYPE_MESSAGES, and ResourceLoaderModule\TYPE_SCRIPTS.

Referenced by headElement().

Here is the call graph for this function:

Here is the caller graph for this function:

Get the body HTML.

Returns:
String: HTML

Definition at line 1313 of file OutputPage.php.

Return the "HTML title", i.e.

the content of the <title> tag.

Returns:
String

Definition at line 784 of file OutputPage.php.

Referenced by headElement().

Here is the caller graph for this function:

Get an array containing the variables to be set in mw.config in JavaScript.

DO NOT CALL THIS FROM OUTSIDE OF THIS CLASS OR Skin::makeGlobalVariablesScript(). This is only public until that function is removed. You have been warned.

Do not add things here which can be evaluated in ResourceLoaderStartupScript

  • in other words, page-independent/site-wide variables (without state). You will only be adding bloat to the html page and causing page caches to have to be purged on configuration changes.
    Returns:
    array

Definition at line 2861 of file OutputPage.php.

References $title, $wgEnableMWSuggest, $wgUseAjax, ContextSource\canUseWikiPage(), MWNamespace\exists(), Action\getActionName(), MWNamespace\getCanonicalName(), getCategories(), ContextSource\getContext(), getFrameOptions(), ContextSource\getSkin(), ContextSource\getTitle(), ContextSource\getUser(), ContextSource\getWikiPage(), isArticle(), SpecialPageFactory\resolveAlias(), SearchEngine\userNamespaces(), and wfRunHooks().

Referenced by getHeadScripts().

Here is the call graph for this function:

Here is the caller graph for this function:

Get the list of language links.

Returns:
Array of Interwiki Prefixed (non DB key) Titles (e.g. 'fr:Test page')

Definition at line 1100 of file OutputPage.php.

Get the value of the "rel" attribute for metadata links.

Returns:
String

Definition at line 328 of file OutputPage.php.

Referenced by addMetadataLink().

Here is the caller graph for this function:

OutputPage::getModuleMessages ( filter = false,
position = null 
)

Get the list of module messages to include on this page.

Parameters:
$filter
$position
Returns:
Array of module names

Definition at line 510 of file OutputPage.php.

References getModules().

Referenced by ParserOutput\addOutputPageMetadata(), getHeadScripts(), and getScriptsForBottomQueue().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::getModules ( filter = false,
position = null,
param = 'mModules' 
)

Get the list of modules to include on this page.

Parameters:
$filterBool whether to filter out insufficiently trustworthy modules
$positionString if not null, only return modules with this position
$paramstring
Returns:
Array of module names

Definition at line 438 of file OutputPage.php.

References filterModules().

Referenced by ParserOutput\addOutputPageMetadata(), getHeadScripts(), getModuleMessages(), getModuleScripts(), getModuleStyles(), and getScriptsForBottomQueue().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::getModuleScripts ( filter = false,
position = null 
)

Get the list of module JS to include on this page.

Parameters:
$filter
$position
Returns:
array of module names

Definition at line 464 of file OutputPage.php.

References getModules().

Referenced by ParserOutput\addOutputPageMetadata(), getHeadScripts(), and getScriptsForBottomQueue().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::getModuleStyles ( filter = false,
position = null 
)

Get the list of module CSS to include on this page.

Parameters:
$filter
$position
Returns:
Array of module names

Definition at line 487 of file OutputPage.php.

References getModules().

Referenced by ParserOutput\addOutputPageMetadata(), and buildCssLinks().

Here is the call graph for this function:

Here is the caller graph for this function:

Return the "page title", i.e.

the content of the <h1> tag.

Returns:
String

Definition at line 824 of file OutputPage.php.

Referenced by headElement().

Here is the caller graph for this function:

Get the value of the "action text".

Returns:
String

Definition at line 759 of file OutputPage.php.

Get the prevent-clickjacking flag.

Since:
1.24
Returns:
boolean

Definition at line 1829 of file OutputPage.php.

Referenced by ParserOutput\addOutputPageMetadata().

Here is the caller graph for this function:

Get the URL to redirect to, or an empty string if not redirect URL set.

Returns:
String

Definition at line 265 of file OutputPage.php.

Get a ResourceLoader object associated with this OutputPage.

Returns:
ResourceLoader

Definition at line 2520 of file OutputPage.php.

Referenced by buildCssLinks(), filterModules(), and makeResourceLoaderLink().

Here is the caller graph for this function:

Get the displayed revision ID.

Returns:
Integer

Definition at line 1358 of file OutputPage.php.

Get the timestamp of displayed revision.

This will be null if not filled by setRevisionTimestamp().

Returns:
String or null

Definition at line 1379 of file OutputPage.php.

Get all registered JS and CSS tags for the header.

Returns:
String

Definition at line 403 of file OutputPage.php.

References getHeadItems().

Here is the call graph for this function:

JS stuff to put at the 'bottom', which can either be the bottom of the <body> or the bottom of the <head> depending on $wgResourceLoaderExperimentalAsyncLoading: modules marked with position 'bottom', legacy scripts ($this->mScripts), user preferences, site JS and user JS.

Parameters:
$inHeadboolean If true, this HTML goes into the <head>, if false it goes into the <body>
Returns:
string

Definition at line 2751 of file OutputPage.php.

References $wgAllowUserJs, $wgUseSiteJs, Xml\encodeJsCall(), getModuleMessages(), getModules(), getModuleScripts(), ContextSource\getRequest(), ContextSource\getTitle(), ContextSource\getUser(), Html\inlineScript(), ResourceLoader\makeLoaderConditionalScript(), makeResourceLoaderLink(), ResourceLoaderModule\TYPE_COMBINED, ResourceLoaderModule\TYPE_MESSAGES, ResourceLoaderModule\TYPE_SCRIPTS, and userCanPreview().

Referenced by getBottomScripts(), and getHeadScripts().

Here is the call graph for this function:

Here is the caller graph for this function:

static OutputPage::getStatusMessage ( code) [static]

Get the message associed with the HTTP response code $code.

Parameters:
$codeInteger: status code
Returns:
String or null: message or null if $code is not in the list of messages
Deprecated:
since 1.18 Use HttpStatus::getMessage() instead.

Definition at line 1927 of file OutputPage.php.

References HttpStatus\getMessage(), and wfDeprecated().

Here is the call graph for this function:

Get the subtitle.

Returns:
String

Definition at line 896 of file OutputPage.php.

Return URLs for each supported syndication format for this page.

Returns:
array associating format keys with URLs

Definition at line 1016 of file OutputPage.php.

Referenced by getHeadLinks().

Here is the caller graph for this function:

Get the templates used on this page.

Returns:
Array (namespace => dbKey => revId)
Since:
1.18

Definition at line 1412 of file OutputPage.php.

Get a complete X-Vary-Options header.

Returns:
String

Definition at line 1744 of file OutputPage.php.

References $cookieName, addVaryHeader(), and getCacheVaryCookies().

Referenced by sendCacheControl().

Here is the call graph for this function:

Here is the caller graph for this function:

Check if the header item $name is already set.

Parameters:
$nameString: item name
Returns:
Boolean

Definition at line 563 of file OutputPage.php.

Check if the request has a cache-varying cookie header If it does, it's very important that we don't allow public caching.

Returns:
Boolean

Definition at line 1701 of file OutputPage.php.

References $cookieName, getCacheVaryCookies(), ContextSource\getRequest(), and wfDebug().

Referenced by sendCacheControl().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::includeJQuery ( modules = array())

Include jQuery core.

Use this to avoid loading it multiple times before we get a usable script loader.

Parameters:
$modulesArray: list of jQuery modules which should be loaded
Returns:
Array: the list of modules which were not loaded.
Since:
1.16
Deprecated:
since 1.17

Definition at line 3531 of file OutputPage.php.

Return whether the content displayed page is related to the source of the corresponding article on the wiki.

Returns:
Boolean

Definition at line 1049 of file OutputPage.php.

Referenced by addDefaultModules(), and getJSVars().

Here is the caller graph for this function:

Return whether this page is related an article on the wiki.

Returns:
Boolean

Definition at line 1071 of file OutputPage.php.

Referenced by getHeadLinks().

Here is the caller graph for this function:

Return whether the output will be completely disabled.

Returns:
Boolean

Definition at line 929 of file OutputPage.php.

Return whether the page is "printable".

Returns:
Boolean

Definition at line 913 of file OutputPage.php.

Referenced by makeResourceLoaderLink(), and sendCacheControl().

Here is the caller graph for this function:

Should we output feed links for this page?

Returns:
Boolean

Definition at line 1008 of file OutputPage.php.

Return whether user JavaScript is allowed for this page.

Deprecated:
since 1.18 Load modules with ResourceLoader, and origin and trustworthiness is identified and enforced automagically.

Will be removed in 1.20.

Returns:
Boolean

Definition at line 1213 of file OutputPage.php.

References getAllowedModules(), ResourceLoaderModule\ORIGIN_USER_INDIVIDUAL, ResourceLoaderModule\TYPE_SCRIPTS, and wfDeprecated().

Here is the call graph for this function:

Produce the stock "please login to use the wiki" page.

Deprecated:
in 1.19; throw the exception directly

Definition at line 2187 of file OutputPage.php.

OutputPage::makeResourceLoaderLink ( modules,
only,
useESI = false,
array $  extraQuery = array(),
loadCall = false 
) [protected]

TODO: Document.

Parameters:
$modulesArray/string with the module name(s)
$onlyString ResourceLoaderModule TYPE_ class constant
$useESIboolean
$extraQueryArray with extra query parameters to add to each request. array( param => value )
$loadCallboolean If true, output an (asynchronous) mw.loader.load() call rather than a <script src="..."> tag
Returns:
string html <script> and <style> tags

Definition at line 2536 of file OutputPage.php.

References ContextSource\$context, $resourceLoader, $url, $user, $version, $wgResourceLoaderUseESI, Xml\element(), Xml\encodeJsCall(), getAllowedModules(), ContextSource\getLanguage(), ContextSource\getRequest(), getResourceLoader(), ContextSource\getSkin(), ContextSource\getUser(), ResourceLoader\inDebugMode(), Html\inlineScript(), Html\inlineStyle(), isPrintable(), Html\linkedScript(), Html\linkedStyle(), ResourceLoader\makeLoaderConditionalScript(), ResourceLoader\makeLoaderQuery(), ResourceLoader\makeLoaderURL(), Html\rawElement(), ResourceLoaderModule\TYPE_COMBINED, ResourceLoaderModule\TYPE_SCRIPTS, ResourceLoaderModule\TYPE_STYLES, and wfTimestamp().

Referenced by buildCssLinks(), getHeadScripts(), and getScriptsForBottomQueue().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::out ( ins)

Actually output something with print().

Parameters:
$insString: the string to output

Definition at line 2025 of file OutputPage.php.

References print.

Referenced by output().

Here is the caller graph for this function:

Finally, all the text has been munged and accumulated into the object, let's actually output it:

Definition at line 1936 of file OutputPage.php.

References $url, $wgDebugRedirects, $wgLanguageCode, $wgMimeType, $wgVaryOnXFP, addDefaultModules(), addVaryHeader(), getFrameOptions(), HttpStatus\getMessage(), ContextSource\getRequest(), ContextSource\getSkin(), out(), print, sendCacheControl(), wfExpandUrl(), wfProfileIn(), wfProfileOut(), wfRunHooks(), and wfTimestamp().

Here is the call graph for this function:

OutputPage::parse ( text,
linestart = true,
interface = false,
language = null 
)

Parse wikitext and return the HTML.

Parameters:
$textString
$linestartBoolean: is this the start of a line?
$interfaceBoolean: use interface language ($wgLang instead of $wgContLang) while parsing language sensitive magic words like GRAMMAR and PLURAL. This also disables LanguageConverter.
$languageLanguage object: target language object, will override $interface
Returns:
String: HTML

Definition at line 1590 of file OutputPage.php.

References $language, $wgParser, ContextSource\getTitle(), and parserOptions().

Referenced by parseInline(), and showPermissionsErrorPage().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::parseInline ( text,
linestart = true,
interface = false 
)

Parse wikitext, strip paragraphs, and return the HTML.

Parameters:
$textString
$linestartBoolean: is this the start of a line?
$interfaceBoolean: use interface language ($wgLang instead of $wgContLang) while parsing language sensitive magic words like GRAMMAR and PLURAL
Returns:
String: HTML

Definition at line 1630 of file OutputPage.php.

References parse().

Here is the call graph for this function:

OutputPage::parserOptions ( options = null)

Get/set the ParserOptions object to use for wikitext parsing.

Parameters:
$optionseither the ParserOption to use or null to only get the current ParserOption object
Returns:
ParserOptions object

Definition at line 1333 of file OutputPage.php.

References $options, ContextSource\getContext(), ParserOptions\newFromContext(), and wfSetVar().

Referenced by addWikiTextTitle(), and parse().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::permissionRequired ( permission)

Display an error page noting that a given permission bit is required.

Deprecated:
since 1.18, just throw the exception directly
Parameters:
$permissionString: key required

Definition at line 2178 of file OutputPage.php.

OutputPage::prepareErrorPage ( pageTitle,
htmlTitle = false 
)

Prepare this object to display an error page; disable caching and indexing, clear the current text and redirect, set the page's title and optionally an custom HTML title (content of the <title> tag).

Parameters:
$pageTitleString|Message will be passed directly to setPageTitle()
$htmlTitleString|Message will be passed directly to setHTMLTitle(); optional, if not passed the <title> attribute will be based on $pageTitle

Definition at line 2047 of file OutputPage.php.

References clearHTML(), clearSubtitle(), enableClientCache(), ContextSource\getTitle(), setArticleRelated(), setHTMLTitle(), setPageTitle(), and setRobotPolicy().

Referenced by showErrorPage(), showFatalError(), showPermissionsErrorPage(), and versionRequired().

Here is the call graph for this function:

Here is the caller graph for this function:

Prepend $text to the body HTML.

Parameters:
$textString: HTML

Definition at line 1275 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.

Parameters:
$enablebool

Definition at line 1810 of file OutputPage.php.

Turn off regular page output and return an error reponse for when rate limiting has triggered.

Definition at line 2308 of file OutputPage.php.

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.

Todo:
Needs to be split into multiple functions.
Parameters:
$sourceString: source code to show (or null).
$protectedBoolean: is this a permissions error?
$reasonsArray: list of reasons for this error, as returned by Title::getUserPermissionsErrors().
$actionString: action that was denied or null if unknown

Definition at line 2248 of file OutputPage.php.

References addBacklinkSubtitle(), addHTML(), addWikiMsg(), addWikiText(), Html\element(), formatPermissionsErrorMessage(), Linker\formatTemplates(), ContextSource\getTitle(), ContextSource\getUser(), ContextSource\msg(), returnToMain(), setArticleRelated(), setPageTitle(), and setRobotPolicy().

Here is the call graph for this function:

OutputPage::redirect ( url,
responsecode = '302' 
)

Redirect to $url rather than displaying the normal page.

Parameters:
$urlString: URL
$responsecodeString: HTTP status code

Definition at line 254 of file OutputPage.php.

References $url.

Limit the highest level of CSS/JS untrustworthiness allowed.

If passed the same or a higher level than the current level of untrustworthiness set, the level will remain unchanged.

Parameters:
int$levelResourceLoaderModule class constant

Definition at line 1266 of file OutputPage.php.

Referenced by disallowUserJs(), reduceAllowedModules(), and setAllowedModules().

Here is the caller graph for this function:

OutputPage::reduceAllowedModules ( type,
level 
)

Limit the highest level of CSS/JS untrustworthiness allowed.

Deprecated:
since 1.24 Module allowance is no longer fragmented by content type. Use reduceAllowedModuleOrigin() instead.
Parameters:
string$typeResourceLoaderModule TYPE_ constant
int$levelResourceLoaderModule ORIGIN_ class constant

Definition at line 1253 of file OutputPage.php.

References reduceAllowedModuleOrigin(), and wfDeprecated().

Here is the call graph for this function:

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.

Parameters:
$unusedNo longer used
$returntoTitle or String to return to
$returntoqueryString: query string for the return to link

Definition at line 2380 of file OutputPage.php.

References addReturnTo(), ContextSource\getRequest(), Title\newFromText(), and Title\newMainPage().

Referenced by readOnlyPage(), showErrorPage(), showPermissionsErrorPage(), and versionRequired().

Here is the call graph for this function:

Here is the caller graph for this function:

Send cache control HTTP headers.

Definition at line 1853 of file OutputPage.php.

References $wgSquidMaxage, $wgUseESI, $wgUseETag, $wgUseSquid, $wgUseXVO, addAcceptLanguage(), ContextSource\getRequest(), getXVO(), haveCacheVaryCookies(), isPrintable(), uncacheableBecauseRequestVars(), and wfDebug().

Referenced by checkLastModified(), and output().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::setAllowedModules ( type,
level 
)

Set the highest level of CSS/JS untrustworthiness allowed.

Deprecated:
since 1.24 Raising level of allowed untrusted content is no longer supported. Use reduceAllowedModuleOrigin() instead.
Parameters:
$typeString ResourceLoaderModule TYPE_ constant
int$levelResourceLoaderModule ORIGIN_ constant

Definition at line 1239 of file OutputPage.php.

References reduceAllowedModuleOrigin(), and wfDeprecated().

Here is the call graph for this function:

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".

Parameters:
$onlyBoolean: whether to output only the body of the article

Definition at line 583 of file OutputPage.php.

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.

Parameters:
$vBoolean

Definition at line 1036 of file OutputPage.php.

Set whether this page is related an article on the wiki Setting false will cause the change of "article flag" toggle to false.

Parameters:
$vBoolean

Definition at line 1059 of file OutputPage.php.

Referenced by prepareErrorPage(), and readOnlyPage().

Here is the caller graph for this function:

OutputPage::setCategoryLinks ( categories)

Reset the category links (but not the category list) and add $categories.

Parameters:
$categoriesArray mapping category name => sort key

Definition at line 1170 of file OutputPage.php.

References addCategoryLinks().

Here is the call graph for this function:

OutputPage::setETag ( tag)

Set the value of the ETag HTTP header, only used if $wgUseETag is true.

Parameters:
$tagString: value of "ETag" header

Definition at line 572 of file OutputPage.php.

Add default feeds to the page header This is mainly kept for backward compatibility, see OutputPage::addFeedLink() for the new version.

See also:
addFeedLink()
Parameters:
$valString: query to append to feed links or false to output default links

Definition at line 976 of file OutputPage.php.

References $wgAdvertisedFeedTypes, and ContextSource\getTitle().

Referenced by setSyndicated().

Here is the call graph for this function:

Here is the caller graph for this function:

Set the displayed file version.

Parameters:
$fileFile|false
Returns:
Mixed: previous value

Definition at line 1389 of file OutputPage.php.

References $file, and wfSetVar().

Here is the call graph for this function:

Set the follow policy for the page, but leave the index policy un- touched.

Parameters:
$policyString: either 'follow' or 'nofollow'.
Returns:
null

Definition at line 737 of file OutputPage.php.

Referenced by setRobotPolicy().

Here is the caller graph for this function:

"HTML title" means the contents of <title>.

It is stored as plain, unescaped text and will be run through htmlspecialchars in the skin file.

Parameters:
$namestring

Definition at line 771 of file OutputPage.php.

References ContextSource\getContext().

Referenced by headElement(), prepareErrorPage(), and setPageTitle().

Here is the call graph for this function:

Here is the caller graph for this function:

Set the index policy for the page, but leave the follow policy un- touched.

Parameters:
$policystring Either 'index' or 'noindex'.
Returns:
null

Definition at line 723 of file OutputPage.php.

Referenced by setRobotPolicy().

Here is the caller graph for this function:

OutputPage::setLanguageLinks ( newLinkArray)

Reset the language links and add new language links.

Parameters:
$newLinkArrayAssociative array mapping language code to the page name

Definition at line 1091 of file OutputPage.php.

OutputPage::setLastModified ( timestamp)

Override the last modified timestamp.

Parameters:
$timestampString: new timestamp, in a format readable by wfTimestamp()

Definition at line 693 of file OutputPage.php.

References wfTimestamp().

Here is the call graph for this function:

"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.

Parameters:
$namestring|Message

Definition at line 805 of file OutputPage.php.

References ContextSource\getContext(), ContextSource\msg(), Sanitizer\normalizeCharReferences(), Sanitizer\removeHTMLtags(), setHTMLTitle(), and Sanitizer\stripAllTags().

Referenced by prepareErrorPage(), and readOnlyPage().

Here is the call graph for this function:

Here is the caller graph for this function:

Set the new value of the "action text", this will be added to the "HTML title", separated from it with " - ".

Parameters:
$textString: new value of the "action text"

Definition at line 750 of file OutputPage.php.

Set the page as printable, i.e.

it'll be displayed with with all print styles included

Definition at line 904 of file OutputPage.php.

Set $mRedirectedFrom, the Title of the page which redirected us to the current page.

param Title

Definition at line 793 of file OutputPage.php.

References $t.

Set the revision ID which will be seen by the wiki text parser for things such as embedded {{REVISIONID}} variable use.

Parameters:
$revidMixed: an positive integer, or null
Returns:
Mixed: previous value

Definition at line 1348 of file OutputPage.php.

References wfSetVar().

Here is the call graph for this function:

Set the timestamp of the revision which will be displayed.

This is used to avoid a extra DB call in Skin::lastModified().

Parameters:
$revidMixed: string, or null
Returns:
Mixed: previous value

Definition at line 1369 of file OutputPage.php.

References wfSetVar().

Here is the call graph for this function:

Set the robot policy for the page: <http://www.robotstxt.org/meta.html>

Parameters:
$policyString: the literal string to output as the contents of the meta tag. Will be parsed according to the spec and output in standardized form.
Returns:
null

Definition at line 705 of file OutputPage.php.

References Article\formatRobotPolicy(), setFollowPolicy(), and setIndexPolicy().

Referenced by prepareErrorPage(), and readOnlyPage().

Here is the call graph for this function:

Here is the caller graph for this function:

Set the value of the "s-maxage" part of the "Cache-control" HTTP header.

Parameters:
$maxageInteger: maximum cache time on the Squid, in seconds.

Definition at line 1646 of file OutputPage.php.

OutputPage::setStatusCode ( statusCode)

Set the HTTP status code to send with the output.

Parameters:
$statusCodeInteger

Definition at line 274 of file OutputPage.php.

Replace the subtile with $str.

Parameters:
$strString|Message: new value of the subtitle

Definition at line 843 of file OutputPage.php.

References addSubtitle(), and clearSubtitle().

Here is the call graph for this function:

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.

See also:
addFeedLink()
Parameters:
$showBoolean: true: add default feeds, false: remove all feeds

Definition at line 959 of file OutputPage.php.

References setFeedAppendQuery().

Here is the call graph for this function:

Set the Title object to use.

Parameters:
$tTitle object

Definition at line 833 of file OutputPage.php.

References ContextSource\getContext().

Here is the call graph for this function:

OutputPage::showErrorPage ( title,
msg,
params = array() 
)

Output a standard error page.

showErrorPage( 'titlemsg', 'pagetextmsg', array( 'param1', 'param2' ) ); showErrorPage( 'titlemsg', $messageObject );

Parameters:
$titleString: message key for page title
$msgMixed: message key (string) for page text, or a Message object
$paramsArray: message parameters; ignored if $msg is a Message object

Definition at line 2074 of file OutputPage.php.

References $title, addHTML(), addWikiMsgArray(), ContextSource\msg(), prepareErrorPage(), and returnToMain().

Here is the call graph for this function:

Definition at line 2332 of file OutputPage.php.

References addHTML(), ContextSource\msg(), and prepareErrorPage().

Referenced by showFileCopyError(), showFileDeleteError(), showFileNotFoundError(), showFileRenameError(), and showUnexpectedValueError().

Here is the call graph for this function:

Here is the caller graph for this function:

OutputPage::showFileCopyError ( old,
new 
)

Definition at line 2342 of file OutputPage.php.

References ContextSource\msg(), and showFatalError().

Here is the call graph for this function:

Definition at line 2350 of file OutputPage.php.

References ContextSource\msg(), and showFatalError().

Here is the call graph for this function:

Definition at line 2354 of file OutputPage.php.

References ContextSource\msg(), and showFatalError().

Here is the call graph for this function:

OutputPage::showFileRenameError ( old,
new 
)

Definition at line 2346 of file OutputPage.php.

References ContextSource\msg(), and showFatalError().

Here is the call graph for this function:

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.

Parameters:
$lagInteger: slave lag

Definition at line 2321 of file OutputPage.php.

References $wgSlaveLagCritical, $wgSlaveLagWarning, ContextSource\getLanguage(), Html\rawElement(), and wrapWikiMsg().

Here is the call graph for this function:

Show an "add new section" link?

Returns:
Boolean

Definition at line 938 of file OutputPage.php.

OutputPage::showPermissionsErrorPage ( errors,
action = null 
)

Output a standard permission error page.

Parameters:
$errorsArray: error message keys
$actionString: action that was denied or null if unknown

Definition at line 2092 of file OutputPage.php.

References $wgGroupPermissions, addHTML(), addWikiText(), formatPermissionsErrorMessage(), ContextSource\getRequest(), SpecialPage\getTitleFor(), ContextSource\getUser(), Linker\linkKnown(), ContextSource\msg(), Title\newFromURL(), Title\newMainPage(), parse(), prepareErrorPage(), returnToMain(), and wfArrayToCGI().

Here is the call graph for this function:

OutputPage::showUnexpectedValueError ( name,
val 
)

Definition at line 2338 of file OutputPage.php.

References ContextSource\msg(), and showFatalError().

Here is the call graph for this function:

OutputPage::styleLink ( style,
options 
) [protected]

Generate <link> tags for stylesheets.

Parameters:
$styleString: URL to the file
$optionsArray: option, can contain 'condition', 'dir', 'media' keys
Returns:
String: HTML fragment

Definition at line 3376 of file OutputPage.php.

References $options, $url, $wgStylePath, $wgStyleVersion, ContextSource\getLanguage(), Html\linkedStyle(), and transformCssMedia().

Referenced by buildCssLinksArray().

Here is the call graph for this function:

Here is the caller graph for this function:

static OutputPage::transformCssMedia ( media) [static]

Transform "media" attribute based on request parameters.

Parameters:
$mediaString: current value of the "media" attribute
Returns:
String: modified value of the "media" attribute

Definition at line 3416 of file OutputPage.php.

References $wgHandheldForIPhone.

Referenced by ResourceLoader\makeCombinedStyles(), and styleLink().

Here is the caller graph for this function:

Return whether this page is not cacheable because "useskin" or "uselang" URL parameters were passed.

Returns:
Boolean

Definition at line 1689 of file OutputPage.php.

References ContextSource\getRequest().

Referenced by sendCacheControl().

Here is the call graph for this function:

Here is the caller graph for this function:

To make it harder for someone to slip a user a fake user-JavaScript or user-CSS preview, a random token is associated with the login session.

If it's not passed back with the preview request, we won't render the code.

Returns:
bool

Definition at line 2954 of file OutputPage.php.

References ContextSource\getRequest(), ContextSource\getTitle(), and ContextSource\getUser().

Referenced by buildCssLinks(), and getScriptsForBottomQueue().

Here is the call graph for this function:

Here is the caller graph for this function:

Display an error page indicating that a given version of MediaWiki is required to use it.

Parameters:
$versionMixed: the version of MediaWiki needed to use the page

Definition at line 2166 of file OutputPage.php.

References $version, addWikiMsg(), ContextSource\msg(), prepareErrorPage(), and returnToMain().

Here is the call graph for this function:

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\n</div>", 'some-error' );

Is equivalent to:

$wgOut->addWikiText( "<div class='error'>\n" . wfMsgNoTrans( 'some-error' ) . "\n</div>" );

The newline after opening div is needed in some wikitext. See bug 19226.

Parameters:
$wrapstring

Definition at line 3499 of file OutputPage.php.

References $n, $options, addWikiText(), and wfMsgExt().

Referenced by showLagWarning().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

OutputPage::$mAllowedModuleOrigin = ResourceLoaderModule::ORIGIN_ALL [protected]

Definition at line 144 of file OutputPage.php.

OutputPage::$mArticleBodyOnly = false

Flag if output should only contain the body of the article.

Should be private.

Definition at line 176 of file OutputPage.php.

OutputPage::$mBodytext = ''

Contains all of the <body> content. Should be private we got set/get accessors and the append() method.

Definition at line 37 of file OutputPage.php.

OutputPage::$mCategories = array()

Definition at line 94 of file OutputPage.php.

OutputPage::$mCategoryLinks = array()

Definition at line 93 of file OutputPage.php.

OutputPage::$mContainsNewMagic = 0

Definition at line 153 of file OutputPage.php.

OutputPage::$mContainsOldMagic = 0

Definition at line 153 of file OutputPage.php.

OutputPage::$mDebugtext = ''

Holds the debug lines that will be output as comments in page source if $wgDebugComments is enabled.

See also $wgShowDebug. TODO: make a getter method for this

Definition at line 44 of file OutputPage.php.

OutputPage::$mDoNothing = false

I just love the name for this self documenting variable.

Todo:
document

Definition at line 150 of file OutputPage.php.

OutputPage::$mEnableClientCache = true

Definition at line 170 of file OutputPage.php.

OutputPage::$mETag = false

Should be private.

No getter but used in sendCacheControl(); Contains an HTTP Entity Tags (see RFC 2616 section 3.13) which is used as a unique identifier for the content. It is later used by the client to compare its cached version with the server version. Client sends headers If-Match and If-None-Match containing its locally cached ETAG value.

To get more information, you will have to look at HTTP/1.1 protocol which is properly described in RFC 2616 : http://tools.ietf.org/html/rfc2616

Definition at line 91 of file OutputPage.php.

OutputPage::$mExtStyles = array()

Additional stylesheets. Looks like this is for extensions. Might be replaced by resource loader.

Definition at line 31 of file OutputPage.php.

OutputPage::$mFeedLinks = array()

Handles the atom / rss links.

We probably only support atom in 2011. Looks like a private variable.

See also:
$wgAdvertisedFeedTypes

Definition at line 167 of file OutputPage.php.

OutputPage::$mFeedLinksAppendQuery = null

Definition at line 137 of file OutputPage.php.

OutputPage::$mFileVersion = null

Definition at line 202 of file OutputPage.php.

OutputPage::$mFollowPolicy = 'follow' [private]

Definition at line 220 of file OutputPage.php.

OutputPage::$mHeadItems = array()

Array of elements in <head>. Parser might add its own headers!

Definition at line 122 of file OutputPage.php.

OutputPage::$mHideNewSectionLink = false

Definition at line 179 of file OutputPage.php.

OutputPage::$mHTMLtitle = ''

Should be private. Stores contents of <title> tag.

Definition at line 47 of file OutputPage.php.

OutputPage::$mImageTimeKeys = array()

Definition at line 133 of file OutputPage.php.

OutputPage::$mIndexPolicy = 'index' [private]

Definition at line 219 of file OutputPage.php.

OutputPage::$mInlineMsg = array()
Todo:
FIXME: Is this still used ?

Definition at line 130 of file OutputPage.php.

OutputPage::$mInlineStyles = ''

Inline CSS styles.

Use addInlineStyle() sparsingly

Definition at line 110 of file OutputPage.php.

OutputPage::$mIsarticle = false

Should be private. Is the displayed content related to the source of the corresponding wiki article.

Definition at line 50 of file OutputPage.php.

OutputPage::$mIsArticleRelated = true

Should be private.

Has get/set methods properly documented. Stores "article flag" toggle.

Definition at line 56 of file OutputPage.php.

OutputPage::$mJQueryDone = false [protected]

Whether jQuery is already handled.

Definition at line 217 of file OutputPage.php.

OutputPage::$mJsConfigVars = array()

Definition at line 127 of file OutputPage.php.

OutputPage::$mKeywords = array()

<meta keyworkds="stuff"> most of the time the first 10 links to an article

Definition at line 26 of file OutputPage.php.

OutputPage::$mLanguageLinks = array()

Should be private. Array of Interwiki Prefixed (non DB key) Titles (e.g. 'fr:Test page')

Definition at line 97 of file OutputPage.php.

OutputPage::$mLastModified = ''

mLastModified and mEtag are used for sending cache control.

The whole caching system should probably be moved into its own class.

Definition at line 79 of file OutputPage.php.

OutputPage::$mLinkColours

Definition at line 113 of file OutputPage.php.

OutputPage::$mLinktags = array()

Definition at line 28 of file OutputPage.php.

OutputPage::$mMetatags = array()

Should be private. Used with addMeta() which adds <meta>

Definition at line 23 of file OutputPage.php.

OutputPage::$mModuleMessages = array()

Definition at line 125 of file OutputPage.php.

OutputPage::$mModules = array()

Definition at line 125 of file OutputPage.php.

OutputPage::$mModuleScripts = array()

Definition at line 125 of file OutputPage.php.

OutputPage::$mModuleStyles = array()

Definition at line 125 of file OutputPage.php.

OutputPage::$mNewSectionLink = false

Definition at line 178 of file OutputPage.php.

OutputPage::$mNoGallery = false

Comes from the parser.

This was probably made to load CSS/JS only if we had <gallery>. Used directly in CategoryPage.php Looks like resource loader can replace this.

Definition at line 186 of file OutputPage.php.

OutputPage::$mPageLinkTitle = ''

Used by skin template.

Example: $tpl->set( 'displaytitle', $out->mPageLinkTitle );

Definition at line 119 of file OutputPage.php.

OutputPage::$mPagetitle = ''

Should be private - has getter and setter. Contains the HTML title.

Definition at line 34 of file OutputPage.php.

OutputPage::$mPageTitleActionText = ''

Definition at line 189 of file OutputPage.php.

OutputPage::$mParserOptions = null [protected]

Definition at line 159 of file OutputPage.php.

OutputPage::$mParseWarnings = array()

Definition at line 190 of file OutputPage.php.

OutputPage::$mPreventClickjacking = true

Definition at line 196 of file OutputPage.php.

OutputPage::$mPrintable = false

Should be private.

We have to set isPrintable(). Some pages should never be printed (ex: redirections).

Definition at line 62 of file OutputPage.php.

OutputPage::$mRedirect = ''

Definition at line 72 of file OutputPage.php.

OutputPage::$mRedirectCode = ''

Definition at line 135 of file OutputPage.php.

OutputPage::$mRedirectedFrom = null [private]

Definition at line 232 of file OutputPage.php.

OutputPage::$mResourceLoader

Definition at line 126 of file OutputPage.php.

OutputPage::$mRevisionId = null

should be private. To include the variable {{REVISIONID}}

Definition at line 199 of file OutputPage.php.

OutputPage::$mRevisionTimestamp = null [private]

Definition at line 200 of file OutputPage.php.

OutputPage::$mScripts = ''

Should be private.

Used for JavaScript (pre resource loader) We should split js / css. mScripts content is inserted as is in <head> by Skin. This might contains either a link to a stylesheet or inline css.

Definition at line 105 of file OutputPage.php.

OutputPage::$mSquidMaxage = 0

Definition at line 193 of file OutputPage.php.

OutputPage::$mStatusCode

Definition at line 73 of file OutputPage.php.

OutputPage::$mSubtitle = array() [private]

Should be private.

We have set/get/append methods.

Contains the page subtitle. Special pages usually have some links here. Don't confuse with site subtitle added by skins.

Definition at line 70 of file OutputPage.php.

OutputPage::$mTemplateIds = array()

Definition at line 132 of file OutputPage.php.

OutputPage::$mVaryHeader [private]
Initial value:
 array(
                'Accept-Encoding' => array( 'list-contains=gzip' ),
                'Cookie' => null
        )

Definition at line 221 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()

Style again! This seems like a code duplication since we already have mStyles. This is what makes OpenSource amazing.

Definition at line 212 of file OutputPage.php.

Referenced by buildCssLinks().


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