Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -373,6 +373,10 @@ |
374 | 374 | $output: the OutputPage object ($wgOut) |
375 | 375 | &$reason: the reason (string) the article is being deleted |
376 | 376 | |
| 377 | +'ArticleContentOnDiff': before showing the article below a diff |
| 378 | + $diffEngine: the DifferenceEngine |
| 379 | + $output: the OutputPage object ($wgOut) |
| 380 | + |
377 | 381 | 'ArticleDelete': before an article is deleted |
378 | 382 | $article: the article (object) being deleted |
379 | 383 | $user: the user (object) deleting the article |
Index: trunk/phase3/includes/diff/DifferenceInterface.php |
— | — | @@ -456,9 +456,8 @@ |
457 | 457 | $wgOut->addHTML( htmlspecialchars( $this->mNewtext ) ); |
458 | 458 | $wgOut->addHTML( "\n</pre>\n" ); |
459 | 459 | } |
460 | | - } elseif( wfRunHooks( 'ArticleContentOnDiff', array( $this, &$wgOut ) ) ) { |
461 | | - //TODO: document this hook |
462 | | - if( $pCache ) { |
| 460 | + } elseif( wfRunHooks( 'ArticleContentOnDiff', array( $this, $wgOut ) ) ) { |
| 461 | + if ( $pCache ) { |
463 | 462 | $article = new Article( $this->mTitle, 0 ); |
464 | 463 | $pOutput = ParserCache::singleton()->get( $article, $wgOut->parserOptions() ); |
465 | 464 | if( $pOutput ) { |
— | — | @@ -467,13 +466,14 @@ |
468 | 467 | $article->doViewParse(); |
469 | 468 | } |
470 | 469 | } else { |
471 | | - $wgOut->addWikiTextTidy( $this->mNewtext ); |
| 470 | + $wgOut->addWikiTextTidy( $this->mNewtext ); |
472 | 471 | } |
473 | | - if( is_object( $this->mNewRev ) && !$this->mNewRev->isCurrent() ) { |
474 | | - $wgOut->parserOptions()->setEditSection( $oldEditSectionSetting ); |
475 | | - } |
476 | 472 | } |
477 | 473 | |
| 474 | + if( is_object( $this->mNewRev ) && !$this->mNewRev->isCurrent() ) { |
| 475 | + $wgOut->parserOptions()->setEditSection( $oldEditSectionSetting ); |
| 476 | + } |
| 477 | + |
478 | 478 | # Add redundant patrol link on bottom... |
479 | 479 | if( $this->mRcidMarkPatrolled && $this->mTitle->quickUserCan('patrol') ) { |
480 | 480 | $sk = $wgUser->getSkin(); |