Bug #18520 » indexed_search_7969_t3_trunk.patch
indexed_search/class.external_parser.php 2010-11-30 11:58:50.000000000 +0100 | ||
---|---|---|
}
|
||
$safeModeEnabled = t3lib_utility_PhpOptions::isSafeModeEnabled();
|
||
$openBasedirEnabled = t3lib_utility_PhpOptions::getIniValueBoolean('open_basedir');
|
||
// Switch on file extension:
|
||
switch($extension) {
|
||
... | ... | |
// PDF
|
||
if ($indexerConfig['pdftools']) {
|
||
$pdfPath = rtrim($indexerConfig['pdftools'], '/').'/';
|
||
if ($safeModeEnabled || (@is_file($pdfPath . 'pdftotext' . $exe) && @is_file($pdfPath . 'pdfinfo' . $exe))) {
|
||
if ($safeModeEnabled || $openBasedirEnabled || (@is_file($pdfPath . 'pdftotext' . $exe) && @is_file($pdfPath . 'pdfinfo' . $exe))) {
|
||
$this->app['pdfinfo'] = $pdfPath.'pdfinfo'.$exe;
|
||
$this->app['pdftotext'] = $pdfPath.'pdftotext'.$exe;
|
||
// PDF mode:
|
||
... | ... | |
// Catdoc
|
||
if ($indexerConfig['catdoc']) {
|
||
$catdocPath = rtrim($indexerConfig['catdoc'], '/').'/';
|
||
if ($safeModeEnabled || @is_file($catdocPath . 'catdoc' . $exe)) {
|
||
if ($safeModeEnabled || $openBasedirEnabled || @is_file($catdocPath . 'catdoc' . $exe)) {
|
||
$this->app['catdoc'] = $catdocPath.'catdoc'.$exe;
|
||
$extOK = TRUE;
|
||
} else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:catdocNotFound'), $catdocPath), 3);
|
||
... | ... | |
// ppthtml
|
||
if ($indexerConfig['ppthtml']) {
|
||
$ppthtmlPath = rtrim($indexerConfig['ppthtml'], '/').'/';
|
||
if ($safeModeEnabled || @is_file($ppthtmlPath . 'ppthtml' . $exe)) {
|
||
if ($safeModeEnabled || $openBasedirEnabled || @is_file($ppthtmlPath . 'ppthtml' . $exe)) {
|
||
$this->app['ppthtml'] = $ppthtmlPath.'ppthtml'.$exe;
|
||
$extOK = TRUE;
|
||
} else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:ppthtmlNotFound'), $ppthtmlPath), 3);
|
||
... | ... | |
// Xlhtml
|
||
if ($indexerConfig['xlhtml']) {
|
||
$xlhtmlPath = rtrim($indexerConfig['xlhtml'], '/').'/';
|
||
if ($safeModeEnabled || @is_file($xlhtmlPath . 'xlhtml' . $exe)) {
|
||
if ($safeModeEnabled || $openBasedirEnabled || @is_file($xlhtmlPath . 'xlhtml' . $exe)) {
|
||
$this->app['xlhtml'] = $xlhtmlPath.'xlhtml'.$exe;
|
||
$extOK = TRUE;
|
||
} else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:xlhtmlNotFound'), $xlhtmlPath), 3);
|
||
... | ... | |
case 'odt': // Oasis OpenDocument Text
|
||
if ($indexerConfig['unzip']) {
|
||
$unzipPath = rtrim($indexerConfig['unzip'], '/').'/';
|
||
if ($safeModeEnabled || @is_file($unzipPath . 'unzip' . $exe)) {
|
||
if ($safeModeEnabled || $openBasedirEnabled || @is_file($unzipPath . 'unzip' . $exe)) {
|
||
$this->app['unzip'] = $unzipPath.'unzip'.$exe;
|
||
$extOK = TRUE;
|
||
} else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:unzipNotFound'), $unzipPath), 3);
|
||
} else $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xml:unzipDisabled'), 1);
|
||
break;
|
||
case 'rtf':
|
||
// Catdoc
|
||
// Unrtf
|
||
if ($indexerConfig['unrtf']) {
|
||
$unrtfPath = rtrim($indexerConfig['unrtf'], '/').'/';
|
||
if ($safeModeEnabled || @is_file($unrtfPath . 'unrtf' . $exe)) {
|
||
if ($safeModeEnabled || $openBasedirEnabled || @is_file($unrtfPath . 'unrtf' . $exe)) {
|
||
$this->app['unrtf'] = $unrtfPath.'unrtf'.$exe;
|
||
$extOK = TRUE;
|
||
} else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:unrtfNotFound'), $unrtfPath), 3);
|