mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
removed conect config parameter in favor of auto-persistant connection
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6446 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
3e36695b1f
commit
cd8da1bd18
1 changed files with 21 additions and 1 deletions
|
@ -130,6 +130,21 @@ class DboOracle extends DboSource {
|
|||
* @access protected
|
||||
*/
|
||||
var $_results;
|
||||
|
||||
/**
|
||||
* Base configuration settings for MySQL driver
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
var $_baseConfig = array(
|
||||
'persistent' => true,
|
||||
'host' => 'localhost',
|
||||
'login' => 'system',
|
||||
'password' => '',
|
||||
'database' => 'cake',
|
||||
'nls_sort' => '',
|
||||
'nls_sort' => ''
|
||||
);
|
||||
/**
|
||||
* Connects to the database using options in the given configuration array.
|
||||
*
|
||||
|
@ -138,9 +153,14 @@ class DboOracle extends DboSource {
|
|||
*/
|
||||
function connect() {
|
||||
$config = $this->config;
|
||||
$connect = $config['connect'];
|
||||
$this->connected = false;
|
||||
$config['charset'] = !empty($config['charset']) ? $config['charset'] : null;
|
||||
|
||||
if ($this->config['persistent']) {
|
||||
$connect = 'ociplogon';
|
||||
} else {
|
||||
$connect = 'ocilogon';
|
||||
}
|
||||
$this->connection = $connect($config['login'], $config['password'], $config['database'], $config['charset']);
|
||||
|
||||
if ($this->connection) {
|
||||
|
|
Loading…
Reference in a new issue