check if file to be indexed exists

This commit is contained in:
Uwe Steinmann 2019-12-31 15:42:15 +01:00
parent 8409b7e518
commit b7deb84279
2 changed files with 48 additions and 44 deletions

View File

@ -158,6 +158,7 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document {
}
if($version && !$nocontent) {
$path = $dms->contentDir . $version->getPath();
if(file_exists($path)) {
$content = '';
$mimetype = $version->getMimeType();
$this->mimetype = $mimetype;
@ -184,6 +185,7 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document {
}
}
}
}
} /* }}} */
public function getErrorMsg() { /* {{{ */

View File

@ -152,6 +152,7 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
}
if($version && !$nocontent) {
$path = $dms->contentDir . $version->getPath();
if(file_exists($path)) {
$content = '';
$mimetype = $version->getMimeType();
$this->mimetype = $mimetype;
@ -178,6 +179,7 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
}
}
}
}
} /* }}} */
public function getErrorMsg() { /* {{{ */