[icinga-checkins] icinga.org: icinga-web/master: * Lazy timeformat set fix

git at icinga.org git at icinga.org
Tue Apr 24 15:01:15 CEST 2012


Module: icinga-web
Branch: master
Commit: b62f911f2a30df2af061db249197d7a97586e72d
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=b62f911f2a30df2af061db249197d7a97586e72d

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Fri Mar 30 12:24:44 2012 +0200

* Lazy timeformat set fix

---

 .../lib/Doctrine/Connection/IcingaOracle.php       |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/doctrine/lib/Doctrine/Connection/IcingaOracle.php b/lib/doctrine/lib/Doctrine/Connection/IcingaOracle.php
index a47e261..670169e 100644
--- a/lib/doctrine/lib/Doctrine/Connection/IcingaOracle.php
+++ b/lib/doctrine/lib/Doctrine/Connection/IcingaOracle.php
@@ -30,7 +30,7 @@
  * @version     $Revision: 7664 $
  * @author      Konsta Vesterinen <kvesteri at cc.hut.fi>
  */
-class Doctrine_Connection_IcingaOracle extends Doctrine_Connection_Common
+class Doctrine_Connection_IcingaOracle extends Doctrine_Connection_Oracle
 {
     /**
      * @var string $driverName                  the name of this connection driver
@@ -83,8 +83,12 @@ class Doctrine_Connection_IcingaOracle extends Doctrine_Connection_Common
     }
 
     public function connect() {
-        parent::connect();
-        parent::setDateFormat($this->dateFormat);
+        if(!$this->isConnected()) {
+            parent::connect();
+            $this->exec('ALTER SESSION SET NLS_DATE_FORMAT = "' . $this->dateFormat . '"');
+            $this->exec('ALTER SESSION SET NLS_TIMESTAMP_FORMAT = "' . $this->dateFormat . '"');
+    
+        }
     }
 
     /**





More information about the icinga-checkins mailing list