Commit 4b5e5e956b681a5040ff811dff5b052a93074d43
1 parent
a597e58e
KTS-3645
"A postscript file not indexed." Fixed. Committed By: Conrad Vermeulen Reviewed By: Megan Watson git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@9283 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
8 additions
and
7 deletions
search2/indexing/indexerCore.inc.php
| @@ -784,19 +784,20 @@ abstract class Indexer | @@ -784,19 +784,20 @@ abstract class Indexer | ||
| 784 | $this->registerTypes(true); | 784 | $this->registerTypes(true); |
| 785 | 785 | ||
| 786 | $disable = array( | 786 | $disable = array( |
| 787 | - OS_WINDOWS=>array('PSExtractor'), | ||
| 788 | - OS_UNIX => array() | 787 | + 'windows'=>array('PSExtractor'), |
| 788 | + 'unix' => array() | ||
| 789 | ); | 789 | ); |
| 790 | 790 | ||
| 791 | - $disableForOS = OS_WINDOWS?$disable[OS_WINDOWS]:$disable[OS_UNIX]; | 791 | + $disableForOS = OS_WINDOWS?$disable['windows']:$disable['unix']; |
| 792 | 792 | ||
| 793 | - foreach($disableForOS as $extractor) | ||
| 794 | - { | ||
| 795 | - $sql = "UPDATE mime_extractors SET active=0 WHERE name='$extractor'"; | 793 | + if (!empty($disableForOS)) |
| 794 | + { | ||
| 795 | + $disableForOS = '\'' . implode("','", $disableForOS) .'\''; | ||
| 796 | + | ||
| 797 | + $sql = "UPDATE mime_extractors SET active=0 WHERE name in ($disableForOS)"; | ||
| 796 | DBUtil::runQuery($sql); | 798 | DBUtil::runQuery($sql); |
| 797 | $default->log->info("checkForRegisteredTypes: disabled '$extractor'"); | 799 | $default->log->info("checkForRegisteredTypes: disabled '$extractor'"); |
| 798 | } | 800 | } |
| 799 | - | ||
| 800 | $this->loadExtractorStatus(); | 801 | $this->loadExtractorStatus(); |
| 801 | 802 | ||
| 802 | if ($this->debug) $default->log->debug('checkForRegisteredTypes: done'); | 803 | if ($this->debug) $default->log->debug('checkForRegisteredTypes: done'); |