diff --git a/CHANGELOG b/CHANGELOG index 80e85839b..ec567bbe5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -112,6 +112,7 @@ - check if converters are set in out/out.ViewDocument.php at all (Closes #394) - do not remove user when transfering objects - do not periodically count tasks if task list in menu is turned off +- use utf8_basename() in op.ImportFS.php -------------------------------------------------------------------------------- Changes in version 5.1.6 diff --git a/controllers/class.UpdateDocument.php b/controllers/class.UpdateDocument.php index 36dda66de..b5a45e1fa 100644 --- a/controllers/class.UpdateDocument.php +++ b/controllers/class.UpdateDocument.php @@ -61,7 +61,7 @@ class SeedDMS_Controller_UpdateDocument extends SeedDMS_Controller_Common { $result = $this->callHook('updateDocument'); if($result === null) { $filesize = SeedDMS_Core_File::fileSize($userfiletmp); - $contentResult=$document->addContent($comment, $user, $userfiletmp, basename($userfilename), $filetype, $userfiletype, $reviewers, $approvers, $version=0, $attributes, $workflow, $initialdocumentstatus); + $contentResult=$document->addContent($comment, $user, $userfiletmp, utf8_basename($userfilename), $filetype, $userfiletype, $reviewers, $approvers, $version=0, $attributes, $workflow, $initialdocumentstatus); if ($this->hasParam('expires')) { if($document->setExpires($this->getParam('expires'))) { diff --git a/op/op.ImportFS.php b/op/op.ImportFS.php index 83dd8ed67..b3f7de41e 100644 --- a/op/op.ImportFS.php +++ b/op/op.ImportFS.php @@ -57,7 +57,7 @@ function import_folder($dirname, $folder) { /* {{{ */ $path = $dirname.'/'.$entry; if($entry != '.' && $entry != '..' && $entry != '.svn') { if(is_file($path)) { - $name = basename($path); + $name = utf8_basename($path); $filetmp = $path; $reviewers = array(); @@ -86,7 +86,7 @@ function import_folder($dirname, $folder) { /* {{{ */ } set_time_limit(30); } elseif(is_dir($path)) { - $name = basename($path); + $name = utf8_basename($path); if($newfolder = $folder->addSubFolder($name, '', $user, $sequence)) { $foldercount++; if(!import_folder($path, $newfolder))