noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 01/02: PRINTBILAN : correct the path for file


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 01/02: PRINTBILAN : correct the path for files , otherwise it bugs with php-fcgi
Date: Sat, 15 Apr 2017 07:24:43 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 0efee87c71a64c5734aa74c348a01658c9a6ec56
Author: Dany De Bontridder <address@hidden>
Date:   Sat Apr 15 12:41:46 2017 +0200

    PRINTBILAN : correct the path for files , otherwise it bugs with php-fcgi
---
 include/class/class_acc_bilan.php | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/include/class/class_acc_bilan.php 
b/include/class/class_acc_bilan.php
index f663cd6..bd8c0b3 100644
--- a/include/class/class_acc_bilan.php
+++ b/include/class/class_acc_bilan.php
@@ -360,8 +360,9 @@ class Acc_Bilan
         unlink($dirname);
         mkdir ($dirname);
         chdir($dirname);
-
-        
$file_base=dirname($_SERVER['SCRIPT_FILENAME']).DIRECTORY_SEPARATOR.$this->b_file_template;
+            
+        // Les documents sont dans noalyss/html/document/...
+        $file_base=NOALYSS_HOME.DIRECTORY_SEPARATOR.$this->b_file_template;
         $work_file=basename($file_base);
         if ( copy ($file_base,$work_file) == false )
         {
@@ -640,14 +641,14 @@ class Acc_Bilan
             ob_start();
             // save the file in a temp folder
             // create a temp directory in /tmp to unpack file and to parse it
-            
$dirname=tempnam($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'tmp','bilan_');
+            $dirname=tempnam($_ENV['TMP'].DIRECTORY_SEPARATOR.'tmp','bilan_');
 
 
             unlink($dirname);
             mkdir ($dirname);
             chdir($dirname);
             // create a temp directory in /tmp to unpack file and to parse it
-            
$file_base=dirname($_SERVER['SCRIPT_FILENAME']).DIRECTORY_SEPARATOR.$this->b_file_template;
+            $file_base=NOALYSS_HOME.DIRECTORY_SEPARATOR.$this->b_file_template;
             $work_file=basename($file_base);
             if ( copy ($file_base,$work_file) == false )
             {



reply via email to

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