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

This commit is contained in:
Uwe Steinmann 2023-01-06 18:55:13 +01:00
commit 8f07c2fd1f
7 changed files with 13 additions and 10 deletions

View File

@ -313,7 +313,7 @@ class SeedDMS_Core_DatabaseAccess {
switch($this->_driver) { switch($this->_driver) {
case 'mysql': case 'mysql':
$this->_conn->exec('SET NAMES utf8'); $this->_conn->exec('SET NAMES utf8');
$this->_conn->setAttribute(PDO::ATTR_AUTOCOMMIT, FALSE); // $this->_conn->setAttribute(PDO::ATTR_AUTOCOMMIT, FALSE);
/* Turn this on if you want strict checking of default values, etc. */ /* Turn this on if you want strict checking of default values, etc. */
/* $this->_conn->exec("SET SESSION sql_mode = 'STRICT_TRANS_TABLES'"); */ /* $this->_conn->exec("SET SESSION sql_mode = 'STRICT_TRANS_TABLES'"); */
/* The following is the default on Ubuntu 16.04 */ /* The following is the default on Ubuntu 16.04 */

View File

@ -58,8 +58,8 @@ class SeedDMS_ConversionServiceImageToText extends SeedDMS_ConversionServiceBase
if(isset($iptcdata[$key])) if(isset($iptcdata[$key]))
$txt .= implode(' ', $iptcdata[$key])."\n"; $txt .= implode(' ', $iptcdata[$key])."\n";
} }
$end = microtime(true);
} }
$end = microtime(true);
if($this->logger) { if($this->logger) {
$this->logger->log('Conversion from '.$this->from.' to '.$this->to.' by extracting iptc took '.($end-$start).' sec.', PEAR_LOG_INFO); $this->logger->log('Conversion from '.$this->from.' to '.$this->to.' by extracting iptc took '.($end-$start).' sec.', PEAR_LOG_INFO);
} }

View File

@ -28,7 +28,8 @@ require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php"); require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.php"); require_once("inc/inc.ClassUI.php");
require_once("inc/inc.ClassAccessOperation.php"); require_once("inc/inc.ClassAccessOperation.php");
require_once("inc/inc.Authentication.php"); // No authentication because browsers do not send cookies when fetching the opensearch desc
//require_once("inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));

View File

@ -202,7 +202,7 @@ if($fullsearch) {
$facets = $searchresult['facets']; $facets = $searchresult['facets'];
$dcount = 0; $dcount = 0;
$fcount = 0; $fcount = 0;
if($searchresult) { if($searchresult['hits']) {
foreach($searchresult['hits'] as $hit) { foreach($searchresult['hits'] as $hit) {
if($hit['document_id'][0] == 'D') { if($hit['document_id'][0] == 'D') {
if($tmp = $dms->getDocument(substr($hit['document_id'], 1))) { if($tmp = $dms->getDocument(substr($hit['document_id'], 1))) {

View File

@ -56,7 +56,7 @@ class SeedDMS_View_IndexInfo extends SeedDMS_Theme_Style {
*/ */
$terms = $index->terms(); $terms = $index->terms();
echo "<legend>".count($terms)." Terms</legend>"; echo "<legend>".count($terms)." overall Terms</legend>";
// echo "<pre>"; // echo "<pre>";
$field = ''; $field = '';
foreach($terms as $term) { foreach($terms as $term) {

View File

@ -42,9 +42,9 @@ class SeedDMS_View_OpensearchDesc extends SeedDMS_Theme_Style {
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/"> <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName><?= $sitename ?></ShortName> <ShortName><?= $sitename ?></ShortName>
<Description><?= $sitename ?></Description> <Description><?= $sitename ?></Description>
<Image height="16" width="16" type="image/x-icon"><?= "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot ?>styles/<?= $this->theme ?>/favicon.ico</Image> <Image height="16" width="16" type="image/x-icon"><?= "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot ?>views/<?= $this->theme ?>/images/favicon.ico</Image>
<Url type="text/html" method="get" template="<?= "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.Search.php?query={searchTerms}" ?>" /> <Url type="text/html" method="get" template="<?= "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.Search.php?query={searchTerms}" ?>" />
<Url type="application/x-suggestions+xml" rel="suggestions" method="get" template="<?= "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.Search.php?action=opensearchsuggestion&query={searchTerms}" ?>" /> <Url type="application/x-suggestions+xml" rel="suggestions" method="get" template="<?= "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.Search.php?action=opensearchsuggestion&amp;query={searchTerms}" ?>" />
<moz:SearchForm><?= "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.Search.php" ?></moz:SearchForm> <moz:SearchForm><?= "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.Search.php" ?></moz:SearchForm>
<OutputEncoding>UTF-8</OutputEncoding> <OutputEncoding>UTF-8</OutputEncoding>
<InputEncoding>UTF-8</InputEncoding> <InputEncoding>UTF-8</InputEncoding>

View File

@ -73,10 +73,12 @@ class SeedDMS_View_SubstituteUser extends SeedDMS_Theme_Style {
echo htmlspecialchars($currUser->getFullName())." (".htmlspecialchars($currUser->getLogin()).")"; echo htmlspecialchars($currUser->getFullName())." (".htmlspecialchars($currUser->getLogin()).")";
if($hasemail) if($hasemail)
echo "</a>"; echo "</a>";
echo "<br />"; if($currUser->getComment())
echo "<br /><small>".htmlspecialchars($currUser->getComment())."</small>";
if($hasemail) if($hasemail)
echo "<small>".htmlspecialchars($currUser->getEmail())."</small><br />"; echo "<br /><small><i class=\"fa fa-envelope-o\"></i> <a href=\"mailto:".htmlspecialchars($currUser->getEmail())."\">".htmlspecialchars($currUser->getEmail())."</a></small>";
echo "<small>".htmlspecialchars($currUser->getComment())."</small>"; if($homefolder = $currUser->getHomeFolder())
echo "<br /><small><i class=\"fa fa-folder-o\"></i> <a href=\"../out/out.ViewFolder.php?folderid=".$homefolder."\">".htmlspecialchars($dms->getFolder($homefolder)->getName())."</a></small>";
echo "</td>"; echo "</td>";
echo "<td>"; echo "<td>";
echo getMLText('role').": "; echo getMLText('role').": ";