r9128 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r9127‎ | r9128 | r9129 >
Date:00:36, 22 May 2005
Author:eloquence
Status:old
Tags:
Comment:
Modified paths:
  • /branches/REL1_4/phase3/includes/Article.php (modified) (history)
  • /branches/REL1_4/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: branches/REL1_4/phase3/includes/Article.php
@@ -1168,7 +1168,7 @@
11691169 # The existence test queries need to be FOR UPDATE
11701170 #$oldUpdate = $wgParser->forUpdate( true );
11711171 $wgOut = new OutputPage();
1172 - $wgOut->addWikiText( $text );
 1172+ $wgOut->addWikiTextWithTitle( $text, $this->mTitle );
11731173 #$wgParser->forUpdate( $oldUpdate );
11741174
11751175 if ( !$wgUseDumbLinkUpdate ) {
Index: branches/REL1_4/phase3/includes/OutputPage.php
@@ -225,9 +225,18 @@
226226 * Convert wikitext to HTML and add it to the buffer
227227 */
228228 function addWikiText( $text, $linestart = true ) {
229 - global $wgParser, $wgTitle, $wgUseTidy;
 229+ global $wgTitle;
 230+ $this->addWikiTextTitle($text, $wgTitle, $linestart);
 231+ }
230232
231 - $parserOutput = $wgParser->parse( $text, $wgTitle, $this->mParserOptions, $linestart );
 233+ function addWikiTextWithTitle($text, &$title, $linestart = true) {
 234+ $this->addWikiTextTitle($text, $title, $linestart);
 235+ }
 236+
 237+ function addWikiTextTitle( $text, &$title, $linestart = true ) {
 238+ global $wgParser, $wgUseTidy;
 239+
 240+ $parserOutput = $wgParser->parse( $text, $title, $this->mParserOptions, $linestart );
232241 $this->mLanguageLinks += $parserOutput->getLanguageLinks();
233242 $this->mCategoryLinks += $parserOutput->getCategoryLinks();
234243 $this->addHTML( $parserOutput->getText() );

Status & tagging log