[icinga-checkins] icinga.org: icinga-web/master: * fixed icingaOracle regexp issue

git at icinga.org git at icinga.org
Thu Nov 10 16:13:15 CET 2011


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

Author: Jannis Moßhammer <jannis.mosshammer at netways.de>
Date:   Thu Nov 10 16:13:02 2011 +0100

* fixed icingaOracle regexp issue

---

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

diff --git a/lib/doctrine/lib/Doctrine/Adapter/Statement/IcingaOracle.php b/lib/doctrine/lib/Doctrine/Adapter/Statement/IcingaOracle.php
index a4c2e77..ec4b99b 100644
--- a/lib/doctrine/lib/Doctrine/Adapter/Statement/IcingaOracle.php
+++ b/lib/doctrine/lib/Doctrine/Adapter/Statement/IcingaOracle.php
@@ -153,14 +153,14 @@ class Doctrine_Adapter_Statement_IcingaOracle implements Doctrine_Adapter_Statem
     private function createAliasMap(&$query) {
         $ctr = 0; 
         $matches = array();
-        $reg = "/AS *(?<alias>\w+)/";
+        $reg = "/AS +(?<alias>\w+)/";
         $this->aliasMap = array();
        
         preg_match_all($reg,$query,$matches);
         foreach($matches["alias"] as $alias) {
             if(preg_match("/DOCTRINE.*?/i",$alias))
                 continue;
-            $query = preg_replace("/(AS *)".$alias."/","AS f_".$ctr,$query,1);
+            $query = preg_replace("/(AS +)".$alias."/","AS f_".$ctr,$query,1);
             $this->aliasMap[("f_".($ctr++))] = $alias;
         }
       





More information about the icinga-checkins mailing list