[thirdparty-commits] russell: mantis/trunk r134 - /mantis/trunk/core/license_api.php
SVN commits to the Digium third-party software repository
thirdparty-commits at lists.digium.com
Fri Oct 2 16:43:59 CDT 2009
Author: russell
Date: Fri Oct 2 16:43:56 2009
New Revision: 134
URL: http://svnview.digium.com/svn/thirdparty?view=rev&rev=134
Log:
Fix up CSV output
Modified:
mantis/trunk/core/license_api.php
Modified: mantis/trunk/core/license_api.php
URL: http://svnview.digium.com/svn/thirdparty/mantis/trunk/core/license_api.php?view=diff&rev=134&r1=133&r2=134
==============================================================================
--- mantis/trunk/core/license_api.php (original)
+++ mantis/trunk/core/license_api.php Fri Oct 2 16:43:56 2009
@@ -222,6 +222,10 @@
return array("id", "user_id", "name", "dob", "company", "job_title", "address_city", "address_country", "nationality_country", "email", "date_signed", "license_ver");
}
+ function get_license_csv_columns() {
+ # this has to be hard coded because db_fetch_array is returning both the associative and numeric array together
+ return array("id", "user_id", "name", "dob", "company", "job_title", "address_city", "address_country", "nationality_country", "date_signed", "license_ver");
+ }
function get_rejected_license_columns() {
# this has to be hard coded because db_fetch_array is returning both the associative and numeric array together
@@ -234,7 +238,8 @@
function get_all_licenses() {
$results = array();
- $sql = "SELECT * from mantis_license_table";
+ $sql = "SELECT id,user_id,name,dob,company,job_title,address_city,address_country,nationality_country,date_signed,license_ver FROM mantis_license_table";
+ #$sql = "SELECT * FROM mantis_license_table";
$result = db_query($sql);
while($res = db_fetch_array($result))
@@ -258,9 +263,9 @@
header( 'Content-Disposition: attachment; filename="' . urlencode( $t_filename ) . '"' );
$t_all = get_all_licenses();
- $t_loops = count( get_license_columns() ) - 1;
-
- echo join($t_sep, get_license_columns() );
+ $t_loops = count( get_license_csv_columns() ) - 1;
+
+ echo join($t_sep, get_license_csv_columns() );
echo $t_nl;
foreach($t_all as $t_row) {
More information about the thirdparty-commits
mailing list