Skip to content
Permalink
Browse files

Fixing DboSybase::connect() to use port configuration value. Thanks '…

…tPl0ch' for the various attempts :) Fixes #90
  • Loading branch information...
markstory committed Sep 30, 2009
1 parent 508d737 commit dc220bbb2147139ee44e45af016315be220086fd
Showing with 8 additions and 8 deletions.
  1. +8 −8 cake/libs/model/datasources/dbo/dbo_sybase.php
@@ -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;
}
/**

0 comments on commit dc220bb

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.