Merge "Mark parser hook output as volatile"

This commit is contained in:
jenkins-bot 2014-05-30 21:09:14 +00:00 committed by Gerrit Code Review
commit feef08d570

View file

@ -151,10 +151,11 @@ class Cite {
* @param $str string Input * @param $str string Input
* @param $argv array Arguments * @param $argv array Arguments
* @param $parser Parser * @param $parser Parser
* @param $frame PPFrame
* *
* @return string * @return string
*/ */
function ref( $str, $argv, $parser ) { function ref( $str, $argv, $parser, $frame ) {
global $wgCiteEnablePopups; global $wgCiteEnablePopups;
if ( $this->mInCite ) { if ( $this->mInCite ) {
return htmlspecialchars( "<ref>$str</ref>" ); return htmlspecialchars( "<ref>$str</ref>" );
@ -169,6 +170,9 @@ class Cite {
$parserOutput->addModules( 'ext.cite.popups' ); $parserOutput->addModules( 'ext.cite.popups' );
} }
$parserOutput->addModuleStyles( 'ext.rtlcite' ); $parserOutput->addModuleStyles( 'ext.rtlcite' );
if ( is_callable( array( $frame, 'setVolatile' ) ) ) {
$frame->setVolatile();
}
return $ret; return $ret;
} }
} }
@ -526,10 +530,11 @@ class Cite {
* @param $str string Input * @param $str string Input
* @param $argv array Arguments * @param $argv array Arguments
* @param $parser Parser * @param $parser Parser
* @param $frame PPFrame
* *
* @return string * @return string
*/ */
function references( $str, $argv, $parser ) { function references( $str, $argv, $parser, $frame ) {
if ( $this->mInCite || $this->mInReferences ) { if ( $this->mInCite || $this->mInReferences ) {
if ( is_null( $str ) ) { if ( is_null( $str ) ) {
return htmlspecialchars( "<references/>" ); return htmlspecialchars( "<references/>" );
@ -541,6 +546,9 @@ class Cite {
$this->mInReferences = true; $this->mInReferences = true;
$ret = $this->guardedReferences( $str, $argv, $parser ); $ret = $this->guardedReferences( $str, $argv, $parser );
$this->mInReferences = false; $this->mInReferences = false;
if ( is_callable( array( $frame, 'setVolatile' ) ) ) {
$frame->setVolatile();
}
return $ret; return $ret;
} }
} }