Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -680,7 +680,7 @@ |
681 | 681 | $dbType = strtolower( $dbType ); |
682 | 682 | $class = 'Database' . ucfirst( $dbType ); |
683 | 683 | |
684 | | - if( in_array( $dbType, $canonicalDBTypes ) ) { |
| 684 | + if( in_array( $dbType, $canonicalDBTypes ) || ( class_exists( $class ) && is_subclass_of( $class, 'DatabaseBase' ) ) ) { |
685 | 685 | return new $class( |
686 | 686 | isset( $p['host'] ) ? $p['host'] : false, |
687 | 687 | isset( $p['user'] ) ? $p['user'] : false, |
— | — | @@ -689,8 +689,6 @@ |
690 | 690 | isset( $p['flags'] ) ? $p['flags'] : 0, |
691 | 691 | isset( $p['tablePrefix'] ) ? $p['tablePrefix'] : 'get from global' |
692 | 692 | ); |
693 | | - } elseif ( class_exists( $class ) && is_subclass_of( $class, 'DatabaseBase' ) ) { |
694 | | - return new $class( $p ); |
695 | 693 | } else { |
696 | 694 | return null; |
697 | 695 | } |