# Parse the text and replace links with placeholders
$wgOut = new OutputPage();
- # Pass the current title along (use linestart default)
- # in case we're creating a wiki page which is different
- # than the currently displayed one (e.g. image pages
- # craeted on file uploads); otherwise, link updates will
+ # Pass the current title along in case we're creating a wiki page
+ # which is different than the currently displayed one (e.g. image
+ # pages created on file uploads); otherwise, link updates will
# go wrong.
- $wgOut->addWikiTextWithTitle( $text, true, $this->mTitle );
+ $wgOut->addWikiTextWithTitle( $text, $this->mTitle );
# Look up the links in the DB and add them to the link cache
$wgOut->transformBuffer( RLH_FOR_UPDATE );
*/
function addWikiText( $text, $linestart = true ) {
global $wgTitle;
- $this->addWikiTextTitle($text, $linestart, $wgTitle);
+ $this->addWikiTextTitle($text, $wgTitle, $linestart);
}
- function addWikiTextWithTitle($text, $linestart = true, &$title) {
- $this->addWikiTextTitle($text, $linestart, $title);
+ function addWikiTextWithTitle($text, &$title, $linestart = true) {
+ $this->addWikiTextTitle($text, $title, $linestart);
}
- function addWikiTextTitle($text, $linestart, &$title) {
+ function addWikiTextTitle($text, &$title, $linestart) {
global $wgParser, $wgUseTidy;
$parserOutput = $wgParser->parse( $text, $title, $this->mParserOptions, $linestart );
$this->mLanguageLinks += $parserOutput->getLanguageLinks();
$this->mCategoryLinks += $parserOutput->getCategoryLinks();
$this->addHTML( $parserOutput->getText() );
-
}
/**