noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 11/14: Bug : in export card, the textarea was


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 11/14: Bug : in export card, the textarea was not exported in CSV properly
Date: Wed, 28 Oct 2015 09:56:59 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit 6e57f3bad03cc94964793c8dfb1c78254a90f5ae
Author: Dany De Bontridder <address@hidden>
Date:   Wed Oct 28 09:01:03 2015 +0100

    Bug : in export card, the textarea was not exported in CSV properly
---
 include/export/export_fiche_csv.php |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/export/export_fiche_csv.php 
b/include/export/export_fiche_csv.php
index ee957bd..72cc7d3 100644
--- a/include/export/export_fiche_csv.php
+++ b/include/export/export_fiche_csv.php
@@ -24,8 +24,8 @@ if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas 
permis');
 header('Pragma: public');
 header('Content-type: application/csv');
 header('Content-Disposition: attachment;filename="fiche.csv"',FALSE);
-include_once ("lib/ac_common.php");
-include_once('class/class_fiche.php');
+include_once NOALYSS_INCLUDE."/lib/ac_common.php";
+include_once NOALYSS_INCLUDE.'/class/class_fiche.php';
 require_once NOALYSS_INCLUDE.'/lib/class_database.php';
 require_once NOALYSS_INCLUDE.'/class/class_dossier.php';
 $gDossier=dossier::id();
@@ -68,14 +68,16 @@ if  ( isset ($_GET['fd_id']))
 
         foreach ( $detail->attribut as $dattribut )
         {
+            $export=str_replace("\n"," ", $dattribut->av_text);
+            $export=str_replace("\r"," ", $export);
             if ( $o == 0 )
             {
-                printf("%s",$dattribut->av_text);
+                printf("\"%s\"",$export);
                 $o=1;
             }
             else
             {
-                printf (";%s",$dattribut->av_text);
+                printf (";\"%s\"",$export);
 
             }
         }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]