summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-09-16 12:16:44 -0700
committerBart Visscher <bartv@thisnet.nl>2013-09-16 12:16:44 -0700
commit9d18e16c77e8c2690dd23dd19ca1f8e1968161c8 (patch)
tree5a37568bf37a7a29494c11cb091202a407abe770 /lib
parent5cf12888ad79d12eb128069a3b14f1987a0708fe (diff)
parent294f3632e0506cf49ca65dff1ae05cb5324a8839 (diff)
downloadnextcloud-server-9d18e16c77e8c2690dd23dd19ca1f8e1968161c8.tar.gz
nextcloud-server-9d18e16c77e8c2690dd23dd19ca1f8e1968161c8.zip
Merge pull request #4825 from owncloud/fix-sharing-expiration-oracle
Fix Sharing "Expiration Date" on Oracle
Diffstat (limited to 'lib')
-rw-r--r--lib/db.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/db.php b/lib/db.php
index f090f474243..b9505b88d82 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -75,6 +75,7 @@ class OC_DB {
// do nothing if the connection already has been established
if (!self::$connection) {
$config = new \Doctrine\DBAL\Configuration();
+ $eventManager = new \Doctrine\Common\EventManager();
switch($type) {
case 'sqlite':
case 'sqlite3':
@@ -123,6 +124,7 @@ class OC_DB {
$connectionParams['port'] = $port;
}
$connectionParams['adapter'] = '\OC\DB\AdapterOCI8';
+ $eventManager->addEventSubscriber(new \Doctrine\DBAL\Event\Listeners\OracleSessionInit);
break;
case 'mssql':
$connectionParams = array(
@@ -142,7 +144,7 @@ class OC_DB {
$connectionParams['wrapperClass'] = 'OC\DB\Connection';
$connectionParams['tablePrefix'] = OC_Config::getValue('dbtableprefix', 'oc_' );
try {
- self::$connection = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config);
+ self::$connection = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config, $eventManager);
if ($type === 'sqlite' || $type === 'sqlite3') {
// Sqlite doesn't handle query caching and schema changes
// TODO: find a better way to handle this