mirror of
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress.git
synced 2025-07-30 17:57:13 +02:00
Merge pull request #88 from LougaoCloud/v3
bugfix: $dbname is not used in driver_pgsql.php
This commit is contained in:
@ -101,7 +101,7 @@ function wpsqli_real_connect(&$connection, $hostname = null, $username = null, $
|
|||||||
|
|
||||||
// Must connect to a specific database unlike MySQL
|
// Must connect to a specific database unlike MySQL
|
||||||
$dbname = defined('DB_NAME') && DB_NAME ? DB_NAME : $database;
|
$dbname = defined('DB_NAME') && DB_NAME ? DB_NAME : $database;
|
||||||
$pg_connstr = $GLOBALS['pg4wp_connstr'] . ' dbname=' . $database;
|
$pg_connstr = $GLOBALS['pg4wp_connstr'] . ' dbname=' . $dbname;
|
||||||
$GLOBALS['pg4wp_conn'] = $connection = pg_connect($pg_connstr);
|
$GLOBALS['pg4wp_conn'] = $connection = pg_connect($pg_connstr);
|
||||||
|
|
||||||
return $connection;
|
return $connection;
|
||||||
|
Reference in New Issue
Block a user