aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2007-05-23 23:47:59 +0000
committerDavid M <davidmj@users.sourceforge.net>2007-05-23 23:47:59 +0000
commit49d351be1d3ac82b352767e966400fc23a5cfb4b (patch)
tree2d3e951ce14be9a846584ab7e9003394bf10704c /phpBB/includes
parentbc90e825eef87b2572903d70d24a94df7d365ff2 (diff)
downloadforums-49d351be1d3ac82b352767e966400fc23a5cfb4b.tar
forums-49d351be1d3ac82b352767e966400fc23a5cfb4b.tar.gz
forums-49d351be1d3ac82b352767e966400fc23a5cfb4b.tar.bz2
forums-49d351be1d3ac82b352767e966400fc23a5cfb4b.tar.xz
forums-49d351be1d3ac82b352767e966400fc23a5cfb4b.zip
- added support for Oracle's easy connect naming
git-svn-id: file:///svn/phpbb/trunk@7671 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/db/oracle.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php
index 1d2a097e04..f6456a17ad 100644
--- a/phpBB/includes/db/oracle.php
+++ b/phpBB/includes/db/oracle.php
@@ -35,8 +35,21 @@ class dbal_oracle extends dbal
$this->user = $sqluser;
$this->server = $sqlserver . (($port) ? ':' . $port : '');
$this->dbname = $database;
-
- $this->db_connect_id = ($new_link) ? @ocinlogon($this->user, $sqlpassword, $this->dbname, 'UTF8') : (($this->persistency) ? @ociplogon($this->user, $sqlpassword, $this->dbname, 'UTF8') : @ocinlogon($this->user, $sqlpassword, $this->dbname, 'UTF8'));
+
+ $connect = $database;
+
+ // support for "easy connect naming"
+ if ($sqlserver !== '' && $sqlserver !== '/')
+ {
+ if (substr($sqlserver, -1, 1) == '/')
+ {
+ $sqlserver == substr($sqlserver, 0, -1);
+ }
+ $connect = $sqlserver . (($port) ? ':' . $port : '') . '/' . $dbname;
+ $this->dbname = $connect;
+ }
+
+ $this->db_connect_id = ($new_link) ? @ocinlogon($this->user, $sqlpassword, $connect, 'UTF8') : (($this->persistency) ? @ociplogon($this->user, $sqlpassword, $connect, 'UTF8') : @ocinlogon($this->user, $sqlpassword, $connect, 'UTF8'));
return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
}