Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
b1347806
Commit
b1347806
authored
Nov 11, 2010
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch by milokment to fix charset configuration and allow to change oci session mode.
parent
a3becb14
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
Driver.php
lib/Doctrine/DBAL/Driver/OCI8/Driver.php
+3
-5
OCI8Connection.php
lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php
+2
-2
No files found.
lib/Doctrine/DBAL/Driver/OCI8/Driver.php
View file @
b1347806
...
@@ -36,7 +36,9 @@ class Driver implements \Doctrine\DBAL\Driver
...
@@ -36,7 +36,9 @@ class Driver implements \Doctrine\DBAL\Driver
return
new
OCI8Connection
(
return
new
OCI8Connection
(
$username
,
$username
,
$password
,
$password
,
$this
->
_constructDsn
(
$params
)
$this
->
_constructDsn
(
$params
),
isset
(
$params
[
'charset'
])
?
$params
[
'charset'
]
:
null
,
isset
(
$params
[
'sessionMode'
])
?
$params
[
'sessionMode'
]
:
OCI_DEFAULT
);
);
}
}
...
@@ -67,10 +69,6 @@ class Driver implements \Doctrine\DBAL\Driver
...
@@ -67,10 +69,6 @@ class Driver implements \Doctrine\DBAL\Driver
$dsn
.=
$params
[
'dbname'
];
$dsn
.=
$params
[
'dbname'
];
}
}
if
(
isset
(
$params
[
'charset'
]))
{
$dsn
.=
';charset='
.
$params
[
'charset'
];
}
return
$dsn
;
return
$dsn
;
}
}
...
...
lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php
View file @
b1347806
...
@@ -37,13 +37,13 @@ class OCI8Connection implements \Doctrine\DBAL\Driver\Connection
...
@@ -37,13 +37,13 @@ class OCI8Connection implements \Doctrine\DBAL\Driver\Connection
* @param string $password
* @param string $password
* @param string $db
* @param string $db
*/
*/
public
function
__construct
(
$username
,
$password
,
$db
)
public
function
__construct
(
$username
,
$password
,
$db
,
$charset
=
null
,
$sessionMode
=
OCI_DEFAULT
)
{
{
if
(
!
defined
(
'OCI_NO_AUTO_COMMIT'
))
{
if
(
!
defined
(
'OCI_NO_AUTO_COMMIT'
))
{
define
(
'OCI_NO_AUTO_COMMIT'
,
0
);
define
(
'OCI_NO_AUTO_COMMIT'
,
0
);
}
}
$this
->
_dbh
=
@
oci_connect
(
$username
,
$password
,
$db
);
$this
->
_dbh
=
@
oci_connect
(
$username
,
$password
,
$db
,
$charset
,
$sessionMode
);
if
(
!
$this
->
_dbh
)
{
if
(
!
$this
->
_dbh
)
{
throw
OCI8Exception
::
fromErrorInfo
(
oci_error
());
throw
OCI8Exception
::
fromErrorInfo
(
oci_error
());
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment