From: Andreas Gohr Date: Wed, 1 Feb 2006 14:40:56 +0000 (+0100) Subject: fixed handling of mail and tag arrays with gaps X-Git-Tag: 0.7.1~91 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0e8c6d9d5ff96f1f5b3ea0b68b412cac871bce40;p=contagged fixed handling of mail and tag arrays with gaps darcs-hash:20060201144056-6e07b-58710d5aa39020094e3ae45712932c7c7e32c6b5.gz --- diff --git a/entry.php b/entry.php index a1db323..00fa82c 100644 --- a/entry.php +++ b/entry.php @@ -20,11 +20,19 @@ //save data if asked for if($_SESSION[ldapab][username] && $_REQUEST[save]){ // prepare special data - $_REQUEST[entry][jpegPhoto][]=_getUploadData(); - $_REQUEST[entry][marker] = explode(',',$_REQUEST[entry][markers]); - $_REQUEST[entry][marker] = array_map('trim',$_REQUEST[entry][marker]); - $_REQUEST[entry][marker] = array_unique($_REQUEST[entry][marker]); - unset($_REQUEST[entry][markers]); + $_REQUEST['entry']['jpegPhoto'][]=_getUploadData(); + $_REQUEST['entry']['marker'] = explode(',',$_REQUEST['entry']['markers']); + $_REQUEST['entry']['marker'] = array_map('trim',$_REQUEST['entry']['marker']); + $_REQUEST['entry']['marker'] = array_unique($_REQUEST['entry']['marker']); + $_REQUEST['entry']['marker'] = array_filter($_REQUEST['entry']['marker']); + sort($_REQUEST['entry']['marker']); + unset($_REQUEST['entry']['markers']); + + $_REQUEST['entry']['mail'] = array_map('trim',$_REQUEST['entry']['mail']); + $_REQUEST['entry']['mail'] = array_unique($_REQUEST['entry']['mail']); + $_REQUEST['entry']['mail'] = array_filter($_REQUEST['entry']['mail']); + sort($_REQUEST['entry']['mail']); + $dn = _saveData(); }