JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
metaform: fix csv download header row
[wfpl.git] / metaform / template.php
index 0f3acf8..e233f36 100644 (file)
@@ -149,7 +149,7 @@ function ~file_name~_main_delete($id) {
 function ~file_name~_csv_download() {
        require_once('code/wfpl/csv.php');
        $rows = db_get_rows('~table_name~', 'id,'.~file_name upper~_DB_FIELDS, 'order by id');
-       array_unshift($rows, explode(',',~file_name upper~_DB_FIELDS));
+       array_unshift($rows, explode(',', 'id,'.~file_name upper~_DB_FIELDS));
        array2d_to_csv_download($rows, '~file_name~.csv');
 }