mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 23:42:11 +00:00
use passed convcmd instead of accessing $settings
This commit is contained in:
parent
97eeee5be7
commit
f74f9b26f4
|
@ -42,7 +42,7 @@ class SeedDMS_View_Indexer extends SeedDMS_Bootstrap_Style {
|
||||||
echo $indent." ".$document->getId().":".htmlspecialchars($document->getName())." ";
|
echo $indent." ".$document->getId().":".htmlspecialchars($document->getName())." ";
|
||||||
/* If the document wasn't indexed before then just add it */
|
/* If the document wasn't indexed before then just add it */
|
||||||
if(!($hits = $index->find('document_id:'.$document->getId()))) {
|
if(!($hits = $index->find('document_id:'.$document->getId()))) {
|
||||||
$index->addDocument(new SeedDMS_Lucene_IndexedDocument($dms, $document, $settings->_convcmd ? $settings->_convcmd : null));
|
$index->addDocument(new SeedDMS_Lucene_IndexedDocument($dms, $document, $this->convcmd ? $this->convcmd : null));
|
||||||
echo "(document added)";
|
echo "(document added)";
|
||||||
} else {
|
} else {
|
||||||
$hit = $hits[0];
|
$hit = $hits[0];
|
||||||
|
@ -61,7 +61,7 @@ class SeedDMS_View_Indexer extends SeedDMS_Bootstrap_Style {
|
||||||
echo $indent."(document unchanged)";
|
echo $indent."(document unchanged)";
|
||||||
} else {
|
} else {
|
||||||
if($index->delete($hit->id)) {
|
if($index->delete($hit->id)) {
|
||||||
$index->addDocument(new SeedDMS_Lucene_IndexedDocument($dms, $document, $settings->_convcmd ? $settings->_convcmd : null));
|
$index->addDocument(new SeedDMS_Lucene_IndexedDocument($dms, $document, $this->convcmd ? $this->convcmd : null));
|
||||||
}
|
}
|
||||||
echo $indent."(document updated)";
|
echo $indent."(document updated)";
|
||||||
}
|
}
|
||||||
|
@ -76,6 +76,7 @@ class SeedDMS_View_Indexer extends SeedDMS_Bootstrap_Style {
|
||||||
$index = $this->params['index'];
|
$index = $this->params['index'];
|
||||||
$recreate = $this->params['recreate'];
|
$recreate = $this->params['recreate'];
|
||||||
$folder = $this->params['folder'];
|
$folder = $this->params['folder'];
|
||||||
|
$this->convcmd = $this->params['convcmd'];
|
||||||
|
|
||||||
$this->htmlStartPage(getMLText("admin_tools"));
|
$this->htmlStartPage(getMLText("admin_tools"));
|
||||||
$this->globalNavigation();
|
$this->globalNavigation();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user