# if(substr_count($s_linestr,",") !=2){
# return(sprintf(_("More than two ',' given in line : '%s'. Remember that parameters are seperated by '|'."),$i_linenum));
# }
- /* Multiple () are not supproted currently ... */
- if(substr_count($s_linestr,"(") >1 ){
- return(sprintf(_("More than one '(' is currently not supported. Line : '%s'."),$i_linenum));
- }
- if(substr_count($s_linestr,")") >1 ){
- return(sprintf(_("More than one ')' is currently not supported. Line : '%s'."),$i_linenum));
- }
+
+# /* Multiple () are not supproted currently ... */
+# if(substr_count($s_linestr,"(") >1 ){
+# return(sprintf(_("More than one '(' is currently not supported. Line : '%s'."),$i_linenum));
+# }
+# 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."'),";
}
}
}
}
-
- /* Macro content must be smaller than 100 lines */
- if(count(split("\n",$this->goFonMacroContent))>100){
- $message[] = _("Makro length must be lower than 100 lines");
- }
-
return $message;
}
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".@LDAP::prepare4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);