mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 05:31:42 +00:00
removeFromIndex() returns null, otherwise the removeFolder is canceled
This commit is contained in:
parent
e060116c0c
commit
e98dc5e4f2
|
@ -43,7 +43,7 @@ class SeedDMS_Controller_RemoveFolder extends SeedDMS_Controller_Common {
|
||||||
$result = $this->callHook('removeFolder', $folder);
|
$result = $this->callHook('removeFolder', $folder);
|
||||||
if($result === null) {
|
if($result === null) {
|
||||||
/* Register a callback which removes each document from the fulltext index
|
/* Register a callback which removes each document from the fulltext index
|
||||||
* The callback must return true other the removal will be canceled.
|
* The callback must return null other the removal will be canceled.
|
||||||
*/
|
*/
|
||||||
function removeFromIndex($arr, $document) {
|
function removeFromIndex($arr, $document) {
|
||||||
$index = $arr[0];
|
$index = $arr[0];
|
||||||
|
@ -53,7 +53,7 @@ class SeedDMS_Controller_RemoveFolder extends SeedDMS_Controller_Common {
|
||||||
$index->delete($hit->id);
|
$index->delete($hit->id);
|
||||||
$index->commit();
|
$index->commit();
|
||||||
}
|
}
|
||||||
return true;
|
return null;
|
||||||
}
|
}
|
||||||
if($index)
|
if($index)
|
||||||
$dms->setCallback('onPreRemoveDocument', 'removeFromIndex', array($index, $indexconf));
|
$dms->setCallback('onPreRemoveDocument', 'removeFromIndex', array($index, $indexconf));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user