mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 18:03:39 +01:00
"fixed again which row to use, if we have to autodetect the fields:
we start now from the beginning searching for the first row of type array (previously we tried the first and last row)"
This commit is contained in:
parent
5dbc859f71
commit
b2436d312b
@ -1010,8 +1010,12 @@ class nextmatch_widget
|
||||
//echo "<p>start=$value[start], num_rows=$value[num_rows]: total=$total, count(\$rows)=".count($rows)."</p>\n";
|
||||
if (!$value['start']) // send the neccessary headers
|
||||
{
|
||||
// use last row for header detection, as first row(s) might be empty to skip header row(s) of template
|
||||
$fp = self::csv_open($rows[count($rows)-1],$value['csv_fields'],$app,$charset_out,$charset,$separator);
|
||||
// skip empty data row(s) used to adjust to number of header-lines
|
||||
foreach($rows as $row0)
|
||||
{
|
||||
if (is_array($row0) && count($row0) > 1) break;
|
||||
}
|
||||
$fp = self::csv_open($row0,$value['csv_fields'],$app,$charset_out,$charset,$separator);
|
||||
}
|
||||
foreach($rows as $key => $row)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user