[icinga-checkins] icinga.org: icinga-web/r1.6: * Oracle Where/Alias field fix

git at icinga.org git at icinga.org
Wed Feb 29 16:40:55 CET 2012


Module: icinga-web
Branch: r1.6
Commit: 2addd9fdcb09f47f504e641ac00877518f93236e
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=2addd9fdcb09f47f504e641ac00877518f93236e

Author: Marius Hein <marius.hein at netways.de>
Date:   Tue Feb 28 11:56:47 2012 +0100

* Oracle Where/Alias field fix

---

 .../Doctrine/Adapter/Statement/IcingaOracle.php    |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/doctrine/lib/Doctrine/Adapter/Statement/IcingaOracle.php b/lib/doctrine/lib/Doctrine/Adapter/Statement/IcingaOracle.php
index 4e7b6c4..31571b0 100644
--- a/lib/doctrine/lib/Doctrine/Adapter/Statement/IcingaOracle.php
+++ b/lib/doctrine/lib/Doctrine/Adapter/Statement/IcingaOracle.php
@@ -251,7 +251,7 @@ class Doctrine_Adapter_Statement_IcingaOracle implements Doctrine_Adapter_Statem
     private function createAliasMap(&$query) {
         $ctr = 0; 
         $matches = array();
-        $reg = "/AS +(?<alias>\w+)/";
+        $reg = "/\s+AS\s+(?<alias>\w+)(\s+|,)/";
         $this->aliasMap = array();
        
         preg_match_all($reg,$query,$matches);
@@ -261,6 +261,8 @@ class Doctrine_Adapter_Statement_IcingaOracle implements Doctrine_Adapter_Statem
             $query = preg_replace("/(AS +)".$alias."/","AS f_".$ctr,$query,1);
             $this->aliasMap[("f_".($ctr++))] = $alias;
         }
+        
+        // AgaviContext::getInstance()->getLoggerManager()->log($query, AgaviLogger::DEBUG);
       
     }  
     /**





More information about the icinga-checkins mailing list