OutputPage Class Reference

List of all members.

Public Member Functions

 __construct ()
 Constructor Initialise private variables.
 redirect ($url, $responsecode= '302')
 getRedirect ()
 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)
 addScript ($script)
 addExtensionStyle ($url)
 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 ()
 getHeadItems ()
 addHeadItem ($name, $value)
 hasHeadItem ($name)
 setETag ($tag)
 setArticleBodyOnly ($only)
 getArticleBodyOnly ($only)
 addLink ($linkarr)
 getExtStyle ()
 addMetadataLink ($linkarr)
 checkLastModified ($timestamp)
 checkLastModified tells the client to use the client-cached page if possible.
 setPageTitleActionText ($text)
 getPageTitleActionText ()
 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.
 setHTMLTitle ($name)
 setPageTitle ($name)
 getHTMLTitle ()
 getPageTitle ()
 setSubtitle ($str)
 appendSubtitle ($str)
 getSubtitle ()
 isArticle ()
 setPrintable ()
 isPrintable ()
 setSyndicated ($show=true)
 isSyndicated ()
 setFeedAppendQuery ($val)
 getFeedAppendQuery ()
 setOnloadHandler ($js)
 getOnloadHandler ()
 disable ()
 isDisabled ()
 setArticleRelated ($v)
 setArticleFlag ($v)
 isArticleRelated ()
 getLanguageLinks ()
 addLanguageLinks ($newLinkArray)
 setLanguageLinks ($newLinkArray)
 getCategoryLinks ()
 addCategoryLinks ($categories)
 Add an array of categories, with names in the keys.
 setCategoryLinks ($categories)
 suppressQuickbar ()
 isQuickbarSuppressed ()
 disallowUserJs ()
 isUserJsAllowed ()
 prependHTML ($text)
 addHTML ($text)
 clearHTML ()
 getHTML ()
 debug ($text)
 setParserOptions ($options)
 parserOptions ($options=null)
 setRevisionId ($revid)
 Set the revision ID which will be seen by the wiki text parser for things such as embedded {{REVISIONID}} variable use.
 getRevisionId ()
 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)
 addWikiTextTitleTidy ($text, &$title, $linestart=true)
 addWikiTextTitle ($text, &$title, $linestart, $tidy=false)
 addParserOutputNoText (&$parserOutput)
 addParserOutput (&$parserOutput)
 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)
 addWikiTextTidy ($text, $linestart=true)
 Add wikitext with tidy enabled.
 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)
 enableClientCache ($state)
 Use enableClientCache(false) to force it to send nocache headers.
 getCacheVaryCookies ()
 uncacheableBecauseRequestVars ()
 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.
 getXVO ()
 Get a complete X-Vary-Options header.
 sendCacheControl ()
 output ()
 Finally, all the text has been munged and accumulated into the object, let's actually output it:.
 out ($ins)
 reportTime ()
 Deprecated, use wfReportTime() instead.
 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.
 errorpage ($title, $msg)
 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 ()
 Use permissionRequired.
 developerRequired ()
 Use permissionRequired.
 loginToUse ()
 Produce the stock "please login to use the wiki" page.
 databaseError ($fname, $sql, $error, $errno)
 formatPermissionsErrorMessage ($errors, $action=null)
 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.
 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)
 Add a "return to" link pointing to a specified title.
 returnToMain ($unused=null, $returnto=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)
 getHeadLinks ()
 getSyndicationLinks ()
 Return URLs for each supported syndication format for this page.
 addStyle ($style, $media='', $condition='', $dir='')
 Add a local or specified stylesheet, with the given media options.
 buildCssLinks ()
 Build a set of <link>s for the stylesheets specified in the $this->styles array.
 transformCssMedia ($media)
 rateLimited ()
 Turn off regular page output and return an error reponse for when rate limiting has triggered.
 showNewSectionLink ()
 Show an "add new section" link?
 forceHideNewSectionLink ()
 Forcibly hide the new section link?
 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.

Static Public Member Functions

static setEncodings ()

Public Attributes

 $mMetatags = array()
 $mKeywords = array()
 $mLinktags = array()
 $mExtStyles = array()
 $mPagetitle = ''
 $mBodytext = ''
 $mDebugtext = ''
 $mHTMLtitle = ''
 $mIsarticle = true
 $mPrintable = false
 $mSubtitle = ''
 $mRedirect = ''
 $mStatusCode
 $mLastModified = ''
 $mETag = false
 $mCategoryLinks = array()
 $mLanguageLinks = array()
 $mScripts = ''
 $mLinkColours
 $mPageLinkTitle = ''
 $mHeadItems = array()
 $mTemplateIds = array()
 $mAllowUserJs
 $mSuppressQuickbar = false
 $mOnloadHandler = ''
 $mDoNothing = false
 $mContainsOldMagic = 0
 $mContainsNewMagic = 0
 $mIsArticleRelated = true
 $mShowFeedLinks = false
 $mFeedLinksAppendQuery = false
 $mEnableClientCache = true
 $mArticleBodyOnly = false
 $mNewSectionLink = false
 $mHideNewSectionLink = false
 $mNoGallery = false
 $mPageTitleActionText = ''
 $mParseWarnings = array()
 $mSquidMaxage = 0
 $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 ()
 styleLink ($style, $options)

Protected Attributes

 $mParserOptions = null

Private Member Functions

 addKeywords (&$parserOutput)
 This function takes the title (first item of mGoodLinks), categories, existing and broken links for the page and uses the first 10 of them for META keywords.
 feedLink ($type, $url, $text)
 Generate a <link rel/>=""> for an RSS feed.

Private Attributes

 $mIndexPolicy = 'index'
 $mFollowPolicy = 'follow'


Detailed Description

Todo:
document

Definition at line 8 of file OutputPage.php.


Constructor & Destructor Documentation

OutputPage::__construct (  ) 

Constructor Initialise private variables.

Definition at line 53 of file OutputPage.php.

References $wgAllowUserJs.


Member Function Documentation

OutputPage::addCategoryLinks ( categories  ) 

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

Definition at line 375 of file OutputPage.php.

References $dbr, $lb, $res, $row, $sql, $text, $title, $type, $wgContLang, $wgUser, Title::makeTitleSafe(), LinkCache::singleton(), wfGetDB(), and wfRunHooks().

Referenced by addParserOutputNoText(), and setCategoryLinks().

OutputPage::addDefaultMeta (  )  [protected]

Definition at line 1517 of file OutputPage.php.

References $wgVersion, and addMeta().

Referenced by getHeadLinks().

OutputPage::addExtensionStyle ( url  ) 

Definition at line 90 of file OutputPage.php.

References $url.

OutputPage::addHeadItem ( name,
value 
)

Definition at line 130 of file OutputPage.php.

References $name.

OutputPage::addHTML ( text  ) 

OutputPage::addInlineScript ( script  ) 

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

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

Definition at line 113 of file OutputPage.php.

References $wgJsMimeType.

OutputPage::addKeyword ( text  ) 

Definition at line 87 of file OutputPage.php.

References $text.

Referenced by addKeywords().

OutputPage::addKeywords ( &$  parserOutput  )  [private]

This function takes the title (first item of mGoodLinks), categories, existing and broken links for the page and uses the first 10 of them for META keywords.

Parameters:
ParserOutput &$parserOutput

Definition at line 1450 of file OutputPage.php.

References $count, $wgTitle, and addKeyword().

Referenced by addParserOutputNoText().

OutputPage::addLanguageLinks ( newLinkArray  ) 

Definition at line 361 of file OutputPage.php.

OutputPage::addLink ( linkarr  ) 

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

References $name.

Referenced by addDefaultMeta(), and headElement().

OutputPage::addMetadataLink ( linkarr  ) 

Definition at line 152 of file OutputPage.php.

References addLink().

Referenced by Skin::addMetadataLinks().

OutputPage::addParserOutput ( &$  parserOutput  ) 

Todo:
document
Parameters:
ParserOutput &$parserOutput

Definition at line 572 of file OutputPage.php.

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

Referenced by addPrimaryWikiText(), addWikiTextTitle(), and tryParserCache().

OutputPage::addParserOutputNoText ( &$  parserOutput  ) 

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:
string $text
Article $article
bool $cache
Deprecated:
Use Article::outputWikitext

Definition at line 588 of file OutputPage.php.

References $text, $wgParser, $wgUser, addParserOutput(), parserOptions(), ParserCache::singleton(), and wfDeprecated().

OutputPage::addReturnTo ( title  ) 

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

Parameters:
Title $title Title to link

Definition at line 1407 of file OutputPage.php.

References $title, $wgUser, addHTML(), addLink(), and wfMsg().

Referenced by returnToMain().

OutputPage::addScript ( script  ) 

Definition at line 88 of file OutputPage.php.

Referenced by addScriptFile().

OutputPage::addScriptFile ( file  ) 

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

Parameters:
string $file filename in skins/common or complete on-server path (/foo/bar.js)

Definition at line 99 of file OutputPage.php.

References $file, $path, $wgJsMimeType, $wgStylePath, $wgStyleVersion, and addScript().

Referenced by 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:
$media -- to specify a media type, 'screen', 'printable', 'handheld' or any.
$conditional -- for IE conditional comments, specifying an IE version
$dir -- set to 'rtl' or 'ltr' for direction-specific sheets

Definition at line 1652 of file OutputPage.php.

References $options.

Referenced by headElement(), 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:
QuickTemplate $template

Definition at line 629 of file OutputPage.php.

References addHTML().

OutputPage::addWikiMsg (  ) 

Add a wikitext-formatted message to the output.

This is equivalent to:

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

Definition at line 1819 of file OutputPage.php.

References $args, $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 1832 of file OutputPage.php.

References $args, $name, $options, $text, 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:
string $text
bool $linestart

Definition at line 479 of file OutputPage.php.

References $text, $wgTitle, and addWikiTextTitle().

Referenced by readOnlyPage(), SpecialRecentChanges::setTopText(), and showPermissionsErrorPage().

OutputPage::addWikiTextTidy ( text,
linestart = true 
)

Add wikitext with tidy enabled.

Definition at line 618 of file OutputPage.php.

References $text, $wgTitle, and addWikiTextTitleTidy().

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

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

Definition at line 488 of file OutputPage.php.

References $text, $title, and addWikiTextTitle().

Referenced by addSecondaryWikiText(), and addWikiTextTidy().

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

Definition at line 484 of file OutputPage.php.

References $text, $title, and addWikiTextTitle().

OutputPage::appendSubtitle ( str  ) 

Definition at line 331 of file OutputPage.php.

OutputPage::blockedPage ( return = true  ) 

Produce a "user is blocked" page.

Parameters:
bool $return Whether to have a "return to $wgTitle" message or not.
Returns:
nothing

Definition at line 1025 of file OutputPage.php.

References $msg, $name, $reason, $wgContLang, $wgLang, $wgTitle, $wgUser, addWikiMsg(), 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 1667 of file OutputPage.php.

References $file, $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:
bool True iff cache-ok headers was sent.

Definition at line 169 of file OutputPage.php.

References $_SERVER, $name, $wgCacheEpoch, $wgCachePages, $wgRequest, $wgUser, disable(), sendCacheControl(), wfClearOutputBuffers(), wfDebug(), wfRestoreWarnings(), wfRunHooks(), wfSuppressWarnings(), and wfTimestamp().

OutputPage::clearHTML (  ) 

Definition at line 439 of file OutputPage.php.

Referenced by rateLimited().

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

Deprecated:

Definition at line 1225 of file OutputPage.php.

OutputPage::debug ( text  ) 

Definition at line 441 of file OutputPage.php.

References $text.

OutputPage::developerRequired (  ) 

Use permissionRequired.

Deprecated:

Definition at line 1190 of file OutputPage.php.

OutputPage::disable (  ) 

Definition at line 342 of file OutputPage.php.

Referenced by checkLastModified().

OutputPage::disallowUserJs (  ) 

Definition at line 434 of file OutputPage.php.

OutputPage::enableClientCache ( state  ) 

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

Parameters:
$state ??

Definition at line 696 of file OutputPage.php.

References wfSetVar().

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

OutputPage::errorpage ( title,
msg 
)

Deprecated:

Definition at line 1130 of file OutputPage.php.

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

OutputPage::fatalError ( message  ) 

Deprecated:

Definition at line 1338 of file OutputPage.php.

References wfDeprecated().

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

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

Definition at line 1636 of file OutputPage.php.

References $text, $url, and Xml::element().

Referenced by getHeadLinks().

OutputPage::fileCopyError ( old,
new 
)

Deprecated:

Definition at line 1350 of file OutputPage.php.

References wfDeprecated(), and wfMsg().

OutputPage::fileDeleteError ( name  ) 

Deprecated:

Definition at line 1362 of file OutputPage.php.

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

OutputPage::fileNotFoundError ( name  ) 

Deprecated:

Definition at line 1368 of file OutputPage.php.

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

OutputPage::fileRenameError ( old,
new 
)

Deprecated:

Definition at line 1356 of file OutputPage.php.

References wfDeprecated(), and wfMsg().

OutputPage::forceHideNewSectionLink (  ) 

Forcibly hide the new section link?

Returns:
bool

Definition at line 1789 of file OutputPage.php.

OutputPage::formatPermissionsErrorMessage ( errors,
action = null 
)

Parameters:
array $errors An array of arrays returned by Title::getUserPermissionsErrors
Returns:
string The wikitext error-messages, formatted into a list.

Definition at line 1233 of file OutputPage.php.

References $action, $error, $text, $wgLang, wfMsg(), and wfMsgNoTrans().

Referenced by readOnlyPage(), and showPermissionsErrorPage().

OutputPage::getArticleBodyOnly ( only  ) 

Definition at line 140 of file OutputPage.php.

OutputPage::getCacheVaryCookies (  ) 

Definition at line 700 of file OutputPage.php.

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

Referenced by getXVO(), and haveCacheVaryCookies().

OutputPage::getCategoryLinks (  ) 

Definition at line 368 of file OutputPage.php.

OutputPage::getExtStyle (  ) 

Definition at line 148 of file OutputPage.php.

Referenced by setupUserCss().

OutputPage::getFeedAppendQuery (  ) 

Definition at line 339 of file OutputPage.php.

Referenced by getSyndicationLinks().

OutputPage::getHeadItems (  ) 

Definition at line 122 of file OutputPage.php.

References $s.

Referenced by getScript(), and headElement().

OutputPage::getHeadLinks (  ) 

OutputPage::getHTML (  ) 

Definition at line 440 of file OutputPage.php.

OutputPage::getHTMLTitle (  ) 

Definition at line 328 of file OutputPage.php.

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

OutputPage::getLanguageLinks (  ) 

Definition at line 360 of file OutputPage.php.

Referenced by SkinTemplate::outputPage().

OutputPage::getOnloadHandler (  ) 

Definition at line 341 of file OutputPage.php.

OutputPage::getPageTitle (  ) 

Definition at line 329 of file OutputPage.php.

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

OutputPage::getPageTitleActionText (  ) 

Definition at line 253 of file OutputPage.php.

Referenced by setPageTitle().

OutputPage::getRedirect (  ) 

Definition at line 64 of file OutputPage.php.

OutputPage::getRevisionId (  ) 

Definition at line 467 of file OutputPage.php.

OutputPage::getScript (  ) 

Definition at line 118 of file OutputPage.php.

References getHeadItems().

Referenced by SkinTemplate::outputPage().

OutputPage::getSubtitle (  ) 

Definition at line 332 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 1615 of file OutputPage.php.

References $wgFeedClasses, $wgTitle, getFeedAppendQuery(), and isSyndicated().

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

OutputPage::getXVO (  ) 

Get a complete X-Vary-Options header.

Definition at line 746 of file OutputPage.php.

References getCacheVaryCookies().

Referenced by sendCacheControl().

OutputPage::hasHeadItem ( name  ) 

Definition at line 134 of file OutputPage.php.

References $name.

OutputPage::haveCacheVaryCookies (  ) 

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

Definition at line 727 of file OutputPage.php.

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

Referenced by sendCacheControl().

OutputPage::headElement ( Skin sk  ) 

OutputPage::isArticle (  ) 

Definition at line 333 of file OutputPage.php.

Referenced by SkinTemplate::outputPage().

OutputPage::isArticleRelated (  ) 

Definition at line 358 of file OutputPage.php.

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

OutputPage::isDisabled (  ) 

Definition at line 343 of file OutputPage.php.

OutputPage::isPrintable (  ) 

Definition at line 335 of file OutputPage.php.

Referenced by sendCacheControl().

OutputPage::isQuickbarSuppressed (  ) 

Definition at line 432 of file OutputPage.php.

OutputPage::isSyndicated (  ) 

Definition at line 337 of file OutputPage.php.

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

OutputPage::isUserJsAllowed (  ) 

Definition at line 435 of file OutputPage.php.

Referenced by SkinTemplate::outputPage().

OutputPage::loginToUse (  ) 

OutputPage::out ( ins  ) 

Todo:
document
Parameters:
string $ins

Definition at line 981 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:
string $text
bool $linestart Is this the start of a line?
bool $interface ??

Definition at line 643 of file OutputPage.php.

References $text, $wgParser, $wgTitle, and parserOptions().

Referenced by parseInline(), and wrapWikiMsg().

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

Parse wikitext, strip paragraphs, and return the HTML.

Definition at line 657 of file OutputPage.php.

References $text, and parse().

OutputPage::parserOptions ( options = null  ) 

Definition at line 449 of file OutputPage.php.

References $options, and wfSetVar().

Referenced by addPrimaryWikiText(), addWikiTextTitle(), parse(), setParserOptions(), and tryParserCache().

OutputPage::permissionRequired ( permission  ) 

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

Parameters:
string $permission key required

Definition at line 1157 of file OutputPage.php.

References $wgLang, $wgUser, addWikiMsg(), User::getGroupsWithPermission(), returnToMain(), setArticleRelated(), setHTMLTitle(), setPageTitle(), setRobotPolicy(), and wfMsg().

Referenced by loginToUse().

OutputPage::prependHTML ( text  ) 

Definition at line 437 of file OutputPage.php.

References $text.

OutputPage::rateLimited (  ) 

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

Definition at line 1760 of file OutputPage.php.

References $wgTitle, addWikiMsg(), clearHTML(), enableClientCache(), 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:
string $source Source code to show (or null).
bool $protected Is this a permissions error?
array $reasons List of reasons for this error, as returned by Title::getUserPermissionsErrors().

Definition at line 1278 of file OutputPage.php.

References $action, $reason, $source, $text, $wgTitle, $wgUser, addHTML(), addWikiMsg(), addWikiText(), Xml::closeElement(), formatPermissionsErrorMessage(), Xml::openElement(), returnToMain(), setArticleRelated(), setPageTitle(), setRobotPolicy(), setSubtitle(), wfMsg(), wfReadOnlyReason(), and wrapWikiMsg().

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

Definition at line 58 of file OutputPage.php.

References $url.

OutputPage::reportTime (  ) 

Deprecated, use wfReportTime() instead.

Returns:
string
Deprecated:

Definition at line 1013 of file OutputPage.php.

References wfDeprecated(), and wfReportTime().

OutputPage::returnToMain ( unused = null,
returnto = NULL 
)

Add a "return to" link pointing to a specified title, or the title indicated in the request, or else the main page.

Parameters:
null $unused No longer used
Title $returnto Title to return to

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

Definition at line 139 of file OutputPage.php.

OutputPage::setArticleFlag ( v  ) 

Definition at line 351 of file OutputPage.php.

Referenced by loginToUse().

OutputPage::setArticleRelated ( v  ) 

OutputPage::setCategoryLinks ( categories  ) 

Definition at line 426 of file OutputPage.php.

References addCategoryLinks().

static OutputPage::setEncodings (  )  [static]

Todo:
document

Definition at line 995 of file OutputPage.php.

References $_SERVER, $wgContLang, $wgInputEncoding, $wgOutputEncoding, and $wgUser.

OutputPage::setETag ( tag  ) 

Definition at line 138 of file OutputPage.php.

OutputPage::setFeedAppendQuery ( val  ) 

Definition at line 338 of file OutputPage.php.

Referenced by SpecialRecentchangeslinked::setBottomText().

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

OutputPage::setHTMLTitle ( name  ) 

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

Referenced by addParserOutputNoText().

OutputPage::setLanguageLinks ( newLinkArray  ) 

Definition at line 364 of file OutputPage.php.

OutputPage::setOnloadHandler ( js  ) 

Definition at line 340 of file OutputPage.php.

OutputPage::setPageTitle ( name  ) 

OutputPage::setPageTitleActionText ( text  ) 

Definition at line 249 of file OutputPage.php.

References $text.

OutputPage::setParserOptions ( options  ) 

Definition at line 444 of file OutputPage.php.

References $options, parserOptions(), and wfDeprecated().

OutputPage::setPrintable (  ) 

Definition at line 334 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:
mixed $revid an integer, or NULL
Returns:
mixed previous value

Definition at line 462 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 267 of file OutputPage.php.

Referenced by blockedPage(), loginToUse(), permissionRequired(), rateLimited(), readOnlyPage(), showErrorPage(), showFatalError(), showPermissionsErrorPage(), and versionRequired().

OutputPage::setSquidMaxage ( maxage  ) 

Parameters:
int $maxage Maximum cache time on the Squid, in seconds.

Definition at line 688 of file OutputPage.php.

Referenced by SkinTemplate::outputPage().

OutputPage::setStatusCode ( statusCode  ) 

Set the HTTP status code to send with the output.

Parameters:
int $statusCode
Returns:
nothing

Definition at line 74 of file OutputPage.php.

Referenced by rateLimited().

OutputPage::setSubtitle ( str  ) 

Definition at line 330 of file OutputPage.php.

Referenced by readOnlyPage(), and SpecialRecentchangeslinked::setTopText().

OutputPage::setSyndicated ( show = true  ) 

Definition at line 336 of file OutputPage.php.

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

Output a standard error page.

Parameters:
string $title Message key for page title
string $msg Message key for page text
array $params Message parameters

Definition at line 1088 of file OutputPage.php.

References $msg, $title, $wgTitle, addHTML(), enableClientCache(), returnToMain(), setArticleRelated(), setHTMLTitle(), setPageTitle(), setRobotPolicy(), and wfMsg().

OutputPage::showFatalError ( message  ) 

OutputPage::showFileCopyError ( old,
new 
)

Definition at line 1386 of file OutputPage.php.

References showFatalError(), and wfMsg().

OutputPage::showFileDeleteError ( name  ) 

Definition at line 1394 of file OutputPage.php.

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

OutputPage::showFileNotFoundError ( name  ) 

Definition at line 1398 of file OutputPage.php.

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

OutputPage::showFileRenameError ( old,
new 
)

Definition at line 1390 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:
int $lag Slave lag

Definition at line 1802 of file OutputPage.php.

References $wgSlaveLagCritical, $wgSlaveLagWarning, addHTML(), and wfMsgExt().

OutputPage::showNewSectionLink (  ) 

Show an "add new section" link?

Returns:
bool

Definition at line 1780 of file OutputPage.php.

OutputPage::showPermissionsErrorPage ( errors,
action = null 
)

Output a standard permission error page.

Parameters:
array $errors Error message keys

Definition at line 1113 of file OutputPage.php.

References $action, $wgTitle, addWikiText(), enableClientCache(), formatPermissionsErrorMessage(), setArticleRelated(), setHTMLTitle(), setPageTitle(), setRobotPolicy(), and wfMsg().

OutputPage::showUnexpectedValueError ( name,
val 
)

Definition at line 1382 of file OutputPage.php.

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

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

OutputPage::suppressQuickbar (  ) 

Definition at line 431 of file OutputPage.php.

OutputPage::sysopRequired (  ) 

Use permissionRequired.

Deprecated:

Definition at line 1182 of file OutputPage.php.

OutputPage::transformCssMedia ( media  ) 

Definition at line 1723 of file OutputPage.php.

References $wgHandheldForIPhone.

Referenced by styleLink().

OutputPage::tryParserCache ( &$  article  ) 

Parameters:
Article $article
User $user
Returns:
bool True if successful, else false.

Definition at line 674 of file OutputPage.php.

References addParserOutput(), parserOptions(), and ParserCache::singleton().

OutputPage::uncacheableBecauseRequestVars (  ) 

Definition at line 717 of file OutputPage.php.

References $wgRequest.

Referenced by sendCacheControl().

OutputPage::unexpectedValueError ( name,
val 
)

Deprecated:

Definition at line 1344 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:
mixed $version The version of MediaWiki needed to use the page

Definition at line 1141 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 an 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( '

$1
', 'some-error' );

Is equivalent to:

$wgOut->addWikiText( '

' . wfMsgNoTrans( 'some-error' ) . '
' );

Definition at line 1860 of file OutputPage.php.

References $args, $n, $name, $options, $s, $spec, addHTML(), parse(), and wfMsgExt().

Referenced by readOnlyPage().


Member Data Documentation

OutputPage::$mAllowUserJs

Definition at line 19 of file OutputPage.php.

OutputPage::$mArticleBodyOnly = false

Definition at line 29 of file OutputPage.php.

OutputPage::$mBodytext = ''

Definition at line 11 of file OutputPage.php.

OutputPage::$mCategoryLinks = array()

Definition at line 15 of file OutputPage.php.

OutputPage::$mContainsNewMagic = 0

Definition at line 23 of file OutputPage.php.

OutputPage::$mContainsOldMagic = 0

Definition at line 23 of file OutputPage.php.

OutputPage::$mDebugtext = ''

Definition at line 11 of file OutputPage.php.

OutputPage::$mDoNothing = false

Definition at line 22 of file OutputPage.php.

OutputPage::$mEnableClientCache = true

Definition at line 28 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::$mFeedLinksAppendQuery = false

Definition at line 27 of file OutputPage.php.

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

Definition at line 47 of file OutputPage.php.

OutputPage::$mHeadItems = array()

Definition at line 16 of file OutputPage.php.

OutputPage::$mHideNewSectionLink = false

Definition at line 32 of file OutputPage.php.

OutputPage::$mHTMLtitle = ''

Definition at line 12 of file OutputPage.php.

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

Definition at line 46 of file OutputPage.php.

OutputPage::$mIsarticle = true

Definition at line 12 of file OutputPage.php.

OutputPage::$mIsArticleRelated = true

Definition at line 24 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 16 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 31 of file OutputPage.php.

OutputPage::$mNoGallery = false

Definition at line 33 of file OutputPage.php.

OutputPage::$mOnloadHandler = ''

Definition at line 21 of file OutputPage.php.

OutputPage::$mPageLinkTitle = ''

Definition at line 16 of file OutputPage.php.

OutputPage::$mPagetitle = ''

Definition at line 11 of file OutputPage.php.

OutputPage::$mPageTitleActionText = ''

Definition at line 34 of file OutputPage.php.

OutputPage::$mParserOptions = null [protected]

Definition at line 25 of file OutputPage.php.

OutputPage::$mParseWarnings = array()

Definition at line 35 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 37 of file OutputPage.php.

OutputPage::$mScripts = ''

Definition at line 16 of file OutputPage.php.

OutputPage::$mShowFeedLinks = false

Definition at line 26 of file OutputPage.php.

OutputPage::$mSquidMaxage = 0

Definition at line 36 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 20 of file OutputPage.php.

OutputPage::$mTemplateIds = array()

Definition at line 17 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 44 of file OutputPage.php.


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

Generated on Sat Sep 5 02:08:43 2009 for MediaWiki by  doxygen 1.5.9