From de93686a687b2ea282240a084b51a4beb556eea6 Mon Sep 17 00:00:00 2001 From: Normann Lou Date: Thu, 26 Jul 2012 12:50:52 +1200 Subject: [PATCH] MINOR: we intial a DMSDocuemnt with Title valued as the file name and remove some inline document that is not correct. --- code/DMS.php | 6 ++---- code/interface/DMSInterface.php | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/code/DMS.php b/code/DMS.php index 92e6b45..c18d62b 100644 --- a/code/DMS.php +++ b/code/DMS.php @@ -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; } diff --git a/code/interface/DMSInterface.php b/code/interface/DMSInterface.php index 23d228c..e7df727 100644 --- a/code/interface/DMSInterface.php +++ b/code/interface/DMSInterface.php @@ -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