Fixed bug #11076: DBAL: Cannot connect to non-local Oracle database with SID (thanks...
authorSteffen Kamper <info@sk-typo3.de>
Sun, 14 Jun 2009 20:23:19 +0000 (20:23 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Sun, 14 Jun 2009 20:23:19 +0000 (20:23 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5589 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/dbal/class.ux_t3lib_db.php

index 3c19a07..50a40eb 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2009-06-14  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #11076: DBAL: Cannot connect to non-local Oracle database with SID (thanks to Xavier Perseguers)
        * Fixed bug #11327: Change 2 forgotten icons in t3skin (edit_fe and edit_file)
 
 2009-06-13  Steffen Kamper  <info@sk-typo3.de>
index fcebe5e..cecc381 100644 (file)
@@ -2126,6 +2126,19 @@ class ux_t3lib_DB extends t3lib_DB {
                                        $GLOBALS['ADODB_FETCH_MODE'] = ADODB_FETCH_BOTH;
 
                                        $this->handlerInstance[$handlerKey] = &ADONewConnection($cfgArray['config']['driver']);
+
+                                               // Set driver-specific options
+                                       if (isset($cfgArray['config']['driverOptions'])) {
+                                               foreach ($cfgArray['config']['driverOptions'] as $optionName => $optionValue) {
+                                                       $optionSetterName = 'set' . ucfirst($optionName);
+                                                       if (method_exists($this->handlerInstance[$handlerKey], $optionSetterName)) {
+                                                               $this->handlerInstance[$handlerKey]->$optionSetterName($optionValue);
+                                                       } else {
+                                                               $this->handlerInstance[$handlerKey]->$optionName = $optionValue;
+                                                       }
+                                               }
+                                       }
+
                                        if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['no_pconnect'])  {
                                                $this->handlerInstance[$handlerKey]->Connect($cfgArray['config']['host'].(isset($cfgArray['config']['port']) ? ':'.$cfgArray['config']['port'] : ''),$cfgArray['config']['username'],$cfgArray['config']['password'],$cfgArray['config']['database']);
                                        } else {