Skip to content

Commit

Permalink
Fixing DboSybase::connect() to use port configuration value. Thanks '…
Browse files Browse the repository at this point in the history
…tPl0ch' for the various attempts :) Fixes #90
  • Loading branch information
markstory committed Sep 30, 2009
1 parent 508d737 commit dc220bb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cake/libs/model/datasources/dbo/dbo_sybase.php
Expand Up @@ -89,17 +89,17 @@ class DboSybase extends DboSource {
*/
function connect() {
$config = $this->config;
$this->connected = false;

if (!$config['persistent']) {
$this->connection = sybase_connect($config['host'], $config['login'], $config['password'], true);
} else {
$this->connection = sybase_pconnect($config['host'], $config['login'], $config['password']);
$port = '';
if ($config['port'] !== null) {
$port = ':' . $config['port'];
}

if (sybase_select_db($config['database'], $this->connection)) {
$this->connected = true;
if ($config['persistent']) {
$this->connection = sybase_connect($config['host'] . $port, $config['login'], $config['password'], true);
} else {
$this->connection = sybase_pconnect($config['host'] . $port, $config['login'], $config['password']);
}
$this->connected = sybase_select_db($config['database'], $this->connection);
return $this->connected;
}
/**
Expand Down

0 comments on commit dc220bb

Please sign in to comment.