[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/107: replace tempname with sys_get_temp_di
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/107: replace tempname with sys_get_temp_dir |
Date: |
Mon, 26 Aug 2019 10:31:45 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit d85d6f8c77083fb997441a672d222bb10836af3e
Author: Dany De Bontridder <address@hidden>
Date: Sat Dec 1 17:57:15 2018 +0100
replace tempname with sys_get_temp_dir
---
include/class/document_export.class.php | 9 +++++----
include/constant.php | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/include/class/document_export.class.php
b/include/class/document_export.class.php
index fea8edc..f491ab1 100644
--- a/include/class/document_export.class.php
+++ b/include/class/document_export.class.php
@@ -38,13 +38,13 @@ class Document_Export
// Create 2 temporary folders 1. convert to PDF + stamp
// 2. store result
$this->feedback = array();
- $this->store_convert = tempnam($_ENV['TMP'], 'convert_');
- $this->store_pdf = tempnam($_ENV['TMP'], 'pdf_');
+ $this->store_convert = tempnam(sys_get_temp_dir(), 'convert_');
+ $this->store_pdf = tempnam(sys_get_temp_dir(), 'pdf_');
unlink($this->store_convert);
unlink($this->store_pdf);
umask(0);
- mkdir($this->store_convert);
- mkdir($this->store_pdf);
+ if ( mkdir($this->store_convert) == FALSE ) throw new
Exception(sprintf("Create %s failed",$this->store_onvert));
+ if ( mkdir($this->store_pdf)== FALSE ) throw new
Exception(sprintf("Create %s failed",$this->store_pdf));
}
/**
* @brief concatenate all PDF into a single one and save it into the
@@ -177,6 +177,7 @@ class Document_Export
$cnt_feedback++;
continue;
}
+
$progress->increment($step);
//
diff --git a/include/constant.php b/include/constant.php
index 34489ca..0e361d0 100644
--- a/include/constant.php
+++ b/include/constant.php
@@ -271,7 +271,7 @@ if ( ! file_exists($ps2pdf) )
/**
* Outil pour manipuler les PDF
*/
-$pdftk='/usr/bin/pdftk';
+$pdftk='/snap/bin/pdftk';
if (file_exists($pdftk))
{
define ('PDFTK',$pdftk);
- [Noalyss-commit] [noalyss] 21/107: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss into dev7016, (continued)
- [Noalyss-commit] [noalyss] 21/107: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss into dev7016, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 15/107: Icon_Action : add testing + cosmetic for Icon_Action::menu, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 22/107: typo, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 26/107: Code Cleaning : replace tempname with sys_get_temp_dir Merge commit 'd85d6f8c77083fb997441a672d222bb10836af3e' into dev7109, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 27/107: Improve : depending if pdftk is a snap or not , his path must be a setting, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 30/107: New function PDF:is_fill add documentation, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 35/107: indent code, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 37/107: Card : allow to specify the max displaid rows, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 34/107: Clean code , remove useless comment, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 60/107: New message : failed, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 01/107: replace tempname with sys_get_temp_dir,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 03/107: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 05/107: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 19/107: Bug with javascript document.viewport cannot be used directly, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 20/107: Bug with javascript global variable width is undefined, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 31/107: translation, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 25/107: correct js for error, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 29/107: Bug in exception : gettext cannot accept 2 args, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 33/107: Small bug use the date instead of now for table version, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 40/107: PHPUnit : adapt to new version, Dany De Bontridder, 2019/08/26
- [Noalyss-commit] [noalyss] 61/107: Documentation, Dany De Bontridder, 2019/08/26