summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 55c787f)
raw | patch | inline | side by side (parent: 55c787f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 24 Oct 2008 14:47:25 +0000 (14:47 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 24 Oct 2008 14:47:25 +0000 (14:47 +0000) |
-Allow multiple brackets in macro apps.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@12773 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@12773 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/gofon/macro/class_gofonMacro.inc | patch | blob | history |
index 9ea248a00b97805f640b5bb1abea0306d10d0be5..6c273b53e0f56b27702f574677c446609c6ca235 100644 (file)
if(substr_count($s_linestr,")") >1 ){
return(sprintf(_("More than one ')' is currently not supported. Line : '%s'."),$i_linenum));
}
- /* Check if there is an application given */
- if(empty($tmp[1])){
- return(sprintf(_("There is no application given in line : '%s'."),$i_linenum));
- }
- /* Check if there is an extension given */
- if(empty($tmp[0])){
- return(sprintf(_("There is no extension type given in line : '%s'."),$i_linenum));
- }
/* Create extension entry for current line
* and add this line to an array that will be inserted
$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."'),";
}