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

git at icinga.org git at icinga.org
Tue Feb 28 12:07:20 CET 2012


Module: icinga-web
Branch: r1.5
Commit: 518eff38d4943e42e438357fe12924bdd5f64a09
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=518eff38d4943e42e438357fe12924bdd5f64a09

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

* Oracle Where/Alias field fix

Conflicts:

	lib/doctrine/lib/Doctrine/Adapter/Statement/IcingaOracle.php

---

 .../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 afc97d0..9957ac9 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