Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2023-04-28 18:43:27 +02:00
commit 6178252e56
4 changed files with 16 additions and 1 deletions

View File

@ -162,6 +162,10 @@ class SeedDMS_Controller_EditDocument extends SeedDMS_Controller_Common {
}
}
/* There are various hooks in inc/inc.FulltextInit.php which will take
* care of reindexing it. They just delete the indexing date which is
* faster then indexing the folder completely
*
if($fulltextservice && ($index = $fulltextservice->Indexer()) && $document) {
$idoc = $fulltextservice->IndexedDocument($document);
if(false !== $this->callHook('preIndexDocument', $document, $idoc)) {
@ -173,6 +177,7 @@ class SeedDMS_Controller_EditDocument extends SeedDMS_Controller_Common {
$index->commit();
}
}
*/
} elseif($result === false) {
if(empty($this->errormsg))

View File

@ -96,6 +96,10 @@ class SeedDMS_Controller_EditFolder extends SeedDMS_Controller_Common {
}
}
/* There are various hooks in inc/inc.FulltextInit.php which will take
* care of reindexing it. They just delete the indexing date which is
* faster then indexing the folder completely
*
if($fulltextservice && ($index = $fulltextservice->Indexer()) && $folder) {
$idoc = $fulltextservice->IndexedDocument($folder);
if(false !== $this->callHook('preIndexFolder', $folder, $idoc)) {
@ -107,6 +111,7 @@ class SeedDMS_Controller_EditFolder extends SeedDMS_Controller_Common {
$index->commit();
}
}
*/
} elseif($result === false) {
if(empty($this->errormsg))

View File

@ -755,7 +755,7 @@ class SeedDMS_NotificationService {
$params['name'] = $folder->getName();
$params['folder_path'] = $folder->getFolderPathPlain();
$params['old_comment'] = $oldcomment;
$params['new_comment'] = $comment;
$params['new_comment'] = $folder->getComment();
$params['username'] = $user->getFullName();
$params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID();
$params['sitename'] = $this->settings->_siteName;

View File

@ -13,6 +13,8 @@ function reindexDocumentOrFolderCallback($fulltextservice, $object) {
$hit = $lucenesearch->getDocument($object->getId());
elseif($object->isType('folder'))
$hit = $lucenesearch->getFolder($object->getId());
elseif($object->isType('documentcontent'))
$hit = $lucenesearch->getDocument($object->getDocument()->getId());
if($hit) {
$index->reindexDocument($hit->id);
$index->commit();
@ -85,5 +87,8 @@ if($settings->_enableFullSearch) {
$dms->addCallback('onPostSetKategories', 'reindexDocumentOrFolderCallback', $fulltextservice);
$dms->addCallback('onPostAddKategories', 'reindexDocumentOrFolderCallback', $fulltextservice);
$dms->addCallback('onPostRemoveKategories', 'reindexDocumentOrFolderCallback', $fulltextservice);
$dms->addCallback('onPostAddAttribute', 'reindexDocumentOrFolderCallback', $fulltextservice);
$dms->addCallback('onPostUpdateAttribute', 'reindexDocumentOrFolderCallback', $fulltextservice);
$dms->addCallback('onPostRemoveAttribute', 'reindexDocumentOrFolderCallback', $fulltextservice);
}