9697: Adding InternalParseBeforeLinks Parser Hook for Semantic MediaWiki (documentati...
authorRiver Tarnell <river@users.mediawiki.org>
Wed, 25 Apr 2007 21:23:43 +0000 (21:23 +0000)
committerRiver Tarnell <river@users.mediawiki.org>
Wed, 25 Apr 2007 21:23:43 +0000 (21:23 +0000)
RELEASE-NOTES
docs/hooks.txt
includes/Parser.php

index a2f1db7..88cc201 100644 (file)
@@ -124,6 +124,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   500 characters
 * Predefined block reasons added to Special:Blockip
 * (bug 9196) Installer now check that zend.ze1_compatibility_mode is off
+* (bug 9697) Introduce 'InternalParseBeforeLinks' hook; see docs/hooks.txt for more information
 
 == Bugfixes since 1.9 ==
 
index 2e10c6d..9f5d289 100644 (file)
@@ -396,6 +396,12 @@ $title: Title object of page
 $url: string value as output (out parameter, can modify)
 $query: query options passed to Title::getFullURL()
 
+'InternalParseBeforeLinks': during Parser's internalParse method before links but
+after noinclude/includeonly/onlyinclude and other processing.
+&$this: Parser object
+&$text: string containing partially parsed text
+&$this->mStripState: Parser's internal StripState object
+
 'LogPageValidTypes': action being logged. DEPRECATED: Use $wgLogTypes
 &$type: array of strings
 
index 73c86d5..f92c829 100644 (file)
@@ -1003,7 +1003,7 @@ class Parser
                $text = Sanitizer::removeHTMLtags( $text, array( &$this, 'attributeStripCallback' ) );
 
                $text = $this->replaceVariables( $text, $args );
-               wfRunHooks( 'InternalParseBeforeLinks', array( &$this, &$text ) );
+               wfRunHooks( 'InternalParseBeforeLinks', array( &$this, &$text, &$this->mStripState ) );
 
                // Tables need to come after variable replacement for things to work
                // properly; putting them before other transformations should keep