Fixup FilesystemService document filename generation.

There was a missing '.' before extension
This commit is contained in:
Benoît Burnichon
2016-02-12 19:15:54 +01:00
parent d1e1d18f8a
commit 1d519ff58f
2 changed files with 52 additions and 3 deletions

View File

@@ -10,6 +10,7 @@
namespace Alchemy\Phrasea\Filesystem;
use Alchemy\Phrasea\Model\RecordInterface;
use MediaAlchemyst\Specification\SpecificationInterface;
class FilesystemService
@@ -66,17 +67,17 @@ class FilesystemService
}
/**
* @param \record_adapter $record
* @param RecordInterface $record
* @param string|\SplFileInfo $source
* @return string
*/
public function generateDocumentFilename(\record_adapter $record, $source)
public function generateDocumentFilename(RecordInterface $record, $source)
{
if (!$source instanceof \SplFileInfo) {
$source = new \SplFileInfo($source);
}
return $record->getRecordId() . '_document' . strtolower($source->getExtension());
return $record->getRecordId() . '_document.' . strtolower($source->getExtension());
}
/**