r86476 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86475‎ | r86476 | r86477 >
Date:14:54, 20 April 2011
Author:yaron
Status:deferred
Tags:
Comment:
Added #clear_external_data function - patch by Chris Wolcott
Modified paths:
  • /trunk/extensions/ExternalData/ED_ParserFunctions.php (modified) (history)
  • /trunk/extensions/ExternalData/ExternalData.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ExternalData/ExternalData.php
@@ -57,6 +57,7 @@
5858 $parser->setFunctionHook( 'external_value', array( 'EDParserFunctions', 'doExternalValue' ) );
5959 $parser->setFunctionHook( 'for_external_table', array( 'EDParserFunctions', 'doForExternalTable' ) );
6060 $parser->setFunctionHook( 'store_external_table', array( 'EDParserFunctions', 'doStoreExternalTable' ) );
 61+ $parser->setFunctionHook( 'clear_external_data', array( 'EDParserFunctions', 'doClearExternalData' ) );
6162
6263 return true; // always return true, in order not to stop MW's hook processing!
6364 }
@@ -72,6 +73,7 @@
7374 $magicWords['external_value'] = array ( 0, 'external_value' );
7475 $magicWords['for_external_table'] = array ( 0, 'for_external_table' );
7576 $magicWords['store_external_table'] = array ( 0, 'store_external_table' );
 77+ $magicWords['clear_external_data'] = array ( 0, 'clear_external_data' );
7678 }
7779 return true;
7880 }
Index: trunk/extensions/ExternalData/ED_ParserFunctions.php
@@ -359,4 +359,13 @@
360360 }
361361 return null;
362362 }
 363+
 364+ /**
 365+ * Render the #clear_external_data parser function
 366+ */
 367+ static function doClearExternalData( &$parser ) {
 368+ global $edgValues;
 369+ $edgValues = null;
 370+ }
 371+
363372 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r94694Fix to r86476 - $edgValues should be getting set to array(), not nullyaron21:52, 16 August 2011

Status & tagging log