noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 02/08: Ajout traduction + header


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 02/08: Ajout traduction + header
Date: Wed, 05 Nov 2014 20:05:15 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit 320593d5274370dcb02d59cfcedad28df0e0ea21
Author: Dany De Bontridder <address@hidden>
Date:   Mon Nov 3 21:02:03 2014 +0100

    Ajout traduction + header
---
 include/class_acc_bilan.php |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/include/class_acc_bilan.php b/include/class_acc_bilan.php
index cbdab05..4fb8169 100644
--- a/include/class_acc_bilan.php
+++ b/include/class_acc_bilan.php
@@ -246,7 +246,7 @@ class Acc_Bilan
         try
         {
             if ( $this->b_id=="")
-                throw new Exception("le formulaire id n'est pas donnee");
+                throw new Exception(_("le formulaire id n'est pas donnee"));
 
             $sql="select b_name,b_file_template,b_file_form,lower(b_type) as 
b_type from bilan where".
                  " b_id = ".$this->b_id;
@@ -603,16 +603,21 @@ class Acc_Bilan
             break;
         case 'odt':
         case 'ods':
-            /*   header("Pragma: public");
+            header("Pragma: public");
             header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
             header("Cache-Control: must-revalidate");
             if ( $this->b_type == 'odt' )
-            header('Content-type: application/vnd.oasis.opendocument.text');
+            {
+                header('Content-type: 
application/vnd.oasis.opendocument.text');
+                header('Content-Disposition: 
attachment;filename="'.$this->b_name.'.odt"',FALSE);
+            }
             if ( $this->b_type == 'ods' )
-            header('Content-type: 
application/vnd.oasis.opendocument.spreadsheet');
-            header('Content-Disposition: 
attachment;filename="'.$this->b_name.'.odt"',FALSE);
+            {
+                header('Content-type: 
application/vnd.oasis.opendocument.spreadsheet');
+                header('Content-Disposition: 
attachment;filename="'.$this->b_name.'.ods"',FALSE);
+            }
+            
             header("Accept-Ranges: bytes");
-            */
             ob_start();
             // save the file in a temp folder
             // create a temp directory in /tmp to unpack file and to parse it
@@ -627,7 +632,7 @@ class Acc_Bilan
             $work_file=basename($file_base);
             if ( copy ($file_base,$work_file) == false )
             {
-                echo "Je ne peux pas ouvrir ce fichier ";
+                echo _("Ouverture fichier impossible");
                 exit();
             }
            /*



reply via email to

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