Code

Phoneaccount - Only add uid related entry if uid is not numeric
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Jan 2007 04:06:11 +0000 (04:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Jan 2007 04:06:11 +0000 (04:06 +0000)
Macro - Corrected comment detection

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5576 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/macro/class_gofonMacro.inc
plugins/gofon/phoneaccount/class_phoneAccount.inc

index 2ce08a7fb6c7cd3948e74cde403253db36f77ed4..4c3c40a8f6589e0f75dea453c03b2dae89f95d7a 100755 (executable)
@@ -278,9 +278,10 @@ class macro extends plugin
        * Remove comments introduced by ;
        * Skip empty lines 
        */ 
-      $s_linestr = preg_replace ("/^.*=\> /","",$s_linestr);
-      $s_linestr = preg_replace("/;.*$/","",$s_linestr) ;
       $s_linestr = trim($s_linestr);
+      $s_linestr = preg_replace("/;.*$/","",$s_linestr) ;
+      $s_linestr = preg_replace ("/^.*=\> /","",$s_linestr);
+
       if(empty($s_linestr)){
         continue;
       }
index 46291a13cf8337d96c74f98b25dc3984ebe51396..ff643f9fcacc5e1ac2f23c3435c0298eabefcb43 100644 (file)
@@ -700,12 +700,14 @@ class phoneAccount extends plugin
      
       $i = 0; 
       $EXT = array();
-      $EXT[$i]['context'] = 'GOsa';
-      $EXT[$i]['exten']   = $this->uid;
-      $EXT[$i]['priority']= 1;
-      $EXT[$i]['app']     = "Goto";
-      $EXT[$i]['appdata'] = $newnums[$i_new_key]."|1";
-      $i ++;
+      if(!is_numeric($this->uid)){
+        $EXT[$i]['context'] = 'GOsa';
+        $EXT[$i]['exten']   = $this->uid;
+        $EXT[$i]['priority']= 1;
+        $EXT[$i]['app']     = "Goto";
+        $EXT[$i]['appdata'] = $newnums[$i_new_key]."|1";
+        $i ++;
+      }
 
       // Entension entries  Hint / Dial / Goto
       foreach($newnums as $s_telenums){