diff --git a/controllers/class.EditDocument.php b/controllers/class.EditDocument.php index a67011a65..bfe0dac30 100644 --- a/controllers/class.EditDocument.php +++ b/controllers/class.EditDocument.php @@ -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)) diff --git a/controllers/class.EditFolder.php b/controllers/class.EditFolder.php index 818f146b2..94a1fa066 100644 --- a/controllers/class.EditFolder.php +++ b/controllers/class.EditFolder.php @@ -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)) diff --git a/inc/inc.ClassNotificationService.php b/inc/inc.ClassNotificationService.php index 7869e0b38..19e3497a1 100644 --- a/inc/inc.ClassNotificationService.php +++ b/inc/inc.ClassNotificationService.php @@ -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; diff --git a/inc/inc.FulltextInit.php b/inc/inc.FulltextInit.php index a3c4fa38d..77ea72661 100644 --- a/inc/inc.FulltextInit.php +++ b/inc/inc.FulltextInit.php @@ -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); }