From: Jason Woofenden Date: Tue, 28 Aug 2012 13:56:26 +0000 (-0400) Subject: metaform: fix csv download header row X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;h=a180ab5face98dd3ad4f90ccc4c96906f00d64f0;p=wfpl.git metaform: fix csv download header row --- diff --git a/metaform/main.html b/metaform/main.html index 781dea1..c0057c2 100644 --- a/metaform/main.html +++ b/metaform/main.html @@ -3,6 +3,7 @@ Meta Form + diff --git a/metaform/template.php b/metaform/template.php index 0f3acf8..e233f36 100644 --- a/metaform/template.php +++ b/metaform/template.php @@ -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'); }