Index: trunk/extensions/ExternalData/ExternalData.php |
— | — | @@ -57,6 +57,7 @@ |
58 | 58 | $parser->setFunctionHook( 'external_value', array( 'EDParserFunctions', 'doExternalValue' ) ); |
59 | 59 | $parser->setFunctionHook( 'for_external_table', array( 'EDParserFunctions', 'doForExternalTable' ) ); |
60 | 60 | $parser->setFunctionHook( 'store_external_table', array( 'EDParserFunctions', 'doStoreExternalTable' ) ); |
| 61 | + $parser->setFunctionHook( 'clear_external_data', array( 'EDParserFunctions', 'doClearExternalData' ) ); |
61 | 62 | |
62 | 63 | return true; // always return true, in order not to stop MW's hook processing! |
63 | 64 | } |
— | — | @@ -72,6 +73,7 @@ |
73 | 74 | $magicWords['external_value'] = array ( 0, 'external_value' ); |
74 | 75 | $magicWords['for_external_table'] = array ( 0, 'for_external_table' ); |
75 | 76 | $magicWords['store_external_table'] = array ( 0, 'store_external_table' ); |
| 77 | + $magicWords['clear_external_data'] = array ( 0, 'clear_external_data' ); |
76 | 78 | } |
77 | 79 | return true; |
78 | 80 | } |
Index: trunk/extensions/ExternalData/ED_ParserFunctions.php |
— | — | @@ -359,4 +359,13 @@ |
360 | 360 | } |
361 | 361 | return null; |
362 | 362 | } |
| 363 | + |
| 364 | + /** |
| 365 | + * Render the #clear_external_data parser function |
| 366 | + */ |
| 367 | + static function doClearExternalData( &$parser ) { |
| 368 | + global $edgValues; |
| 369 | + $edgValues = null; |
| 370 | + } |
| 371 | + |
363 | 372 | } |