Index: branches/wmf/1.16wmf4/docs/hooks.txt |
— | — | @@ -356,6 +356,10 @@ |
357 | 357 | $output: the OutputPage object ($wgOut) |
358 | 358 | &$reason: the reason (string) the article is being deleted |
359 | 359 | |
| 360 | +'ArticleContentOnDiff': before showing the article below a diff |
| 361 | + $diffEngine: the DifferenceEngine |
| 362 | + $output: the OutputPage object ($wgOut) |
| 363 | + |
360 | 364 | 'ArticleDelete': before an article is deleted |
361 | 365 | $article: the article (object) being deleted |
362 | 366 | $user: the user (object) deleting the article |
Index: branches/wmf/1.16wmf4/includes/diff/DifferenceInterface.php |
— | — | @@ -443,21 +443,24 @@ |
444 | 444 | $wgOut->addHTML( htmlspecialchars( $this->mNewtext ) ); |
445 | 445 | $wgOut->addHTML( "\n</pre>\n" ); |
446 | 446 | } |
447 | | - } elseif( $pCache ) { |
448 | | - $article = new Article( $this->mTitle, 0 ); |
449 | | - $pOutput = ParserCache::singleton()->get( $article, $wgUser ); |
450 | | - if( $pOutput ) { |
451 | | - $wgOut->addParserOutput( $pOutput ); |
| 447 | + } elseif( wfRunHooks( 'ArticleContentOnDiff', array( $this, $wgOut ) ) ) { |
| 448 | + if ( $pCache ) { |
| 449 | + $article = new Article( $this->mTitle, 0 ); |
| 450 | + $pOutput = ParserCache::singleton()->get( $article, $wgOut->parserOptions() ); |
| 451 | + if( $pOutput ) { |
| 452 | + $wgOut->addParserOutput( $pOutput ); |
| 453 | + } else { |
| 454 | + $article->doViewParse(); |
| 455 | + } |
452 | 456 | } else { |
453 | | - $article->doViewParse(); |
| 457 | + $wgOut->addWikiTextTidy( $this->mNewtext ); |
454 | 458 | } |
455 | | - } else { |
456 | | - $wgOut->addWikiTextTidy( $this->mNewtext ); |
457 | 459 | } |
458 | | - |
| 460 | + |
459 | 461 | if( is_object( $this->mNewRev ) && !$this->mNewRev->isCurrent() ) { |
460 | 462 | $wgOut->parserOptions()->setEditSection( $oldEditSectionSetting ); |
461 | 463 | } |
| 464 | + |
462 | 465 | # Add redundant patrol link on bottom... |
463 | 466 | if( $this->mRcidMarkPatrolled && $this->mTitle->quickUserCan('patrol') ) { |
464 | 467 | $sk = $wgUser->getSkin(); |
Property changes on: branches/wmf/1.16wmf4/includes/diff/DifferenceInterface.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
465 | 468 | Merged /trunk/phase3/includes/diff/DifferenceInterface.php:r75332,75481,75838 |
Property changes on: branches/wmf/1.16wmf4 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
466 | 469 | Merged /trunk/phase3:r75332,75481 |