use sys_get_temp_dir() instead of '/tmp'

This commit is contained in:
Uwe Steinmann 2021-05-09 08:15:14 +02:00
parent 3cee482b1c
commit 53654444f0
2 changed files with 2 additions and 2 deletions

View File

@ -333,7 +333,7 @@ if($settings->_libraryFolder) {
if($clonedoc = $dms->getDocument($_POST["librarydoc"])) {
if($content = $clonedoc->getLatestContent()) {
$docsource = 'library';
$fullfile = tempnam('/tmp', '');
$fullfile = tempnam(sys_get_temp_dir(), '');
if(SeedDMS_Core_File::copyFile($dms->contentDir . $content->getPath(), $fullfile)) {
/* Check if a local file is uploaded as well */
if(isset($_FILES["userfile"]['error'][0])) {

View File

@ -97,7 +97,7 @@ $(document).ready(function() {
$downmgr->addItem($entry->getLatestContent(), $extracols);
}
}
$filename = tempnam('/tmp', '');
$filename = tempnam(sys_get_temp_dir(), '');
if(isset($_GET['includecontent']) && $_GET['includecontent']) {
$downmgr->createArchive($filename);
header("Content-Transfer-Encoding: binary");