mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
fix some comments and variable names
This commit is contained in:
parent
ca2739b96e
commit
be2ed2f061
|
@ -22,17 +22,17 @@
|
|||
*/
|
||||
class SeedDMS_Controller_RemoveFolder extends SeedDMS_Controller_Common {
|
||||
|
||||
/* Register a callback which removes each document from the fulltext index
|
||||
/* Register a callback which removes each document/folder from the fulltext index
|
||||
* The callback must return null otherwise the removal will be canceled.
|
||||
*/
|
||||
static function removeFromIndex($arr, $document) { /* {{{ */
|
||||
static function removeFromIndex($arr, $object) { /* {{{ */
|
||||
$fulltextservice = $arr[0];
|
||||
$lucenesearch = $fulltextservice->Search();
|
||||
$hit = null;
|
||||
if($document->isType('document'))
|
||||
$hit = $lucenesearch->getDocument($document->getID());
|
||||
elseif($document->isType('folder'))
|
||||
$hit = $lucenesearch->getFolder($document->getID());
|
||||
if($object->isType('document'))
|
||||
$hit = $lucenesearch->getDocument($object->getID());
|
||||
elseif($object->isType('folder'))
|
||||
$hit = $lucenesearch->getFolder($object->getID());
|
||||
if($hit) {
|
||||
$index = $fulltextservice->Indexer();
|
||||
$index->delete($hit->id);
|
||||
|
@ -55,7 +55,7 @@ class SeedDMS_Controller_RemoveFolder extends SeedDMS_Controller_Common {
|
|||
$folder = $this->params['folder'];
|
||||
$fulltextservice = $this->params['fulltextservice'];
|
||||
|
||||
/* Get the document id and name before removing the document */
|
||||
/* Get the folder id and name before removing the folder */
|
||||
$foldername = $folder->getName();
|
||||
$folderid = $folder->getID();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user