Index: trunk/phase3/includes/installer/DatabaseUpdater.php |
— | — | @@ -26,6 +26,11 @@ |
27 | 27 | |
28 | 28 | protected $extensionUpdates = array(); |
29 | 29 | |
| 30 | + /** |
| 31 | + * Handle to the database subclass |
| 32 | + * |
| 33 | + * @var DatabaseBase |
| 34 | + */ |
30 | 35 | protected $db; |
31 | 36 | |
32 | 37 | protected $shared = false; |
Index: trunk/phase3/includes/installer/PostgresUpdater.php |
— | — | @@ -516,14 +516,10 @@ |
517 | 517 | protected function checkPgUser() { |
518 | 518 | global $wgDBmwschema, $wgDBts2schema, $wgDBuser; |
519 | 519 | |
520 | | - # Just in case their LocalSettings.php does not have this: |
521 | | - if ( !isset( $wgDBmwschema ) ) { |
522 | | - $wgDBmwschema = 'mediawiki'; |
523 | | - } |
| 520 | + $config = $this->db->selectField( |
| 521 | + 'pg_catalog.pg_user', "array_to_string(useconfig,'*')", |
| 522 | + array( 'usename' => $wgDBuser ), __METHOD__ ); |
524 | 523 | |
525 | | - $safeuser = $this->db->addQuotes( $wgDBuser ); |
526 | | - $SQL = "SELECT array_to_string(useconfig,'*') FROM pg_catalog.pg_user WHERE usename = $safeuser"; |
527 | | - $config = pg_fetch_result( $this->db->query( $SQL ), 0, 0 ); |
528 | 524 | $conf = array(); |
529 | 525 | foreach ( explode( '*', $config ) as $c ) { |
530 | 526 | list( $x, $y ) = explode( '=', $c ); |