From 77eab44dc10b3ad8d8b3d1d5ba647ba96c558b63 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 1 Mar 2017 15:56:00 +0100 Subject: [PATCH] new version, catch exception in execWithTimeout() --- SeedDMS_Lucene/Lucene/IndexedDocument.php | 17 ++++---------- SeedDMS_Lucene/package.xml | 28 ++++++++++++++++++----- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/SeedDMS_Lucene/Lucene/IndexedDocument.php b/SeedDMS_Lucene/Lucene/IndexedDocument.php index 874bfd149..027536dae 100644 --- a/SeedDMS_Lucene/Lucene/IndexedDocument.php +++ b/SeedDMS_Lucene/Lucene/IndexedDocument.php @@ -127,19 +127,12 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document { $mimetype = $version->getMimeType(); if(isset($_convcmd[$mimetype])) { $cmd = sprintf($_convcmd[$mimetype], $path); - $content = self::execWithTimeout($cmd, $timeout); - /* - $fp = popen($cmd, 'r'); - if($fp) { - $content = ''; - while(!feof($fp)) { - $content .= fread($fp, 2048); + try { + $content = self::execWithTimeout($cmd, $timeout); + if($content) { + $this->addField(Zend_Search_Lucene_Field::UnStored('content', $content, 'utf-8')); } - pclose($fp); - } - */ - if($content) { - $this->addField(Zend_Search_Lucene_Field::UnStored('content', $content, 'utf-8')); + } catch (Exception $e) { } } } diff --git a/SeedDMS_Lucene/package.xml b/SeedDMS_Lucene/package.xml index 3f5e3d45c..774715d7b 100644 --- a/SeedDMS_Lucene/package.xml +++ b/SeedDMS_Lucene/package.xml @@ -11,11 +11,11 @@ uwe@steinmann.cx yes - 2016-04-28 - + 2017-03-01 + - 1.1.9 - 1.1.7 + 1.1.10 + 1.1.10 stable @@ -23,8 +23,7 @@ GPL License -pass variables to stream_select() to fullfill strict standards. -make all functions in Indexer.php static +catch exception in execWithTimeout() @@ -235,5 +234,22 @@ add command for indexing postѕcript files set last parameter of stream_select() to 200000 micro sec. in case the timeout in sec. is set to 0 + + 2016-04-28 + + + 1.1.9 + 1.1.7 + + + stable + stable + + GPL License + +pass variables to stream_select() to fullfill strict standards. +make all functions in Indexer.php static + +