mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
add hook addDocument::preIndexDocument
This commit is contained in:
parent
cbd9b8fa83
commit
811a8f14d2
|
@ -336,7 +336,15 @@ for ($file_num=0;$file_num<count($_FILES["userfile"]["tmp_name"]);$file_num++){
|
|||
$index = $indexconf['Indexer']::open($settings->_luceneDir);
|
||||
if($index) {
|
||||
$indexconf['Indexer']::init($settings->_stopWordsFile);
|
||||
$index->addDocument(new $indexconf['IndexedDocument']($dms, $document, isset($settings->_converters['fulltext']) ? $settings->_converters['fulltext'] : null, !($filesize < $settings->_maxSizeForFullText)));
|
||||
$idoc = new $indexconf['IndexedDocument']($dms, $document, isset($settings->_converters['fulltext']) ? $settings->_converters['fulltext'] : null, !($filesize < $settings->_maxSizeForFullText));
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['addDocument'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['addDocument'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'preIndexDocument')) {
|
||||
$hookObj->preIndexDocument($document, $idoc);
|
||||
}
|
||||
}
|
||||
}
|
||||
$index->addDocument($idoc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user