Index: branches/REL1_4/phase3/includes/Article.php |
— | — | @@ -1168,7 +1168,7 @@ |
1169 | 1169 | # The existence test queries need to be FOR UPDATE |
1170 | 1170 | #$oldUpdate = $wgParser->forUpdate( true ); |
1171 | 1171 | $wgOut = new OutputPage(); |
1172 | | - $wgOut->addWikiText( $text ); |
| 1172 | + $wgOut->addWikiTextWithTitle( $text, $this->mTitle ); |
1173 | 1173 | #$wgParser->forUpdate( $oldUpdate ); |
1174 | 1174 | |
1175 | 1175 | if ( !$wgUseDumbLinkUpdate ) { |
Index: branches/REL1_4/phase3/includes/OutputPage.php |
— | — | @@ -225,9 +225,18 @@ |
226 | 226 | * Convert wikitext to HTML and add it to the buffer |
227 | 227 | */ |
228 | 228 | function addWikiText( $text, $linestart = true ) { |
229 | | - global $wgParser, $wgTitle, $wgUseTidy; |
| 229 | + global $wgTitle; |
| 230 | + $this->addWikiTextTitle($text, $wgTitle, $linestart); |
| 231 | + } |
230 | 232 | |
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 ); |
232 | 241 | $this->mLanguageLinks += $parserOutput->getLanguageLinks(); |
233 | 242 | $this->mCategoryLinks += $parserOutput->getCategoryLinks(); |
234 | 243 | $this->addHTML( $parserOutput->getText() ); |