From c5fb24d80d7b3d2e70f898aac7a0b6c0c70b3e98 Mon Sep 17 00:00:00 2001 From: Magnus Manske Date: Wed, 21 Dec 2005 12:02:18 +0000 Subject: [PATCH] new hooks --- includes/Article.php | 3 +++ includes/Parser.php | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/includes/Article.php b/includes/Article.php index 4396a29499..1a348018d0 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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; } diff --git a/includes/Parser.php b/includes/Parser.php index af65ddb45f..7552339ac7 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -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 ); -- 2.20.1