diff --git a/CHANGELOG b/CHANGELOG index c5e622caa..156e20c57 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -47,6 +47,12 @@ - add document list which can be exported as an archive - search results can be exported +-------------------------------------------------------------------------------- + Changes in version 5.1.4 +-------------------------------------------------------------------------------- +- fix javascript error when indexing document, because the indexer was also + created when the js-code was requested (Closes #340) + -------------------------------------------------------------------------------- Changes in version 5.1.3 -------------------------------------------------------------------------------- @@ -89,6 +95,11 @@ - added support for postgresql - document attachments can linked to a version and be public or hidden +-------------------------------------------------------------------------------- + Changes in version 5.0.14 +-------------------------------------------------------------------------------- +- use cmd timeout when indexing documents (Closes #344) + -------------------------------------------------------------------------------- Changes in version 5.0.13 -------------------------------------------------------------------------------- @@ -188,6 +199,11 @@ - add .xml to online file types by default - add home folder for users +-------------------------------------------------------------------------------- + Changes in version 4.3.37 +-------------------------------------------------------------------------------- +- fix label in password forgotten form (Closes #346) + -------------------------------------------------------------------------------- Changes in version 4.3.36 -------------------------------------------------------------------------------- diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 0098700e8..85f1e6068 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -12,7 +12,7 @@ uwe@steinmann.cx yes - 2017-08-29 + 2017-09-05 6.0.1 @@ -34,6 +34,7 @@ are any waiting or pending revisions at all - fix field name in getDocumentList() to make it work for pgsql - views instead of temp. tables can be used - ReceiveOwner list does not contain old versions anymore +- all changes up to 5.1.4 merged @@ -1226,6 +1227,21 @@ do not sort some temporary tables anymore, because it causes an error in mysql i - fix sql statement for creating temp. tables (sqlite) + + 2017-09-05 + + + 4.3.37 + 4.3.37 + + + stable + stable + + GPL License + + + 2016-01-22 @@ -1492,8 +1508,8 @@ if the owner tries to access them - 2017-07-13 - + 2017-08-23 + 5.1.3 5.1.3 @@ -1510,7 +1526,22 @@ returns just users which are not disabled - add methods isMandatoryReviewerOf() and isMandatoryApproverOf() - add methods transferDocumentsFolders() and transferEvents() - add method SeedDMS_Core_DMS::getDocumentByOriginalFilename() - + + + + 2017-09-05 + + + 5.1.4 + 5.1.4 + + + stable + stable + + GPL License + + 2017-02-28 diff --git a/SeedDMS_Preview/Preview/Base.php b/SeedDMS_Preview/Preview/Base.php index b68186c69..25a36cdee 100644 --- a/SeedDMS_Preview/Preview/Base.php +++ b/SeedDMS_Preview/Preview/Base.php @@ -64,13 +64,13 @@ class SeedDMS_Preview_Base { 2 => array("pipe", "w") ); $pipes = array(); - + $timeout += time(); $process = proc_open($cmd, $descriptorspec, $pipes); if (!is_resource($process)) { throw new Exception("proc_open failed on: " . $cmd); } - + $output = ''; $timeleft = $timeout - time(); $read = array($pipes[1]); @@ -78,13 +78,13 @@ class SeedDMS_Preview_Base { $exeptions = NULL; do { stream_select($read, $write, $exeptions, $timeleft, 200000); - + if (!empty($read)) { $output .= fread($pipes[1], 8192); } $timeleft = $timeout - time(); } while (!feof($pipes[1]) && $timeleft > 0); - + if ($timeleft <= 0) { proc_terminate($process); throw new Exception("command timeout on: " . $cmd); @@ -109,7 +109,7 @@ class SeedDMS_Preview_Base { /** * Check if converter for a given mimetype is set * - * @param string $mimetype + * @param string $mimetype * @return boolean true if converter exists, otherwise false */ function hasConverter($mimetype) { /* {{{ */ diff --git a/SeedDMS_Preview/Preview/PdfPreviewer.php b/SeedDMS_Preview/Preview/PdfPreviewer.php index f3c618b9f..49b303359 100644 --- a/SeedDMS_Preview/Preview/PdfPreviewer.php +++ b/SeedDMS_Preview/Preview/PdfPreviewer.php @@ -101,6 +101,7 @@ class SeedDMS_Preview_PdfPreviewer extends SeedDMS_Preview_Base { try { self::execWithTimeout($cmd, $this->timeout); } catch(Exception $e) { + return false; } } return true; diff --git a/SeedDMS_Preview/Preview/Previewer.php b/SeedDMS_Preview/Preview/Previewer.php index 970fcdb95..c32271c29 100644 --- a/SeedDMS_Preview/Preview/Previewer.php +++ b/SeedDMS_Preview/Preview/Previewer.php @@ -140,6 +140,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base { try { self::execWithTimeout($cmd, $this->timeout); } catch(Exception $e) { + return false; } } return true; diff --git a/SeedDMS_Preview/package.xml b/SeedDMS_Preview/package.xml index 71eb627ba..6c0211aef 100644 --- a/SeedDMS_Preview/package.xml +++ b/SeedDMS_Preview/package.xml @@ -11,10 +11,10 @@ uwe@steinmann.cx yes - 2017-03-02 - + 2017-09-18 + - 1.2.2 + 1.2.3 1.2.0 @@ -23,8 +23,7 @@ GPL License -commands can be set for mimetypes 'xxxx/*' and '*' -pass mimetype as parameter '%m' to converter +createPreview() returns false if running the converter command fails @@ -271,5 +270,22 @@ add new previewer which converts document to pdf instead of png setConverters() overrides exiting converters + + 2017-03-02 + + + 1.2.2 + 1.2.0 + + + stable + stable + + GPL License + +commands can be set for mimetypes 'xxxx/*' and '*' +pass mimetype as parameter '%m' to converter + + diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 097d247fd..f450e0072 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -241,8 +241,12 @@ class Settings { /* {{{ */ var $_cmdTimeout = 5; // Preview image width in lists var $_previewWidthList = 40; + // Preview image width in menu lists + var $_previewWidthMenuList = 40; // Preview image width on document details page var $_previewWidthDetail = 100; + // Preview image width in drop folder list + var $_previewWidthDropFolderList = 100; // show full preview on document details page var $_showFullPreview = false; // convert to pdf for preview on document details page @@ -428,8 +432,12 @@ class Settings { /* {{{ */ $this->_theme = strval($tab["theme"]); if(isset($tab["previewWidthList"])) $this->_previewWidthList = intval($tab["previewWidthList"]); + if(isset($tab["previewWidthMenuList"])) + $this->_previewWidthMenuList = intval($tab["previewWidthMenuList"]); if(isset($tab["previewWidthDetail"])) $this->_previewWidthDetail = intval($tab["previewWidthDetail"]); + if(isset($tab["previewWidthDropFolderList"])) + $this->_previewWidthDropFolderList = intval($tab["previewWidthDropFolderList"]); $this->_showFullPreview = Settings::boolVal($tab["showFullPreview"]); $this->_convertToPdf = Settings::boolVal($tab["convertToPdf"]); @@ -755,7 +763,9 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "availablelanguages", implode(',', $this->_availablelanguages)); $this->setXMLAttributValue($node, "theme", $this->_theme); $this->setXMLAttributValue($node, "previewWidthList", $this->_previewWidthList); + $this->setXMLAttributValue($node, "previewWidthMenuList", $this->_previewWidthMenuList); $this->setXMLAttributValue($node, "previewWidthDetail", $this->_previewWidthDetail); + $this->setXMLAttributValue($node, "previewWidthDropFolderList", $this->_previewWidthDropFolderList); $this->setXMLAttributValue($node, "showFullPreview", $this->_showFullPreview); $this->setXMLAttributValue($node, "convertToPdf", $this->_convertToPdf); diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index 2b30c49dc..05a41479a 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (1557), rickr (144), s.pnt (26) +// Translators: Admin (1563), rickr (144), s.pnt (26) $text = array( '2_factor_auth' => 'Autorizzazione a due fattori', @@ -474,14 +474,14 @@ URL: [url]', 'expired' => 'Scaduto', 'expired_at_date' => '', 'expires' => 'Scadenza', -'expire_by_date' => '', +'expire_by_date' => 'Scadenza per Data', 'expire_in_1d' => '', 'expire_in_1h' => '', -'expire_in_1m' => '', -'expire_in_1w' => '', -'expire_in_1y' => '', +'expire_in_1m' => '1 Mese', +'expire_in_1w' => '7 Giorni', +'expire_in_1y' => '1 Anno', 'expire_in_2h' => '', -'expire_in_2y' => '', +'expire_in_2y' => '2 Anni', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Scadenza cambiata', @@ -665,7 +665,7 @@ URL: [url]', 'linked_documents' => 'Documenti collegati', 'linked_files' => 'Allegati', 'linked_to_current_version' => '', -'linked_to_document' => '', +'linked_to_document' => 'Collegato al documento', 'linked_to_this_version' => '', 'link_alt_updatedocument' => 'Se vuoi caricare file più grandi del limite massimo attuale, usa la pagina alternativa di upload.', 'link_to_version' => '', diff --git a/languages/ko_KR/lang.inc b/languages/ko_KR/lang.inc index 03be2801b..edc3b4407 100644 --- a/languages/ko_KR/lang.inc +++ b/languages/ko_KR/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (940), daivoc (421), fofwisdom (166) +// Translators: Admin (944), daivoc (421), fofwisdom (166) $text = array( '2_factor_auth' => '이중 인증', @@ -481,7 +481,7 @@ URL: [url]', 'expire_in_1w' => '1주 후 만료', 'expire_in_1y' => '1년 후 만료', 'expire_in_2h' => '', -'expire_in_2y' => '', +'expire_in_2y' => '2년 후에 만료', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => '유효 기간 변경', @@ -585,7 +585,7 @@ URL: [url]', 'include_content' => '내용을 포함', 'include_documents' => '문서 포함', 'include_subdirectories' => '하위 디렉터리 포함', -'indexing_tasks_in_queue' => '', +'indexing_tasks_in_queue' => '큐에서 대기중인 색인 작업들', 'index_converters' => '인덱스 문서 변환', 'index_done' => '마침', 'index_error' => '오류', @@ -669,7 +669,7 @@ URL: [url]', 'linked_to_this_version' => '', 'link_alt_updatedocument' => '최대 업로드 크기보다 큰 파일을 업로드하려는 경우, 대체 업로드 페이지를 upload page 사용하십시오.', 'link_to_version' => '', -'list_access_rights' => '', +'list_access_rights' => '모든 접근 권한 나열', 'list_contains_no_access_docs' => '', 'list_hooks' => '', 'local_file' => '로컬 파일', @@ -813,7 +813,7 @@ URL : [url]', 'only_jpg_user_images' => '.JPG - 이미지만 사용자가 이미지로 사용할 수 있습니다', 'order_by_sequence_off' => '순서에 의한 정렬 설정이 켜져 있습니다. 이 매개 변수를 사용하고 싶은 경우 이것을 활성화 해야 합니다.', 'original_filename' => '원래본 파일명', -'overall_indexing_progress' => '', +'overall_indexing_progress' => '전체 색인 진행률', 'owner' => '소유자', 'ownership_changed_email' => '소유자 변경', 'ownership_changed_email_body' => '소유자 변경 diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 7e4647691..09484b4c2 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (954), flaviove (627), lfcristofoli (352) +// Translators: Admin (960), flaviove (627), lfcristofoli (352) $text = array( '2_factor_auth' => '', @@ -470,11 +470,11 @@ URL: [url]', 'expire_by_date' => 'Data de vencimento', 'expire_in_1d' => '', 'expire_in_1h' => '', -'expire_in_1m' => '', +'expire_in_1m' => 'Expira em 1 mês', 'expire_in_1w' => 'Expira em uma (01) semana', -'expire_in_1y' => '', +'expire_in_1y' => 'Expira em 1 ano', 'expire_in_2h' => '', -'expire_in_2y' => '', +'expire_in_2y' => 'Expira em 2 anos', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Data de validade mudou', @@ -1106,7 +1106,7 @@ URL: [url]', 'settings_contentOffsetDir' => 'Pasta de Compensação de Conteúdo', 'settings_contentOffsetDir_desc' => 'Para contornar as limitações do sistema de arquivos subjacente, uma nova estrutura de diretórios foi concebida que existe dentro do diretório de conteúdo (Content Directory). Isso requer um diretório base para começar. Normalmente, deixe Isso para a configuração padrão, 1048576, mas pode ser qualquer número ou cadeia de caracteres que ainda não existe dentro (Diretório de conteúdo)', 'settings_convertToPdf' => 'Converte o PDF para visualização', -'settings_convertToPdf_desc' => '', +'settings_convertToPdf_desc' => 'Se um documento não puder ser mostrado pelo navegador, uma versão em PDF será mostrada.', 'settings_cookieLifetime' => 'Tempo de Vida dos Cookies', 'settings_cookieLifetime_desc' => 'O tempo de vida de um cookie em segundos. Se definido como 0, o cookie será removido quando o navegador é fechado.', 'settings_coreDir' => 'Diretório Núcleo do SeedDMS', @@ -1275,7 +1275,7 @@ URL: [url]', 'settings_maxRecursiveCount_desc' => 'Este é o número máximo de documentos ou pastas que serão verificados por direitos de acesso, quando recursivamente contar objetos. Se esse número for ultrapassado, será estimado o número de documentos e pastas na visualização da pasta.', 'settings_maxSizeForFullText' => '', 'settings_maxSizeForFullText_desc' => '', -'settings_maxUploadSize' => '', +'settings_maxUploadSize' => 'Tamanho máximo para arquivos enviados.', 'settings_maxUploadSize_desc' => '', 'settings_more_settings' => 'Configurar outras configurações. Login padrão: admin/admin', 'settings_notfound' => 'Não encontrado', diff --git a/op/op.Ajax.php b/op/op.Ajax.php index 3a7154b98..5f7559851 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -863,7 +863,7 @@ switch($command) { $index = $indexconf['Indexer']::open($settings->_luceneDir); if($index) { $indexconf['Indexer']::init($settings->_stopWordsFile); - $idoc = new $indexconf['IndexedDocument']($dms, $document, isset($settings->_converters['fulltext']) ? $settings->_converters['fulltext'] : null, false); + $idoc = new $indexconf['IndexedDocument']($dms, $document, isset($settings->_converters['fulltext']) ? $settings->_converters['fulltext'] : null, false, $settings->_cmdTimeout); if(isset($GLOBALS['SEEDDMS_HOOKS']['indexDocument'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['indexDocument'] as $hookObj) { if (method_exists($hookObj, 'preIndexDocument')) { diff --git a/op/op.Preview.php b/op/op.Preview.php index 5d3dc5cb1..488555945 100644 --- a/op/op.Preview.php +++ b/op/op.Preview.php @@ -74,8 +74,15 @@ if(!empty($_GET["width"])) else $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); $previewer->setConverters($settings->_converters['preview']); -if(!$previewer->hasPreview($object)) - $previewer->createPreview($object); +if(!$previewer->hasPreview($object)) { + if(!$previewer->createPreview($object)) { + } +} +if(!$previewer->hasPreview($object)) { + header('Content-Type: image/svg+xml'); + readfile('../views/'.$theme.'/images/empty.svg'); + exit; +} header('Content-Type: image/png'); $previewer->getPreview($object); diff --git a/op/op.Settings.php b/op/op.Settings.php index 98291589e..f37e146a9 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -65,6 +65,8 @@ if ($action == "saveSettings") $settings->_availablelanguages = $_POST["availablelanguages"]; $settings->_theme = $_POST["theme"]; $settings->_previewWidthList = $_POST["previewWidthList"]; + $settings->_previewWidthMenuList = $_POST["previewWidthMenuList"]; + $settings->_previewWidthDropFolderList = $_POST["previewWidthDropFolderList"]; $settings->_previewWidthDetail = $_POST["previewWidthDetail"]; $settings->_showFullPreview = getBoolValue("showFullPreview"); $settings->_convertToPdf = getBoolValue("convertToPdf"); diff --git a/out/out.DropFolderChooser.php b/out/out.DropFolderChooser.php index 5eaa38892..89ed922c1 100644 --- a/out/out.DropFolderChooser.php +++ b/out/out.DropFolderChooser.php @@ -49,7 +49,8 @@ if($view) { $view->setParam('dropfolderfile', isset($_GET["dropfolderfile"]) ? $_GET["dropfolderfile"] : ''); $view->setParam('form', $form); $view->setParam('cachedir', $settings->_cacheDir); - $view->setParam('previewWidthList', $settings->_previewWidthList); + $view->setParam('previewWidthMenuList', $settings->_previewWidthMenuList); + $view->setParam('previewWidthList', $settings->_previewWidthDropFolderList); $view->setParam('timeout', $settings->_cmdTimeout); $view->setParam('showfolders', $showfolders); $view($_GET); diff --git a/out/out.Indexer.php b/out/out.Indexer.php index 0b91f678c..a5c9df7f1 100644 --- a/out/out.Indexer.php +++ b/out/out.Indexer.php @@ -40,23 +40,27 @@ if(!$settings->_enableFullSearch) { UI::exitError(getMLText("admin_tools"),getMLText("fulltextsearch_disabled")); } -if(isset($_GET['create']) && $_GET['create'] == 1) { - if(isset($_GET['confirm']) && $_GET['confirm'] == 1) { - $index = $indexconf['Indexer']::create($settings->_luceneDir); +if(!isset($_GET['action']) || $_GET['action'] == 'show') { + if(isset($_GET['create']) && $_GET['create'] == 1) { + if(isset($_GET['confirm']) && $_GET['confirm'] == 1) { + $index = $indexconf['Indexer']::create($settings->_luceneDir); + if(!$index) { + UI::exitError(getMLText("admin_tools"),getMLText("no_fulltextindex")); + } + $indexconf['Indexer']::init($settings->_stopWordsFile); + } else { + header('Location: out.CreateIndex.php'); + exit; + } + } else { + $index = $indexconf['Indexer']::open($settings->_luceneDir); if(!$index) { UI::exitError(getMLText("admin_tools"),getMLText("no_fulltextindex")); } $indexconf['Indexer']::init($settings->_stopWordsFile); - } else { - header('Location: out.CreateIndex.php'); - exit; } } else { - $index = $indexconf['Indexer']::open($settings->_luceneDir); - if(!$index) { - UI::exitError(getMLText("admin_tools"),getMLText("no_fulltextindex")); - } - $indexconf['Indexer']::init($settings->_stopWordsFile); + $index = null; } if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) { diff --git a/out/out.ObjectCheck.php b/out/out.ObjectCheck.php index 50167cd55..314733c1f 100644 --- a/out/out.ObjectCheck.php +++ b/out/out.ObjectCheck.php @@ -20,8 +20,8 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. include("../inc/inc.Version.php"); -include("../inc/inc.LogInit.php"); include("../inc/inc.Settings.php"); +include("../inc/inc.LogInit.php"); include("../inc/inc.Language.php"); include("../inc/inc.Init.php"); include("../inc/inc.Extension.php"); diff --git a/out/out.Timeline.php b/out/out.Timeline.php index 7ad8a33dd..9a2823099 100644 --- a/out/out.Timeline.php +++ b/out/out.Timeline.php @@ -40,18 +40,15 @@ if(isset($_GET['skip'])) else $skip = array(); +$document = null; +$content = null; if(isset($_GET['documentid']) && $_GET['documentid'] && is_numeric($_GET['documentid'])) { - $document = $dms->getDocument($_GET["documentid"]); - if (!is_object($document)) { - $view->exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); + if($document = $dms->getDocument($_GET["documentid"])) { + if(isset($_GET['version']) && $_GET['version'] && is_numeric($_GET['version'])) { + $content = $document->getContentByVersion($_GET['version']); + } } -} else - $document = null; - -if(isset($_GET['version']) && $_GET['version'] && is_numeric($_GET['version'])) { - $content = $document->getContentByVersion($_GET['version']); -} else - $content = null; +} if($view) { $view->setParam('dms', $dms); diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index ba3c78c09..686e6091a 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -116,7 +116,7 @@ $(document).ready(function() { alternatives: [$('#dropfolderfileform1'), $('#choosedocsearchform1')] }, dropfolderfileform1: { - alternatives: [$(".btn-file input"), $('#choosedocsearchform1')] + alternatives: [$("#userfile"), $('#choosedocsearchform1')] } - '.getMLText("browse").'… + '.getMLText("browse").'… @@ -1460,7 +1460,7 @@ $(document).ready(function() { print "\n"; ?>