r68516 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68515‎ | r68516 | r68517 >
Date:13:53, 24 June 2010
Author:yaron
Status:deferred
Tags:
Comment:
Renamed new 'LoadExtensionSchemaUpdates' function, set to produce the same SQL regardless of DBMS
Modified paths:
  • /trunk/extensions/ApprovedRevs/ApprovedRevs.hooks.php (modified) (history)
  • /trunk/extensions/ApprovedRevs/ApprovedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ApprovedRevs/ApprovedRevs.php
@@ -48,7 +48,7 @@
4949 $wgHooks['BeforeParserFetchTemplateAndtitle'][] = 'ApprovedRevsHooks::setTranscludedPageRev';
5050 $wgHooks['ArticleDeleteComplete'][] = 'ApprovedRevsHooks::deleteRevisionApproval';
5151 $wgHooks['AdminLinks'][] = 'ApprovedRevsHooks::addToAdminLinks';
52 -$wgHooks['LoadExtensionSchemaUpdates'][] = 'ApprovedRevsHooks::onLoadExtensionSchemaUpdates';
 52+$wgHooks['LoadExtensionSchemaUpdates'][] = 'ApprovedRevsHooks::describeDBSchema';
5353
5454 // logging
5555 $wgLogTypes['approval'] = 'approval';
Index: trunk/extensions/ApprovedRevs/ApprovedRevs.hooks.php
@@ -281,15 +281,15 @@
282282 return true;
283283 }
284284
285 - public static function onLoadExtensionSchemaUpdates() {
 285+ public static function describeDBSchema() {
286286 global $wgExtNewTables, $wgDBtype;
287287
288288 $dir = dirname( __FILE__ );
289289
290290 // DB updates
291 - if ( $wgDBtype == 'mysql' ) {
 291+ //if ( $wgDBtype == 'mysql' ) {
292292 $wgExtNewTables[] = array( 'approved_revs', "$dir/ApprovedRevs.sql" );
293 - }
 293+ //}
294294 return true;
295295 }
296296 }

Status & tagging log