"fixed wrong order of private column in csv import"

This commit is contained in:
Ralf Becker 2009-06-04 13:58:29 +00:00
parent 16e9cc7e37
commit 8cbd43d9be

View File

@ -273,6 +273,10 @@ switch($_POST['action'])
$log = '<table border="1" style="border: 1px dotted black; border-collapse: collapse;">'."\n\t<tr><td>#</td>\n";
if (!in_array('private',$addr_fields)) // autocreate public access if not set by user
{
$log .= "\t\t<td><b>private</b></td>\n";
}
foreach($addr_fields as $csv_idx => $addr)
{ // convert $_POST['trans'][$csv_idx] into array of pattern => value
// if (!$_POST['debug']) echo "<p>$csv_idx: ".$csv_fields[$csv_idx].": $addr".($_POST['trans'][$csv_idx] ? ': '.$_POST['trans'][$csv_idx] : '')."</p>";
@ -298,10 +302,6 @@ switch($_POST['action'])
}
$log .= "\t\t<td><b>$addr</b></td>\n";
}
if (!in_array('private',$addr_fields)) // autocreate public access if not set by user
{
$log .= "\t\t<td><b>private</b></td>\n";
}
$start = $_POST['start'] < 1 ? 1 : $_POST['start'];
// ignore empty lines, is_null($fields[0]) is returned on empty lines !!!