[20908] Feature tweak : better csv export

Pascal Vilarem <[email protected]>
Newsgroups gmane.comp.web.phpgroupware.cvs
Message-ID <[email protected]>
Revision: 20908
          http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=20908
Author:   maat
Date:     2010-01-05 17:17:18 +0000 (Tue, 05 Jan 2010)
Log Message:
-----------
Feature tweak : better csv export

Modified Paths:
--------------
    modules/ged/trunk/inc/class.ged_ui.inc.php

Modified: modules/ged/trunk/inc/class.ged_ui.inc.php
===================================================================
--- modules/ged/trunk/inc/class.ged_ui.inc.php	2010-01-05 16:47:03 UTC (rev 20907)
+++ modules/ged/trunk/inc/class.ged_ui.inc.php	2010-01-05 17:17:18 UTC (rev 20908)
@@ -2458,7 +2458,8 @@
 				//readfile($version['file_full_path']);
 				
 				$fp = fopen('php://output', 'w');
-				
+				$libel = array("reference","name","version_label","author","status","date","url");
+				fputcsv($fp, $libel, ";", "\"");
 				foreach ($chronos as $chrono_type)
 				{
 					foreach($chrono_type as $chrono)
@@ -2499,7 +2500,8 @@
 				//readfile($version['file_full_path']);
 				
 				$fp = fopen('php://output', 'w');
-				
+				$libel = array("reference","name","version_label","author","status","date","url");
+				fputcsv($fp, $libel, ";", "\"");
 				foreach ($chronos as $chrono_type)
 				{
 					foreach($chrono_type as $chrono)
@@ -2610,7 +2612,8 @@
 				header('Content-Disposition: attachment; filename="dico.csv"', false);
 
 				$fp = fopen('php://output', 'w');
-				
+				$libel = array("reference","name","version_label","author","status","date","url");
+				fputcsv($fp, $libel, ";", "\"");
 				foreach ($all_versions as $version_type)
 				{
 					foreach($version_type as $version)
@@ -2649,7 +2652,8 @@
 				header('Content-Disposition: attachment; filename="dico.csv"', false);
 
 				$fp = fopen('php://output', 'w');
-				
+				$libel = array("reference","name","version_label","author","status","date","url");
+				fputcsv($fp, $libel, ";", "\"");
 				foreach ($all_versions as $version_type)
 				{
 					foreach($version_type as $version)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.