fixed bug in call of hook ArticleViewHeader
authorManuel Schneider <80686@users.mediawiki.org>
Thu, 22 Mar 2007 08:19:47 +0000 (08:19 +0000)
committerManuel Schneider <80686@users.mediawiki.org>
Thu, 22 Mar 2007 08:19:47 +0000 (08:19 +0000)
includes/Article.php

index 3c8d10e..3dd47a0 100644 (file)
@@ -718,9 +718,9 @@ class Article {
                }
 
                $outputDone = false;
+               wfRunHooks( 'ArticleViewHeader', array( &$this ) );
                if ( $pcache ) {
                        if ( $wgOut->tryParserCache( $this, $wgUser ) ) {
-                               wfRunHooks( 'ArticleViewHeader', array( &$this ) );
                                $outputDone = true;
                        }
                }
@@ -767,11 +767,6 @@ class Article {
                        }
                }
                if( !$outputDone ) {
-                       /**
-                        * @fixme: this hook doesn't work most of the time, as it doesn't
-                        * trigger when the parser cache is used.
-                        */
-                       wfRunHooks( 'ArticleViewHeader', array( &$this ) ) ;
                        $wgOut->setRevisionId( $this->getRevIdFetched() );
                        # wrap user css and user js in pre and don't parse
                        # XXX: use $this->mTitle->usCssJsSubpage() when php is fixed/ a workaround is found