r77081 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77080‎ | r77081 | r77082 >
Date:19:12, 21 November 2010
Author:ashley
Status:deferred
Tags:
Comment:
SocialProfile: support PostgreSQL now that the appropriate .sql files exist
Modified paths:
  • /trunk/extensions/SocialProfile/SocialProfile.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/SocialProfile.php
@@ -215,6 +215,17 @@
216216 $wgExtNewTables[] = array( 'user_gift', "$dir/UserGifts/usergifts.sql" );
217217 $wgExtNewTables[] = array( 'gift', "$dir/UserGifts/usergifts.sql" );
218218 $wgExtNewTables[] = array( 'user_system_messages', "$dir/UserSystemMessages/user_system_messages.sql" );
 219+ } elseif( $wgDBtype == 'postgresql' ) {
 220+ $wgExtNewTables[] = array( 'user_board', "$dir/UserBoard/user_board.postgres.sql" );
 221+ $wgExtNewTables[] = array( 'user_profile', "$dir/UserProfile/user_profile.postgres.sql" );
 222+ $wgExtNewTables[] = array( 'user_stats', "$dir/UserStats/user_stats.postgres.sql" );
 223+ $wgExtNewTables[] = array( 'user_relationship', "$dir/UserRelationship/user_relationship.postgres.sql" );
 224+ $wgExtNewTables[] = array( 'user_relationship_request', "$dir/UserRelationship/user_relationship.postgres.sql" );
 225+ $wgExtNewTables[] = array( 'user_system_gift', "$dir/SystemGifts/systemgifts.postgres.sql" );
 226+ $wgExtNewTables[] = array( 'system_gift', "$dir/SystemGifts/systemgifts.postgres.sql" );
 227+ $wgExtNewTables[] = array( 'user_gift', "$dir/UserGifts/usergifts.postgres.sql" );
 228+ $wgExtNewTables[] = array( 'gift', "$dir/UserGifts/usergifts.postgres.sql" );
 229+ $wgExtNewTables[] = array( 'user_system_messages', "$dir/UserSystemMessages/user_system_messages.postgres.sql" );
219230 }
220231 } else {
221232 if ( $updater->getDB()->getType() == 'mysql' ) {
@@ -239,6 +250,27 @@
240251 "$dir/UserGifts/usergifts.sql", true ) );
241252 $updater->addExtensionUpdate( array( 'addTable', 'user_system_messages',
242253 "$dir/UserSystemMessages/user_system_messages.sql", true ) );
 254+ } elseif ( $updater->getDB()->getType() == 'postgresql' ) {
 255+ $updater->addExtensionUpdate( array( 'addTable', 'user_board',
 256+ "$dir/UserBoard/user_board.postgres.sql", true ) );
 257+ $updater->addExtensionUpdate( array( 'addTable', 'user_profile',
 258+ "$dir/UserProfile/user_profile.postgres.sql", true ) );
 259+ $updater->addExtensionUpdate( array( 'addTable', 'user_stats',
 260+ "$dir/UserStats/user_stats.postgres.sql", true ) );
 261+ $updater->addExtensionUpdate( array( 'addTable', 'user_relationship',
 262+ "$dir/UserRelationship/user_relationship.postgres.sql", true ) );
 263+ $updater->addExtensionUpdate( array( 'addTable', 'user_relationship_request',
 264+ "$dir/UserRelationship/user_relationship.postgres.sql", true ) );
 265+ $updater->addExtensionUpdate( array( 'addTable', 'user_system_gift',
 266+ "$dir/SystemGifts/systemgifts.postgres.sql", true ) );
 267+ $updater->addExtensionUpdate( array( 'addTable', 'system_gift',
 268+ "$dir/SystemGifts/systemgifts.postgres.sql", true ) );
 269+ $updater->addExtensionUpdate( array( 'addTable', 'user_gift',
 270+ "$dir/UserGifts/usergifts.postgres.sql", true ) );
 271+ $updater->addExtensionUpdate( array( 'addTable', 'gift',
 272+ "$dir/UserGifts/usergifts.postgres.sql", true ) );
 273+ $updater->addExtensionUpdate( array( 'addTable', 'user_system_messages',
 274+ "$dir/UserSystemMessages/user_system_messages.postgres.sql", true ) );
243275 }
244276 }
245277 return true;

Follow-up revisions

RevisionCommit summaryAuthorDate
r77082SocialProfile: follow-up to r77081: it's apparently just 'postgres' here...ashley19:15, 21 November 2010

Status & tagging log