Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -675,9 +675,9 @@ |
676 | 676 | 'mysql', 'postgres', 'sqlite', 'oracle', 'mssql', 'ibm_db2' |
677 | 677 | ); |
678 | 678 | $dbType = strtolower( $dbType ); |
| 679 | + $class = 'Database' . ucfirst( $dbType ); |
679 | 680 | |
680 | 681 | if( in_array( $dbType, $canonicalDBTypes ) ) { |
681 | | - $class = 'Database' . ucfirst( $dbType ); |
682 | 682 | return new $class( |
683 | 683 | isset( $p['host'] ) ? $p['host'] : false, |
684 | 684 | isset( $p['user'] ) ? $p['user'] : false, |
— | — | @@ -686,6 +686,8 @@ |
687 | 687 | isset( $p['flags'] ) ? $p['flags'] : 0, |
688 | 688 | isset( $p['tablePrefix'] ) ? $p['tablePrefix'] : 'get from global' |
689 | 689 | ); |
| 690 | + } elseif (class_exists($class)) { |
| 691 | + return new $class($p); |
690 | 692 | } else { |
691 | 693 | return null; |
692 | 694 | } |