new hooks
authorMagnus Manske <magnusmanske@users.mediawiki.org>
Wed, 21 Dec 2005 12:02:18 +0000 (12:02 +0000)
committerMagnus Manske <magnusmanske@users.mediawiki.org>
Wed, 21 Dec 2005 12:02:18 +0000 (12:02 +0000)
includes/Article.php
includes/Parser.php

index 4396a29..1a34801 100644 (file)
@@ -362,6 +362,7 @@ class Article {
                if ( $this->mContentLoaded ) {
                        return $this->mContent;
                }
+               
                $dbr =& $this->getDB();
                $fname = 'Article::fetchContent';
 
@@ -464,6 +465,8 @@ class Article {
                $this->mContentLoaded = true;
                $this->mRevision =& $revision;
 
+               wfRunHooks( 'ArticleAfterFetchContent', array( &$this, &$this->mContent ) ) ;
+
                return $this->mContent;
        }
 
index af65ddb..7552339 100644 (file)
@@ -192,6 +192,10 @@ class Parser
                $text = $this->strip( $text, $x );
                wfRunHooks( 'ParserAfterStrip', array( &$this, &$text, &$x ) );
 
+               # Hook to suspend the parser in this state
+               if ( !wfRunHooks( 'ParserBeforeInternalParse', array( &$this, &$text, &$x ) ) )
+                       return $text ;
+
                $text = $this->internalParse( $text );
 
                $text = $this->unstrip( $text, $this->mStripState );