r106639 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106638‎ | r106639 | r106640 >
Date:10:46, 19 December 2011
Author:catrope
Status:ok
Tags:
Comment:
[RL2] Add tables to ParserTestTables
Modified paths:
  • /branches/RL2/extensions/Gadgets/Gadgets.hooks.php (modified) (history)
  • /branches/RL2/extensions/Gadgets/Gadgets.php (modified) (history)

Diff [purge]

Index: branches/RL2/extensions/Gadgets/Gadgets.php
@@ -111,6 +111,7 @@
112112 $wgHooks['GetPreferences'][] = 'GadgetsHooks::getPreferences';
113113 $wgHooks['UserGetDefaultOptions'][] = 'GadgetsHooks::userGetDefaultOptions';
114114 $wgHooks['LoadExtensionSchemaUpdates'][] = 'GadgetsHooks::loadExtensionSchemaUpdates';
 115+$wgHooks['ParserTestTables'][] = 'GadgetsHooks::parserTestTables';
115116 $wgHooks['PreferencesGetLegend'][] = 'GadgetsHooks::preferencesGetLegend';
116117 $wgHooks['ResourceLoaderRegisterModules'][] = 'GadgetsHooks::registerModules';
117118 $wgHooks['TitleIsCssOrJsPage'][] = 'GadgetsHooks::titleIsCssOrJsPage';
Index: branches/RL2/extensions/Gadgets/Gadgets.hooks.php
@@ -318,6 +318,13 @@
319319 return true;
320320 }
321321
 322+ public static function parserTestTables( &$tables ) {
 323+ // These tables are listed here because we have on-save hooks
 324+ // that write to these tables
 325+ $tables[] = 'gadgets';
 326+ $tables[] = 'gadgetpagelist';
 327+ }
 328+
322329 public static function preferencesGetLegend( $form, $key, &$legend ) {
323330 $matches = null;
324331 if ( preg_match( '/^(?:gadgetrepo|gadgetcategory(local)?-[A-Za-z0-9]*)-([A-Za-z0-9]*)$/', $key, $matches ) ) {

Status & tagging log