$template='entry_edit.tpl';
}elseif($_REQUEST['mode']=='vcf'){
$template='entry_vcf.tpl';
+}elseif($_REQUEST['mode']=='map'){
+ $template='entry_map.tpl';
}else{
$template='entry_show.tpl';
}
if($_SESSION['ldapab']['username'] && !empty($_REQUEST['save']) && $_REQUEST['save']){
// prepare special data
$_REQUEST['entry']['photo'] = _getUploadData();
- $_REQUEST['entry']['marker'] = explode(',',$_REQUEST['entry']['markers']);
+ if($_REQUEST['entry']['markers'])
+ $_REQUEST['entry']['marker'] = explode(',',$_REQUEST['entry']['markers']);
unset($_REQUEST['entry']['markers']);
foreach(array_keys($_REQUEST['entry']) as $field){
tpl_ldaperror("mod $key");
}
}
+
+ // special tag handling for Thunderbird
+ if($conf['tbtaghack'] && in_array('contactPerson',$OCLASSES)){
+ for($i=1;$i<5;$i++){
+ if(empty($entry["custom$i"])){
+ // deletion
+ unset($del);
+ $del["custom$i"]=array();
+ $r = @ldap_mod_replace($LDAP_CON,$dn,$del);
+ tpl_ldaperror("del custom$i");
+ }else{
+ // modification
+ unset($add);
+ $add["custom$i"]=$entry["custom$i"];
+ $r = @ldap_mod_replace($LDAP_CON,$dn,$add);
+ tpl_ldaperror("mod custom$i");
+ }
+ }
+ }
+
+
return $dn;
}
}