Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1116,11 +1116,9 @@ |
1117 | 1117 | $parserOutput = $wgParser->parse( $this->mArticle->preSaveTransform( $toparse ) ."\n\n", |
1118 | 1118 | $wgTitle, $parserOptions ); |
1119 | 1119 | |
1120 | | - $previewHTML = $parserOutput->mText; |
| 1120 | + $previewHTML = $parserOutput->getText(); |
| 1121 | + $wgOut->addParserOutputNoText( $parserOutput ); |
1121 | 1122 | |
1122 | | - $wgOut->addCategoryLinks($parserOutput->getCategoryLinks()); |
1123 | | - $wgOut->addLanguageLinks($parserOutput->getLanguageLinks()); |
1124 | | - |
1125 | 1123 | wfProfileOut( $fname ); |
1126 | 1124 | return $previewhead . $previewHTML; |
1127 | 1125 | } |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -286,12 +286,20 @@ |
287 | 287 | global $wgParser; |
288 | 288 | $parserOutput = $wgParser->parse( $text, $title, $this->mParserOptions, |
289 | 289 | $linestart, true, $this->mRevisionId ); |
| 290 | + $this->addParserOutput( $parserOutput ); |
| 291 | + } |
| 292 | + |
| 293 | + function addParserOutputNoText( &$parserOutput ) { |
290 | 294 | $this->mLanguageLinks += $parserOutput->getLanguageLinks(); |
291 | 295 | $this->addCategoryLinks( $parserOutput->getCategories() ); |
292 | 296 | $this->addKeywords( $parserOutput ); |
293 | 297 | if ( $parserOutput->getCacheTime() == -1 ) { |
294 | 298 | $this->enableClientCache( false ); |
295 | 299 | } |
| 300 | + } |
| 301 | + |
| 302 | + function addParserOutput( &$parserOutput ) { |
| 303 | + $this->addParserOutputNoText( $parserOutput ); |
296 | 304 | $this->addHTML( $parserOutput->getText() ); |
297 | 305 | } |
298 | 306 | |
— | — | @@ -305,19 +313,11 @@ |
306 | 314 | $parserOutput = $wgParser->parse( $text, $article->mTitle, |
307 | 315 | $this->mParserOptions, true, true, $this->mRevisionId ); |
308 | 316 | |
309 | | - $text = $parserOutput->getText(); |
310 | | - |
311 | 317 | if ( $article && $parserOutput->getCacheTime() != -1 ) { |
312 | 318 | $wgParserCache->save( $parserOutput, $article, $wgUser ); |
313 | 319 | } |
314 | 320 | |
315 | | - $this->mLanguageLinks += $parserOutput->getLanguageLinks(); |
316 | | - $this->addCategoryLinks( $parserOutput->getCategories() ); |
317 | | - $this->addKeywords( $parserOutput ); |
318 | | - if ( $parserOutput->getCacheTime() == -1 ) { |
319 | | - $this->enableClientCache( false ); |
320 | | - } |
321 | | - $this->addHTML( $text ); |
| 321 | + $this->addParserOutput( $parserOutput ); |
322 | 322 | } |
323 | 323 | |
324 | 324 | /** |