Applying patch from 'tPl0ch', connect key is set to 'mysql_connect' when not using persistent connections. Fixes #132

This commit is contained in:
Mark Story 2009-12-22 13:23:55 -05:00
parent 6356c6ed87
commit 425dcf2df5

View file

@ -448,13 +448,13 @@ class DboMysql extends DboMysqlBase {
*/
function connect() {
$config = $this->config;
$connect = $config['connect'];
$this->connected = false;
if (!$config['persistent']) {
$this->connection = mysql_connect($config['host'] . ':' . $config['port'], $config['login'], $config['password'], true);
$config['connect'] = 'mysql_connect';
} else {
$this->connection = $connect($config['host'] . ':' . $config['port'], $config['login'], $config['password']);
$this->connection = mysql_pconnect($config['host'] . ':' . $config['port'], $config['login'], $config['password']);
}
if (mysql_select_db($config['database'], $this->connection)) {