r77082 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77081‎ | r77082 | r77083 >
Date:19:15, 21 November 2010
Author:ashley
Status:ok (Comments)
Tags:
Comment:
SocialProfile: follow-up to r77081: it's apparently just 'postgres' here...
Modified paths:
  • /trunk/extensions/SocialProfile/SocialProfile.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/SocialProfile.php
@@ -215,7 +215,7 @@
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' ) {
 219+ } elseif( $wgDBtype == 'postgres' ) {
220220 $wgExtNewTables[] = array( 'user_board', "$dir/UserBoard/user_board.postgres.sql" );
221221 $wgExtNewTables[] = array( 'user_profile', "$dir/UserProfile/user_profile.postgres.sql" );
222222 $wgExtNewTables[] = array( 'user_stats', "$dir/UserStats/user_stats.postgres.sql" );
@@ -250,7 +250,7 @@
251251 "$dir/UserGifts/usergifts.sql", true ) );
252252 $updater->addExtensionUpdate( array( 'addTable', 'user_system_messages',
253253 "$dir/UserSystemMessages/user_system_messages.sql", true ) );
254 - } elseif ( $updater->getDB()->getType() == 'postgresql' ) {
 254+ } elseif ( $updater->getDB()->getType() == 'postgres' ) {
255255 $updater->addExtensionUpdate( array( 'addTable', 'user_board',
256256 "$dir/UserBoard/user_board.postgres.sql", true ) );
257257 $updater->addExtensionUpdate( array( 'addTable', 'user_profile',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77081SocialProfile: support PostgreSQL now that the appropriate .sql files existashley19:12, 21 November 2010

Comments

#Comment by MarkAHershberger (talk | contribs)   22:41, 24 November 2010

Instead of testing for mysql explicitly, it works a little better (in my experience) to default to the same schema file for all databases and only use the db-specific file where necessary.

Status & tagging log