some more documentation, use appropriate variable name

This commit is contained in:
Uwe Steinmann 2021-01-08 10:06:42 +01:00
parent 9bacd79374
commit 4bc32501b8

View File

@ -65,12 +65,22 @@ class SeedDMS_FulltextService {
$this->cmdtimeout = $timeout;
}
public function IndexedDocument($document, $forceupdate=false) {
if($document->isType('document'))
$nocontent = ($document->getLatestContent()->getFileSize() > $this->maxsize) && !$forceupdate;
/**
* Return an indexable document from the given document or folder
*
* @param SeedDMS_Core_Document|SeedDMS_Core_Folder $object document or folder
* to be indexed
* @param boolean $forceupdate set to true if the document shall be updated no
* matter how large the content is. Setting this to false will only update the
* document if its content is below the configured size.
* @return object indexed Document ready for passing to the indexer
*/
public function IndexedDocument($object, $forceupdate=false) {
if($object->isType('document'))
$nocontent = ($object->getLatestContent()->getFileSize() > $this->maxsize) && !$forceupdate;
else
$nocontent = true;
return new $this->services[0]['IndexedDocument']($document->getDMS(), $document, $this->converters, $nocontent, $this->cmdtimeout);
return new $this->services[0]['IndexedDocument']($object->getDMS(), $object, $this->converters, $nocontent, $this->cmdtimeout);
}
/**