r12194 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12193‎ | r12194 | r12195 >
Date:12:02, 21 December 2005
Author:magnus_manske
Status:old
Tags:
Comment:
new hooks
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -362,6 +362,7 @@
363363 if ( $this->mContentLoaded ) {
364364 return $this->mContent;
365365 }
 366+
366367 $dbr =& $this->getDB();
367368 $fname = 'Article::fetchContent';
368369
@@ -464,6 +465,8 @@
465466 $this->mContentLoaded = true;
466467 $this->mRevision =& $revision;
467468
 469+ wfRunHooks( 'ArticleAfterFetchContent', array( &$this, &$this->mContent ) ) ;
 470+
468471 return $this->mContent;
469472 }
470473
Index: trunk/phase3/includes/Parser.php
@@ -192,6 +192,10 @@
193193 $text = $this->strip( $text, $x );
194194 wfRunHooks( 'ParserAfterStrip', array( &$this, &$text, &$x ) );
195195
 196+ # Hook to suspend the parser in this state
 197+ if ( !wfRunHooks( 'ParserBeforeInternalParse', array( &$this, &$text, &$x ) ) )
 198+ return $text ;
 199+
196200 $text = $this->internalParse( $text );
197201
198202 $text = $this->unstrip( $text, $this->mStripState );

Status & tagging log