r57251 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57250‎ | r57251 | r57252 >
Date:21:10, 1 October 2009
Author:nimishg
Status:ok
Tags:
Comment:
Added ParserTestTables function to make sure tables exist
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UserDailyContribs/UserDailyContribs.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/UserDailyContribs/UserDailyContribs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UserDailyContribs/UserDailyContribs.php
@@ -41,3 +41,4 @@
4242 // Hooked functions
4343 $wgHooks['LoadExtensionSchemaUpdates'][] = 'UserDailyContribsHooks::schema';
4444 $wgHooks['ArticleSaveComplete'][] = 'UserDailyContribsHooks::storeNewContrib';
 45+$wgHooks['ParserTestTables'][] = 'UserDailyContribsHooks::parserTestTables';
Index: trunk/extensions/UsabilityInitiative/UserDailyContribs/UserDailyContribs.hooks.php
@@ -20,6 +20,15 @@
2121 return true;
2222 }
2323
 24+ /**
 25+ * Hook for making sure parser tests pass
 26+ * @param $tables
 27+ * @return unknown_type
 28+ */
 29+ public static function parserTestTables( &$tables ) {
 30+ $tables[] = 'user_daily_contribs';
 31+ return true;
 32+ }
2433
2534 /**
2635 * Stores a new contribution

Status & tagging log