mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
fix syntax error, run update of index even if update hook was called before
This commit is contained in:
parent
a3fcfcb6d9
commit
add79b47d1
|
@ -69,32 +69,21 @@ class SeedDMS_Controller_UpdateDocument extends SeedDMS_Controller_Common {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($recipients['i']) {
|
if($recipients['i']) {
|
||||||
foreach($recipients['i'] as $uid) {
|
foreach($recipients['i'] as $uid) {
|
||||||
if($u = $dms->getUser($uid)) {
|
if($u = $dms->getUser($uid)) {
|
||||||
$res = $contentResult->getContent()->addIndRecipient($u, $user);
|
$res = $contentResult->getContent()->addIndRecipient($u, $user);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if($recipients['g']) {
|
||||||
if($recipients['g']) {
|
foreach($recipients['g'] as $gid) {
|
||||||
foreach($recipients['g'] as $gid) {
|
if($g = $dms->getGroup($gid)) {
|
||||||
if($g = $dms->getGroup($gid)) {
|
$res = $contentResult->getContent()->addGrpRecipient($g, $user);
|
||||||
$res = $contentResult->getContent()->addGrpRecipient($g, $user);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if($index) {
|
|
||||||
$lucenesearch = new $indexconf['Search']($index);
|
|
||||||
if($hit = $lucenesearch->getDocument((int) $document->getId())) {
|
|
||||||
$index->delete($hit->id);
|
|
||||||
}
|
|
||||||
$idoc = new $indexconf['IndexedDocument']($dms, $document, isset($settings->_converters['fulltext']) ? $settings->_converters['fulltext'] : null, !($filesize < $settings->_maxSizeForFullText));
|
|
||||||
if(!$this->callHook('preIndexDocument', $document, $idoc)) {
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!$this->callHook('postUpdateDocument', $document, $contentResult->getContent())) {
|
|
||||||
}
|
|
||||||
$content = $contentResult->getContent();
|
$content = $contentResult->getContent();
|
||||||
} else {
|
} else {
|
||||||
$this->errormsg = 'error_update_document';
|
$this->errormsg = 'error_update_document';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user