Bug #16442 ยป bug_3994.diff
typo3/sysext/indexed_search/class.external_parser.php (Arbeitskopie) | ||
---|---|---|
$cmd = $this->app['pdfinfo'].' "'.$absFile.'"';
|
||
exec($cmd,$res);
|
||
$pdfInfo = $this->splitPdfInfo($res);
|
||
unset($res);
|
||
if (intval($pdfInfo['pages'])) {
|
||
list($low,$high) = explode('-',$cPKey);
|
||
... | ... | |
$tempFileName = t3lib_div::tempnam('Typo3_indexer'); // Create temporary name
|
||
@unlink ($tempFileName); // Delete if exists, just to be safe.
|
||
$cmd = $this->app['pdftotext'].' -f '.$low.' -l '.$high.' -enc UTF-8 -q "'.$absFile.'" '.$tempFileName;
|
||
exec($cmd,$res);
|
||
exec($cmd);
|
||
if (@is_file($tempFileName)) {
|
||
$content = t3lib_div::getUrl($tempFileName);
|
||
unlink($tempFileName);
|
||
... | ... | |
$cmd = $this->app['catdoc'].' -d utf-8 "'.$absFile.'"';
|
||
exec($cmd,$res);
|
||
$content = implode(chr(10),$res);
|
||
unset($res);
|
||
$contentArr = $this->pObj->splitRegularContent($this->removeEndJunk($content));
|
||
}
|
||
break;
|
||
... | ... | |
$cmd = $this->app['ppthtml'].' "'.$absFile.'"';
|
||
exec($cmd,$res);
|
||
$content = implode(chr(10),$res);
|
||
unset($res);
|
||
$content = $this->pObj->convertHTMLToUtf8($content);
|
||
$contentArr = $this->pObj->splitHTMLContent($this->removeEndJunk($content));
|
||
$contentArr['title'] = basename($absFile); // Make sure the title doesn't expose the absolute path!
|
||
... | ... | |
$cmd = $this->app['xlhtml'].' -nc -te "'.$absFile.'"';
|
||
exec($cmd,$res);
|
||
$content = implode(chr(10),$res);
|
||
unset($res);
|
||
$content = $this->pObj->convertHTMLToUtf8($content);
|
||
$contentArr = $this->pObj->splitHTMLContent($this->removeEndJunk($content));
|
||
$contentArr['title'] = basename($absFile); // Make sure the title doesn't expose the absolute path!
|
||
... | ... | |
case 'odt':
|
||
if ($this->app['unzip']) {
|
||
// Read content.xml:
|
||
$cmd = $this->app['unzip'].' -p '.$absFile.' content.xml';
|
||
exec($cmd,$out);
|
||
$content_xml = implode(chr(10),$out);
|
||
$cmd = $this->app['unzip'].' -p "'.$absFile.'" content.xml';
|
||
exec($cmd,$res);
|
||
$content_xml = implode(chr(10),$res);
|
||
unset($res);
|
||
// Read meta.xml:
|
||
$cmd = $this->app['unzip'].' -p '.$absFile.' meta.xml';
|
||
exec($cmd, $out);
|
||
$meta_xml = implode(chr(10),$out);
|
||
$cmd = $this->app['unzip'].' -p "'.$absFile.'" meta.xml';
|
||
exec($cmd, $res);
|
||
$meta_xml = implode(chr(10),$res);
|
||
unset($res);
|
||
$utf8_content = trim(strip_tags(str_replace('<',' <',$content_xml)));
|
||
$contentArr = $this->pObj->splitRegularContent($utf8_content);
|
||
... | ... | |
$cmd = $this->app['unrtf'].' "'.$absFile.'"';
|
||
exec($cmd,$res);
|
||
$fileContent = implode(chr(10),$res);
|
||
unset($res);
|
||
$fileContent = $this->pObj->convertHTMLToUtf8($fileContent);
|
||
$contentArr = $this->pObj->splitHTMLContent($fileContent);
|
||
}
|
||
... | ... | |
$cmd = $this->app['pdfinfo'].' "'.$absFile.'"';
|
||
exec($cmd,$res);
|
||
$pdfInfo = $this->splitPdfInfo($res);
|
||
unset($res);
|
||
if (intval($pdfInfo['pages'])) {
|
||
$cParts = array();
|