Commit f71fb0a526f003ca878c99e1d87bc38c17b95524

Authored by Megan Watson
1 parent 7e9d33bc

KTS-3900

"Drop OpenOffice for text extraction"
Fixed. Disabled the starOffice extractor, commented out OO code in the base extractor.

Committed by: Megan Watson
Reviewed by: Donald Jackson



git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@9602 c91229c3-7414-0410-bfa2-8a42b809f60b
search2/indexing/extractorCore.inc.php
... ... @@ -494,7 +494,7 @@ abstract class OOFallbackDocumentExtractor extends ExternalDocumentExtractor
494 494  
495 495 $config = KTConfig::getSingleton();
496 496 $this->params = $config->get('indexer/' . $cmd . 'cmdline', $params);
497   - $this->useOO = $config->get('indexer/useOpenOffice', true);
  497 + $this->useOO = false; //$config->get('indexer/useOpenOffice', true);
498 498 if (!$config->get('indexer/use_' . $cmd, true) || OS_WINDOWS)
499 499 {
500 500 $this->cmd = false;
... ... @@ -502,8 +502,8 @@ abstract class OOFallbackDocumentExtractor extends ExternalDocumentExtractor
502 502  
503 503 if ($this->useOO)
504 504 {
505   - require_once('extractors/StarOfficeExtractor.inc.php');
506   - $this->oo = new StarOfficeExtractor();
  505 +// require_once('extractors/StarOfficeExtractor.inc.php');
  506 +// $this->oo = new StarOfficeExtractor();
507 507 }
508 508 }
509 509  
... ... @@ -547,6 +547,7 @@ abstract class OOFallbackDocumentExtractor extends ExternalDocumentExtractor
547 547 // if failure, fallthrough, and attempt OO
548 548 }
549 549  
  550 + /*
550 551 if ($this->useOO)
551 552 {
552 553 $this->oo->setSourceFile($this->sourcefile);
... ... @@ -567,25 +568,26 @@ abstract class OOFallbackDocumentExtractor extends ExternalDocumentExtractor
567 568 }
568 569 else
569 570 {
  571 + */
570 572 global $default;
571 573 $docId = $this->document->getId();
572 574 $cmd = $this->cmd;
573 575 $default->log->info("The document {$docId} cannot be indexed as {$cmd} is not available and OpenOffice is not in use.");
574 576 file_put_contents($this->targetfile, '');
575 577 return true;
576   - }
  578 + //}
577 579 }
578 580  
579 581 public function diagnose()
580 582 {
581   - if ($this->cmd !== false || !$this->useOO)
  583 + if ($this->cmd !== false) // || !$this->useOO)
582 584 {
583 585 // cmd is found. we don't care about oo.
584 586 // if we can't use oo, well, not much we can do....
585 587 return null;
586 588 }
587 589  
588   - return $this->oo->diagnose();
  590 + return false; //$this->oo->diagnose();
589 591 }
590 592 }
591 593  
... ...
search2/indexing/extractors/StarOfficeExtractor.inc.php
... ... @@ -71,6 +71,8 @@ class StarOfficeExtractor extends ExternalDocumentExtractor
71 71  
72 72 public function getSupportedMimeTypes()
73 73 {
  74 + // disable
  75 + return array();
74 76 $supported = array();
75 77  
76 78 if ($this->useOO)
... ...