mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CiteThisPage
synced 2024-12-03 19:56:21 +00:00
Added hook to support partial rendering for the InlineEditor extension. Doesn't affect normal behaviour.
This commit is contained in:
parent
286a80efc1
commit
efb47a9d90
|
@ -1014,6 +1014,14 @@ class Cite {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook for the InlineEditor extension. If any reference is in the text, the entire
|
||||
* page should be reparsed, so we return false in that case.
|
||||
*/
|
||||
function checkAnyRefs( &$output ) {
|
||||
return ( empty( $this->mRefs ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the parser hooks
|
||||
*/
|
||||
|
@ -1025,6 +1033,7 @@ class Cite {
|
|||
|
||||
$wgHooks['ParserClearState'][] = array( self::$instance, 'clearState' );
|
||||
$wgHooks['ParserBeforeTidy'][] = array( self::$instance, 'checkRefsNoReferences' );
|
||||
$wgHooks['InlineEditorPartialAfterParse'][] = array( self::$instance, 'checkAnyRefs' );
|
||||
}
|
||||
$parser->setHook( 'ref' , array( self::$instance, 'ref' ) );
|
||||
$parser->setHook( 'references' , array( self::$instance, 'references' ) );
|
||||
|
|
Loading…
Reference in a new issue