From aa005b60cec44ce91f7ef830448d604bfbaaf301 Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 29 Sep 2008 10:14:38 +0000 Subject: [PATCH] Simplified regular expression git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12554 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc index 3037efa09..aad01898b 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc @@ -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."'),"; } -- 2.30.2