r113601 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113600‎ | r113601 | r113602 >
Date:23:40, 11 March 2012
Author:reedy
Status:reverted
Tags:gerritmigration, tstarling 
Comment:
Bug 35162 - Change in Database api break extension MSSQLBackCompat

$canonicalDBTypes is probably superfluous information, but doesn't harm as a shortcut

Ping r108051
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/Database.php
@@ -680,7 +680,7 @@
681681 $dbType = strtolower( $dbType );
682682 $class = 'Database' . ucfirst( $dbType );
683683
684 - if( in_array( $dbType, $canonicalDBTypes ) ) {
 684+ if( in_array( $dbType, $canonicalDBTypes ) || ( class_exists( $class ) && is_subclass_of( $class, 'DatabaseBase' ) ) ) {
685685 return new $class(
686686 isset( $p['host'] ) ? $p['host'] : false,
687687 isset( $p['user'] ) ? $p['user'] : false,
@@ -689,8 +689,6 @@
690690 isset( $p['flags'] ) ? $p['flags'] : 0,
691691 isset( $p['tablePrefix'] ) ? $p['tablePrefix'] : 'get from global'
692692 );
693 - } elseif ( class_exists( $class ) && is_subclass_of( $class, 'DatabaseBase' ) ) {
694 - return new $class( $p );
695693 } else {
696694 return null;
697695 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r114335Revert r107309, r113601, r113704, r113742, r113792, r113838, r113859, r113893......catrope00:16, 21 March 2012
r114374MFT r113412, r113441, r113601, r113617, r113782reedy16:57, 21 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107932Fix Bug 33384 - database drivers cannot be provided by extension...mah19:55, 3 January 2012

Status & tagging log