From 742973c85bc4b43ef8db174481f1ba532e804405 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 5 Jul 2008 22:45:37 +0000 Subject: [PATCH] Revert r37078, 37132 "New hook ParserBeforeTranscludeTemplate: This hook allows for modification of the title and text of a template which is being transcluded. Use of this hook will allow extensions to create features such as TransWiki for an alternative to ScaryTransclusions." This hook seems a bit oddly placed to me; the template gets fetched locally, and *then* we give the opportunity to fetch it remotely instead? Just seems to be in the wrong order, and pretty unclear. --- RELEASE-NOTES | 5 +---- docs/hooks.txt | 6 ------ includes/parser/Parser.php | 2 -- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index cc231d9849..c5d7544ee6 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -179,10 +179,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Added blank special page Special:BlankPage for benchmarking, etc. * Foreign repo file descriptions and thumbnails are now cached. * (bug 11732) Allow localisation of edit button images -* New hook ParserBeforeTranscludeTemplate to allow extensions to modify the text - and title of a template being transcluded in a way similar to how - ParserBeforeStrip effects the page being parsed - + === Bug fixes in 1.13 === * (bug 10677) Add link to the file description page on the shared repository diff --git a/docs/hooks.txt b/docs/hooks.txt index 39cbd01742..68c529ca10 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -913,12 +913,6 @@ $parser: parser object $text: text being parsed $stripState: stripState used (object) -'ParserBeforeTranscludeTemplate': Allows modification of the text and title of a - template which is being transcluded -&$parser: parser object -&$text: text being transcluded -&$title: title object of the template - 'ParserBeforeTidy': called before tidy and custom tags replacements $parser: Parser object being used $text: actual text diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index ea18a92025..f7235255ff 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3039,8 +3039,6 @@ class Parser // Cache miss, go to the database list( $text, $title ) = $this->fetchTemplateAndTitle( $title ); - wfRunHooks( 'ParserBeforeTranscludeTemplate', array( &$this, &$text, &$title ) ); - if ( $text === false ) { $this->mTplDomCache[$titleText] = false; return array( false, $title ); -- 2.20.1