Use new code style

This commit is contained in:
David Stone
2025-02-07 19:02:33 -07:00
parent 0181024ae1
commit 8433379d90
672 changed files with 37107 additions and 45249 deletions

View File

@ -21,7 +21,6 @@ function wu_generate_csv($file_name, $data = array()) {
$fp = fopen('php://output', 'w');
if ($fp && $data) {
header('Content-Type: text/csv; charset=utf-8');
header('Content-Disposition: attachment; filename="' . $file_name . '.csv"');
@ -31,19 +30,11 @@ function wu_generate_csv($file_name, $data = array()) {
header('Expires: 0');
foreach ($data as $data_line) {
if (is_array($data_line)) {
fputcsv($fp, array_values($data_line));
} elseif (is_object($data_line)) {
fputcsv($fp, array_values(get_object_vars($data_line)));
} // end if;
} // end foreach;
} // end if;
} // end wu_generate_csv;
}
}
}
}