Project

General

Profile

Feature #20693 ยป indexed_search.patch

Administrator Admin, 2009-06-29 09:44

View differences:

typo3/sysext/indexed_search/ext_conf_template.txt Thu Jun 26 13:27:00 2008
# cat=basic; type=string; label=Path to unzip: The indexer uses "unzip" to extract the contents from OpenOffice.org/Oasis OpenDocument files. The application must be installed in this path. Otherwise leave the field empty.
unzip = /usr/bin/
# cat=basic; type=string; label=Path to WORD parser: The indexer uses the application 'catdoc' for extracting content from WORD files. The application must be installed in this path. Otherwise leave the field empty.
# cat=basic; type=string; label=Path to WORD parser: The indexer uses the application 'catdoc' or 'AbiWord' for extracting content from WORD files. The application must be installed in this path. Otherwise leave the field empty.
catdoc = /usr/bin/
# cat=basic; type=options[catdoc,abiword]; label=Which Wordextractor should be used.
wordselect = catdoc
# cat=basic; type=string; label=Path to EXCEL parser: The indexer uses the application 'xlhtml' for extracting content from EXCEL files. The application must be installed in this path. Otherwise leave the field empty.
xlhtml = /usr/bin/
-- typo3/sysext/indexed_search/class.external_parser.php Fri Jun 26 10:31:00 2009
++ typo3/sysext/indexed_search/class.external_parser.php Thu Jun 26 13:29:00 2008
......
// Catdoc
if ($indexerConfig['catdoc']) {
$catdocPath = ereg_replace("\/$",'',$indexerConfig['catdoc']).'/';
if (ini_get('safe_mode') || @is_file($catdocPath.'catdoc'.$exe)) {
$this->app['catdoc'] = $catdocPath.'catdoc'.$exe;
$extOK = TRUE;
} else $this->pObj->log_setTSlogMessage("'catdoc' tool for reading Word-files was not found in path '".$catdocPath."catdoc'",3);
if ($indexerConfig['wordselect']=='abiword') {
if (ini_get('safe_mode') || @is_file($catdocPath.'AbiWord'.$exe)) {
$this->app['abiWord'] = $catdocPath.'AbiWord'.$exe;
$extOK = TRUE;
} else $this->pObj->log_setTSlogMessage("'AbiWord' tool for reading Word-files was not found in path '".$catdocPath."AbiWord'",3);
} elseif ($indexerConfig['wordselect']=='catdoc'){
if (ini_get('safe_mode') || @is_file($catdocPath.'catdoc'.$exe)) {
$this->app['catdoc'] = $catdocPath.'catdoc'.$exe;
$extOK = TRUE;
} else $this->pObj->log_setTSlogMessage("'catdoc' tool for reading Word-files was not found in path '".$catdocPath."catdoc'",3);
}
} else $this->pObj->log_setTSlogMessage('catdoc tools (Word-files) disabled',1);
break;
case 'pps': // MS PowerPoint(?)
......
$content = implode(chr(10),$res);
unset($res);
$contentArr = $this->pObj->splitRegularContent($this->removeEndJunk($content));
} elseif ($this->app['abiWord']) {
$tempFileName = t3lib_div::tempnam('Typo3_indexer'); // Create temporary name
@unlink ($tempFileName); // Delete if exists, just to be safe.
$cmd = $this->app['abiWord'] . ' -t txt -o ' . $tempFileName . ' ' . escapeshellarg($absFile);
exec($cmd);
if (@is_file($tempFileName)) {
$content = t3lib_div::getUrl($tempFileName);
unlink($tempFileName);
} else {
$this->pObj->log_setTSlogMessage('AbiWord Failed on this document: '.$absFile.".",2);
}
if (strlen($content)) {
$contentArr = $this->pObj->splitRegularContent($this->removeEndJunk($content));
}
}
break;
case 'pps':
    (1-1/1)