fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7055] added get of temp-directory from phpgw server-


From: Erik Holm-Larsen
Subject: [Fmsystem-commits] [7055] added get of temp-directory from phpgw server-settings
Date: Fri, 25 Feb 2011 06:36:50 +0000

Revision: 7055
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7055
Author:   erikhl
Date:     2011-02-25 06:36:46 +0000 (Fri, 25 Feb 2011)
Log Message:
-----------
added get of temp-directory from phpgw server-settings

Modified Paths:
--------------
    trunk/rental/inc/class.uimakepdf.inc.php

Modified: trunk/rental/inc/class.uimakepdf.inc.php
===================================================================
--- trunk/rental/inc/class.uimakepdf.inc.php    2011-02-24 15:13:18 UTC (rev 
7054)
+++ trunk/rental/inc/class.uimakepdf.inc.php    2011-02-25 06:36:46 UTC (rev 
7055)
@@ -417,7 +417,8 @@
                {       
                        $config = CreateObject('phpgwapi.config','rental');
                        $config->read();
-                       $myFile = 
"/tmp/temp_contract_".strtotime(date('Y-m-d')).".html";
+                       $tmp_dir = $GLOBALS['phpgw_info']['server']['temp_dir'];
+                       $myFile = $tmp_dir . 
"/temp_contract_".strtotime(date('Y-m-d')).".html";
                        $fh = fopen($myFile, 'w') or die("can't open file");
                        $stringData = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 
4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>';
                        fwrite($fh, $stringData);
@@ -431,7 +432,7 @@
                        //echo $_SESSION['contract_html'];
                        $_SESSION['contract_html'] = "";
                         
-                       $pdf_file_name = 
"/tmp/temp_contract_".strtotime(date('Y-m-d')).".pdf";
+                       $pdf_file_name = $tmp_dir . 
"/temp_contract_".strtotime(date('Y-m-d')).".pdf";
                        //var_dump($config->config_data['path_to_wkhtmltopdf']);
                        //var_dump($GLOBALS['phpgw_info']);
                        $wkhtmltopdf_executable = 
$config->config_data['path_to_wkhtmltopdf'];




reply via email to

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