Index: trunk/extensions/Cite/Cite_body.php |
— | — | @@ -1013,6 +1013,14 @@ |
1014 | 1014 | } |
1015 | 1015 | return true; |
1016 | 1016 | } |
| 1017 | + |
| 1018 | + /** |
| 1019 | + * Hook for the InlineEditor extension. If any reference is in the text, the entire |
| 1020 | + * page should be reparsed, so we return false in that case. |
| 1021 | + */ |
| 1022 | + function checkAnyRefs( &$output ) { |
| 1023 | + return ( empty( $this->mRefs ) ); |
| 1024 | + } |
1017 | 1025 | |
1018 | 1026 | /** |
1019 | 1027 | * Initialize the parser hooks |
— | — | @@ -1025,6 +1033,7 @@ |
1026 | 1034 | |
1027 | 1035 | $wgHooks['ParserClearState'][] = array( self::$instance, 'clearState' ); |
1028 | 1036 | $wgHooks['ParserBeforeTidy'][] = array( self::$instance, 'checkRefsNoReferences' ); |
| 1037 | + $wgHooks['InlineEditorPartialAfterParse'][] = array( self::$instance, 'checkAnyRefs' ); |
1029 | 1038 | } |
1030 | 1039 | $parser->setHook( 'ref' , array( self::$instance, 'ref' ) ); |
1031 | 1040 | $parser->setHook( 'references' , array( self::$instance, 'references' ) ); |