http://www.mediawiki.org/wiki/Special:Code/MediaWiki/82891

Revision: 82891
Author:   janpaul123
Date:     2011-02-27 14:50:56 +0000 (Sun, 27 Feb 2011)
Log Message:
-----------
Added hook to support partial rendering for the InlineEditor extension. Doesn't 
affect normal behaviour.

Modified Paths:
--------------
    trunk/extensions/Cite/Cite_body.php

Modified: trunk/extensions/Cite/Cite_body.php
===================================================================
--- trunk/extensions/Cite/Cite_body.php 2011-02-27 13:41:03 UTC (rev 82890)
+++ trunk/extensions/Cite/Cite_body.php 2011-02-27 14:50:56 UTC (rev 82891)
@@ -1013,6 +1013,14 @@
                }
                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 @@
 
                        $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' ) );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to