OutputPage Class Reference

List of all members.

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


Detailed Description

Todo:
document

Definition at line 8 of file OutputPage.php.


Constructor & Destructor Documentation

OutputPage::__construct (  ) 

Constructor Initialise private variables.

Definition at line 66 of file OutputPage.php.

References $wgAllowUserJs.


Member Function Documentation

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.

Parameters:
$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.

Parameters:
$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.

Parameters:
$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.

Parameters:
$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.

Parameters:
$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.

Parameters:
$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.

Parameters:
$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.

Parameters:
$text String or array of strings

Definition at line 119 of file OutputPage.php.

OutputPage::addLanguageLinks ( newLinkArray  ) 

Add new language links.

Parameters:
$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.

Parameters:
$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:".

Parameters:
$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".

Parameters:
$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.

Parameters:
$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.

Parameters:
$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.

Parameters:
$text String: wikitext
$article Article object
$cache Boolean
Deprecated:
Use Article::outputWikitext

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.

Parameters:
$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.

)

Parameters:
$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.

Parameters:
$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 
)

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

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

Meant primarily for internal use...

Parameters:
$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.

Parameters:
$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.

Parameters:
$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.

Parameters:
$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.

Parameters:
$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.

Parameters:
$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.

Parameters:
$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.

Parameters:
$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.

Parameters:
$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.

Parameters:
$return Boolean: whether to have a "return to $wgTitle" message or not.
Returns:
nothing

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

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

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 (  ) 

Clear the body HTML.

Definition at line 895 of file OutputPage.php.

Referenced by rateLimited().

OutputPage::databaseError ( fname,
sql,
error,
errno 
)

Deprecated:

Definition at line 1998 of file OutputPage.php.

OutputPage::debug ( text  ) 

Add $text to the debug output.

Parameters:
$text String: debug text

Definition at line 914 of file OutputPage.php.

OutputPage::developerRequired (  ) 

Deprecated:
use permissionRequired()

Definition at line 1828 of file OutputPage.php.

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 (  ) 

Remove user JavaScript from scripts to load.

Definition at line 860 of file OutputPage.php.

OutputPage::enableClientCache ( state  ) 

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

Parameters:
$state ??

Definition at line 1217 of file OutputPage.php.

References wfSetVar().

Referenced by addParserOutputNoText(), rateLimited(), showErrorPage(), showFatalError(), and showPermissionsErrorPage().

OutputPage::errorpage ( title,
msg 
)

Deprecated:

Definition at line 1992 of file OutputPage.php.

References $msg, $title, and wfDeprecated().

OutputPage::fatalError ( message  ) 

Deprecated:

Definition at line 2003 of file OutputPage.php.

References wfDeprecated().

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

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

Parameters:
$type String: feed type
$url String: URL to the feed
$text String: value of the "title" attribute
Returns:
String: HTML fragment

Definition at line 2383 of file OutputPage.php.

References $url, and Html::element().

Referenced by getHeadLinks().

OutputPage::fileCopyError ( old,
new 
)

Deprecated:

Definition at line 2015 of file OutputPage.php.

References wfDeprecated(), and wfMsg().

OutputPage::fileDeleteError ( name  ) 

Deprecated:

Definition at line 2027 of file OutputPage.php.

References $name, wfDeprecated(), and wfMsg().

OutputPage::fileNotFoundError ( name  ) 

Deprecated:

Definition at line 2033 of file OutputPage.php.

References $name, wfDeprecated(), and wfMsg().

OutputPage::fileRenameError ( old,
new 
)

Deprecated:

Definition at line 2021 of file OutputPage.php.

References wfDeprecated(), and wfMsg().

OutputPage::forceHideNewSectionLink (  ) 

Forcibly hide the new section link?

Returns:
Boolean

Definition at line 594 of file OutputPage.php.

OutputPage::formatPermissionsErrorMessage ( errors,
action = null 
)

Format a list of error messages.

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

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.

Returns:
Boolean

Definition at line 274 of file OutputPage.php.

OutputPage::getCacheVaryCookies (  ) 

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

Returns:
Array

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.

Returns:
Array of strings

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.

Returns:
Array

Definition at line 825 of file OutputPage.php.

OutputPage::getExtStyle (  ) 

Get all links added by extensions.

Returns:
Array

Definition at line 178 of file OutputPage.php.

Referenced by setupUserCss().

OutputPage::getFeedAppendQuery (  ) 

Will currently always return null.

Returns:
null

Definition at line 669 of file OutputPage.php.

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.

Returns:
String

Definition at line 221 of file OutputPage.php.

References $s.

Referenced by getScript(), and headElement().

OutputPage::getHeadLinks (  ) 

OutputPage::getHeadScripts ( Skin sk  ) 

Gets the global variables and mScripts; also adds userjs to the end if enabled.

Parameters:
$sk Skin object to use
Returns:
String: HTML fragment

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 (  ) 

Get the body HTML.

Returns:
String: HTML

Definition at line 904 of file OutputPage.php.

OutputPage::getHTMLTitle (  ) 

Return the "HTML title", i.e.

the content of the <title> tag.

Returns:
String

Definition at line 459 of file OutputPage.php.

Referenced by headElement(), and SkinTemplate::outputPage().

OutputPage::getLanguageLinks (  ) 

Get the list of language links.

Returns:
Associative array mapping language code to the page name

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.

Returns:
String

Definition at line 489 of file OutputPage.php.

Referenced by headElement(), and SkinTemplate::outputPage().

OutputPage::getPageTitleActionText (  ) 

Get the value of the "action text".

Returns:
String

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.

Returns:
String

Definition at line 88 of file OutputPage.php.

OutputPage::getRevisionId (  ) 

Get the current revision ID.

Returns:
Integer

Definition at line 958 of file OutputPage.php.

OutputPage::getScript (  ) 

Get all registered JS and CSS tags for the header.

Returns:
String

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.

Parameters:
$code Integer: status code
Returns:
String or null: message or null if $code is not in the list of messages

Definition at line 1458 of file OutputPage.php.

References $code.

Referenced by output().

OutputPage::getSubtitle (  ) 

Get the subtitle.

Returns:
String

Definition at line 540 of file OutputPage.php.

Referenced by SkinTemplate::outputPage().

OutputPage::getSyndicationLinks (  ) 

Return URLs for each supported syndication format for this page.

Returns:
array associating format keys with URLs

Definition at line 660 of file OutputPage.php.

Referenced by getHeadLinks(), and SkinTemplate::outputPage().

OutputPage::getTitle (  ) 

OutputPage::getXVO (  ) 

Get a complete X-Vary-Options header.

Returns:
String

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.

Parameters:
$name String: item name
Returns:
Boolean

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.

Returns:
Boolean

Definition at line 1261 of file OutputPage.php.

References $wgRequest, getCacheVaryCookies(), and wfDebug().

Referenced by sendCacheControl().

OutputPage::headElement ( Skin sk,
includeStyle = true 
)

OutputPage::includeJQuery ( modules = array()  ) 

Include jQuery core.

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

Parameters:
$modules Array: list of jQuery modules which should be loaded
Returns:
Array: the list of modules which were not 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.

Returns:
Boolean

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.

Returns:
Boolean

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.

Returns:
Boolean

Definition at line 575 of file OutputPage.php.

OutputPage::isPrintable (  ) 

Return whether the page is "printable".

Returns:
Boolean

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.

Returns:
Boolean

Definition at line 852 of file OutputPage.php.

OutputPage::isSyndicated (  ) 

Should we output feed links for this page?

Returns:
Boolean

Definition at line 652 of file OutputPage.php.

Referenced by SkinTemplate::outputPage().

OutputPage::isUserJsAllowed (  ) 

Return whether user JavaScript is allowed for this page.

Returns:
Boolean

Definition at line 869 of file OutputPage.php.

Referenced by getHeadScripts(), and SkinTemplate::outputPage().

OutputPage::loginToUse (  ) 

OutputPage::out ( ins  ) 

Actually output something with print().

Performs an iconv to the output encoding, if needed.

Parameters:
$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 (  ) 

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

Parse wikitext and return the HTML.

Parameters:
$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
Returns:
String: HTML

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.

Parameters:
$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
Returns:
String: HTML

Definition at line 1174 of file OutputPage.php.

References parse().

OutputPage::parserOptions ( options = null  ) 

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

Parameters:
$options either the ParserOption to use or null to only get the current ParserOption object
Returns:
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.

Parameters:
$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.

Parameters:
$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.

Todo:
Needs to be split into multiple functions.
Parameters:
$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.

Parameters:
$url String: URL
$responsecode String: HTTP status code

Definition at line 77 of file OutputPage.php.

References $url.

OutputPage::reportTime (  ) 

Deprecated:
use wfReportTime() instead.
Returns:
String

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.

Parameters:
$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 (  ) 

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

Parameters:
$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.

Parameters:
$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.

Parameters:
$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.

Parameters:
$categories Associative array mapping category name to its sort key

Definition at line 812 of file OutputPage.php.

References addCategoryLinks().

static OutputPage::setEncodings (  )  [static]

Todo:
document

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.

Parameters:
$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.

See also:
addFeedLink()
Parameters:
$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.

Parameters:
$policy String: either 'follow' or 'nofollow'.
Returns:
null

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.

Parameters:
$policy string Either 'index' or 'noindex'.
Returns:
null

Definition at line 395 of file OutputPage.php.

Referenced by setRobotPolicy().

OutputPage::setLanguageLinks ( newLinkArray  ) 

Reset the language links and add new language links.

Parameters:
$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 " - ".

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

Definition at line 423 of file OutputPage.php.

OutputPage::setParserOptions ( options  ) 

Deprecated:
use parserOptions() instead

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.

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

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

Parameters:
$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.
Returns:
null

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.

Parameters:
$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.

Parameters:
$statusCode Integer
Returns:
nothing

Definition at line 98 of file OutputPage.php.

Referenced by rateLimited().

OutputPage::setSubtitle ( str  ) 

Replace the subtile with $str.

Parameters:
$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.

See also:
addFeedLink()
Parameters:
$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.

Parameters:
$t Title object

Definition at line 498 of file OutputPage.php.

References $t.

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

Output a standard error page.

Parameters:
$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  ) 

OutputPage::showFileCopyError ( old,
new 
)

Definition at line 2051 of file OutputPage.php.

References showFatalError(), and wfMsg().

OutputPage::showFileDeleteError ( name  ) 

Definition at line 2059 of file OutputPage.php.

References $name, showFatalError(), and wfMsg().

OutputPage::showFileNotFoundError ( name  ) 

Definition at line 2063 of file OutputPage.php.

References $name, showFatalError(), and wfMsg().

OutputPage::showFileRenameError ( old,
new 
)

Definition at line 2055 of file OutputPage.php.

References showFatalError(), and wfMsg().

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.

Parameters:
$lag Integer: slave lag

Definition at line 2546 of file OutputPage.php.

References $wgLang, $wgSlaveLagCritical, $wgSlaveLagWarning, Html::rawElement(), and wrapWikiMsg().

OutputPage::showNewSectionLink (  ) 

Show an "add new section" link?

Returns:
Boolean

Definition at line 585 of file OutputPage.php.

OutputPage::showPermissionsErrorPage ( errors,
action = null 
)

Output a standard permission error page.

Parameters:
$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 
)

Definition at line 2047 of file OutputPage.php.

References $name, showFatalError(), and wfMsg().

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

Generate <link> tags for stylesheets.

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

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 (  ) 

Deprecated:
use permissionRequired()

Definition at line 1821 of file OutputPage.php.

OutputPage::transformCssMedia ( media  ) 

Transform "media" attribute based on request parameters.

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

Definition at line 2487 of file OutputPage.php.

References $wgHandheldForIPhone, and $wgRequest.

Referenced by styleLink().

OutputPage::tryParserCache ( &$  article  ) 

Deprecated:
Parameters:
$article Article
Returns:
Boolean: true if successful, else false.

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.

Returns:
Boolean

Definition at line 1249 of file OutputPage.php.

References $wgRequest.

Referenced by sendCacheControl().

OutputPage::unexpectedValueError ( name,
val 
)

Deprecated:

Definition at line 2009 of file OutputPage.php.

References $name, wfDeprecated(), and wfMsg().

OutputPage::versionRequired ( version  ) 

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

Parameters:
$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().


Member Data Documentation

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]

Whether to load jQuery core.

Definition at line 54 of file OutputPage.php.

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.


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

Generated on Sat Apr 30 22:57:44 2011 for MediaWiki by  doxygen 1.5.9