Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2019-05-14 20:44:47 +02:00
commit 5e8c34ad54
8 changed files with 51 additions and 23 deletions

View File

@ -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
--------------------------------------------------------------------------------

View File

@ -1641,7 +1641,7 @@ remove deprecated methods SeedDMS_Core_Document::convert(), SeedDMS_Core_Documen
</notes>
</release>
<release>
<date>2018-12-18</date>
<date>2019-04-04</date>
<time>07:31:17</time>
<version>
<release>5.1.10</release>

View File

@ -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;

View File

@ -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`

View File

@ -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()));

View File

@ -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.

View File

@ -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);

View File

@ -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 "<div class=\"container-fluid\">\n";
echo '<div class="row-fluid">'."\n";
echo '<div class="span12">'."\n";
echo '<div class="alert alert-info">'."\n";
$html = "<div class=\"container-fluid\">\n";
$html .= '<div class="row-fluid">'."\n";
$html .= '<div class="span12">'."\n";
$html .= '<div class="alert alert-info">'."\n";
if ($this->params['printdisclaimer']){
echo "<div class=\"disclaimer\">".getMLText("disclaimer")."</div>";
$html .= "<div class=\"disclaimer\">".getMLText("disclaimer")."</div>";
}
if (isset($this->params['footnote']) && strlen((string)$this->params['footnote'])>0) {
echo "<div class=\"footNote\">".(string)$this->params['footnote']."</div>";
$html .= "<div class=\"footNote\">".(string)$this->params['footnote']."</div>";
}
echo "</div>\n";
echo "</div>\n";
echo "</div>\n";
echo "</div>\n";
$html .= "</div>\n";
$html .= "</div>\n";
$html .= "</div>\n";
$html .= "</div>\n";
return;
return $html;
} /* }}} */
function contentStart() { /* {{{ */
@ -435,7 +442,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
}
if($this->params['enableclipboard']) {
echo " <div id=\"menu-clipboard\">";
echo " <div class=\"ajax\" data-no-spinner=\"true\" data-view=\"Clipboard\" data-action=\"menuClipboard\"></div>";
echo " <div class=\"ajax\" data-no-spinner=\"true\" data-view=\"Clipboard\" data-action=\"menuClipboard\" data-query=\"folderid=23\"></div>";
echo " </div>";
}