mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-23 18:11:31 +00:00
create original file name from new document name when uploading document from the library folder.
This commit is contained in:
parent
04ce8ea28f
commit
e76df4c71f
|
@ -3,6 +3,8 @@
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
- merge changes up to 5.1.27
|
- merge changes up to 5.1.27
|
||||||
- fix triggering workflow (Closes: #542)
|
- fix triggering workflow (Closes: #542)
|
||||||
|
- create original file name from new document name when uploading document
|
||||||
|
from the library folder. Used to be the original file name
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 6.0.19
|
Changes in version 6.0.19
|
||||||
|
|
|
@ -367,10 +367,15 @@ if($settings->_libraryFolder) {
|
||||||
$docsource = 'library';
|
$docsource = 'library';
|
||||||
$fullfile = tempnam(sys_get_temp_dir(), '');
|
$fullfile = tempnam(sys_get_temp_dir(), '');
|
||||||
if(SeedDMS_Core_File::copyFile($dms->contentDir . $content->getPath(), $fullfile)) {
|
if(SeedDMS_Core_File::copyFile($dms->contentDir . $content->getPath(), $fullfile)) {
|
||||||
|
if($_POST["name"]!="") {
|
||||||
|
$oext = pathinfo($content->getOriginalFileName(), PATHINFO_EXTENSION);
|
||||||
|
$origfilename = getFilenameByDocname(trim($_POST['name'])).".".$oext;
|
||||||
|
} else
|
||||||
|
$origfilename = $content->getOriginalFileName();
|
||||||
$file_ary[] = array(
|
$file_ary[] = array(
|
||||||
'tmp_name' => $fullfile,
|
'tmp_name' => $fullfile,
|
||||||
'type' => $content->getMimeType(),
|
'type' => $content->getMimeType(),
|
||||||
'name' => $content->getOriginalFileName(),
|
'name' => $origfilename,
|
||||||
'size' => $content->getFileSize(),
|
'size' => $content->getFileSize(),
|
||||||
'error' => 0,
|
'error' => 0,
|
||||||
'source' => 'library',
|
'source' => 'library',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user