protected function checkPgUser() {
global $wgDBmwschema, $wgDBts2schema, $wgDBuser;
- # Just in case their LocalSettings.php does not have this:
- if ( !isset( $wgDBmwschema ) ) {
- $wgDBmwschema = 'mediawiki';
- }
+ $config = $this->db->selectField(
+ 'pg_catalog.pg_user', "array_to_string(useconfig,'*')",
+ array( 'usename' => $wgDBuser ), __METHOD__ );
- $safeuser = $this->db->addQuotes( $wgDBuser );
- $SQL = "SELECT array_to_string(useconfig,'*') FROM pg_catalog.pg_user WHERE usename = $safeuser";
- $config = pg_fetch_result( $this->db->query( $SQL ), 0, 0 );
$conf = array();
foreach ( explode( '*', $config ) as $c ) {
list( $x, $y ) = explode( '=', $c );