Two new hooks by Ryan Lane for the StableVersions extension
authorMagnus Manske <magnusmanske@users.mediawiki.org>
Thu, 27 Jul 2006 18:51:52 +0000 (18:51 +0000)
committerMagnus Manske <magnusmanske@users.mediawiki.org>
Thu, 27 Jul 2006 18:51:52 +0000 (18:51 +0000)
includes/Article.php

index 738fb0f..a30f17f 100644 (file)
@@ -719,6 +719,7 @@ class Article {
                $outputDone = false;
                if ( $pcache ) {
                        if ( $wgOut->tryParserCache( $this, $wgUser ) ) {
+                               wfRunHooks( 'ArticleViewHeader', array( &$this ) );
                                $outputDone = true;
                        }
                }
@@ -2180,6 +2181,10 @@ class Article {
        function setOldSubtitle( $oldid=0 ) {
                global $wgLang, $wgOut, $wgUser;
 
+               if ( !wfRunHooks( 'DisplayOldSubtitle', array(&$this, &$oldid) ) ) {
+                               return; 
+               }       
+
                $revision = Revision::newFromId( $oldid );
 
                $current = ( $oldid == $this->mLatest );