Adding fix when mysql_connect is set as a connection in the database config and persistent key is not set in the config, the default for persistent is true and this would override the settings in the database config

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4945 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-04-30 10:56:22 +00:00
parent 860c8d3ddc
commit 5b70a957bb

View file

@ -96,7 +96,7 @@ class DboMysql extends DboSource {
$connect = $config['connect'];
$this->connected = false;
if (!$config['persistent']) {
if (!$config['persistent'] || $config['connect'] === 'mysql_connect') {
$this->connection = mysql_connect($config['host'] . ':' . $config['port'], $config['login'], $config['password'], true);
} else {
$this->connection = $connect($config['host'], $config['login'], $config['password']);