diff --git a/CHANGELOG b/CHANGELOG index e3a6ba785..b0bce6e20 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -116,6 +116,15 @@ - add document list which can be exported as an archive - search results can be exported +-------------------------------------------------------------------------------- + Changes in version 5.1.11 +-------------------------------------------------------------------------------- +- do not show attributes in search results in extra column anymore +- fix setting language during login (Closes #437) +- fix indexing documents even if no preIndexDocument hook is set (Closes #437) +- fix moving documents on the clipboard into the current folder +- new hook 'footNote' in class Bootstrap + -------------------------------------------------------------------------------- Changes in version 5.1.10 -------------------------------------------------------------------------------- diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 3348352ea..7e74ee2aa 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -1641,7 +1641,7 @@ remove deprecated methods SeedDMS_Core_Document::convert(), SeedDMS_Core_Documen - 2018-12-18 + 2019-04-04 5.1.10 diff --git a/controllers/class.Login.php b/controllers/class.Login.php index 7ff2fee50..d65415118 100644 --- a/controllers/class.Login.php +++ b/controllers/class.Login.php @@ -161,11 +161,9 @@ class SeedDMS_Controller_Login extends SeedDMS_Controller_Common { $user->clearLoginFailures(); // Capture the user's language and theme settings. - if (isset($_REQUEST["lang"]) && strlen($_REQUEST["lang"])>0 && is_numeric(array_search($_REQUEST["lang"],getLanguages())) ) { - $lang = $_REQUEST["lang"]; + if ($lang) { $user->setLanguage($lang); - } - else { + } else { $lang = $user->getLanguage(); if (strlen($lang)==0) { $lang = $settings->_language; diff --git a/doc/README.Install.md b/doc/README.Install.md index b203fa9e5..cc480541f 100644 --- a/doc/README.Install.md +++ b/doc/README.Install.md @@ -8,13 +8,13 @@ SeedDMS is a web-based application written in PHP. It uses MySQL, sqlite3 or postgresql to manage the documents that were uploaded into the application. Be aware that postgresql is not very well tested. -Make sure you have PHP 5.4 and MySQL 5 or higher installed. SeedDMS +Make sure you have PHP 7.x and MySQL 5 or higher installed. SeedDMS will work with PHP running in CGI-mode as well as running as a module under apache. Here is a detailed list of requirements: -1. A web server with at least php 5.4 +1. A web server with at least php 7.0 2. A mysql database, unless you use sqlite 3. The php installation must have support for `pdo_mysql` or `pdo_sqlite`, `php_gd2`, `php_mbstring` diff --git a/op/op.Ajax.php b/op/op.Ajax.php index b8c07a535..46a50ecf9 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -879,15 +879,16 @@ switch($command) { $idoc = new $indexconf['IndexedDocument']($dms, $document, isset($settings->_converters['fulltext']) ? $settings->_converters['fulltext'] : null, false, $settings->_cmdTimeout); $error = $idoc->getErrorMsg(); if(!$error) { + $ires = null; if(isset($GLOBALS['SEEDDMS_HOOKS']['indexDocument'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['indexDocument'] as $hookObj) { if (method_exists($hookObj, 'preIndexDocument')) { - if(false !== ($ires = $hookObj->preIndexDocument(null, $document, $idoc))) { - $ires = $index->addDocument($idoc); - } + $ires = $hookObj->preIndexDocument(null, $document, $idoc); } } } + if(false !== $ires) + $ires = $index->addDocument($idoc); header('Content-Type: application/json'); if(false === $ires) { echo json_encode(array('success'=>false, 'message'=>getMLText('error_document_indexed'), 'data'=>$document->getID())); diff --git a/op/op.Login.php b/op/op.Login.php index 7f98452f9..ca4a8b714 100644 --- a/op/op.Login.php +++ b/op/op.Login.php @@ -65,6 +65,11 @@ if(isset($_POST['pwd'])) { } } +$lang = ''; +if(isset($_REQUEST["lang"]) && strlen($_REQUEST["lang"])>0 && is_numeric(array_search($_REQUEST["lang"],getLanguages())) ) { + $lang = (string) $_REQUEST["lang"]; +} + $session = new SeedDMS_Session($db); // TODO: by the PHP manual: The superglobals $_GET and $_REQUEST are already decoded. diff --git a/out/out.Clipboard.php b/out/out.Clipboard.php index bef7d4108..3d05a787b 100644 --- a/out/out.Clipboard.php +++ b/out/out.Clipboard.php @@ -33,7 +33,15 @@ require_once("inc/inc.ClassUI.php"); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); +$folder = null; +if (isset($_GET["folderid"]) && is_numeric($_GET["folderid"])) { + $folderid = intval($_GET["folderid"]); + $folder = $dms->getFolder($folderid); +} + + if($view) { + $view->setParam('folder', $folder); $view->setParam('previewWidthList', $settings->_previewWidthList); $view->setParam('timeout', $settings->_cmdTimeout); $view->setParam('xsendfile', $settings->_enableXsendfile); diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 7a042f336..318515a7c 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -141,7 +141,14 @@ background-image: linear-gradient(to bottom, #882222, #111111);; function htmlEndPage($nofooter=false) { /* {{{ */ if(!$nofooter) { - $this->footNote(); + $hookObjs = $this->getHookObjects('SeedDMS_View_Bootstrap'); + $html = $this->footNote(); + foreach($hookObjs as $hookObj) { + if (method_exists($hookObj, 'footNote')) { + $html = $hookObj->footNote($this, $html); + } + } + echo $html; if($this->params['showmissingtranslations']) { $this->missingLanguageKeys(); } @@ -220,23 +227,23 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } /* }}} */ function footNote() { /* {{{ */ - echo "
\n"; - echo '
'."\n"; - echo '
'."\n"; - echo '
'."\n"; + $html = "
\n"; + $html .= '
'."\n"; + $html .= '
'."\n"; + $html .= '
'."\n"; if ($this->params['printdisclaimer']){ - echo "
".getMLText("disclaimer")."
"; + $html .= "
".getMLText("disclaimer")."
"; } if (isset($this->params['footnote']) && strlen((string)$this->params['footnote'])>0) { - echo "
".(string)$this->params['footnote']."
"; + $html .= "
".(string)$this->params['footnote']."
"; } - echo "
\n"; - echo "
\n"; - echo "
\n"; - echo "
\n"; + $html .= "
\n"; + $html .= "
\n"; + $html .= "
\n"; + $html .= "
\n"; - return; + return $html; } /* }}} */ function contentStart() { /* {{{ */ @@ -435,7 +442,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } if($this->params['enableclipboard']) { echo "
"; - echo "
"; + echo "
"; echo "
"; }