Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F5303
transhook.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 10:25 PM
2014-11-21 22:25:26 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
transhook.diff
View Options
Index: includes/parser/Parser.php
===================================================================
--- includes/parser/Parser.php (revision 45863)
+++ includes/parser/Parser.php (working copy)
@@ -2787,6 +2787,7 @@
$forceRawInterwiki = false; # Force interwiki transclusion to be done in raw mode not rendered
$isChildObj = false; # $text is a DOM node needing expansion in a child frame
$isLocalObj = false; # $text is a DOM node needing expansion in the current frame
+ $isTransclude = false; # $text contains a transcluded page, DOMness determined by isChildObj
# Title object, where $text came from
$title = NULL;
@@ -2970,6 +2971,7 @@
if ( $text !== false ) {
$found = true;
$isChildObj = true;
+ $isTransclude = true;
}
}
@@ -2989,6 +2991,7 @@
$text = $this->preprocessToDom( $text, self::PTD_FOR_INCLUSION );
$isChildObj = true;
}
+ $isTransclude = true;
$found = true;
}
wfProfileOut( __METHOD__ . '-loadtpl' );
@@ -3026,6 +3029,9 @@
$text = $frame->expand( $text, PPFrame::RECOVER_ORIG );
$isLocalObj = false;
}
+ if ($isTransclude) {
+ wfRunHooks( 'ParserAfterStrip', array( &$this, &$text, &$this->mStripState ) );
+ }
# Replace raw HTML by a placeholder
# Add a blank line preceding, to prevent it from mucking up
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4864
Default Alt Text
transhook.diff (1 KB)
Attached To
Mode
T19131: Feature Request: Transclusion Preprocessing Hook
Attached
Detach File
Event Timeline
Log In to Comment