Code

Simplified regular expression
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 29 Sep 2008 10:14:38 +0000 (10:14 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 29 Sep 2008 10:14:38 +0000 (10:14 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12554 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc

index 3037efa09cb7901aedc0d037c3cafddcb822fa99..aad01898bd83ace935a05b7a8cbc9fdcad1e10b0 100644 (file)
@@ -318,8 +318,7 @@ class macro extends plugin
       $exten  = addslashes($tmp[0]);
       $prio   = addslashes($tmp[1]);
       $app    = addslashes(preg_replace("/\(.*\).*$/","",$tmp[2]));
-      $para   = addslashes(preg_replace("/^.*\(/","",$tmp[2]));
-      $para   = preg_replace("/\).*$/","",$para);
+      $para   = addslashes(preg_replace("/^[^(]*\((.*)\)[^)]*$/", "$1", $tmp[2]));
       $sql.= " ('".$context."','".$exten."','".$prio."','".$app."','".$para."'),";
     }