]> git.sur5r.net Git - contagged/commitdiff
fixed handling of mail and tag arrays with gaps
authorAndreas Gohr <gohr@cosmocode.de>
Wed, 1 Feb 2006 14:40:56 +0000 (15:40 +0100)
committerAndreas Gohr <gohr@cosmocode.de>
Wed, 1 Feb 2006 14:40:56 +0000 (15:40 +0100)
darcs-hash:20060201144056-6e07b-58710d5aa39020094e3ae45712932c7c7e32c6b5.gz

entry.php

index a1db3238d1fc7cd75aea1cb08ea03ba0586bb50b..00fa82c616bae39f442986118aceb28b19d695ed 100644 (file)
--- a/entry.php
+++ b/entry.php
   //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();
   }