mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 12:05:56 +00:00
MINOR: we intial a DMSDocuemnt with Title valued as the file name and remove some inline document that is not correct.
This commit is contained in:
parent
4cdda77524
commit
de93686a68
@ -24,8 +24,7 @@ class DMS implements DMSInterface {
|
||||
|
||||
/**
|
||||
* Takes a File object or a String (path to a file) and copies it into the DMS. The original file remains unchanged.
|
||||
* When storing a document, sets the fields on the File has "tag" metadata. E.g: filename, path, etc. all become
|
||||
* single-value tags on the Document.
|
||||
* When storing a document, sets the fields on the File has "tag" metadata.
|
||||
* @param $file File object, or String that is path to a file to store
|
||||
* @return DMSDocumentInstance Document object that we just created
|
||||
*/
|
||||
@ -54,10 +53,9 @@ class DMS implements DMSInterface {
|
||||
//write the filename of the stored document
|
||||
$doc->Filename = $toFilename;
|
||||
$doc->Folder = $toFolder;
|
||||
$doc->Title=$fromFilename;
|
||||
$doc->write();
|
||||
|
||||
//set an initial title for the document from the filename
|
||||
$doc->addTag('title', $fromFilename, false);
|
||||
|
||||
return $doc;
|
||||
}
|
||||
|
@ -20,8 +20,7 @@ interface DMSInterface {
|
||||
|
||||
/**
|
||||
* Takes a File object or a String (path to a file) and copies it into the DMS. The original file remains unchanged.
|
||||
* When storing a document, sets the fields on the File has "tag" metadata. E.g: filename, path, etc. all become
|
||||
* single-value tags on the Document.
|
||||
* When storing a document, sets the fields on the File has "tag" metadata.
|
||||
* @abstract
|
||||
* @param $file File object, or String that is path to a file to store
|
||||
* @return DMSDocumentInstance Document object that we just created
|
||||
|
Loading…
x
Reference in New Issue
Block a user