Permalink
Browse files

Applying patch from 'tPl0ch', connect key is set to 'mysql_connect' w…

…hen not using persistent connections. Fixes #132
  • Loading branch information...
markstory committed Dec 22, 2009
1 parent 6356c6e commit 425dcf2df5ae50af96063ab0634e317edc574745
Showing with 2 additions and 2 deletions.
  1. +2 −2 cake/libs/model/datasources/dbo/dbo_mysql.php
@@ -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)) {

0 comments on commit 425dcf2

Please sign in to comment.