From 88faf823e6bf09eb0c04c5e0293d4c3a2c346304 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 2 Nov 2022 09:57:31 +0100
Subject: [PATCH 001/247] add changes of 5.1.28
---
CHANGELOG | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG b/CHANGELOG
index aed90953d..c03837ebe 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,6 +5,7 @@
with 0 bytes was created by the user
- fix repair of wrong file extension
- fix regression in password forgotten function
+- fix security issue when creating hash in password forgotten operation
--------------------------------------------------------------------------------
Changes in version 5.1.27
From fd8de36db8e9d9a6f387184f314ecc0d8b3f113d Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 4 Nov 2022 20:38:09 +0100
Subject: [PATCH 002/247] allow facicon in extensions
---
.htaccess | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.htaccess b/.htaccess
index 4c5031251..69e29975e 100644
--- a/.htaccess
+++ b/.htaccess
@@ -8,7 +8,7 @@ Header set X-Content-Type-Options: "nosniff"
RewriteEngine On
#RewriteRule "^favicon\.ico$" "-" [L]
#RewriteRule "^(favicon\.ico)$" %{HTTP_HOST}/views/bootstrap/images/favicon.svg [L,NC]
-RewriteRule "(favicon\.ico)" /views/bootstrap/images/favicon.svg [L,NC]
+RewriteRule "^(favicon\.ico)" /views/bootstrap/images/favicon.svg [L,NC]
# Store the current location in an environment variable CWD to use
# mod_rewrite in .htaccess files without knowing the RewriteBase
@@ -32,7 +32,7 @@ RewriteRule ^ext/[^/]+/icon.(?:png|svg)$ - [L]
RewriteCond %{REQUEST_URI} "ext/[^/]+/"
RewriteRule !^ext/[^/]+/.*(?:op|out|res|node_modules) - [F]
RewriteCond %{REQUEST_URI} "ext/[^/]+/res/.*$" [NC]
-RewriteRule !^ext/[^/]+/res/.*\.(?:css|js|png|gif|svg|html|woff) - [F]
+RewriteRule !^ext/[^/]+/res/.*\.(?:css|js|png|gif|svg|ico|html|woff) - [F]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ext/.*$ - [L]
From 13099d67aa140b0e11a72d3472b5c94eddf323a9 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sat, 5 Nov 2022 16:24:39 +0100
Subject: [PATCH 003/247] add initial support for logging and notifications
---
restapi/index.php | 86 +++++++++++++++++++++++++++++++++++++++--------
1 file changed, 72 insertions(+), 14 deletions(-)
diff --git a/restapi/index.php b/restapi/index.php
index 54306dea7..f80fe80d1 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -1,11 +1,40 @@
preAddService($dms, $notifier);
+ }
+ }
+}
+
+if($settings->_enableEmail) {
+ $notifier->addService(new SeedDMS_EmailNotify($dms, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword));
+}
+
+if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
+ foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
+ if(method_exists($notificationObj, 'postAddService')) {
+ $notificationObj->postAddService($dms, $notifier);
+ }
+ }
+}
require "vendor/autoload.php";
@@ -194,10 +223,13 @@ class RestapiController { /* {{{ */
$dms = $this->container->dms;
$settings = $this->container->config;
+ $logger = $this->container->logger;
$params = $request->getParsedBody();
- if(empty($params['user']) || empty($params['pass']))
+ if(empty($params['user']) || empty($params['pass'])) {
+ $logger->log("Login without username or password failed", PEAR_LOG_INFO);
return $response->withJson(array('success'=>false, 'message'=>'No user or password given', 'data'=>''), 400);
+ }
$username = $params['user'];
$password = $params['pass'];
@@ -220,12 +252,13 @@ class RestapiController { /* {{{ */
if(!$userobj) {
setcookie("mydms_session", '', time()-3600, $settings->_httpRoot);
+ $logger->log("Login with user name '".$username."' failed", PEAR_LOG_INFO);
return $response->withJson(array('success'=>false, 'message'=>'Login failed', 'data'=>''), 403);
} else {
require_once("../inc/inc.ClassSession.php");
$session = new SeedDMS_Session($dms->getDb());
if(!$id = $session->create(array('userid'=>$userobj->getId(), 'theme'=>$userobj->getTheme(), 'lang'=>$userobj->getLanguage()))) {
- exit;
+ return $response->withJson(array('success'=>false, 'message'=>'Creating session failed', 'data'=>''), 500);
}
// Set the session cookie.
@@ -236,6 +269,7 @@ class RestapiController { /* {{{ */
setcookie("mydms_session", $id, $lifetime, $settings->_httpRoot);
$dms->setUser($userobj);
+ $logger->log("Login with user name '".$username."' successful", PEAR_LOG_INFO);
return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$this->__getUserData($userobj)), 200);
}
} /* }}} */
@@ -445,6 +479,7 @@ class RestapiController { /* {{{ */
$dms = $this->container->dms;
$userobj = $this->container->userobj;
$settings = $this->container->config;
+ $logger = $this->container->logger;
if(!$userobj) {
return $response->withJson(array('success'=>false, 'message'=>'Not logged in', 'data'=>''), 403);
@@ -472,9 +507,12 @@ class RestapiController { /* {{{ */
$sequence = 1.0;
}
$newattrs = array();
- if(!empty($params['attributes'])) {
- foreach($params['attributes'] as $attrname=>$attrvalue) {
- $attrdef = $dms->getAttributeDefinitionByName($attrname);
+ if(!empty($params['attributes'])) {
+ foreach($params['attributes'] as $attrname=>$attrvalue) {
+ if((is_int($attrname) || ctype_digit($attrname)) && ((int) $attrname) > 0)
+ $attrdef = $dms->getAttributeDefinition((int) $attrname);
+ else
+ $attrdef = $dms->getAttributeDefinitionByName($attrname);
if($attrdef) {
$newattrs[$attrdef->getID()] = $attrvalue;
}
@@ -489,6 +527,7 @@ class RestapiController { /* {{{ */
if($folder = $parent->addSubFolder($params['name'], $comment, $userobj, $sequence, $newattrs)) {
$rec = $this->__getFolderData($folder);
+ $logger->log("Creating folder '".$folder->getName()."' (".$folder->getId().") successful", PEAR_LOG_INFO);
return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$rec), 201);
} else {
return $response->withJson(array('success'=>false, 'message'=>'Could not create folder', 'data'=>''), 500);
@@ -644,7 +683,11 @@ class RestapiController { /* {{{ */
}
$attributes = isset($params["attributes"]) ? $params["attributes"] : array();
foreach($attributes as $attrdefid=>$attribute) {
- if($attrdef = $dms->getAttributeDefinition($attrdefid)) {
+ if((is_int($attrdefid) || ctype_digit($attrdefid)) && ((int) $attrdefid) > 0)
+ $attrdef = $dms->getAttributeDefinition((int) $attrdefid);
+ else
+ $attrdef = $dms->getAttributeDefinitionByName($attrdefid);
+ if($attrdef) {
if($attribute) {
if(!$attrdef->validate($attribute)) {
return $response->withJson(array('success'=>false, 'message'=>getAttributeValidationText($attrdef->getValidationError(), $attrdef->getName(), $attribute), 'data'=>''), 400);
@@ -725,7 +768,11 @@ class RestapiController { /* {{{ */
$comment = isset($params['comment']) ? $params['comment'] : null;
$attributes = isset($params["attributes"]) ? $params["attributes"] : array();
foreach($attributes as $attrdefid=>$attribute) {
- if($attrdef = $dms->getAttributeDefinition($attrdefid)) {
+ if((is_int($attrdefid) || ctype_digit($attrdefid)) && ((int) $attrdefid) > 0)
+ $attrdef = $dms->getAttributeDefinition((int) $attrdefid);
+ else
+ $attrdef = $dms->getAttributeDefinitionByName($attrdefid);
+ if($attrdef) {
if($attribute) {
if(!$attrdef->validate($attribute)) {
return $response->withJson(array('success'=>false, 'message'=>getAttributeValidationText($attrdef->getValidationError(), $attrdef->getName(), $attribute), 'data'=>''), 400);
@@ -1631,7 +1678,10 @@ class RestapiController { /* {{{ */
$query = $params['value'];
if(empty($params['limit']) || !$limit = $params['limit'])
$limit = 50;
- $attrdef = $dms->getAttributeDefinitionByName($attrname);
+ if(ctype_digit($attrname) && ((int) $attrname) > 0)
+ $attrdef = $dms->getAttributeDefinition((int) $attrname);
+ else
+ $attrdef = $dms->getAttributeDefinitionByName($attrname);
$entries = array();
if($attrdef) {
$resArr = $attrdef->getObjects($query, $limit);
@@ -2167,6 +2217,7 @@ class RestapiController { /* {{{ */
function createCategory($request, $response) { /* {{{ */
$dms = $this->container->dms;
$userobj = $this->container->userobj;
+ $logger = $this->container->logger;
$check = $this->checkIfAdmin($request, $response);
if($check !== true)
@@ -2182,6 +2233,7 @@ class RestapiController { /* {{{ */
return $response->withJson(array('success'=>false, 'message'=>'Category already exists', 'data'=>''), 409);
} else {
if($data = $dms->addDocumentCategory($params['name'])) {
+ $logger->log("Creating category '".$data->getName()."' (".$data->getId().") successful", PEAR_LOG_INFO);
return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$this->__getCategoryData($data)), 201);
} else {
return $response->withJson(array('success'=>false, 'message'=>'Could not add category', 'data'=>''), 500);
@@ -2381,6 +2433,8 @@ class Auth { /* {{{ */
// $this->container has the DI
$dms = $this->container->dms;
$settings = $this->container->config;
+ $logger = $this->container->logger;
+ $logger->log("Access with method ".$request->getMethod()." on '".$request->getUri()->getPath()."'".(isset($this->container->environment['HTTP_ORIGIN']) ? " with origin ".$this->container->environment['HTTP_ORIGIN'] : ''), PEAR_LOG_INFO);
if($settings->_apiOrigin && isset($this->container->environment['HTTP_ORIGIN'])) {
$origins = explode(',', $settings->_apiOrigin);
if(!in_array($this->container->environment['HTTP_ORIGIN'], $origins)) {
@@ -2401,6 +2455,7 @@ class Auth { /* {{{ */
} else {
return $response->withStatus(403);
}
+ $logger->log("Login with apikey as '".$userobj->getLogin()."' successful", PEAR_LOG_INFO);
} else {
require_once("../inc/inc.ClassSession.php");
$session = new SeedDMS_Session($dms->getDb());
@@ -2432,6 +2487,7 @@ class Auth { /* {{{ */
return $response->withStatus(403);
}
}
+// $logger->log("Login with user name '".$userobj->getLogin()."' successful", PEAR_LOG_INFO);
$dms->setUser($userobj);
} else {
return $response->withStatus(403);
@@ -2448,6 +2504,8 @@ $container = $app->getContainer();
$container['dms'] = $dms;
$container['config'] = $settings;
$container['conversionmgr'] = $conversionmgr;
+$container['logger'] = $logger;
+$container['fulltextservice'] = $fulltextservice;
$app->add(new Auth($container));
// Make CORS preflighted request possible
From 35b83b37dce9150d4fb114e0f81735777acaf497 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sat, 5 Nov 2022 16:29:10 +0100
Subject: [PATCH 004/247] add changes in 5.1.28
---
CHANGELOG | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG b/CHANGELOG
index c03837ebe..f08cee268 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6,6 +6,7 @@
- fix repair of wrong file extension
- fix regression in password forgotten function
- fix security issue when creating hash in password forgotten operation
+- add initial support for logging and notifications in rest api
--------------------------------------------------------------------------------
Changes in version 5.1.27
From d9ba59990f878ed561c89edf3aaf7801d8309182 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 6 Nov 2022 16:07:04 +0100
Subject: [PATCH 005/247] clear login failures after successful login
---
webdav/webdav.php | 3 +++
1 file changed, 3 insertions(+)
diff --git a/webdav/webdav.php b/webdav/webdav.php
index 4aa5fa700..7eed1e7d7 100644
--- a/webdav/webdav.php
+++ b/webdav/webdav.php
@@ -191,6 +191,9 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
if($userobj->isAdmin() && ($_SERVER['REMOTE_ADDR'] != $settings->_adminIP ) && ( $settings->_adminIP != ""))
return false;
+ /* Clear login failures if login was successful */
+ $userobj->clearLoginFailures();
+
$this->user = $userobj;
return true;
From 9869c3d8cee3af3ac35c1f0abc472caa5855453f Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 6 Nov 2022 16:07:40 +0100
Subject: [PATCH 006/247] add missing space in log message
---
webdav/webdav.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/webdav/webdav.php b/webdav/webdav.php
index 7eed1e7d7..2393f08bd 100644
--- a/webdav/webdav.php
+++ b/webdav/webdav.php
@@ -175,7 +175,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
if(!$userobj) {
if($this->logger)
- $this->logger->log('check_auth: No such user'.$user, PEAR_LOG_NOTICE);
+ $this->logger->log('check_auth: No such user '.$user, PEAR_LOG_NOTICE);
return false;
}
From 57b298c4893bbee4160ffae021d4436afda1193c Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 6 Nov 2022 16:08:57 +0100
Subject: [PATCH 007/247] invoke controller instead of calling run()
---
webdav/webdav.php | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/webdav/webdav.php b/webdav/webdav.php
index 2393f08bd..f402a9a8a 100644
--- a/webdav/webdav.php
+++ b/webdav/webdav.php
@@ -757,7 +757,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$controller->setParam('attributes', array());
$controller->setParam('workflow', $workflow);
- if(!$content = $controller->run()) {
+ if(!$content = $controller()) {
if($this->logger)
$this->logger->log('PUT: error adding new version', PEAR_LOG_ERR);
unlink($tmpFile);
@@ -853,7 +853,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$controller->setParam('notificationusers', array());
$controller->setParam('maxsizeforfulltext', $settings->_maxSizeForFullText);
$controller->setParam('defaultaccessdocs', $settings->_defaultAccessDocs);
- if(!$document = $controller->run()) {
+ if(!$document = $controller()) {
// if(!$res = $folder->addDocument($name, '', 0, $this->user, '', array(), $tmpFile, $name, $fileType, $mimetype, 0, array(), array(), 0, "")) {
unlink($tmpFile);
if($this->logger)
@@ -959,7 +959,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$controller->setParam('attributes', array());
$controller->setParam('notificationgroups', array());
$controller->setParam('notificationusers', array());
- if(!$subFolder = $controller->run()) {
+ if(!$subFolder = $controller()) {
// if (!$folder->addSubFolder($name, '', $this->user, 0)) {
return "409 Conflict ".$controller->getErrorMsg();
}
@@ -1452,8 +1452,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$controller->setParam('notificationusers', array());
$controller->setParam('maxsizeforfulltext', $settings->_maxSizeForFullText);
$controller->setParam('defaultaccessdocs', $settings->_defaultAccessDocs);
- if(!$document = $controller->run()) {
-// if(!$newdoc = $objdest->addDocument($newdocname, '', 0, $this->user, '', array(), $fspath, $content->getOriginalFileName(), $content->getFileType(), $content->getMimeType(), 0, array(), array(), 0, "")) {
+ if(!$document = $controller()) {
if($this->logger)
$this->logger->log('COPY: error copying object', PEAR_LOG_ERR);
return "409 Conflict";
From fbe6e492c8f345e9e4015224a1cdf135c6fd5bdc Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 6 Nov 2022 16:09:27 +0100
Subject: [PATCH 008/247] use methods in inc/inc.ClassNotificationService.php
it send notifications
---
webdav/webdav.php | 190 ++++------------------------------------------
1 file changed, 13 insertions(+), 177 deletions(-)
diff --git a/webdav/webdav.php b/webdav/webdav.php
index f402a9a8a..9382d6321 100644
--- a/webdav/webdav.php
+++ b/webdav/webdav.php
@@ -767,24 +767,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
if($this->notifier) {
if($this->logger)
$this->logger->log('PUT: Sending Notifications', PEAR_LOG_INFO);
- $notifyList = $document->getNotifyList();
- $folder = $document->getFolder();
-
- $subject = "document_updated_email_subject";
- $message = "document_updated_email_body";
- $params = array();
- $params['name'] = $document->getName();
- $params['folder_path'] = $folder->getFolderPathPlain();
- $params['username'] = $this->user->getFullName();
- $params['comment'] = $document->getComment();
- $params['version_comment'] = $content->getComment();
- $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
- $params['sitename'] = $settings->_siteName;
- $params['http_root'] = $settings->_httpRoot;
- $this->notifier->toList($this->user, $notifyList["users"], $subject, $message, $params);
- foreach ($notifyList["groups"] as $grp) {
- $this->notifier->toGroup($this->user, $grp, $subject, $message, $params);
- }
+ $this->notifier->sendNewDocumentVersionMail($document, $this->user);
}
}
}
@@ -863,29 +846,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
if($this->notifier) {
if($this->logger)
$this->logger->log('PUT: Sending Notifications', PEAR_LOG_INFO);
- $fnl = $folder->getNotifyList();
- $dnl = $document->getNotifyList();
- $nl = array(
- 'users'=>array_unique(array_merge($dnl['users'], $fnl['users']), SORT_REGULAR),
- 'groups'=>array_unique(array_merge($dnl['groups'], $fnl['groups']), SORT_REGULAR)
- );
-
- $subject = "new_document_email_subject";
- $message = "new_document_email_body";
- $params = array();
- $params['name'] = $name;
- $params['folder_name'] = $folder->getName();
- $params['folder_path'] = $folder->getFolderPathPlain();
- $params['username'] = $this->user->getFullName();
- $params['comment'] = '';
- $params['version_comment'] = '';
- $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
- $params['sitename'] = $settings->_siteName;
- $params['http_root'] = $settings->_httpRoot;
- $this->notifier->toList($this->user, $nl["users"], $subject, $message, $params);
- foreach ($nl["groups"] as $grp) {
- $this->notifier->toGroup($this->user, $grp, $subject, $message, $params);
- }
+ $this->notifier->sendNewDocumentMail($document, $this->user);
}
}
@@ -967,28 +928,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
if($this->notifier) {
if($this->logger)
$this->logger->log('MKCOL: Sending Notifications', PEAR_LOG_INFO);
- $fnl = $folder->getNotifyList();
- $snl = $subFolder->getNotifyList();
- $nl = array(
- 'users'=>array_unique(array_merge($snl['users'], $fnl['users']), SORT_REGULAR),
- 'groups'=>array_unique(array_merge($snl['groups'], $fnl['groups']), SORT_REGULAR)
- );
-
- $subject = "new_subfolder_email_subject";
- $message = "new_subfolder_email_body";
- $params = array();
- $params['name'] = $subFolder->getName();
- $params['folder_name'] = $folder->getName();
- $params['folder_path'] = $folder->getFolderPathPlain();
- $params['username'] = $this->user->getFullName();
- $params['comment'] = '';
- $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$subFolder->getID();
- $params['sitename'] = $settings->_siteName;
- $params['http_root'] = $settings->_httpRoot;
- $this->notifier->toList($this->user, $nl["users"], $subject, $message, $params);
- foreach ($nl["groups"] as $grp) {
- $this->notifier->toGroup($this->user, $grp, $subject, $message, $params);
- }
+ $this->notifier->sendNewFolderMail($subFolder, $this->user);
}
return ("201 Created");
@@ -1030,79 +970,37 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
return "409 Conflict";
}
- $parent = $obj->getParent();
- $fnl = $obj->getNotifyList();
- $pnl = $parent->getNotifyList();
- $nl = array(
- 'users'=>array_unique(array_merge($fnl['users'], $pnl['users']), SORT_REGULAR),
- 'groups'=>array_unique(array_merge($fnl['groups'], $pnl['groups']), SORT_REGULAR)
- );
- $foldername = $obj->getName();
-
$controller = Controller::factory('RemoveFolder');
$controller->setParam('dms', $this->dms);
$controller->setParam('user', $this->user);
$controller->setParam('folder', $obj);
$controller->setParam('fulltextservice', $fulltextservice);
- if(!$controller->run()) {
+ if(!$controller()) {
return "409 Conflict ".$controller->getErrorMsg();
}
if($this->notifier) {
if($this->logger)
$this->logger->log('DELETE: Sending Notifications', PEAR_LOG_INFO);
- $subject = "folder_deleted_email_subject";
- $message = "folder_deleted_email_body";
- $params = array();
- $params['name'] = $foldername;
- $params['folder_path'] = $parent->getFolderPathPlain();
- $params['username'] = $this->user->getFullName();
- $params['sitename'] = $settings->_siteName;
- $params['http_root'] = $settings->_httpRoot;
- $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$parent->getID();
- $this->notifier->toList($this->user, $nl["users"], $subject, $message, $params);
- foreach ($nl["groups"] as $grp) {
- $this->notifier->toGroup($this->user, $grp, $subject, $message, $params);
- }
+ $this->notifier->sendDeleteFolderMail($obj, $this->user);
}
} else {
- /* Get the notify list before removing the document
- * Also inform the users/groups of the parent folder
- */
- $folder = $obj->getFolder();
- $dnl = $obj->getNotifyList();
- $fnl = $folder->getNotifyList();
- $nl = array(
- 'users'=>array_unique(array_merge($dnl['users'], $fnl['users']), SORT_REGULAR),
- 'groups'=>array_unique(array_merge($dnl['groups'], $fnl['groups']), SORT_REGULAR)
- );
- $docname = $obj->getName();
-
$controller = Controller::factory('RemoveDocument');
$controller->setParam('dms', $this->dms);
$controller->setParam('user', $this->user);
$controller->setParam('document', $obj);
$controller->setParam('fulltextservice', $fulltextservice);
- if(!$controller->run()) {
+ if(!$controller()) {
return "409 Conflict ".$controller->getErrorMsg();
}
if($this->notifier){
if($this->logger)
$this->logger->log('DELETE: Sending Notifications', PEAR_LOG_INFO);
- $subject = "document_deleted_email_subject";
- $message = "document_deleted_email_body";
- $params = array();
- $params['name'] = $docname;
- $params['folder_path'] = $folder->getFolderPathPlain();
- $params['username'] = $this->user->getFullName();
- $params['sitename'] = $settings->_siteName;
- $params['http_root'] = $settings->_httpRoot;
- $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$folder->getID();
- $this->notifier->toList($this->user, $nl["users"], $subject, $message, $params);
- foreach ($nl["groups"] as $grp) {
- $this->notifier->toGroup($this->user, $grp, $subject, $message, $params);
- }
+ /* $obj still has the data from the just deleted document,
+ * which is just enough to send the email.
+ */
+ $this->notifier->sendDeleteDocumentMail($obj, $this->user);
}
}
@@ -1211,27 +1109,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
if($this->notifier) {
if($this->logger)
$this->logger->log('MOVE: Sending Notifications', PEAR_LOG_INFO);
- $nl1 = $oldFolder->getNotifyList();
- $nl2 = $objsource->getNotifyList();
- $nl3 = $objdest->getNotifyList();
- $nl = array(
- 'users'=>array_unique(array_merge($nl1['users'], $nl2['users'], $nl3['users']), SORT_REGULAR),
- 'groups'=>array_unique(array_merge($nl1['groups'], $nl2['groups'], $nl3['groups']), SORT_REGULAR)
- );
- $subject = "document_moved_email_subject";
- $message = "document_moved_email_body";
- $params = array();
- $params['name'] = $objsource->getName();
- $params['old_folder_path'] = $oldFolder->getFolderPathPlain();
- $params['new_folder_path'] = $objdest->getFolderPathPlain();
- $params['username'] = $this->user->getFullName();
- $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$objsource->getID();
- $params['sitename'] = $settings->_siteName;
- $params['http_root'] = $settings->_httpRoot;
- $this->notifier->toList($this->user, $nl["users"], $subject, $message, $params);
- foreach ($nl["groups"] as $grp) {
- $this->notifier->toGroup($this->user, $grp, $subject, $message, $params);
- }
+ $this->notifier->sendMovedDocumentMail($objsource, $this->user, $oldFolder);
}
} else {
return "500 Internal server error";
@@ -1254,27 +1132,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
if($this->notifier) {
if($this->logger)
$this->logger->log('MOVE: Sending Notifications', PEAR_LOG_INFO);
- $nl1 = $oldFolder->getNotifyList();
- $nl2 = $objsource->getNotifyList();
- $nl3 = $objdest->getNotifyList();
- $nl = array(
- 'users'=>array_unique(array_merge($nl1['users'], $nl2['users'], $nl3['users']), SORT_REGULAR),
- 'groups'=>array_unique(array_merge($nl1['groups'], $nl2['groups'], $nl3['groups']), SORT_REGULAR)
- );
- $subject = "folder_moved_email_subject";
- $message = "folder_moved_email_body";
- $params = array();
- $params['name'] = $objsource->getName();
- $params['old_folder_path'] = $oldFolder->getFolderPathPlain();
- $params['new_folder_path'] = $objdest->getFolderPathPlain();
- $params['username'] = $this->user->getFullName();
- $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$objsource->getID();
- $params['sitename'] = $settings->_siteName;
- $params['http_root'] = $settings->_httpRoot;
- $this->notifier->toList($this->user, $nl["users"], $subject, $message, $params);
- foreach ($nl["groups"] as $grp) {
- $this->notifier->toGroup($this->user, $grp, $subject, $message, $params);
- }
+ $this->notifier->sendMovedFolderMail($objsource, $this->user, $oldFolder);
}
} else {
return "500 Internal server error";
@@ -1461,29 +1319,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
if($this->notifier) {
if($this->logger)
$this->logger->log('COPY: Sending Notifications', PEAR_LOG_INFO);
- $fnl = $objdest->getNotifyList();
- $dnl = $document->getNotifyList();
- $nl = array(
- 'users'=>array_unique(array_merge($dnl['users'], $fnl['users']), SORT_REGULAR),
- 'groups'=>array_unique(array_merge($dnl['groups'], $fnl['groups']), SORT_REGULAR)
- );
-
- $subject = "new_document_email_subject";
- $message = "new_document_email_body";
- $params = array();
- $params['name'] = $newdocname;
- $params['folder_name'] = $objdest->getName();
- $params['folder_path'] = $objdest->getFolderPathPlain();
- $params['username'] = $this->user->getFullName();
- $params['comment'] = '';
- $params['version_comment'] = '';
- $params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
- $params['sitename'] = $settings->_siteName;
- $params['http_root'] = $settings->_httpRoot;
- $this->notifier->toList($this->user, $nl["users"], $subject, $message, $params);
- foreach ($nl["groups"] as $grp) {
- $this->notifier->toGroup($this->user, $grp, $subject, $message, $params);
- }
+ $this->notifier->sendNewDocumentMail($document, $this->user);
}
return "201 Created";
}
From 441d8d6c0fda7cd38e6dfebe86a6efdbe0e21088 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 6 Nov 2022 16:09:46 +0100
Subject: [PATCH 009/247] add changes of 5.1.28
---
CHANGELOG | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CHANGELOG b/CHANGELOG
index f08cee268..e43986e67 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,6 +7,8 @@
- fix regression in password forgotten function
- fix security issue when creating hash in password forgotten operation
- add initial support for logging and notifications in rest api
+- use methods in inc/inc.ClassNotificationService.php for webdav
+- clear login failures when login by webdav succeeds
--------------------------------------------------------------------------------
Changes in version 5.1.27
From 257c23aead1ec670e3c9ec1fc063bb3e65db0e06 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 6 Nov 2022 16:38:56 +0100
Subject: [PATCH 010/247] fix indenting of lines
---
restapi/index.php | 66 +++++++++++++++++++++++------------------------
1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/restapi/index.php b/restapi/index.php
index f80fe80d1..db1b6eabc 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -17,23 +17,23 @@ require_once("../inc/inc.ClassController.php");
$notifier = new SeedDMS_NotificationService($logger, $settings);
if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
- foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
- if(method_exists($notificationObj, 'preAddService')) {
- $notificationObj->preAddService($dms, $notifier);
- }
- }
+ foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
+ if(method_exists($notificationObj, 'preAddService')) {
+ $notificationObj->preAddService($dms, $notifier);
+ }
+ }
}
if($settings->_enableEmail) {
- $notifier->addService(new SeedDMS_EmailNotify($dms, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword));
+ $notifier->addService(new SeedDMS_EmailNotify($dms, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword));
}
if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
- foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
- if(method_exists($notificationObj, 'postAddService')) {
- $notificationObj->postAddService($dms, $notifier);
- }
- }
+ foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) {
+ if(method_exists($notificationObj, 'postAddService')) {
+ $notificationObj->postAddService($dms, $notifier);
+ }
+ }
}
require "vendor/autoload.php";
@@ -269,7 +269,7 @@ class RestapiController { /* {{{ */
setcookie("mydms_session", $id, $lifetime, $settings->_httpRoot);
$dms->setUser($userobj);
- $logger->log("Login with user name '".$username."' successful", PEAR_LOG_INFO);
+ $logger->log("Login with user name '".$username."' successful", PEAR_LOG_INFO);
return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$this->__getUserData($userobj)), 200);
}
} /* }}} */
@@ -507,12 +507,12 @@ class RestapiController { /* {{{ */
$sequence = 1.0;
}
$newattrs = array();
- if(!empty($params['attributes'])) {
- foreach($params['attributes'] as $attrname=>$attrvalue) {
- if((is_int($attrname) || ctype_digit($attrname)) && ((int) $attrname) > 0)
- $attrdef = $dms->getAttributeDefinition((int) $attrname);
- else
- $attrdef = $dms->getAttributeDefinitionByName($attrname);
+ if(!empty($params['attributes'])) {
+ foreach($params['attributes'] as $attrname=>$attrvalue) {
+ if((is_int($attrname) || ctype_digit($attrname)) && ((int) $attrname) > 0)
+ $attrdef = $dms->getAttributeDefinition((int) $attrname);
+ else
+ $attrdef = $dms->getAttributeDefinitionByName($attrname);
if($attrdef) {
$newattrs[$attrdef->getID()] = $attrvalue;
}
@@ -527,7 +527,7 @@ class RestapiController { /* {{{ */
if($folder = $parent->addSubFolder($params['name'], $comment, $userobj, $sequence, $newattrs)) {
$rec = $this->__getFolderData($folder);
- $logger->log("Creating folder '".$folder->getName()."' (".$folder->getId().") successful", PEAR_LOG_INFO);
+ $logger->log("Creating folder '".$folder->getName()."' (".$folder->getId().") successful", PEAR_LOG_INFO);
return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$rec), 201);
} else {
return $response->withJson(array('success'=>false, 'message'=>'Could not create folder', 'data'=>''), 500);
@@ -683,10 +683,10 @@ class RestapiController { /* {{{ */
}
$attributes = isset($params["attributes"]) ? $params["attributes"] : array();
foreach($attributes as $attrdefid=>$attribute) {
- if((is_int($attrdefid) || ctype_digit($attrdefid)) && ((int) $attrdefid) > 0)
- $attrdef = $dms->getAttributeDefinition((int) $attrdefid);
- else
- $attrdef = $dms->getAttributeDefinitionByName($attrdefid);
+ if((is_int($attrdefid) || ctype_digit($attrdefid)) && ((int) $attrdefid) > 0)
+ $attrdef = $dms->getAttributeDefinition((int) $attrdefid);
+ else
+ $attrdef = $dms->getAttributeDefinitionByName($attrdefid);
if($attrdef) {
if($attribute) {
if(!$attrdef->validate($attribute)) {
@@ -768,10 +768,10 @@ class RestapiController { /* {{{ */
$comment = isset($params['comment']) ? $params['comment'] : null;
$attributes = isset($params["attributes"]) ? $params["attributes"] : array();
foreach($attributes as $attrdefid=>$attribute) {
- if((is_int($attrdefid) || ctype_digit($attrdefid)) && ((int) $attrdefid) > 0)
- $attrdef = $dms->getAttributeDefinition((int) $attrdefid);
- else
- $attrdef = $dms->getAttributeDefinitionByName($attrdefid);
+ if((is_int($attrdefid) || ctype_digit($attrdefid)) && ((int) $attrdefid) > 0)
+ $attrdef = $dms->getAttributeDefinition((int) $attrdefid);
+ else
+ $attrdef = $dms->getAttributeDefinitionByName($attrdefid);
if($attrdef) {
if($attribute) {
if(!$attrdef->validate($attribute)) {
@@ -1678,10 +1678,10 @@ class RestapiController { /* {{{ */
$query = $params['value'];
if(empty($params['limit']) || !$limit = $params['limit'])
$limit = 50;
- if(ctype_digit($attrname) && ((int) $attrname) > 0)
- $attrdef = $dms->getAttributeDefinition((int) $attrname);
- else
- $attrdef = $dms->getAttributeDefinitionByName($attrname);
+ if(ctype_digit($attrname) && ((int) $attrname) > 0)
+ $attrdef = $dms->getAttributeDefinition((int) $attrname);
+ else
+ $attrdef = $dms->getAttributeDefinitionByName($attrname);
$entries = array();
if($attrdef) {
$resArr = $attrdef->getObjects($query, $limit);
@@ -2455,7 +2455,7 @@ class Auth { /* {{{ */
} else {
return $response->withStatus(403);
}
- $logger->log("Login with apikey as '".$userobj->getLogin()."' successful", PEAR_LOG_INFO);
+ $logger->log("Login with apikey as '".$userobj->getLogin()."' successful", PEAR_LOG_INFO);
} else {
require_once("../inc/inc.ClassSession.php");
$session = new SeedDMS_Session($dms->getDb());
@@ -2487,7 +2487,7 @@ class Auth { /* {{{ */
return $response->withStatus(403);
}
}
-// $logger->log("Login with user name '".$userobj->getLogin()."' successful", PEAR_LOG_INFO);
+// $logger->log("Login with user name '".$userobj->getLogin()."' successful", PEAR_LOG_INFO);
$dms->setUser($userobj);
} else {
return $response->withStatus(403);
From 0e1b00d0b5fb882855d40b88af4c9ea625f3340b Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 6 Nov 2022 17:02:38 +0100
Subject: [PATCH 011/247] use controller to create subfolder, send
notifications
---
restapi/index.php | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/restapi/index.php b/restapi/index.php
index db1b6eabc..4ab5d1c26 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -480,6 +480,8 @@ class RestapiController { /* {{{ */
$userobj = $this->container->userobj;
$settings = $this->container->config;
$logger = $this->container->logger;
+ $fulltextservice = $this->container->fulltextservice;
+ $notifier = $this->container->notifier;
if(!$userobj) {
return $response->withJson(array('success'=>false, 'message'=>'Not logged in', 'data'=>''), 403);
@@ -524,10 +526,24 @@ class RestapiController { /* {{{ */
return $response->withJson(array('success'=>false, 'message'=>getMLText("subfolder_duplicate_name"), 'data'=>''), 409);
}
}
- if($folder = $parent->addSubFolder($params['name'], $comment, $userobj, $sequence, $newattrs)) {
- $rec = $this->__getFolderData($folder);
- $logger->log("Creating folder '".$folder->getName()."' (".$folder->getId().") successful", PEAR_LOG_INFO);
+ $controller = Controller::factory('AddSubFolder');
+ $controller->setParam('dms', $dms);
+ $controller->setParam('user', $userobj);
+ $controller->setParam('fulltextservice', $fulltextservice);
+ $controller->setParam('folder', $parent);
+ $controller->setParam('name', $params['name']);
+ $controller->setParam('comment', $comment);
+ $controller->setParam('sequence', $sequence);
+ $controller->setParam('attributes', $newattrs);
+ $controller->setParam('notificationgroups', []);
+ $controller->setParam('notificationusers', []);
+ if($folder = $controller()) {
+ $rec = $this->__getFolderData($folder);
+ $logger->log("Creating folder '".$folder->getName()."' (".$folder->getId().") successful", PEAR_LOG_INFO);
+ if($notifier) {
+ $notifier->sendNewFolderMail($folder, $userobj);
+ }
return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$rec), 201);
} else {
return $response->withJson(array('success'=>false, 'message'=>'Could not create folder', 'data'=>''), 500);
@@ -2506,6 +2522,7 @@ $container['config'] = $settings;
$container['conversionmgr'] = $conversionmgr;
$container['logger'] = $logger;
$container['fulltextservice'] = $fulltextservice;
+$container['notifier'] = $notifier;
$app->add(new Auth($container));
// Make CORS preflighted request possible
From 1ec3367695bcf9db90a02ba14c80238999435211 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 6 Nov 2022 20:03:12 +0100
Subject: [PATCH 012/247] fix line indenting
---
SeedDMS_Core/Core/inc.ClassObject.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/SeedDMS_Core/Core/inc.ClassObject.php b/SeedDMS_Core/Core/inc.ClassObject.php
index a2f0b1ae4..ec1fa3124 100644
--- a/SeedDMS_Core/Core/inc.ClassObject.php
+++ b/SeedDMS_Core/Core/inc.ClassObject.php
@@ -38,10 +38,10 @@ class SeedDMS_Core_Object { /* {{{ */
*/
public $_dms;
- /**
- * SeedDMS_Core_Object constructor.
- * @param $id
- */
+ /**
+ * SeedDMS_Core_Object constructor.
+ * @param $id
+ */
function __construct($id) { /* {{{ */
$this->_id = $id;
$this->_dms = null;
From a5802ad3e8de492863a95663b78f6535774222b5 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 6 Nov 2022 20:03:58 +0100
Subject: [PATCH 013/247] add route /document/{id}/attribute/{attrdefid}
---
restapi/index.php | 51 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/restapi/index.php b/restapi/index.php
index 4ab5d1c26..438761b7d 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -1559,6 +1559,56 @@ class RestapiController { /* {{{ */
}
} /* }}} */
+ function setDocumentAttribute($request, $response, $args) { /* {{{ */
+ $dms = $this->container->dms;
+ $userobj = $this->container->userobj;
+
+ if(!$userobj) {
+ return $response->withJson(array('success'=>false, 'message'=>'Not logged in', 'data'=>''), 403);
+ return;
+ }
+
+ if(!ctype_digit($args['id']) || $args['id'] == 0) {
+ return $response->withJson(array('success'=>false, 'message'=>'No document given', 'data'=>''), 400);
+ return;
+ }
+ if(!ctype_digit($args['attrdefid']) || $args['attrdefid'] == 0) {
+ return $response->withJson(array('success'=>false, 'message'=>'No attribute definition id given', 'data'=>''), 400);
+ return;
+ }
+ $attrdef = $dms->getAttributeDefinition($args['attrdefid']);
+ $doc = $dms->getDocument($args['id']);
+ if($doc && $attrdef) {
+ if($attrdef->getObjType() !== SeedDMS_Core_AttributeDefinition::objtype_document) {
+ return $response->withJson(array('success'=>false, 'message'=>'Attribute definition not suitable for documents', 'data'=>''), 500);
+ }
+
+ $params = $request->getParsedBody();
+ $new = $doc->getAttributeValue($attrdef) ? true : false;
+ if(!$attrdef->validate($params['value'], $doc, $new)) {
+ return $response->withJson(array('success'=>false, 'message'=>'Validation of attribute value failed: '.$attrdef->getValidationError(), 'data'=>''), 500);
+ }
+ if($doc->getAccessMode($userobj, 'setDocumentAttribute') > M_READ) {
+ if ($doc->setAttributeValue($attrdef, $params['value'])) {
+ return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>''), 201);
+ } else {
+ return $response->withJson(array('success'=>false, 'message'=>'Could not set attribute value of document', 'data'=>''), 500);
+ }
+ } else {
+ return $response->withJson(array('success'=>false, 'message'=>'No access on document', 'data'=>''), 403);
+ }
+ } else {
+ if(!$doc)
+ return $response->withJson(array('success'=>false, 'message'=>'No such document', 'data'=>''), 404);
+ if(!$attrdef)
+ return $response->withJson(array('success'=>false, 'message'=>'No such attr definition', 'data'=>''), 404);
+ return $response->withJson(array('success'=>false, 'message'=>'Could not find user or document', 'data'=>''), 500);
+ }
+
+ $data = $this->__getDocumentData($doc);
+ return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$data), 200);
+ } /* }}} */
+
function getAccount($request, $response) { /* {{{ */
$dms = $this->container->dms;
$userobj = $this->container->userobj;
@@ -2575,6 +2625,7 @@ $app->delete('/document/{id}/categories', \RestapiController::class.':removeDocu
$app->delete('/document/{id}/category/{catid}', \RestapiController::class.':removeDocumentCategory');
$app->post('/document/{id}/category/{catid}', \RestapiController::class.':addDocumentCategory');
$app->put('/document/{id}/owner/{userid}', \RestapiController::class.':setDocumentOwner');
+$app->put('/document/{id}/attribute/{attrdefid}', \RestapiController::class.':setDocumentAttribute');
$app->put('/account/fullname', \RestapiController::class.':setFullName');
$app->put('/account/email', \RestapiController::class.':setEmail');
$app->get('/account/documents/locked', \RestapiController::class.':getLockedDocuments');
From 7cba489f1a18f378ecb2684b353ee054bb0ca89a Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 6 Nov 2022 20:04:12 +0100
Subject: [PATCH 014/247] fix typo
---
SeedDMS_Core/Core/inc.ClassAttribute.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SeedDMS_Core/Core/inc.ClassAttribute.php b/SeedDMS_Core/Core/inc.ClassAttribute.php
index a474783b3..779673389 100644
--- a/SeedDMS_Core/Core/inc.ClassAttribute.php
+++ b/SeedDMS_Core/Core/inc.ClassAttribute.php
@@ -1204,7 +1204,7 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */
* @param boolean $new set to true if the value is new value and not taken from
* an existing attribute
* (this will only be passed to the onAttributeValidate callback)
- * @return boolean true if validation succeds, otherwise false
+ * @return boolean true if validation succeeds, otherwise false
*/
function validate($attrvalue, $object=null, $new=false) { /* {{{ */
/* Check if 'onAttributeValidate' callback is set */
From 239487e198c5c0215eae4417f4dd9d23e33a900f Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 7 Nov 2022 12:13:15 +0100
Subject: [PATCH 015/247] fix sql error when deleting a folder attribute
---
SeedDMS_Core/Core/inc.ClassAttribute.php | 2 +-
SeedDMS_Core/package.xml | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/SeedDMS_Core/Core/inc.ClassAttribute.php b/SeedDMS_Core/Core/inc.ClassAttribute.php
index 779673389..93f8a3e41 100644
--- a/SeedDMS_Core/Core/inc.ClassAttribute.php
+++ b/SeedDMS_Core/Core/inc.ClassAttribute.php
@@ -247,7 +247,7 @@ class SeedDMS_Core_Attribute { /* {{{ */
break;
case $this->_dms->getClassname('folder'):
if(trim($value) === '')
- $queryStr = "DELETE FROM `tblFolderAttributes WHERE` `folder` = " . $this->_obj->getID() . " AND `attrdef` = " . $this->_attrdef->getId();
+ $queryStr = "DELETE FROM `tblFolderAttributes` WHERE `folder` = " . $this->_obj->getID() . " AND `attrdef` = " . $this->_attrdef->getId();
else
$queryStr = "UPDATE `tblFolderAttributes` SET `value` = ".$db->qstr($value)." WHERE `folder` = " . $this->_obj->getID() . " AND `attrdef` = " . $this->_attrdef->getId();
break;
diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml
index e384b9ad2..83473231c 100644
--- a/SeedDMS_Core/package.xml
+++ b/SeedDMS_Core/package.xml
@@ -12,7 +12,7 @@
uwe@steinmann.cx
yes
- 2022-09-24
+ 2022-11-07
13:44:55
5.1.28
@@ -27,6 +27,7 @@
- fix SeedDMS_Core_User::getDocumentContents()
- fix SeedDMS_Core_File::fileExtension()
- SeedDMS_Core_DMS::createPasswordRequest() creates a cryptographically secure hash
+- fix sql error when deleting a folder attribute
From b068c385e7f43ed7523cdb87e9752c660796da4a Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 7 Nov 2022 12:16:10 +0100
Subject: [PATCH 016/247] add new method __getAttributesData()
---
restapi/index.php | 49 +++++++++++++++++++++++------------------------
1 file changed, 24 insertions(+), 25 deletions(-)
diff --git a/restapi/index.php b/restapi/index.php
index 438761b7d..cb7ad9bbf 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -48,6 +48,22 @@ class RestapiController { /* {{{ */
$this->container = $container;
}
+ protected function __getAttributesData($obj) { /* {{{ */
+ $attributes = $obj->getAttributes();
+ $attrvalues = array();
+ if($attributes) {
+ foreach($attributes as $attrdefid=>$attribute) {
+ $attrdef = $attribute->getAttributeDefinition();
+ $attrvalues[] = array(
+ 'id'=>$attrdef->getId(),
+ 'name'=>$attrdef->getName(),
+ 'value'=>$attribute->getValue()
+ );
+ }
+ }
+ return $attrvalues;
+ }
+
protected function __getDocumentData($document) { /* {{{ */
$data = array(
'type'=>'document',
@@ -87,19 +103,13 @@ class RestapiController { /* {{{ */
}
$data['categories'] = $c;
}
- $attributes = $document->getAttributes();
+ $attributes = $this->__getAttributesData($document);
if($attributes) {
- $attrvalues = array();
- foreach($attributes as $attrdefid=>$attribute)
- $attrvalues[] = array('id'=>(int)$attrdefid, 'value'=>$attribute->getValue());
- $data['attributes'] = $attrvalues;
+ $data['attributes'] = $attributes;
}
- $attributes = $lc->getAttributes();
+ $attributes = $this->__getAttributesData($lc);
if($attributes) {
- $attrvalues = array();
- foreach($attributes as $attrdefid=>$attribute)
- $attrvalues[] = array('id'=>(int)$attrdefid, 'value'=>$attribute->getValue());
- $data['version-attributes'] = $attrvalues;
+ $data['version-attributes'] = $attributes;
}
return $data;
} /* }}} */
@@ -146,12 +156,9 @@ class RestapiController { /* {{{ */
'comment'=>$folder->getComment(),
'date'=>date('Y-m-d H:i:s', $folder->getDate()),
);
- $attributes = $folder->getAttributes();
+ $attributes = $this->__getAttributesData($folder);
if($attributes) {
- $attrvalues = array();
- foreach($attributes as $attrdefid=>$attribute)
- $attrvalues[] = array('id'=>(int)$attrdefid, 'value'=>$attribute->getValue());
- $data['attributes'] = $attrvalues;
+ $data['attributes'] = $attributes;
}
return $data;
} /* }}} */
@@ -421,16 +428,8 @@ class RestapiController { /* {{{ */
$folder = $dms->getFolder($args['id']);
if($folder) {
if ($folder->getAccessMode($userobj) >= M_READ) {
- $recs = array();
- $attributes = $folder->getAttributes();
- foreach($attributes as $attribute) {
- $recs[] = array(
- 'id'=>(int)$attribute->getId(),
- 'value'=>$attribute->getValue(),
- 'name'=>$attribute->getAttributeDefinition()->getName(),
- );
- }
- return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$recs), 200);
+ $attributes = $this->__getAttributesData($folder);
+ return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$attributes), 200);
} else {
return $response->withJson(array('success'=>false, 'message'=>'No access', 'data'=>''), 403);
}
From 8484d3897449fa004acdbcf06a4e5d967ac5cee3 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 7 Nov 2022 12:17:03 +0100
Subject: [PATCH 017/247] add new method getDocumentContentAttributes()
---
restapi/index.php | 41 ++++++++++++++++++++++++++++++++---------
1 file changed, 32 insertions(+), 9 deletions(-)
diff --git a/restapi/index.php b/restapi/index.php
index cb7ad9bbf..445f7aa72 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -1343,16 +1343,39 @@ class RestapiController { /* {{{ */
$document = $dms->getDocument($args['id']);
if($document) {
if ($document->getAccessMode($userobj) >= M_READ) {
- $recs = array();
- $attributes = $document->getAttributes();
- foreach($attributes as $attribute) {
- $recs[] = array(
- 'id'=>(int)$attribute->getId(),
- 'value'=>$attribute->getValue(),
- 'name'=>$attribute->getAttributeDefinition()->getName(),
- );
+ $attributes = $this->__getAttributesData($document);
+ return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$attributes), 200);
+ } else {
+ return $response->withJson(array('success'=>false, 'message'=>'No access', 'data'=>''), 403);
+ }
+ } else {
+ if($document === null)
+ $status=404;
+ else
+ $status=500;
+ return $response->withJson(array('success'=>false, 'message'=>'No document', 'data'=>''), $status);
+ }
+ } /* }}} */
+
+ function getDocumentContentAttributes($request, $response, $args) { /* {{{ */
+ $dms = $this->container->dms;
+ $userobj = $this->container->userobj;
+
+ $document = $dms->getDocument($args['id']);
+ if($document) {
+ if ($document->getAccessMode($userobj) >= M_READ) {
+
+ $version = $document->getContentByVersion($args['version']);
+ if($version) {
+ if($version->getAccessMode($userobj) >= M_READ) {
+ $attributes = $this->__getAttributesData($version);
+ return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$attributes), 200);
+ } else {
+ return $response->withJson(array('success'=>false, 'message'=>'No access on version', 'data'=>''), 403);
+ }
+ } else {
+ return $response->withJson(array('success'=>false, 'message'=>'No version', 'data'=>''), 404);
}
- return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$recs), 200);
} else {
return $response->withJson(array('success'=>false, 'message'=>'No access', 'data'=>''), 403);
}
From 6d13883e8f392fa74a6176ab9fecd10c912c1d49 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 7 Nov 2022 12:18:26 +0100
Subject: [PATCH 018/247] add logging and fix status codes in
setDocumentAttribute()
---
restapi/index.php | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/restapi/index.php b/restapi/index.php
index 445f7aa72..a4e750eb5 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -1584,6 +1584,7 @@ class RestapiController { /* {{{ */
function setDocumentAttribute($request, $response, $args) { /* {{{ */
$dms = $this->container->dms;
$userobj = $this->container->userobj;
+ $logger = $this->container->logger;
if(!$userobj) {
return $response->withJson(array('success'=>false, 'message'=>'Not logged in', 'data'=>''), 403);
@@ -1602,16 +1603,20 @@ class RestapiController { /* {{{ */
$doc = $dms->getDocument($args['id']);
if($doc && $attrdef) {
if($attrdef->getObjType() !== SeedDMS_Core_AttributeDefinition::objtype_document) {
- return $response->withJson(array('success'=>false, 'message'=>'Attribute definition not suitable for documents', 'data'=>''), 500);
+ return $response->withJson(array('success'=>false, 'message'=>'Attribute definition not suitable for documents', 'data'=>''), 409);
}
$params = $request->getParsedBody();
+ if(!isset($params['value'])) {
+ return $response->withJson(array('success'=>false, 'message'=>'Attribute value not set', 'data'=>''), 400);
+ }
$new = $doc->getAttributeValue($attrdef) ? true : false;
if(!$attrdef->validate($params['value'], $doc, $new)) {
- return $response->withJson(array('success'=>false, 'message'=>'Validation of attribute value failed: '.$attrdef->getValidationError(), 'data'=>''), 500);
+ return $response->withJson(array('success'=>false, 'message'=>'Validation of attribute value failed: '.$attrdef->getValidationError(), 'data'=>''), 400);
}
if($doc->getAccessMode($userobj, 'setDocumentAttribute') > M_READ) {
if ($doc->setAttributeValue($attrdef, $params['value'])) {
+ $logger->log("Setting attribute '".$attrdef->getName()."' (".$attrdef->getId().") to '".$params['value']."' successful", PEAR_LOG_INFO);
return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>''), 201);
} else {
return $response->withJson(array('success'=>false, 'message'=>'Could not set attribute value of document', 'data'=>''), 500);
From 196fa91a27d181cd9be48c2a99b36fd36cd5a56a Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 7 Nov 2022 12:19:07 +0100
Subject: [PATCH 019/247] add method setDocumentContentAttribute()
---
restapi/index.php | 114 +++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 112 insertions(+), 2 deletions(-)
diff --git a/restapi/index.php b/restapi/index.php
index a4e750eb5..8774fa5ae 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -1631,9 +1631,119 @@ class RestapiController { /* {{{ */
return $response->withJson(array('success'=>false, 'message'=>'No such attr definition', 'data'=>''), 404);
return $response->withJson(array('success'=>false, 'message'=>'Could not find user or document', 'data'=>''), 500);
}
+ } /* }}} */
- $data = $this->__getDocumentData($doc);
- return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$data), 200);
+ function setDocumentContentAttribute($request, $response, $args) { /* {{{ */
+ $dms = $this->container->dms;
+ $userobj = $this->container->userobj;
+ $logger = $this->container->logger;
+
+ if(!$userobj) {
+ return $response->withJson(array('success'=>false, 'message'=>'Not logged in', 'data'=>''), 403);
+ return;
+ }
+
+ if(!ctype_digit($args['id']) || $args['id'] == 0) {
+ return $response->withJson(array('success'=>false, 'message'=>'No document given', 'data'=>''), 400);
+ return;
+ }
+ if(!ctype_digit($args['version']) || $args['version'] == 0) {
+ return $response->withJson(array('success'=>false, 'message'=>'No version number given', 'data'=>''), 400);
+ return;
+ }
+ if(!ctype_digit($args['attrdefid']) || $args['attrdefid'] == 0) {
+ return $response->withJson(array('success'=>false, 'message'=>'No attribute definition id given', 'data'=>''), 400);
+ return;
+ }
+ $attrdef = $dms->getAttributeDefinition($args['attrdefid']);
+ if($doc = $dms->getDocument($args['id']))
+ $version = $doc->getContentByVersion($args['version']);
+ if($doc && $attrdef && $version) {
+ if($attrdef->getObjType() !== SeedDMS_Core_AttributeDefinition::objtype_documentcontent) {
+ return $response->withJson(array('success'=>false, 'message'=>'Attribute definition not suitable for document versions', 'data'=>''), 409);
+ }
+
+ $params = $request->getParsedBody();
+ if(!isset($params['value'])) {
+ return $response->withJson(array('success'=>false, 'message'=>'Attribute value not set', 'data'=>''), 400);
+ }
+ $new = $version->getAttributeValue($attrdef) ? true : false;
+ if(!$attrdef->validate($params['value'], $version, $new)) {
+ return $response->withJson(array('success'=>false, 'message'=>'Validation of attribute value failed: '.$attrdef->getValidationError(), 'data'=>''), 400);
+ }
+ if($doc->getAccessMode($userobj, 'setDocumentContentAttribute') > M_READ) {
+ if ($version->setAttributeValue($attrdef, $params['value'])) {
+ $logger->log("Setting attribute '".$attrdef->getName()."' (".$attrdef->getId().") to '".$params['value']."' successful", PEAR_LOG_INFO);
+ return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>''), 201);
+ } else {
+ return $response->withJson(array('success'=>false, 'message'=>'Could not set attribute value of document content', 'data'=>''), 500);
+ }
+ } else {
+ return $response->withJson(array('success'=>false, 'message'=>'No access on document', 'data'=>''), 403);
+ }
+ } else {
+ if(!$doc)
+ return $response->withJson(array('success'=>false, 'message'=>'No such document', 'data'=>''), 404);
+ if(!$version)
+ return $response->withJson(array('success'=>false, 'message'=>'No such version', 'data'=>''), 404);
+ if(!$attrdef)
+ return $response->withJson(array('success'=>false, 'message'=>'No such attr definition', 'data'=>''), 404);
+ return $response->withJson(array('success'=>false, 'message'=>'Could not find user or document', 'data'=>''), 500);
+ }
+ } /* }}} */
+
+ function setFolderAttribute($request, $response, $args) { /* {{{ */
+ $dms = $this->container->dms;
+ $userobj = $this->container->userobj;
+ $logger = $this->container->logger;
+
+ if(!$userobj) {
+ return $response->withJson(array('success'=>false, 'message'=>'Not logged in', 'data'=>''), 403);
+ return;
+ }
+
+ if(!ctype_digit($args['id']) || $args['id'] == 0) {
+ return $response->withJson(array('success'=>false, 'message'=>'No folder given', 'data'=>''), 400);
+ return;
+ }
+ if(!ctype_digit($args['attrdefid']) || $args['attrdefid'] == 0) {
+ return $response->withJson(array('success'=>false, 'message'=>'No attribute definition id given', 'data'=>''), 400);
+ return;
+ }
+ $attrdef = $dms->getAttributeDefinition($args['attrdefid']);
+ $obj = $dms->getFolder($args['id']);
+ if($obj && $attrdef) {
+ if($attrdef->getObjType() !== SeedDMS_Core_AttributeDefinition::objtype_folder) {
+ return $response->withJson(array('success'=>false, 'message'=>'Attribute definition not suitable for folders', 'data'=>''), 409);
+ }
+
+ $params = $request->getParsedBody();
+ if(!isset($params['value'])) {
+ return $response->withJson(array('success'=>false, 'message'=>'Attribute value not set', 'data'=>''.$request->getHeader('Content-Type')[0]), 400);
+ }
+ if(strlen($params['value'])) {
+ $new = $obj->getAttributeValue($attrdef) ? true : false;
+ if(!$attrdef->validate($params['value'], $obj, $new)) {
+ return $response->withJson(array('success'=>false, 'message'=>'Validation of attribute value failed: '.$attrdef->getValidationError(), 'data'=>''), 400);
+ }
+ }
+ if($obj->getAccessMode($userobj, 'setFolderAttribute') > M_READ) {
+ if ($obj->setAttributeValue($attrdef, $params['value'])) {
+ $logger->log("Setting attribute '".$attrdef->getName()."' (".$attrdef->getId().") to '".$params['value']."' successful", PEAR_LOG_INFO);
+ return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>''), 201);
+ } else {
+ return $response->withJson(array('success'=>false, 'message'=>'Could not set attribute value of folder', 'data'=>''), 500);
+ }
+ } else {
+ return $response->withJson(array('success'=>false, 'message'=>'No access on folder', 'data'=>''), 403);
+ }
+ } else {
+ if(!$obj)
+ return $response->withJson(array('success'=>false, 'message'=>'No such folder', 'data'=>''), 404);
+ if(!$attrdef)
+ return $response->withJson(array('success'=>false, 'message'=>'No such attr definition', 'data'=>''), 404);
+ return $response->withJson(array('success'=>false, 'message'=>'Could not find user or folder', 'data'=>''), 500);
+ }
} /* }}} */
function getAccount($request, $response) { /* {{{ */
From 31e47d4fbebab360c2667415147efa0acf84cebd Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 7 Nov 2022 12:19:58 +0100
Subject: [PATCH 020/247] do more logging during authentication
---
restapi/index.php | 3 +++
1 file changed, 3 insertions(+)
diff --git a/restapi/index.php b/restapi/index.php
index 8774fa5ae..354b26e22 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -2639,6 +2639,7 @@ class Auth { /* {{{ */
$logger = $this->container->logger;
$logger->log("Access with method ".$request->getMethod()." on '".$request->getUri()->getPath()."'".(isset($this->container->environment['HTTP_ORIGIN']) ? " with origin ".$this->container->environment['HTTP_ORIGIN'] : ''), PEAR_LOG_INFO);
if($settings->_apiOrigin && isset($this->container->environment['HTTP_ORIGIN'])) {
+ $logger->log("Checking origin", PEAR_LOG_DEBUG);
$origins = explode(',', $settings->_apiOrigin);
if(!in_array($this->container->environment['HTTP_ORIGIN'], $origins)) {
return $response->withStatus(403);
@@ -2648,9 +2649,11 @@ class Auth { /* {{{ */
* don't even try to authorize.
*/
if($request->getMethod() == 'OPTIONS') {
+ $logger->log("Received preflight options request", PEAR_LOG_DEBUG);
} elseif(!in_array($request->getUri()->getPath(), array('login')) && substr($request->getUri()->getPath(), 0, 5) != 'echo/') {
$userobj = null;
if(!empty($this->container->environment['HTTP_AUTHORIZATION']) && !empty($settings->_apiKey) && !empty($settings->_apiUserId)) {
+ $logger->log("Authorization key: ".$this->container->environment['HTTP_AUTHORIZATION'], PEAR_LOG_DEBUG);
if($settings->_apiKey == $this->container->environment['HTTP_AUTHORIZATION']) {
if(!($userobj = $dms->getUser($settings->_apiUserId))) {
return $response->withStatus(403);
From 6f4ec80ad6901a66e0051c81bae7c76a45e9ddbe Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 7 Nov 2022 12:20:30 +0100
Subject: [PATCH 021/247] add new routes for changing attributes
---
restapi/index.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/restapi/index.php b/restapi/index.php
index 354b26e22..9d6a8e53f 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -2743,6 +2743,7 @@ $app->get('/folder/{id}/children', \RestapiController::class.':getFolderChildren
$app->get('/folder/{id}/parent', \RestapiController::class.':getFolderParent');
$app->get('/folder/{id}/path', \RestapiController::class.':getFolderPath');
$app->get('/folder/{id}/attributes', \RestapiController::class.':getFolderAttributes');
+$app->put('/folder/{id}/attribute/{attrdefid}', \RestapiController::class.':setFolderAttribute');
$app->post('/folder/{id}/folder', \RestapiController::class.':createFolder');
$app->put('/folder/{id}/document', \RestapiController::class.':uploadDocumentPut');
$app->post('/folder/{id}/document', \RestapiController::class.':uploadDocument');
@@ -2755,17 +2756,19 @@ $app->get('/document/{id}/content', \RestapiController::class.':getDocumentConte
$app->get('/document/{id}/versions', \RestapiController::class.':getDocumentVersions');
$app->get('/document/{id}/version/{version}', \RestapiController::class.':getDocumentVersion');
$app->put('/document/{id}/version/{version}', \RestapiController::class.':updateDocumentVersion');
+$app->get('/document/{id}/version/{version}/attributes', \RestapiController::class.':getDocumentContentAttributes');
+$app->put('/document/{id}/version/{version}/attribute/{attrdefid}', \RestapiController::class.':setDocumentContentAttribute');
$app->get('/document/{id}/files', \RestapiController::class.':getDocumentFiles');
$app->get('/document/{id}/file/{fileid}', \RestapiController::class.':getDocumentFile');
$app->get('/document/{id}/links', \RestapiController::class.':getDocumentLinks');
$app->post('/document/{id}/link/{documentid}', \RestapiController::class.':addDocumentLink');
$app->get('/document/{id}/attributes', \RestapiController::class.':getDocumentAttributes');
+$app->put('/document/{id}/attribute/{attrdefid}', \RestapiController::class.':setDocumentAttribute');
$app->get('/document/{id}/preview/{version}/{width}', \RestapiController::class.':getDocumentPreview');
$app->delete('/document/{id}/categories', \RestapiController::class.':removeDocumentCategories');
$app->delete('/document/{id}/category/{catid}', \RestapiController::class.':removeDocumentCategory');
$app->post('/document/{id}/category/{catid}', \RestapiController::class.':addDocumentCategory');
$app->put('/document/{id}/owner/{userid}', \RestapiController::class.':setDocumentOwner');
-$app->put('/document/{id}/attribute/{attrdefid}', \RestapiController::class.':setDocumentAttribute');
$app->put('/account/fullname', \RestapiController::class.':setFullName');
$app->put('/account/email', \RestapiController::class.':setEmail');
$app->get('/account/documents/locked', \RestapiController::class.':getLockedDocuments');
From fa56d5735d0b5d4ecddb46152722cccf2eaf62bb Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 7 Nov 2022 12:20:50 +0100
Subject: [PATCH 022/247] fix various errors, add missing functions
---
restapi/swagger.yaml | 252 +++++++++++++++++++++++++++++++++++++++----
1 file changed, 232 insertions(+), 20 deletions(-)
diff --git a/restapi/swagger.yaml b/restapi/swagger.yaml
index 4375e09e1..f19c5299c 100644
--- a/restapi/swagger.yaml
+++ b/restapi/swagger.yaml
@@ -13,6 +13,9 @@ info:
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
+servers:
+ - url:
+ description: Current host server
host: ""
basePath: "_httpRoot; ?>restapi/index.php"
tags:
@@ -22,6 +25,7 @@ tags:
description: "Find out more about our store"
url: "https://www.seeddms.org"
schemes:
+- "http"
- "https"
paths:
/login:
@@ -32,9 +36,9 @@ paths:
description: "Log in by providing a username and password"
operationId: "login"
produces:
- - "application/json"
+ - "application/json"
consumes:
- - application/x-www-form-urlencoded
+ - "application/x-www-form-urlencoded"
parameters:
- name: "user"
in: "formData"
@@ -111,7 +115,7 @@ paths:
produces:
- "application/json"
consumes:
- - application/x-www-form-urlencoded
+ - "application/x-www-form-urlencoded"
parameters:
- in: formData
name: email
@@ -138,7 +142,7 @@ paths:
produces:
- "application/json"
consumes:
- - multipart/form-data
+ - "application/x-www-form-urlencoded"
parameters:
- in: formData
name: email
@@ -208,7 +212,7 @@ paths:
produces:
- "application/json"
consumes:
- - multipart/form-data
+ - "application/x-www-form-urlencoded"
parameters:
- in: "formData"
name: "user"
@@ -371,7 +375,7 @@ paths:
produces:
- "application/json"
consumes:
- - multipart/form-data
+ - "application/x-www-form-urlencoded"
parameters:
- name: "id"
in: "path"
@@ -431,7 +435,7 @@ paths:
produces:
- "application/json"
consumes:
- - multipart/form-data
+ - "application/x-www-form-urlencoded"
parameters:
- in: "formData"
name: "name"
@@ -687,11 +691,106 @@ paths:
$ref: "#/definitions/ApiResponse"
security:
- api_key: []
+ /document/{id}/version/{version}/attributes:
+ get:
+ tags:
+ - "document"
+ summary: "Return attributes of document version"
+ description: "Returns the attributes of a given document version"
+ operationId: "getDocumentContentAttributes"
+ produces:
+ - "application/json"
+ parameters:
+ - name: "id"
+ in: "path"
+ description: "ID of document whose attributes to be returned."
+ type: "integer"
+ required: true
+ format: "int64"
+ - name: "version"
+ in: "path"
+ description: "Version number of document"
+ required: true
+ type: "integer"
+ format: "int64"
+ responses:
+ "200":
+ description: "successful operation"
+ schema:
+ $ref: "#/definitions/ApiResponseAttributes"
+ "403":
+ description: "No access"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ "404":
+ description: "Document or version not found"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ "500":
+ description: "Internal error"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ security:
+ - api_key: []
+ /document/{id}/version/{version}/attribute/{attrdefid}:
+ put:
+ tags:
+ - "document"
+ summary: "Set document version attribute"
+ description: "Sets the attribute value of a document version. If the value is an empty string the attribute will be deleted."
+ operationId: "setDocumentContentAttribute"
+ produces:
+ - "application/json"
+ consumes:
+ - "application/x-www-form-urlencoded"
+ parameters:
+ - name: "id"
+ in: "path"
+ description: "ID of document"
+ required: true
+ type: "integer"
+ format: "int64"
+ - name: "version"
+ in: "path"
+ description: "Version number of document"
+ required: true
+ type: "integer"
+ format: "int64"
+ - name: "attrdefid"
+ in: "path"
+ description: "ID of attribute definition"
+ required: true
+ type: "integer"
+ format: "int64"
+ - in: "formData"
+ name: "value"
+ type: "string"
+ description: "Value of attribute"
+ required: true
+ responses:
+ "201":
+ description: "successful operation"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ "400":
+ description: "Invalid attribute value, or setting an attribute not allowed for the type of object"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ "403":
+ description: "No access"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ "404":
+ description: "Document, version or attribute definition not found"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ security:
+ - api_key: []
/document/{id}/attributes:
get:
tags:
- "document"
- summary: "Return attributes of document by ID"
+ summary: "Return attributes of document"
description: "Returns the attributes of a given document"
operationId: "getDocumentAttributes"
produces:
@@ -722,11 +821,59 @@ paths:
$ref: "#/definitions/ApiResponse"
security:
- api_key: []
+ /document/{id}/attribute/{attrdefid}:
+ put:
+ tags:
+ - "document"
+ summary: "Set document attribute"
+ description: "Sets the attribute value of a document. If the value is an empty string the attribute will be deleted."
+ operationId: "setDocumentAttribute"
+ produces:
+ - "application/json"
+ consumes:
+ - "application/x-www-form-urlencoded"
+ parameters:
+ - name: "id"
+ in: "path"
+ description: "ID of document"
+ required: true
+ type: "integer"
+ format: "int64"
+ - name: "attrdefid"
+ in: "path"
+ description: "ID of attribute definition"
+ required: true
+ type: "integer"
+ format: "int64"
+ - in: "formData"
+ name: "value"
+ type: "string"
+ description: "Value of attribute"
+ required: true
+ responses:
+ "201":
+ description: "successful operation"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ "400":
+ description: "Invalid attribute value, or setting an attribute not allowed for the type of object"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ "403":
+ description: "No access"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ "404":
+ description: "Document or attribute definition not found"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ security:
+ - api_key: []
/document/{id}/files:
get:
tags:
- "document"
- summary: "Return attached files of document by ID"
+ summary: "Return attached files of document"
description: "Returns the attached files of a given document"
operationId: "getDocumentFiles"
produces:
@@ -802,7 +949,7 @@ paths:
produces:
- "application/json"
consumes:
- - multipart/form-data
+ - "application/x-www-form-urlencoded"
parameters:
- name: "id"
in: "path"
@@ -920,7 +1067,7 @@ paths:
produces:
- "application/json"
consumes:
- - multipart/form-data
+ - "application/x-www-form-urlencoded"
parameters:
- name: "id"
in: "path"
@@ -957,7 +1104,6 @@ paths:
$ref: "#/definitions/ApiResponse"
security:
- api_key: []
- /document/{id}/category/{catid}:
delete:
tags:
- "document"
@@ -1008,7 +1154,7 @@ paths:
produces:
- "application/json"
consumes:
- - multipart/form-data
+ - "application/x-www-form-urlencoded"
parameters:
- name: "id"
in: "path"
@@ -1223,7 +1369,7 @@ paths:
get:
tags:
- "folder"
- summary: "Return attributes of folder by ID"
+ summary: "Return attributes of folder"
description: "Returns the attributes of a given folder"
operationId: "getFolderAttributes"
produces:
@@ -1254,6 +1400,54 @@ paths:
$ref: "#/definitions/ApiResponse"
security:
- api_key: []
+ /folder/{id}/attribute/{attrdefid}:
+ put:
+ tags:
+ - "folder"
+ summary: "Set folder attribute"
+ description: "Sets the attribute value of a folder. If the value is an empty string the attribute will be deleted."
+ operationId: "setFolderAttribute"
+ produces:
+ - "application/json"
+ consumes:
+ - "application/x-www-form-urlencoded"
+ parameters:
+ - name: "id"
+ in: "path"
+ description: "ID of folder"
+ required: true
+ type: "integer"
+ format: "int64"
+ - name: "attrdefid"
+ in: "path"
+ description: "ID of attribute definition"
+ required: true
+ type: "integer"
+ format: "int64"
+ - in: "formData"
+ name: "value"
+ type: "string"
+ description: "Value of attribute"
+ required: true
+ responses:
+ "201":
+ description: "successful operation"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ "400":
+ description: "Invalid attribute value, or setting an attribute not allowed for the type of object"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ "403":
+ description: "No access"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ "404":
+ description: "Folder or attribute definition not found"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ security:
+ - api_key: []
/folder/{id}/folder:
post:
tags:
@@ -1264,7 +1458,7 @@ paths:
produces:
- "application/json"
consumes:
- - multipart/form-data
+ - "application/x-www-form-urlencoded"
parameters:
- name: "id"
in: "path"
@@ -1316,7 +1510,7 @@ paths:
produces:
- "application/json"
consumes:
- - multipart/form-data
+ - "application/x-www-form-urlencoded"
parameters:
- name: "id"
in: "path"
@@ -1390,7 +1584,7 @@ paths:
produces:
- "application/json"
consumes:
- - multipart/form-data
+ - "application/x-www-form-urlencoded"
parameters:
- in: "formData"
name: "name"
@@ -1487,7 +1681,7 @@ paths:
produces:
- "application/json"
consumes:
- - multipart/form-data
+ - "application/x-www-form-urlencoded"
parameters:
- name: "id"
in: "path"
@@ -1543,7 +1737,7 @@ paths:
produces:
- "application/json"
consumes:
- - multipart/form-data
+ - "application/x-www-form-urlencoded"
parameters:
- name: "id"
in: "path"
@@ -1570,10 +1764,28 @@ paths:
$ref: "#/definitions/ApiResponse"
security:
- api_key: []
+ /statstotal:
+ get:
+ tags:
+ - "misc"
+ summary: "Return various statistical data"
+ description: "Just returns the body content"
+ operationId: "getStatsTotal"
+ produces:
+ - "application/json"
+ responses:
+ "200":
+ description: "successful operation"
+ schema:
+ $ref: "#/definitions/ApiResponse"
+ "400":
+ description: "Invalid status value"
+ security:
+ - api_key: []
/echo:
get:
tags:
- - "test"
+ - "misc"
summary: "Return what was send in the body"
description: "Just returns the body content"
operationId: "echoData"
From e0cd3fb1e8f938f15e9b4c4b23942c210050ba2d Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 7 Nov 2022 12:21:16 +0100
Subject: [PATCH 023/247] add changes of 5.1.28
---
CHANGELOG | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CHANGELOG b/CHANGELOG
index e43986e67..0e334bfbe 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,6 +7,9 @@
- fix regression in password forgotten function
- fix security issue when creating hash in password forgotten operation
- add initial support for logging and notifications in rest api
+- add rest api calls to get attributes of a document version and to set
+ attributes of folders, documents, and document versions
+- fixed various errors in swagger.yaml
- use methods in inc/inc.ClassNotificationService.php for webdav
- clear login failures when login by webdav succeeds
From 7dee5cb767508f771eafe37eb69b3aa5a979075e Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 8 Nov 2022 16:45:27 +0100
Subject: [PATCH 024/247] allow to add more tabs with log files with a
selectable prefix
---
out/out.LogManagement.php | 2 +-
views/bootstrap/class.LogManagement.php | 52 +++++++++++++++----------
2 files changed, 32 insertions(+), 22 deletions(-)
diff --git a/out/out.LogManagement.php b/out/out.LogManagement.php
index 8f4a95a42..bcf7a699f 100644
--- a/out/out.LogManagement.php
+++ b/out/out.LogManagement.php
@@ -39,7 +39,7 @@ if (isset($_GET["logname"])) $logname=basename($_GET["logname"], '.log').'.log';
else $logname=NULL;
if (isset($_GET["mode"])) $mode=$_GET["mode"];
-else $mode='web';
+else $mode='default';
if($view) {
$view->setParam('logname', $logname);
diff --git a/views/bootstrap/class.LogManagement.php b/views/bootstrap/class.LogManagement.php
index d58a524ce..294242303 100644
--- a/views/bootstrap/class.LogManagement.php
+++ b/views/bootstrap/class.LogManagement.php
@@ -98,41 +98,51 @@ $("input[type=checkbox]").each(function () { this.checked = !this.checked; });
$this->contentHeading(getMLText("log_management"));
- $entries = array();
- $wentries = array();
+ $sections = array(
+ array('default', 'Web'),
+ array('webdav', 'WebDAV'),
+ array('restapi', 'RestAPI'),
+ );
+ if($es = $this->callHook('extraSections'))
+ $sections = array_merge($sections, $es);
+ $entries = [];
+ foreach($sections as $section) {
+ $entries[$section[0]] = array();
+ }
+
$handle = opendir($this->logdir);
if($handle) {
while ($e = readdir($handle)){
if (is_dir($this->logdir.$e)) continue;
if (strpos($e,".log")==FALSE) continue;
if (strcmp($e,"current.log")==0) continue;
- if(substr($e, 0, 6) == 'webdav') {
- $wentries[] = $e;
- } else {
- $entries[] = $e;
- }
+ $section = strtok($e, '-');
+ if(isset($entries[$section]))
+ $entries[$section][] = $e;
+ else
+ $entries['default'][] = $e;
}
closedir($handle);
- sort($entries);
- sort($wentries);
- $entries = array_reverse($entries);
- $wentries = array_reverse($wentries);
+ foreach($sections as $section) {
+ sort($entries[$section[0]]);
+ $entries[$section[0]] = array_reverse($entries[$section[0]]);
+ }
}
?>
-
-showPaneHeader('web', 'web', (!$mode || $mode == 'web')); ?>
-showPaneHeader('webdav', 'webdav', (!$mode || $mode == 'webdav')); ?>
+
+showPaneHeader($section[0], $section[1], (!$mode || $mode == $section[0]));
+?>
showStartPaneContent('web', (!$mode || $mode == 'web'));
- $this->filelist($entries, 'web');
- $this->showEndPaneContent('web', $mode);
-
- $this->showStartPaneContent('webdav', (!$mode || $mode == 'webdav'));
- $this->filelist($wentries, 'webdav');
- $this->showEndPaneContent('webdav', $mode);
+ foreach($sections as $section) {
+ $this->showStartPaneContent($section[0], (!$mode || $mode == $section[0]));
+ $this->filelist($entries[$section[0]], $section[0]);
+ $this->showEndPaneContent($section[0], $mode);
+ }
?>
Date: Tue, 8 Nov 2022 16:46:09 +0100
Subject: [PATCH 025/247] add changes for 5.1.28
---
CHANGELOG | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CHANGELOG b/CHANGELOG
index 0e334bfbe..71ef00400 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -12,6 +12,8 @@
- fixed various errors in swagger.yaml
- use methods in inc/inc.ClassNotificationService.php for webdav
- clear login failures when login by webdav succeeds
+- output log of restapi in LogManagement
+- new hook to add more tabs for sections in LogManagement
--------------------------------------------------------------------------------
Changes in version 5.1.27
From a9f3b7a6a6fe162a1959699babf085baa51e863a Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 8 Nov 2022 20:07:08 +0100
Subject: [PATCH 026/247] add optional parameter $mask to getLogger()
---
inc/inc.Utils.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php
index d0e321230..e13394421 100644
--- a/inc/inc.Utils.php
+++ b/inc/inc.Utils.php
@@ -395,7 +395,7 @@ function getFilenameByDocname($content) { /* {{{ */
return mb_ereg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $filename);
} /* }}} */
-function getLogger($prefix='') { /* {{{ */
+function getLogger($prefix='', $mask=PEAR_LOG_INFO) { /* {{{ */
global $settings;
if($settings->_logFileEnable) {
@@ -407,7 +407,7 @@ function getLogger($prefix='') { /* {{{ */
@mkdir($settings->_contentDir.'log');
if(file_exists($settings->_contentDir.'log') && is_dir($settings->_contentDir.'log')) {
$logger = Log::factory('file', $logname);
- $logger->setMask(Log::MAX(PEAR_LOG_DEBUG));
+ $logger->setMask(Log::MAX($mask));
} else
$logger = null;
} else {
From 17673db9148f6431317d4e189db3b90ad8ba2bdd Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 8 Nov 2022 20:07:39 +0100
Subject: [PATCH 027/247] use getLogger() to retrieve logger
---
inc/inc.LogInit.php | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/inc/inc.LogInit.php b/inc/inc.LogInit.php
index d75101f9e..2cc586873 100644
--- a/inc/inc.LogInit.php
+++ b/inc/inc.LogInit.php
@@ -19,18 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("Log.php");
+require_once("inc/inc.Utils.php");
-if ($settings->_logFileEnable) {
- if ($settings->_logFileRotation=="h") $logname=date("YmdH", time());
- else if ($settings->_logFileRotation=="d") $logname=date("Ymd", time());
- else $logname=date("Ym", time());
+$logger = getLogger();
- if(!file_exists($settings->_contentDir.'log'))
- @mkdir($settings->_contentDir.'log');
- if(file_exists($settings->_contentDir.'log') && is_dir($settings->_contentDir.'log'))
- $logger = Log::factory('file', $settings->_contentDir.'log/'.$logname.'.log');
- else
- $logger = null;
-} else {
- $logger = null;
-}
From f36735ef8154c95a72dfb9b9f2bda5b10b2799f4 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 8 Nov 2022 20:07:59 +0100
Subject: [PATCH 028/247] pass mask=PEAR_LOG_DEBUG to getLogger()
---
restapi/index.php | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/restapi/index.php b/restapi/index.php
index 9d6a8e53f..b7c68cd0d 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -3,8 +3,9 @@ include("../inc/inc.Settings.php");
require_once("../inc/inc.Language.php");
require_once("../inc/inc.Utils.php");
+require_once("Log.php");
-$logger = getLogger('restapi-');
+$logger = getLogger('restapi-', PEAR_LOG_DEBUG);
require_once("../inc/inc.Init.php");
require_once("../inc/inc.Extension.php");
@@ -259,7 +260,7 @@ class RestapiController { /* {{{ */
if(!$userobj) {
setcookie("mydms_session", '', time()-3600, $settings->_httpRoot);
- $logger->log("Login with user name '".$username."' failed", PEAR_LOG_INFO);
+ $logger->log("Login with user name '".$username."' failed", PEAR_LOG_ERR);
return $response->withJson(array('success'=>false, 'message'=>'Login failed', 'data'=>''), 403);
} else {
require_once("../inc/inc.ClassSession.php");
@@ -2653,7 +2654,7 @@ class Auth { /* {{{ */
} elseif(!in_array($request->getUri()->getPath(), array('login')) && substr($request->getUri()->getPath(), 0, 5) != 'echo/') {
$userobj = null;
if(!empty($this->container->environment['HTTP_AUTHORIZATION']) && !empty($settings->_apiKey) && !empty($settings->_apiUserId)) {
- $logger->log("Authorization key: ".$this->container->environment['HTTP_AUTHORIZATION'], PEAR_LOG_DEBUG);
+ $logger->log("Authorization key: ".$this->container->environment['HTTP_AUTHORIZATION'], PEAR_LOG_DEBUG);
if($settings->_apiKey == $this->container->environment['HTTP_AUTHORIZATION']) {
if(!($userobj = $dms->getUser($settings->_apiUserId))) {
return $response->withStatus(403);
@@ -2667,13 +2668,12 @@ class Auth { /* {{{ */
$session = new SeedDMS_Session($dms->getDb());
if (isset($_COOKIE["mydms_session"])) {
$dms_session = $_COOKIE["mydms_session"];
+ $logger->log("Session key: ".$dms_session, PEAR_LOG_DEBUG);
if(!$resArr = $session->load($dms_session)) {
/* Delete Cookie */
setcookie("mydms_session", $dms_session, time()-3600, $settings->_httpRoot);
- if($settings->_enableGuestLogin)
- $userobj = $dms->getUser($settings->_guestID);
- else
- return $response->withStatus(403);
+ $logger->log("Session for id '".$dms_session."' has gone", PEAR_LOG_ERR);
+ return $response->withStatus(403);
}
/* Load user data */
From 233639ce3520ab26c90f82e9c5ea8b2e18805633 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 9 Nov 2022 06:40:50 +0100
Subject: [PATCH 029/247] include inc.Utils.php early
---
op/op.AddDocument.php | 2 +-
op/op.AddDocumentLink.php | 2 +-
op/op.AddEvent.php | 2 +-
op/op.AddFile.php | 2 +-
op/op.AddFile2.php | 2 +-
op/op.AddMultiDocument.php | 2 +-
op/op.AddSubFolder.php | 2 +-
op/op.AddToClipboard.php | 1 +
op/op.AddTransitionToWorkflow.php | 1 +
op/op.Ajax.php | 2 +-
op/op.ApproveDocument.php | 3 +--
op/op.AttributeMgr.php | 1 +
op/op.Categories.php | 1 +
op/op.ChangePassword.php | 2 +-
op/op.ClearCache.php | 2 +-
op/op.ClearClipboard.php | 1 +
op/op.CreateDump.php | 2 +-
op/op.CreateFolderArchive.php | 1 +
op/op.CreateSubFolderIndex.php | 1 +
op/op.CreateVersioningFiles.php | 1 +
op/op.DefaultKeywords.php | 1 +
op/op.DocumentAccess.php | 2 +-
op/op.DocumentNotify.php | 2 +-
op/op.Download.php | 2 +-
op/op.DropFolderPreview.php | 2 +-
op/op.EditAttributes.php | 2 +-
op/op.EditComment.php | 2 +-
op/op.EditDocument.php | 2 +-
op/op.EditDocumentFile.php | 2 +-
op/op.EditEvent.php | 2 +-
op/op.EditFolder.php | 2 +-
op/op.EditOnline.php | 2 +-
op/op.EditUserData.php | 1 +
op/op.ExtensionMgr.php | 1 +
op/op.FolderAccess.php | 2 +-
op/op.FolderNotify.php | 2 +-
op/op.GroupMgr.php | 1 +
op/op.GroupView.php | 1 +
op/op.ImportFS.php | 2 +-
op/op.ImportUsers.php | 2 +-
op/op.LockDocument.php | 2 +-
op/op.Login.php | 2 +-
op/op.Logout.php | 2 +-
op/op.ManageNotify.php | 1 +
op/op.MoveClipboard.php | 1 +
op/op.MoveDocument.php | 2 +-
op/op.MoveFolder.php | 2 +-
op/op.OverrideContentStatus.php | 2 +-
op/op.PasswordForgotten.php | 2 +-
op/op.PdfPreview.php | 2 +-
op/op.Preview.php | 2 +-
op/op.RemoveApprovalLog.php | 3 +--
op/op.RemoveArchive.php | 1 +
op/op.RemoveDocument.php | 1 +
op/op.RemoveDocumentFile.php | 1 +
op/op.RemoveDocumentLink.php | 1 +
op/op.RemoveDump.php | 1 +
op/op.RemoveEvent.php | 2 +-
op/op.RemoveFolder.php | 1 +
op/op.RemoveFolderFiles.php | 1 +
op/op.RemoveFromClipboard.php | 1 +
op/op.RemoveLog.php | 1 +
op/op.RemoveReviewLog.php | 3 +--
op/op.RemoveTransitionFromWorkflow.php | 1 +
op/op.RemoveVersion.php | 1 +
op/op.RemoveWorkflow.php | 1 +
op/op.RemoveWorkflowAction.php | 1 +
op/op.RemoveWorkflowFromDocument.php | 1 +
op/op.RemoveWorkflowState.php | 1 +
op/op.ResetSu.php | 1 +
op/op.ReturnFromSubWorkflow.php | 1 +
op/op.ReviewDocument.php | 3 +--
op/op.RewindWorkflow.php | 1 +
op/op.RunSubWorkflow.php | 1 +
op/op.SetExpires.php | 1 +
op/op.SetLanguage.php | 1 +
op/op.SetReviewersApprovers.php | 2 +-
op/op.SetWorkflow.php | 1 +
op/op.Settings.php | 2 +-
op/op.SubstituteUser.php | 1 +
op/op.TransferDocument.php | 2 +-
op/op.TriggerWorkflow.php | 1 +
op/op.UnlockDocument.php | 2 +-
op/op.UpdateDocument.php | 1 +
op/op.UpdateDocument2.php | 1 +
op/op.UploadChunks.php | 3 ++-
op/op.UserDefaultKeywords.php | 1 +
op/op.UserListCsv.php | 2 +-
op/op.UsrMgr.php | 3 +--
op/op.ViewOnline.php | 1 +
op/op.WorkflowActionsMgr.php | 2 +-
op/op.WorkflowMgr.php | 2 +-
op/op.WorkflowStatesMgr.php | 2 +-
93 files changed, 94 insertions(+), 55 deletions(-)
diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php
index add3a5161..03e42468e 100644
--- a/op/op.AddDocument.php
+++ b/op/op.AddDocument.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.AddDocumentLink.php b/op/op.AddDocumentLink.php
index fc664f730..6aa92770f 100644
--- a/op/op.AddDocumentLink.php
+++ b/op/op.AddDocumentLink.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.AddEvent.php b/op/op.AddEvent.php
index 84a83da65..f319ba394 100644
--- a/op/op.AddEvent.php
+++ b/op/op.AddEvent.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
include("../inc/inc.DBInit.php");
diff --git a/op/op.AddFile.php b/op/op.AddFile.php
index cbb203c35..2c595c594 100644
--- a/op/op.AddFile.php
+++ b/op/op.AddFile.php
@@ -18,8 +18,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.AddFile2.php b/op/op.AddFile2.php
index ae05026db..237fb9e7e 100644
--- a/op/op.AddFile2.php
+++ b/op/op.AddFile2.php
@@ -18,8 +18,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.AddMultiDocument.php b/op/op.AddMultiDocument.php
index 9bcbd0dcf..b493d5b3f 100644
--- a/op/op.AddMultiDocument.php
+++ b/op/op.AddMultiDocument.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.AddSubFolder.php b/op/op.AddSubFolder.php
index 716c6bff5..948b807fc 100644
--- a/op/op.AddSubFolder.php
+++ b/op/op.AddSubFolder.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.AddToClipboard.php b/op/op.AddToClipboard.php
index 3c6625545..27d33d62d 100644
--- a/op/op.AddToClipboard.php
+++ b/op/op.AddToClipboard.php
@@ -20,6 +20,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.DBInit.php");
include("../inc/inc.Language.php");
diff --git a/op/op.AddTransitionToWorkflow.php b/op/op.AddTransitionToWorkflow.php
index f9789a533..6d7203506 100644
--- a/op/op.AddTransitionToWorkflow.php
+++ b/op/op.AddTransitionToWorkflow.php
@@ -20,6 +20,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.Ajax.php b/op/op.Ajax.php
index d84ded609..364188a13 100644
--- a/op/op.Ajax.php
+++ b/op/op.Ajax.php
@@ -17,8 +17,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
require_once("../inc/inc.Settings.php");
-require_once("../inc/inc.LogInit.php");
require_once("../inc/inc.Utils.php");
+require_once("../inc/inc.LogInit.php");
require_once("../inc/inc.Language.php");
require_once("../inc/inc.Init.php");
require_once("../inc/inc.Extension.php");
diff --git a/op/op.ApproveDocument.php b/op/op.ApproveDocument.php
index a2834cbf5..beef24221 100644
--- a/op/op.ApproveDocument.php
+++ b/op/op.ApproveDocument.php
@@ -20,13 +20,12 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
include("../inc/inc.DBInit.php");
-include("../inc/inc.ClassAccessOperation.php");
include("../inc/inc.Authentication.php");
include("../inc/inc.ClassUI.php");
diff --git a/op/op.AttributeMgr.php b/op/op.AttributeMgr.php
index e263c93de..24b94a0eb 100644
--- a/op/op.AttributeMgr.php
+++ b/op/op.AttributeMgr.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.Categories.php b/op/op.Categories.php
index 7fdabceab..8cbea9575 100644
--- a/op/op.Categories.php
+++ b/op/op.Categories.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.ChangePassword.php b/op/op.ChangePassword.php
index 5eee414d3..1c92b28ca 100644
--- a/op/op.ChangePassword.php
+++ b/op/op.ChangePassword.php
@@ -19,8 +19,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.ClearCache.php b/op/op.ClearCache.php
index ad9a1d63f..72a168047 100644
--- a/op/op.ClearCache.php
+++ b/op/op.ClearCache.php
@@ -17,8 +17,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.ClearClipboard.php b/op/op.ClearClipboard.php
index fb955afa6..df8313cfe 100644
--- a/op/op.ClearClipboard.php
+++ b/op/op.ClearClipboard.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.CreateDump.php b/op/op.CreateDump.php
index 7b25963ef..e471484a5 100644
--- a/op/op.CreateDump.php
+++ b/op/op.CreateDump.php
@@ -17,8 +17,8 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-include("../inc/inc.Version.php");
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.CreateFolderArchive.php b/op/op.CreateFolderArchive.php
index 07c1cb112..3c5cd384a 100644
--- a/op/op.CreateFolderArchive.php
+++ b/op/op.CreateFolderArchive.php
@@ -18,6 +18,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.CreateSubFolderIndex.php b/op/op.CreateSubFolderIndex.php
index 6d02e4778..1a58535e5 100644
--- a/op/op.CreateSubFolderIndex.php
+++ b/op/op.CreateSubFolderIndex.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.CreateVersioningFiles.php b/op/op.CreateVersioningFiles.php
index f3b8c30fc..4ab4e4ca6 100644
--- a/op/op.CreateVersioningFiles.php
+++ b/op/op.CreateVersioningFiles.php
@@ -18,6 +18,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.DefaultKeywords.php b/op/op.DefaultKeywords.php
index 069d8955a..5150d6b79 100644
--- a/op/op.DefaultKeywords.php
+++ b/op/op.DefaultKeywords.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.DocumentAccess.php b/op/op.DocumentAccess.php
index d4877c736..6fc483123 100644
--- a/op/op.DocumentAccess.php
+++ b/op/op.DocumentAccess.php
@@ -19,8 +19,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.DocumentNotify.php b/op/op.DocumentNotify.php
index 1ce87d163..e0ba58116 100644
--- a/op/op.DocumentNotify.php
+++ b/op/op.DocumentNotify.php
@@ -19,8 +19,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.Download.php b/op/op.Download.php
index 585251152..7403509b8 100644
--- a/op/op.Download.php
+++ b/op/op.Download.php
@@ -20,9 +20,9 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
-include("../inc/inc.Utils.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
include("../inc/inc.DBInit.php");
diff --git a/op/op.DropFolderPreview.php b/op/op.DropFolderPreview.php
index 84f36213b..96f2209d1 100644
--- a/op/op.DropFolderPreview.php
+++ b/op/op.DropFolderPreview.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.EditAttributes.php b/op/op.EditAttributes.php
index 3dd4f21b7..8e4d3c01e 100644
--- a/op/op.EditAttributes.php
+++ b/op/op.EditAttributes.php
@@ -20,9 +20,9 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
-include("../inc/inc.Utils.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
include("../inc/inc.DBInit.php");
diff --git a/op/op.EditComment.php b/op/op.EditComment.php
index af2860f66..e07a210c5 100644
--- a/op/op.EditComment.php
+++ b/op/op.EditComment.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.EditDocument.php b/op/op.EditDocument.php
index 0876c7971..a9e630dba 100644
--- a/op/op.EditDocument.php
+++ b/op/op.EditDocument.php
@@ -19,8 +19,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.EditDocumentFile.php b/op/op.EditDocumentFile.php
index 71f3ae0be..edeb83cc1 100644
--- a/op/op.EditDocumentFile.php
+++ b/op/op.EditDocumentFile.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.EditEvent.php b/op/op.EditEvent.php
index 7f73a438e..d2e220bef 100644
--- a/op/op.EditEvent.php
+++ b/op/op.EditEvent.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.EditFolder.php b/op/op.EditFolder.php
index 2a58a0286..851931d6c 100644
--- a/op/op.EditFolder.php
+++ b/op/op.EditFolder.php
@@ -19,8 +19,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.EditOnline.php b/op/op.EditOnline.php
index 152fd3c59..40377a775 100644
--- a/op/op.EditOnline.php
+++ b/op/op.EditOnline.php
@@ -19,9 +19,9 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
-include("../inc/inc.Utils.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
include("../inc/inc.DBInit.php");
diff --git a/op/op.EditUserData.php b/op/op.EditUserData.php
index e72028156..66b1b5327 100644
--- a/op/op.EditUserData.php
+++ b/op/op.EditUserData.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.ExtensionMgr.php b/op/op.ExtensionMgr.php
index 8e53c9d33..c7b2bf5e7 100644
--- a/op/op.ExtensionMgr.php
+++ b/op/op.ExtensionMgr.php
@@ -17,6 +17,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.FolderAccess.php b/op/op.FolderAccess.php
index 004abd871..63de4210f 100644
--- a/op/op.FolderAccess.php
+++ b/op/op.FolderAccess.php
@@ -19,8 +19,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.FolderNotify.php b/op/op.FolderNotify.php
index ffca554c2..4ad783e93 100644
--- a/op/op.FolderNotify.php
+++ b/op/op.FolderNotify.php
@@ -19,8 +19,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.GroupMgr.php b/op/op.GroupMgr.php
index c427c6b70..d51dd6842 100644
--- a/op/op.GroupMgr.php
+++ b/op/op.GroupMgr.php
@@ -20,6 +20,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.GroupView.php b/op/op.GroupView.php
index 8219e30b9..152ee05e3 100644
--- a/op/op.GroupView.php
+++ b/op/op.GroupView.php
@@ -20,6 +20,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.ImportFS.php b/op/op.ImportFS.php
index 19cf01aea..260b2c487 100644
--- a/op/op.ImportFS.php
+++ b/op/op.ImportFS.php
@@ -17,8 +17,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.ImportUsers.php b/op/op.ImportUsers.php
index 29315235a..bd86036dd 100644
--- a/op/op.ImportUsers.php
+++ b/op/op.ImportUsers.php
@@ -17,8 +17,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.LockDocument.php b/op/op.LockDocument.php
index 393119dc2..3889f7a39 100644
--- a/op/op.LockDocument.php
+++ b/op/op.LockDocument.php
@@ -20,8 +20,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/op/op.Login.php b/op/op.Login.php
index 8209e06ad..04519ce8a 100644
--- a/op/op.Login.php
+++ b/op/op.Login.php
@@ -19,8 +19,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.Logout.php b/op/op.Logout.php
index 96b99e430..06af4bcc9 100644
--- a/op/op.Logout.php
+++ b/op/op.Logout.php
@@ -19,8 +19,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
include("../inc/inc.ClassSession.php");
diff --git a/op/op.ManageNotify.php b/op/op.ManageNotify.php
index e6c493977..f6b5e4088 100644
--- a/op/op.ManageNotify.php
+++ b/op/op.ManageNotify.php
@@ -18,6 +18,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.MoveClipboard.php b/op/op.MoveClipboard.php
index bff27c200..d08841d19 100644
--- a/op/op.MoveClipboard.php
+++ b/op/op.MoveClipboard.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.MoveDocument.php b/op/op.MoveDocument.php
index e1ebc227a..a1c876596 100644
--- a/op/op.MoveDocument.php
+++ b/op/op.MoveDocument.php
@@ -19,8 +19,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.MoveFolder.php b/op/op.MoveFolder.php
index d0fc96886..73a693df0 100644
--- a/op/op.MoveFolder.php
+++ b/op/op.MoveFolder.php
@@ -19,8 +19,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.OverrideContentStatus.php b/op/op.OverrideContentStatus.php
index e313844ed..4d14bb67d 100644
--- a/op/op.OverrideContentStatus.php
+++ b/op/op.OverrideContentStatus.php
@@ -19,8 +19,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.PasswordForgotten.php b/op/op.PasswordForgotten.php
index bfe719972..03ae90ac0 100644
--- a/op/op.PasswordForgotten.php
+++ b/op/op.PasswordForgotten.php
@@ -19,8 +19,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.PdfPreview.php b/op/op.PdfPreview.php
index a516c6088..4b963426f 100644
--- a/op/op.PdfPreview.php
+++ b/op/op.PdfPreview.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.Preview.php b/op/op.Preview.php
index d62d4a31c..3ded08099 100644
--- a/op/op.Preview.php
+++ b/op/op.Preview.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.RemoveApprovalLog.php b/op/op.RemoveApprovalLog.php
index 8c971a951..b5424342c 100644
--- a/op/op.RemoveApprovalLog.php
+++ b/op/op.RemoveApprovalLog.php
@@ -20,13 +20,12 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
include("../inc/inc.DBInit.php");
-include("../inc/inc.ClassAccessOperation.php");
include("../inc/inc.Authentication.php");
include("../inc/inc.ClassUI.php");
diff --git a/op/op.RemoveArchive.php b/op/op.RemoveArchive.php
index ff71bb74b..7338fcaa8 100644
--- a/op/op.RemoveArchive.php
+++ b/op/op.RemoveArchive.php
@@ -18,6 +18,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.RemoveDocument.php b/op/op.RemoveDocument.php
index 36fb9bee1..e889dbf14 100644
--- a/op/op.RemoveDocument.php
+++ b/op/op.RemoveDocument.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.RemoveDocumentFile.php b/op/op.RemoveDocumentFile.php
index f01114f94..5d16b9b39 100644
--- a/op/op.RemoveDocumentFile.php
+++ b/op/op.RemoveDocumentFile.php
@@ -18,6 +18,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.RemoveDocumentLink.php b/op/op.RemoveDocumentLink.php
index 87d088d54..3863be9a8 100644
--- a/op/op.RemoveDocumentLink.php
+++ b/op/op.RemoveDocumentLink.php
@@ -18,6 +18,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.RemoveDump.php b/op/op.RemoveDump.php
index 925891995..a7b8d39d5 100644
--- a/op/op.RemoveDump.php
+++ b/op/op.RemoveDump.php
@@ -18,6 +18,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.RemoveEvent.php b/op/op.RemoveEvent.php
index 998671038..93d1f3b30 100644
--- a/op/op.RemoveEvent.php
+++ b/op/op.RemoveEvent.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.RemoveFolder.php b/op/op.RemoveFolder.php
index caae1ad54..312945ea1 100644
--- a/op/op.RemoveFolder.php
+++ b/op/op.RemoveFolder.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.RemoveFolderFiles.php b/op/op.RemoveFolderFiles.php
index dd060c70f..f71c333b3 100644
--- a/op/op.RemoveFolderFiles.php
+++ b/op/op.RemoveFolderFiles.php
@@ -18,6 +18,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.RemoveFromClipboard.php b/op/op.RemoveFromClipboard.php
index 2bf32f712..d088fb6ac 100644
--- a/op/op.RemoveFromClipboard.php
+++ b/op/op.RemoveFromClipboard.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.RemoveLog.php b/op/op.RemoveLog.php
index ab33ad0bb..fd7c018a8 100644
--- a/op/op.RemoveLog.php
+++ b/op/op.RemoveLog.php
@@ -18,6 +18,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.RemoveReviewLog.php b/op/op.RemoveReviewLog.php
index 1e14c7b22..57621ebf5 100644
--- a/op/op.RemoveReviewLog.php
+++ b/op/op.RemoveReviewLog.php
@@ -20,13 +20,12 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
include("../inc/inc.DBInit.php");
-include("../inc/inc.ClassAccessOperation.php");
include("../inc/inc.Authentication.php");
include("../inc/inc.ClassUI.php");
diff --git a/op/op.RemoveTransitionFromWorkflow.php b/op/op.RemoveTransitionFromWorkflow.php
index 093ce03b6..2fb4f6188 100644
--- a/op/op.RemoveTransitionFromWorkflow.php
+++ b/op/op.RemoveTransitionFromWorkflow.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.RemoveVersion.php b/op/op.RemoveVersion.php
index d372521b5..0d9045a24 100644
--- a/op/op.RemoveVersion.php
+++ b/op/op.RemoveVersion.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.RemoveWorkflow.php b/op/op.RemoveWorkflow.php
index fe361eb7c..6da10a93a 100644
--- a/op/op.RemoveWorkflow.php
+++ b/op/op.RemoveWorkflow.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.RemoveWorkflowAction.php b/op/op.RemoveWorkflowAction.php
index 6d7e7c462..42844c586 100644
--- a/op/op.RemoveWorkflowAction.php
+++ b/op/op.RemoveWorkflowAction.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.RemoveWorkflowFromDocument.php b/op/op.RemoveWorkflowFromDocument.php
index ce83d2dd2..1dd21fb7e 100644
--- a/op/op.RemoveWorkflowFromDocument.php
+++ b/op/op.RemoveWorkflowFromDocument.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.RemoveWorkflowState.php b/op/op.RemoveWorkflowState.php
index 22ace8ff0..11a3a10fa 100644
--- a/op/op.RemoveWorkflowState.php
+++ b/op/op.RemoveWorkflowState.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.ResetSu.php b/op/op.ResetSu.php
index 12af8d57c..833ac2aef 100644
--- a/op/op.ResetSu.php
+++ b/op/op.ResetSu.php
@@ -17,6 +17,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.ReturnFromSubWorkflow.php b/op/op.ReturnFromSubWorkflow.php
index 23ff85ed0..e76da43bf 100644
--- a/op/op.ReturnFromSubWorkflow.php
+++ b/op/op.ReturnFromSubWorkflow.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.ReviewDocument.php b/op/op.ReviewDocument.php
index bbfa98de7..9e54f71f2 100644
--- a/op/op.ReviewDocument.php
+++ b/op/op.ReviewDocument.php
@@ -20,13 +20,12 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
include("../inc/inc.DBInit.php");
-include("../inc/inc.ClassAccessOperation.php");
include("../inc/inc.Authentication.php");
include("../inc/inc.ClassUI.php");
diff --git a/op/op.RewindWorkflow.php b/op/op.RewindWorkflow.php
index b01b6a278..1a6b7fe71 100644
--- a/op/op.RewindWorkflow.php
+++ b/op/op.RewindWorkflow.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.RunSubWorkflow.php b/op/op.RunSubWorkflow.php
index 3e08f5725..092e03710 100644
--- a/op/op.RunSubWorkflow.php
+++ b/op/op.RunSubWorkflow.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.SetExpires.php b/op/op.SetExpires.php
index 5efd3eee6..f18a7d303 100644
--- a/op/op.SetExpires.php
+++ b/op/op.SetExpires.php
@@ -20,6 +20,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.SetLanguage.php b/op/op.SetLanguage.php
index 06c07651b..9cb0b2d02 100644
--- a/op/op.SetLanguage.php
+++ b/op/op.SetLanguage.php
@@ -20,6 +20,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.SetReviewersApprovers.php b/op/op.SetReviewersApprovers.php
index 16d767e95..b2b4ef0d4 100644
--- a/op/op.SetReviewersApprovers.php
+++ b/op/op.SetReviewersApprovers.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.SetWorkflow.php b/op/op.SetWorkflow.php
index 13a961c00..8e9a9fda8 100644
--- a/op/op.SetWorkflow.php
+++ b/op/op.SetWorkflow.php
@@ -20,6 +20,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.Settings.php b/op/op.Settings.php
index 7c482f5a9..33cbecbaa 100644
--- a/op/op.Settings.php
+++ b/op/op.Settings.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.SubstituteUser.php b/op/op.SubstituteUser.php
index cb7b83bb7..9159642b4 100644
--- a/op/op.SubstituteUser.php
+++ b/op/op.SubstituteUser.php
@@ -17,6 +17,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.TransferDocument.php b/op/op.TransferDocument.php
index d146c50d3..a5bd98337 100644
--- a/op/op.TransferDocument.php
+++ b/op/op.TransferDocument.php
@@ -19,12 +19,12 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
include("../inc/inc.DBInit.php");
-include("../inc/inc.ClassAccessOperation.php");
include("../inc/inc.ClassUI.php");
include("../inc/inc.ClassController.php");
include("../inc/inc.Authentication.php");
diff --git a/op/op.TriggerWorkflow.php b/op/op.TriggerWorkflow.php
index a42511316..298e9849b 100644
--- a/op/op.TriggerWorkflow.php
+++ b/op/op.TriggerWorkflow.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.UnlockDocument.php b/op/op.UnlockDocument.php
index be90d36d9..f23a62f1e 100644
--- a/op/op.UnlockDocument.php
+++ b/op/op.UnlockDocument.php
@@ -20,8 +20,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/op/op.UpdateDocument.php b/op/op.UpdateDocument.php
index 117f20c99..c507b0abd 100644
--- a/op/op.UpdateDocument.php
+++ b/op/op.UpdateDocument.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.UpdateDocument2.php b/op/op.UpdateDocument2.php
index 609125075..64c7fbe5c 100644
--- a/op/op.UpdateDocument2.php
+++ b/op/op.UpdateDocument2.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.UploadChunks.php b/op/op.UploadChunks.php
index a05f18562..e5855423e 100644
--- a/op/op.UploadChunks.php
+++ b/op/op.UploadChunks.php
@@ -20,7 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
+include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.UserDefaultKeywords.php b/op/op.UserDefaultKeywords.php
index 93d03b845..6dddb58f1 100644
--- a/op/op.UserDefaultKeywords.php
+++ b/op/op.UserDefaultKeywords.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.UserListCsv.php b/op/op.UserListCsv.php
index 805787a62..1cc485721 100644
--- a/op/op.UserListCsv.php
+++ b/op/op.UserListCsv.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.UsrMgr.php b/op/op.UsrMgr.php
index 013c92ccd..2f5d20c3e 100644
--- a/op/op.UsrMgr.php
+++ b/op/op.UsrMgr.php
@@ -20,13 +20,12 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
include("../inc/inc.DBInit.php");
-include("../inc/inc.ClassAccessOperation.php");
include("../inc/inc.ClassUI.php");
include("../inc/inc.Authentication.php");
include("../inc/inc.ClassPasswordStrength.php");
diff --git a/op/op.ViewOnline.php b/op/op.ViewOnline.php
index 32d011bbc..73ec7446b 100644
--- a/op/op.ViewOnline.php
+++ b/op/op.ViewOnline.php
@@ -19,6 +19,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.WorkflowActionsMgr.php b/op/op.WorkflowActionsMgr.php
index fb91f0029..6ff1efe4e 100644
--- a/op/op.WorkflowActionsMgr.php
+++ b/op/op.WorkflowActionsMgr.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.WorkflowMgr.php b/op/op.WorkflowMgr.php
index c238f4455..c53ed7aa4 100644
--- a/op/op.WorkflowMgr.php
+++ b/op/op.WorkflowMgr.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.WorkflowStatesMgr.php b/op/op.WorkflowStatesMgr.php
index f80423001..b27342869 100644
--- a/op/op.WorkflowStatesMgr.php
+++ b/op/op.WorkflowStatesMgr.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
From 17dac9d1bcfe61d05b1547f49ca781e7306f0c5b Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 9 Nov 2022 06:41:20 +0100
Subject: [PATCH 030/247] pass object of SeedDMS_AccessOperation to view
---
out/out.RemoveArchive.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/out/out.RemoveArchive.php b/out/out.RemoveArchive.php
index 910bdf14c..ff47f93ec 100644
--- a/out/out.RemoveArchive.php
+++ b/out/out.RemoveArchive.php
@@ -29,6 +29,7 @@ require_once("inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
+$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings);
if (!$user->isAdmin()) {
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"));
}
@@ -41,6 +42,7 @@ $arkname = $_GET["arkname"];
if($view) {
$view->setParam('archive', $arkname);
+ $view->setParam('accessobject', $accessop);
$view($_GET);
exit;
}
From 3571d97f2fb00a184afcb8bd11d78934aa40bd3b Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 9 Nov 2022 09:25:45 +0100
Subject: [PATCH 031/247] fix inclusion of php files
---
inc/inc.Authentication.php | 1 -
inc/inc.Extension.php | 2 --
inc/inc.Settings.php | 2 ++
index.php | 12 ++++++------
out/out.AddDocument.php | 2 +-
out/out.AddEvent.php | 1 +
out/out.AddFile.php | 2 +-
out/out.AddSubFolder.php | 2 +-
out/out.AdminTools.php | 1 +
out/out.ApprovalSummary.php | 1 +
out/out.ApproveDocument.php | 2 +-
out/out.AttributeMgr.php | 1 +
out/out.BackupTools.php | 2 +-
out/out.Calendar.php | 1 +
out/out.Categories.php | 1 +
out/out.CategoryChooser.php | 1 +
out/out.ChangePassword.php | 2 +-
out/out.Charts.php | 2 +-
out/out.Clipboard.php | 1 +
out/out.CreateIndex.php | 2 +-
out/out.DefaultKeywords.php | 1 +
out/out.DocumentAccess.php | 2 +-
out/out.DocumentChooser.php | 1 +
out/out.DocumentNotify.php | 2 +-
out/out.DocumentVersionDetail.php | 2 +-
out/out.DropFolderChooser.php | 1 +
out/out.EditAttributes.php | 2 +-
out/out.EditComment.php | 2 +-
out/out.EditDocument.php | 3 +--
out/out.EditDocumentFile.php | 2 +-
out/out.EditEvent.php | 1 +
out/out.EditFolder.php | 2 +-
out/out.EditOnline.php | 2 +-
out/out.EditUserData.php | 1 +
out/out.ErrorDlg.php | 2 +-
out/out.ExpiredDocuments.php | 1 +
out/out.ExtensionMgr.php | 2 +-
out/out.FolderAccess.php | 2 +-
out/out.FolderChooser.php | 1 +
out/out.FolderNotify.php | 2 +-
out/out.ForcePasswordChange.php | 1 +
out/out.GroupMgr.php | 1 +
out/out.GroupView.php | 1 +
out/out.Help.php | 1 +
out/out.Hooks.php | 1 +
out/out.ImportFS.php | 2 +-
out/out.ImportUsers.php | 2 +-
out/out.IndexInfo.php | 2 +-
out/out.Indexer.php | 2 +-
out/out.Info.php | 2 +-
out/out.KeywordChooser.php | 1 +
out/out.LogManagement.php | 2 +-
out/out.Login.php | 2 +-
out/out.ManageNotify.php | 1 +
out/out.MoveDocument.php | 2 +-
out/out.MoveFolder.php | 2 +-
out/out.MyAccount.php | 1 +
out/out.MyDocuments.php | 1 +
out/out.NotificationServices.php | 1 +
out/out.ObjectCheck.php | 2 +-
out/out.OpensearchDesc.php | 2 +-
out/out.OverrideContentStatus.php | 2 +-
out/out.PasswordForgotten.php | 1 +
out/out.PasswordSend.php | 1 +
out/out.RemoveApprovalLog.php | 2 +-
out/out.RemoveArchive.php | 1 +
out/out.RemoveDocument.php | 3 +--
out/out.RemoveDocumentFile.php | 3 +--
out/out.RemoveDump.php | 1 +
out/out.RemoveEvent.php | 1 +
out/out.RemoveFolder.php | 2 +-
out/out.RemoveFolderFiles.php | 1 +
out/out.RemoveGroup.php | 1 +
out/out.RemoveLog.php | 1 +
out/out.RemoveReviewLog.php | 2 +-
out/out.RemoveUser.php | 1 +
out/out.RemoveUserFromProcesses.php | 1 +
out/out.RemoveVersion.php | 2 +-
out/out.RemoveWorkflow.php | 2 +-
out/out.RemoveWorkflowFromDocument.php | 3 +--
out/out.ReturnFromSubWorkflow.php | 2 +-
out/out.ReviewDocument.php | 3 +--
out/out.ReviewSummary.php | 1 +
out/out.RewindWorkflow.php | 2 +-
out/out.RunSubWorkflow.php | 3 +--
out/out.Search.php | 3 +--
out/out.SendLoginData.php | 2 ++
out/out.Session.php | 2 +-
out/out.SetExpires.php | 3 +--
out/out.SetReviewersApprovers.php | 2 +-
out/out.SetWorkflow.php | 3 +--
out/out.Settings.php | 1 +
out/out.Setup2Factor.php | 2 ++
out/out.Statistic.php | 2 +-
out/out.SubstituteUser.php | 3 +--
out/out.Tasks.php | 1 +
out/out.Timeline.php | 3 +--
out/out.TransferDocument.php | 3 +--
out/out.TransferObjects.php | 1 +
out/out.TriggerWorkflow.php | 2 +-
out/out.UpdateDocument.php | 2 +-
out/out.UpdateDocument2.php | 2 +-
out/out.UserDefaultKeywords.php | 1 +
out/out.UserImage.php | 1 +
out/out.UserList.php | 1 +
out/out.UsrMgr.php | 1 +
out/out.UsrView.php | 1 +
out/out.ViewDocument.php | 3 +--
out/out.ViewEvent.php | 1 +
out/out.ViewFolder.php | 2 +-
out/out.WorkflowActionsMgr.php | 1 +
out/out.WorkflowGraph.php | 1 +
out/out.WorkflowMgr.php | 1 +
out/out.WorkflowStatesMgr.php | 1 +
out/out.WorkflowSummary.php | 1 +
115 files changed, 121 insertions(+), 81 deletions(-)
diff --git a/inc/inc.Authentication.php b/inc/inc.Authentication.php
index fb4ee2455..a94b601f6 100644
--- a/inc/inc.Authentication.php
+++ b/inc/inc.Authentication.php
@@ -12,7 +12,6 @@
* @version Release: @package_version@
*/
-require_once("inc.Utils.php");
require_once("inc.ClassNotificationService.php");
require_once("inc.ClassEmailNotify.php");
require_once("inc.ClassSession.php");
diff --git a/inc/inc.Extension.php b/inc/inc.Extension.php
index 4fdb0329b..016240071 100644
--- a/inc/inc.Extension.php
+++ b/inc/inc.Extension.php
@@ -15,8 +15,6 @@ global $logger;
require "inc.ClassExtensionMgr.php";
require_once "inc.ClassExtBase.php";
-require_once "inc.Version.php";
-require_once "inc.Utils.php";
$extMgr = new SeedDMS_Extension_Mgr($settings->_rootDir."/ext", $settings->_cacheDir, $settings->_repositoryUrl, $settings->_proxyUrl, $settings->_proxyUser, $settings->_proxyPassword);
diff --git a/inc/inc.Settings.php b/inc/inc.Settings.php
index 83688f255..b19345afb 100644
--- a/inc/inc.Settings.php
+++ b/inc/inc.Settings.php
@@ -83,3 +83,5 @@ ini_set('include_path', $settings->_rootDir.'../pear'. PATH_SEPARATOR .ini_get('
/* composer is installed in pear directory, but install tool does not need it */
if(!defined("SEEDDMS_INSTALL"))
require_once 'vendor/autoload.php';
+
+require_once "inc.Version.php";
diff --git a/index.php b/index.php
index 049d7a48e..4b30fbbcb 100644
--- a/index.php
+++ b/index.php
@@ -20,12 +20,12 @@
include("inc/inc.Settings.php");
if(true) {
- include("inc/inc.LogInit.php");
- include("inc/inc.Utils.php");
- include("inc/inc.Language.php");
- include("inc/inc.Init.php");
- include("inc/inc.Extension.php");
- include("inc/inc.DBInit.php");
+ require_once("inc/inc.Utils.php");
+ require_once("inc/inc.LogInit.php");
+ require_once("inc/inc.Language.php");
+ require_once("inc/inc.Init.php");
+ require_once("inc/inc.Extension.php");
+ require_once("inc/inc.DBInit.php");
require "vendor/autoload.php";
diff --git a/out/out.AddDocument.php b/out/out.AddDocument.php
index 4062b943d..6bfc1c3c5 100644
--- a/out/out.AddDocument.php
+++ b/out/out.AddDocument.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.AddEvent.php b/out/out.AddEvent.php
index 2562b43ba..d8a98ba5b 100644
--- a/out/out.AddEvent.php
+++ b/out/out.AddEvent.php
@@ -19,6 +19,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.AddFile.php b/out/out.AddFile.php
index 09b8673f8..9b24a6a23 100644
--- a/out/out.AddFile.php
+++ b/out/out.AddFile.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.AddSubFolder.php b/out/out.AddSubFolder.php
index cca88ea16..5b859337d 100644
--- a/out/out.AddSubFolder.php
+++ b/out/out.AddSubFolder.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.AdminTools.php b/out/out.AdminTools.php
index 35557c271..33154667c 100644
--- a/out/out.AdminTools.php
+++ b/out/out.AdminTools.php
@@ -19,6 +19,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.ApprovalSummary.php b/out/out.ApprovalSummary.php
index 8fff6f38e..89f12c6a7 100644
--- a/out/out.ApprovalSummary.php
+++ b/out/out.ApprovalSummary.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.ApproveDocument.php b/out/out.ApproveDocument.php
index 0b44248e1..32695db63 100644
--- a/out/out.ApproveDocument.php
+++ b/out/out.ApproveDocument.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.AttributeMgr.php b/out/out.AttributeMgr.php
index f882ec36f..f769f6900 100644
--- a/out/out.AttributeMgr.php
+++ b/out/out.AttributeMgr.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.BackupTools.php b/out/out.BackupTools.php
index 105f5fa9f..ced1fc6fd 100644
--- a/out/out.BackupTools.php
+++ b/out/out.BackupTools.php
@@ -19,8 +19,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.Calendar.php b/out/out.Calendar.php
index 22a40b405..b6c8f9ea4 100644
--- a/out/out.Calendar.php
+++ b/out/out.Calendar.php
@@ -19,6 +19,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.ClassCalendar.php");
require_once("inc/inc.Language.php");
diff --git a/out/out.Categories.php b/out/out.Categories.php
index 8630776d6..ea5462135 100644
--- a/out/out.Categories.php
+++ b/out/out.Categories.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.CategoryChooser.php b/out/out.CategoryChooser.php
index b1fed4a5b..b690ffa78 100644
--- a/out/out.CategoryChooser.php
+++ b/out/out.CategoryChooser.php
@@ -20,6 +20,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.ClassUI.php");
require_once("inc/inc.Language.php");
diff --git a/out/out.ChangePassword.php b/out/out.ChangePassword.php
index 35baaff55..a01e4b73d 100644
--- a/out/out.ChangePassword.php
+++ b/out/out.ChangePassword.php
@@ -20,8 +20,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.Charts.php b/out/out.Charts.php
index 5dcd83c8b..7f7ae116f 100644
--- a/out/out.Charts.php
+++ b/out/out.Charts.php
@@ -19,8 +19,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.Clipboard.php b/out/out.Clipboard.php
index 91dbb4238..4460a3012 100644
--- a/out/out.Clipboard.php
+++ b/out/out.Clipboard.php
@@ -22,6 +22,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.CreateIndex.php b/out/out.CreateIndex.php
index a17958db5..b83928bd0 100644
--- a/out/out.CreateIndex.php
+++ b/out/out.CreateIndex.php
@@ -22,7 +22,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.Version.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.DefaultKeywords.php b/out/out.DefaultKeywords.php
index a1a3d4a21..02713bc37 100644
--- a/out/out.DefaultKeywords.php
+++ b/out/out.DefaultKeywords.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.DocumentAccess.php b/out/out.DocumentAccess.php
index 008edfc32..e00d53c4f 100644
--- a/out/out.DocumentAccess.php
+++ b/out/out.DocumentAccess.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.DocumentChooser.php b/out/out.DocumentChooser.php
index 77fe21698..6465f02d3 100644
--- a/out/out.DocumentChooser.php
+++ b/out/out.DocumentChooser.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.DocumentNotify.php b/out/out.DocumentNotify.php
index 4cf0987e2..2a2780c84 100644
--- a/out/out.DocumentNotify.php
+++ b/out/out.DocumentNotify.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.DocumentVersionDetail.php b/out/out.DocumentVersionDetail.php
index 58923d132..24d73972e 100644
--- a/out/out.DocumentVersionDetail.php
+++ b/out/out.DocumentVersionDetail.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.DropFolderChooser.php b/out/out.DropFolderChooser.php
index 55efd5165..112892928 100644
--- a/out/out.DropFolderChooser.php
+++ b/out/out.DropFolderChooser.php
@@ -20,6 +20,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.EditAttributes.php b/out/out.EditAttributes.php
index 80c80bf0d..8a933efde 100644
--- a/out/out.EditAttributes.php
+++ b/out/out.EditAttributes.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.EditComment.php b/out/out.EditComment.php
index 953c9042f..e5b336891 100644
--- a/out/out.EditComment.php
+++ b/out/out.EditComment.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.EditDocument.php b/out/out.EditDocument.php
index bc242bc5a..205dff0be 100644
--- a/out/out.EditDocument.php
+++ b/out/out.EditDocument.php
@@ -20,14 +20,13 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.php");
-require_once("inc/inc.ClassAccessOperation.php");
require_once("inc/inc.Authentication.php");
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) {
diff --git a/out/out.EditDocumentFile.php b/out/out.EditDocumentFile.php
index dd0927070..1a8052493 100644
--- a/out/out.EditDocumentFile.php
+++ b/out/out.EditDocumentFile.php
@@ -19,8 +19,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.EditEvent.php b/out/out.EditEvent.php
index cebb0a59a..9ed579b31 100644
--- a/out/out.EditEvent.php
+++ b/out/out.EditEvent.php
@@ -19,6 +19,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.EditFolder.php b/out/out.EditFolder.php
index 85e4be781..2ebba2de3 100644
--- a/out/out.EditFolder.php
+++ b/out/out.EditFolder.php
@@ -20,8 +20,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.EditOnline.php b/out/out.EditOnline.php
index 8f381066b..2ba54550d 100644
--- a/out/out.EditOnline.php
+++ b/out/out.EditOnline.php
@@ -20,13 +20,13 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.php");
-require_once("inc/inc.ClassAccessOperation.php");
require_once("inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
diff --git a/out/out.EditUserData.php b/out/out.EditUserData.php
index 4694261db..7283b967c 100644
--- a/out/out.EditUserData.php
+++ b/out/out.EditUserData.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.ErrorDlg.php b/out/out.ErrorDlg.php
index 015d0377e..4f2744e20 100644
--- a/out/out.ErrorDlg.php
+++ b/out/out.ErrorDlg.php
@@ -24,8 +24,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.ExpiredDocuments.php b/out/out.ExpiredDocuments.php
index 9c35deadd..c35d8de0b 100644
--- a/out/out.ExpiredDocuments.php
+++ b/out/out.ExpiredDocuments.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.ExtensionMgr.php b/out/out.ExtensionMgr.php
index f3e45fd2f..19fef05f0 100644
--- a/out/out.ExtensionMgr.php
+++ b/out/out.ExtensionMgr.php
@@ -18,7 +18,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.Version.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.FolderAccess.php b/out/out.FolderAccess.php
index 70172e001..38d567a7f 100644
--- a/out/out.FolderAccess.php
+++ b/out/out.FolderAccess.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.FolderChooser.php b/out/out.FolderChooser.php
index d45c13c73..1cf5b27e2 100644
--- a/out/out.FolderChooser.php
+++ b/out/out.FolderChooser.php
@@ -20,6 +20,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.FolderNotify.php b/out/out.FolderNotify.php
index 3411eca66..12da6d54b 100644
--- a/out/out.FolderNotify.php
+++ b/out/out.FolderNotify.php
@@ -20,8 +20,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.ForcePasswordChange.php b/out/out.ForcePasswordChange.php
index 36189235c..4b9d7a530 100644
--- a/out/out.ForcePasswordChange.php
+++ b/out/out.ForcePasswordChange.php
@@ -32,6 +32,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.GroupMgr.php b/out/out.GroupMgr.php
index 7ebf936a4..48c0f67d9 100644
--- a/out/out.GroupMgr.php
+++ b/out/out.GroupMgr.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.GroupView.php b/out/out.GroupView.php
index 7442f8783..2a2eab124 100644
--- a/out/out.GroupView.php
+++ b/out/out.GroupView.php
@@ -19,6 +19,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.Help.php b/out/out.Help.php
index 7de5bd165..a43662e33 100644
--- a/out/out.Help.php
+++ b/out/out.Help.php
@@ -19,6 +19,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.Hooks.php b/out/out.Hooks.php
index 6acc28c43..987e032c4 100644
--- a/out/out.Hooks.php
+++ b/out/out.Hooks.php
@@ -18,6 +18,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.ImportFS.php b/out/out.ImportFS.php
index 782c55539..3290ee82e 100644
--- a/out/out.ImportFS.php
+++ b/out/out.ImportFS.php
@@ -19,8 +19,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.ImportUsers.php b/out/out.ImportUsers.php
index 199763a26..71b894215 100644
--- a/out/out.ImportUsers.php
+++ b/out/out.ImportUsers.php
@@ -19,8 +19,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.IndexInfo.php b/out/out.IndexInfo.php
index 2a08d87f5..b8f309ee1 100644
--- a/out/out.IndexInfo.php
+++ b/out/out.IndexInfo.php
@@ -21,7 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.Version.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.Indexer.php b/out/out.Indexer.php
index 9b6fc49ca..c0b12ad37 100644
--- a/out/out.Indexer.php
+++ b/out/out.Indexer.php
@@ -21,7 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.Version.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.Info.php b/out/out.Info.php
index fb8fb3468..04338665d 100644
--- a/out/out.Info.php
+++ b/out/out.Info.php
@@ -21,7 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.Version.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.KeywordChooser.php b/out/out.KeywordChooser.php
index b1402036b..a0d2eb420 100644
--- a/out/out.KeywordChooser.php
+++ b/out/out.KeywordChooser.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.LogManagement.php b/out/out.LogManagement.php
index bcf7a699f..6b7f66d48 100644
--- a/out/out.LogManagement.php
+++ b/out/out.LogManagement.php
@@ -19,8 +19,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.Login.php b/out/out.Login.php
index 0683b57d6..d3307be62 100644
--- a/out/out.Login.php
+++ b/out/out.Login.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.ManageNotify.php b/out/out.ManageNotify.php
index dcf8c3840..19b1f1ce2 100644
--- a/out/out.ManageNotify.php
+++ b/out/out.ManageNotify.php
@@ -19,6 +19,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.MoveDocument.php b/out/out.MoveDocument.php
index 4efea96ee..dc727ba6c 100644
--- a/out/out.MoveDocument.php
+++ b/out/out.MoveDocument.php
@@ -20,8 +20,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.MoveFolder.php b/out/out.MoveFolder.php
index d96dca56f..e1ebde22e 100644
--- a/out/out.MoveFolder.php
+++ b/out/out.MoveFolder.php
@@ -20,8 +20,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.MyAccount.php b/out/out.MyAccount.php
index e68a70bb4..1a7014abe 100644
--- a/out/out.MyAccount.php
+++ b/out/out.MyAccount.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.MyDocuments.php b/out/out.MyDocuments.php
index e64a5b9ed..7cfa317fb 100644
--- a/out/out.MyDocuments.php
+++ b/out/out.MyDocuments.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.NotificationServices.php b/out/out.NotificationServices.php
index 9367fcf44..f985d37ed 100644
--- a/out/out.NotificationServices.php
+++ b/out/out.NotificationServices.php
@@ -18,6 +18,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.ObjectCheck.php b/out/out.ObjectCheck.php
index c393a04c1..e5ac6bedf 100644
--- a/out/out.ObjectCheck.php
+++ b/out/out.ObjectCheck.php
@@ -21,7 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.Version.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.OpensearchDesc.php b/out/out.OpensearchDesc.php
index 5d34d75b9..d1240efab 100644
--- a/out/out.OpensearchDesc.php
+++ b/out/out.OpensearchDesc.php
@@ -20,8 +20,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.OverrideContentStatus.php b/out/out.OverrideContentStatus.php
index 1248a8e04..51564fad4 100644
--- a/out/out.OverrideContentStatus.php
+++ b/out/out.OverrideContentStatus.php
@@ -20,8 +20,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.PasswordForgotten.php b/out/out.PasswordForgotten.php
index 2573d8d59..3d595b9d2 100644
--- a/out/out.PasswordForgotten.php
+++ b/out/out.PasswordForgotten.php
@@ -20,6 +20,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.PasswordSend.php b/out/out.PasswordSend.php
index 591bc0a5e..5d8d5904c 100644
--- a/out/out.PasswordSend.php
+++ b/out/out.PasswordSend.php
@@ -20,6 +20,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.RemoveApprovalLog.php b/out/out.RemoveApprovalLog.php
index d310c66de..453c22e3e 100644
--- a/out/out.RemoveApprovalLog.php
+++ b/out/out.RemoveApprovalLog.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.RemoveArchive.php b/out/out.RemoveArchive.php
index ff47f93ec..5b19e2966 100644
--- a/out/out.RemoveArchive.php
+++ b/out/out.RemoveArchive.php
@@ -19,6 +19,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.RemoveDocument.php b/out/out.RemoveDocument.php
index 170d272aa..0a19c9e0c 100644
--- a/out/out.RemoveDocument.php
+++ b/out/out.RemoveDocument.php
@@ -20,14 +20,13 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.php");
-require_once("inc/inc.ClassAccessOperation.php");
require_once("inc/inc.Authentication.php");
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) {
diff --git a/out/out.RemoveDocumentFile.php b/out/out.RemoveDocumentFile.php
index dd0927070..3a687d410 100644
--- a/out/out.RemoveDocumentFile.php
+++ b/out/out.RemoveDocumentFile.php
@@ -19,14 +19,13 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.php");
-require_once("inc/inc.ClassAccessOperation.php");
require_once("inc/inc.Authentication.php");
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) {
diff --git a/out/out.RemoveDump.php b/out/out.RemoveDump.php
index b4ef8cf65..985897b78 100644
--- a/out/out.RemoveDump.php
+++ b/out/out.RemoveDump.php
@@ -19,6 +19,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.RemoveEvent.php b/out/out.RemoveEvent.php
index 4e6b02bd8..5b47c79f9 100644
--- a/out/out.RemoveEvent.php
+++ b/out/out.RemoveEvent.php
@@ -19,6 +19,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.RemoveFolder.php b/out/out.RemoveFolder.php
index ad172c7d0..de7bb985e 100644
--- a/out/out.RemoveFolder.php
+++ b/out/out.RemoveFolder.php
@@ -20,8 +20,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.RemoveFolderFiles.php b/out/out.RemoveFolderFiles.php
index 01bc467a2..1f8b2f7bf 100644
--- a/out/out.RemoveFolderFiles.php
+++ b/out/out.RemoveFolderFiles.php
@@ -19,6 +19,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.RemoveGroup.php b/out/out.RemoveGroup.php
index 5956fc765..7c3284324 100644
--- a/out/out.RemoveGroup.php
+++ b/out/out.RemoveGroup.php
@@ -20,6 +20,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.RemoveLog.php b/out/out.RemoveLog.php
index 4fa445af8..0e4b1f16b 100644
--- a/out/out.RemoveLog.php
+++ b/out/out.RemoveLog.php
@@ -19,6 +19,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.RemoveReviewLog.php b/out/out.RemoveReviewLog.php
index 8e46ac83c..41b81e9c5 100644
--- a/out/out.RemoveReviewLog.php
+++ b/out/out.RemoveReviewLog.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.RemoveUser.php b/out/out.RemoveUser.php
index 4c6cd6d45..959091162 100644
--- a/out/out.RemoveUser.php
+++ b/out/out.RemoveUser.php
@@ -20,6 +20,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.RemoveUserFromProcesses.php b/out/out.RemoveUserFromProcesses.php
index 4521647fc..610d5810a 100644
--- a/out/out.RemoveUserFromProcesses.php
+++ b/out/out.RemoveUserFromProcesses.php
@@ -20,6 +20,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.RemoveVersion.php b/out/out.RemoveVersion.php
index e8b58ba24..3b1f5664b 100644
--- a/out/out.RemoveVersion.php
+++ b/out/out.RemoveVersion.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.RemoveWorkflow.php b/out/out.RemoveWorkflow.php
index 90606a13c..98fb26936 100644
--- a/out/out.RemoveWorkflow.php
+++ b/out/out.RemoveWorkflow.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.RemoveWorkflowFromDocument.php b/out/out.RemoveWorkflowFromDocument.php
index 883924713..0a91e68a4 100644
--- a/out/out.RemoveWorkflowFromDocument.php
+++ b/out/out.RemoveWorkflowFromDocument.php
@@ -21,14 +21,13 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.php");
-require_once("inc/inc.ClassAccessOperation.php");
require_once("inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
diff --git a/out/out.ReturnFromSubWorkflow.php b/out/out.ReturnFromSubWorkflow.php
index 7313e08cd..cd1c2ef73 100644
--- a/out/out.ReturnFromSubWorkflow.php
+++ b/out/out.ReturnFromSubWorkflow.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.ReviewDocument.php b/out/out.ReviewDocument.php
index e1ef11747..c61eb533e 100644
--- a/out/out.ReviewDocument.php
+++ b/out/out.ReviewDocument.php
@@ -21,14 +21,13 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.php");
-require_once("inc/inc.ClassAccessOperation.php");
require_once("inc/inc.Authentication.php");
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) {
diff --git a/out/out.ReviewSummary.php b/out/out.ReviewSummary.php
index 7b651594c..3632abc60 100644
--- a/out/out.ReviewSummary.php
+++ b/out/out.ReviewSummary.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.RewindWorkflow.php b/out/out.RewindWorkflow.php
index 7d3ba11bb..137852fb2 100644
--- a/out/out.RewindWorkflow.php
+++ b/out/out.RewindWorkflow.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.RunSubWorkflow.php b/out/out.RunSubWorkflow.php
index b54bcef87..58868fef2 100644
--- a/out/out.RunSubWorkflow.php
+++ b/out/out.RunSubWorkflow.php
@@ -21,14 +21,13 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.php");
-require_once("inc/inc.ClassAccessOperation.php");
require_once("inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
diff --git a/out/out.Search.php b/out/out.Search.php
index ad0ff113c..7d0a75da4 100644
--- a/out/out.Search.php
+++ b/out/out.Search.php
@@ -20,14 +20,13 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.php");
-require_once("inc/inc.ClassAccessOperation.php");
require_once("inc/inc.Authentication.php");
function getTime() {
diff --git a/out/out.SendLoginData.php b/out/out.SendLoginData.php
index 97db9e237..82585ed49 100644
--- a/out/out.SendLoginData.php
+++ b/out/out.SendLoginData.php
@@ -20,6 +20,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.Session.php b/out/out.Session.php
index 0e1d9c126..1d6a830b1 100644
--- a/out/out.Session.php
+++ b/out/out.Session.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.SetExpires.php b/out/out.SetExpires.php
index 10ba93fab..614738ebc 100644
--- a/out/out.SetExpires.php
+++ b/out/out.SetExpires.php
@@ -21,14 +21,13 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.php");
-require_once("inc/inc.ClassAccessOperation.php");
require_once("inc/inc.Authentication.php");
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) {
diff --git a/out/out.SetReviewersApprovers.php b/out/out.SetReviewersApprovers.php
index 5e27ec33d..f10350a59 100644
--- a/out/out.SetReviewersApprovers.php
+++ b/out/out.SetReviewersApprovers.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.SetWorkflow.php b/out/out.SetWorkflow.php
index 72a31862b..5518081c5 100644
--- a/out/out.SetWorkflow.php
+++ b/out/out.SetWorkflow.php
@@ -21,14 +21,13 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.php");
-require_once("inc/inc.ClassAccessOperation.php");
require_once("inc/inc.Authentication.php");
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) {
diff --git a/out/out.Settings.php b/out/out.Settings.php
index 49a381598..6f5422620 100644
--- a/out/out.Settings.php
+++ b/out/out.Settings.php
@@ -19,6 +19,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.Setup2Factor.php b/out/out.Setup2Factor.php
index ac41c473d..f754c864f 100644
--- a/out/out.Setup2Factor.php
+++ b/out/out.Setup2Factor.php
@@ -13,6 +13,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.Statistic.php b/out/out.Statistic.php
index 4de20e18d..c50f12949 100644
--- a/out/out.Statistic.php
+++ b/out/out.Statistic.php
@@ -19,8 +19,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.SubstituteUser.php b/out/out.SubstituteUser.php
index 1d6800cd7..0a1a5178d 100644
--- a/out/out.SubstituteUser.php
+++ b/out/out.SubstituteUser.php
@@ -18,14 +18,13 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.php");
-require_once("inc/inc.ClassAccessOperation.php");
require_once("inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
diff --git a/out/out.Tasks.php b/out/out.Tasks.php
index c5bc8b278..272799e4f 100644
--- a/out/out.Tasks.php
+++ b/out/out.Tasks.php
@@ -22,6 +22,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.Timeline.php b/out/out.Timeline.php
index ed7d8f2d2..a7b6e05b2 100644
--- a/out/out.Timeline.php
+++ b/out/out.Timeline.php
@@ -19,14 +19,13 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.php");
-require_once("inc/inc.ClassAccessOperation.php");
require_once("inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
diff --git a/out/out.TransferDocument.php b/out/out.TransferDocument.php
index c10915ee0..e5063bc10 100644
--- a/out/out.TransferDocument.php
+++ b/out/out.TransferDocument.php
@@ -20,14 +20,13 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.php");
-require_once("inc/inc.ClassAccessOperation.php");
require_once("inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
diff --git a/out/out.TransferObjects.php b/out/out.TransferObjects.php
index a8918e107..9bd53b620 100644
--- a/out/out.TransferObjects.php
+++ b/out/out.TransferObjects.php
@@ -20,6 +20,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.TriggerWorkflow.php b/out/out.TriggerWorkflow.php
index e4a2e81ed..9017396be 100644
--- a/out/out.TriggerWorkflow.php
+++ b/out/out.TriggerWorkflow.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.UpdateDocument.php b/out/out.UpdateDocument.php
index 333c5f980..47f2494d0 100644
--- a/out/out.UpdateDocument.php
+++ b/out/out.UpdateDocument.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.UpdateDocument2.php b/out/out.UpdateDocument2.php
index 97a978981..77a4e612f 100644
--- a/out/out.UpdateDocument2.php
+++ b/out/out.UpdateDocument2.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.UserDefaultKeywords.php b/out/out.UserDefaultKeywords.php
index 80843d9c7..ff13e526a 100644
--- a/out/out.UserDefaultKeywords.php
+++ b/out/out.UserDefaultKeywords.php
@@ -20,6 +20,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.UserImage.php b/out/out.UserImage.php
index 6287c3eae..3f0378472 100644
--- a/out/out.UserImage.php
+++ b/out/out.UserImage.php
@@ -20,6 +20,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.UserList.php b/out/out.UserList.php
index bf7d84282..9af34b3bc 100644
--- a/out/out.UserList.php
+++ b/out/out.UserList.php
@@ -19,6 +19,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.UsrMgr.php b/out/out.UsrMgr.php
index a56ae5f8f..5aaeda188 100644
--- a/out/out.UsrMgr.php
+++ b/out/out.UsrMgr.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.UsrView.php b/out/out.UsrView.php
index 1bb439728..e660797bf 100644
--- a/out/out.UsrView.php
+++ b/out/out.UsrView.php
@@ -19,6 +19,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.ViewDocument.php b/out/out.ViewDocument.php
index e1013cb84..12917eaf2 100644
--- a/out/out.ViewDocument.php
+++ b/out/out.ViewDocument.php
@@ -21,14 +21,13 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.php");
-require_once("inc/inc.ClassAccessOperation.php");
require_once("inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
diff --git a/out/out.ViewEvent.php b/out/out.ViewEvent.php
index 1dd0b214e..c54e25739 100644
--- a/out/out.ViewEvent.php
+++ b/out/out.ViewEvent.php
@@ -19,6 +19,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.ViewFolder.php b/out/out.ViewFolder.php
index ec5172381..e4880beed 100644
--- a/out/out.ViewFolder.php
+++ b/out/out.ViewFolder.php
@@ -21,8 +21,8 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
-require_once("inc/inc.LogInit.php");
require_once("inc/inc.Utils.php");
+require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php");
diff --git a/out/out.WorkflowActionsMgr.php b/out/out.WorkflowActionsMgr.php
index e2e7fdcaa..0f7590eb0 100644
--- a/out/out.WorkflowActionsMgr.php
+++ b/out/out.WorkflowActionsMgr.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.WorkflowGraph.php b/out/out.WorkflowGraph.php
index 0be7f7c33..dc58677aa 100644
--- a/out/out.WorkflowGraph.php
+++ b/out/out.WorkflowGraph.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.WorkflowMgr.php b/out/out.WorkflowMgr.php
index b50c79160..ce2f18708 100644
--- a/out/out.WorkflowMgr.php
+++ b/out/out.WorkflowMgr.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.WorkflowStatesMgr.php b/out/out.WorkflowStatesMgr.php
index d5e8f056a..183df5417 100644
--- a/out/out.WorkflowStatesMgr.php
+++ b/out/out.WorkflowStatesMgr.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
diff --git a/out/out.WorkflowSummary.php b/out/out.WorkflowSummary.php
index 88bd32ffc..22993fdc6 100644
--- a/out/out.WorkflowSummary.php
+++ b/out/out.WorkflowSummary.php
@@ -21,6 +21,7 @@
if(!isset($settings))
require_once("../inc/inc.Settings.php");
+require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
require_once("inc/inc.Init.php");
From 5438d95eb5579c15a576b7e532b8d7318b6d904f Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 9 Nov 2022 10:26:08 +0100
Subject: [PATCH 032/247] add SeedDMS_Core_Attribute::getParsedValue() and use
it in SeedDMS_Core_Object:: getAttributeValue()
---
SeedDMS_Core/Core/inc.ClassAttribute.php | 21 +++++++++++++++++++++
SeedDMS_Core/Core/inc.ClassObject.php | 4 ++--
SeedDMS_Core/package.xml | 1 +
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/SeedDMS_Core/Core/inc.ClassAttribute.php b/SeedDMS_Core/Core/inc.ClassAttribute.php
index 93f8a3e41..945b1b0c2 100644
--- a/SeedDMS_Core/Core/inc.ClassAttribute.php
+++ b/SeedDMS_Core/Core/inc.ClassAttribute.php
@@ -120,6 +120,27 @@ class SeedDMS_Core_Attribute { /* {{{ */
*/
function getValue() { return $this->_value; }
+ /**
+ * Return attribute value parsed into a php type or object
+ *
+ * This function will return the value of multi value attributes
+ * including the separator char.
+ *
+ * @return string the attribute value as it is stored in the database.
+ */
+ function getParsedValue() { /* {{{ */
+ switch($this->_attrdef->getType()) {
+ case SeedDMS_Core_AttributeDefinition::type_float:
+ return (float) $this->_value;
+ case SeedDMS_Core_AttributeDefinition::type_boolean:
+ return (bool) $this->_value;
+ case SeedDMS_Core_AttributeDefinition::type_int:
+ return (int) $this->_value;
+ default:
+ return $this->_value;
+ }
+ } /* }}} */
+
/**
* Return attribute values as an array
*
diff --git a/SeedDMS_Core/Core/inc.ClassObject.php b/SeedDMS_Core/Core/inc.ClassObject.php
index ec1fa3124..8bcc68a15 100644
--- a/SeedDMS_Core/Core/inc.ClassObject.php
+++ b/SeedDMS_Core/Core/inc.ClassObject.php
@@ -152,7 +152,7 @@ class SeedDMS_Core_Object { /* {{{ */
}
if (isset($this->_attributes[$attrdef->getId()])) {
- $value = $this->_attributes[$attrdef->getId()]->getValue();
+ $value = $this->_attributes[$attrdef->getId()]->getValue();
if($attrdef->getMultipleValues()) {
$sep = substr($value, 0, 1);
$vsep = $attrdef->getValueSetSeparator();
@@ -166,7 +166,7 @@ class SeedDMS_Core_Object { /* {{{ */
else
return(array($value));
} else {
- return $value;
+ return $this->_attributes[$attrdef->getId()]->getParsedValue();
}
} else
return false;
diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml
index 83473231c..51e1c0914 100644
--- a/SeedDMS_Core/package.xml
+++ b/SeedDMS_Core/package.xml
@@ -28,6 +28,7 @@
- fix SeedDMS_Core_File::fileExtension()
- SeedDMS_Core_DMS::createPasswordRequest() creates a cryptographically secure hash
- fix sql error when deleting a folder attribute
+- add SeedDMS_Core_Attribute::getParsedValue() and use it in SeedDMS_Core_Object::getAttributeValue()
From 2ce2fd07feca57aba09c08813cd32485569433e8 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 9 Nov 2022 12:22:23 +0100
Subject: [PATCH 033/247] add version 5.1.28 and updated notes of 6.0.21
---
SeedDMS_Core/package.xml | 26 +++++++++++++++++++++-----
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml
index be73778c1..589cbe144 100644
--- a/SeedDMS_Core/package.xml
+++ b/SeedDMS_Core/package.xml
@@ -24,11 +24,7 @@
GPL License
-- fix SeedDMS_Core_User::getDocumentContents()
-- fix SeedDMS_Core_File::fileExtension()
-- SeedDMS_Core_DMS::createPasswordRequest() creates a cryptographically secure hash
-- fix sql error when deleting a folder attribute
-- add SeedDMS_Core_Attribute::getParsedValue() and use it in SeedDMS_Core_Object::getAttributeValue()
+- all changes from 5.1.28 merged
@@ -2014,6 +2010,26 @@ add method SeedDMS_Core_DatabaseAccess::setLogFp()
- pass an array as an attribute to search() will OR each element
+
+ 2022-11-07
+ 13:44:55
+
+ 5.1.28
+ 5.1.28
+
+
+ stable
+ stable
+
+ GPL License
+
+- fix SeedDMS_Core_User::getDocumentContents()
+- fix SeedDMS_Core_File::fileExtension()
+- SeedDMS_Core_DMS::createPasswordRequest() creates a cryptographically secure hash
+- fix sql error when deleting a folder attribute
+- add SeedDMS_Core_Attribute::getParsedValue() and use it in SeedDMS_Core_Object::getAttributeValue()
+
+
2017-02-28
06:34:50
From e422fcf67a71b2eccbcc822bc63b5462012b3359 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 9 Nov 2022 13:31:10 +0100
Subject: [PATCH 034/247] checkout can be canceled if file disappeared, is
obsolete
---
op/op.CancelCheckOut.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/op/op.CancelCheckOut.php b/op/op.CancelCheckOut.php
index 209d37e4e..c13ac2404 100644
--- a/op/op.CancelCheckOut.php
+++ b/op/op.CancelCheckOut.php
@@ -38,7 +38,8 @@ $documentid = $_POST["documentid"];
$document = $dms->getDocument($documentid);
$checkoutstatus = $document->checkOutStatus();
-if($checkoutstatus != 3 && empty($settings->_enableCancelCheckout)) {
+/* Check out of files which has been changed, can only be canceled if allowed in the configuration */
+if($checkoutstatus == 0 && empty($settings->_enableCancelCheckout)) {
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("operation_disallowed"));
}
From 3e733b91cd03e0c5dd13e3a2b39867d20feddf34 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 9 Nov 2022 13:31:47 +0100
Subject: [PATCH 035/247] check checkout status
---
views/bootstrap/class.ViewDocument.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php
index aa8552d45..384e60b7d 100644
--- a/views/bootstrap/class.ViewDocument.php
+++ b/views/bootstrap/class.ViewDocument.php
@@ -422,6 +422,7 @@ $(document).ready( function() {
}
foreach($infos as $info) {
$checkoutuser = $dms->getUser($info['userID']);
+ $checkoutstatus = $document->checkOutStatus();
echo "";
From b8449289ac76b46cf710ac5f2110dd1c193114f1 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 9 Nov 2022 13:33:18 +0100
Subject: [PATCH 036/247] do not even try to remove a checked out file if it
doesn't exist anymore
---
SeedDMS_Core/Core/inc.ClassDocument.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php
index 3f941829f..992ff1af3 100644
--- a/SeedDMS_Core/Core/inc.ClassDocument.php
+++ b/SeedDMS_Core/Core/inc.ClassDocument.php
@@ -1202,7 +1202,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
$db->rollbackTransaction();
return false;
}
- if(!SeedDMS_Core_File::removeFile($info['filename'])) {
+ if(file_exists($info['filename']) && !SeedDMS_Core_File::removeFile($info['filename'])) {
$db->rollbackTransaction();
return false;
}
From b9311ff1e7f40d8a16569d3eeb55e136ae5c4ed5 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 9 Nov 2022 15:14:38 +0100
Subject: [PATCH 037/247] find a better mimetype by using file() and the
extension
---
webdav/webdav.php | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/webdav/webdav.php b/webdav/webdav.php
index 9382d6321..1a9967497 100644
--- a/webdav/webdav.php
+++ b/webdav/webdav.php
@@ -663,14 +663,17 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$tmp = explode(';', $mimetype);
$mimetype = $tmp[0];
+ $lastDotIndex = strrpos($name, ".");
+ if($lastDotIndex === false) $fileType = ".";
+ else $fileType = substr($name, $lastDotIndex);
switch($mimetype) {
- case 'application/pdf';
+ case 'application/pdf':
$fileType = ".pdf";
break;
- default:
- $lastDotIndex = strrpos($name, ".");
- if($lastDotIndex === false) $fileType = ".";
- else $fileType = substr($name, $lastDotIndex);
+ case 'text/plain':
+ if($fileType == '.md')
+ $mimetype = 'text/markdown';
+ break;
}
if($this->logger)
$this->logger->log('PUT: file is of type '.$mimetype, PEAR_LOG_INFO);
@@ -698,7 +701,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
unlink($tmpFile);
return "403 Forbidden";
} else {
- /* Check if the new version iѕ identical to the current version.
+ /* Check if the new version is identical to the current version.
* In that case just update the modification date
*/
$lc = $document->getLatestContent();
From 05b616f6757349b5d56a63d71e763eb302505a24 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 9 Nov 2022 19:13:51 +0100
Subject: [PATCH 038/247] fix typos
---
doc/README.WebDAV | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/README.WebDAV b/doc/README.WebDAV
index 0f66f8318..5f281dc45 100644
--- a/doc/README.WebDAV
+++ b/doc/README.WebDAV
@@ -69,7 +69,7 @@ swap file at all or create it outside the WebDAV server. A second problem
arises from how vim modifіes the file you are editing. Before a file
is saved a backup is created by renaming the file to the same name with a
'~' at the end and writing the file content into a new
-file with the name of the original file. Afterwards vim deleteѕ the backup
+file with the name of the original file. Afterwards vim deletes the backup
file. On a regular file system you
won't see a difference between the file before and after saving, though
it is actually a new one. In SeedDMS you won't notice a difference either
@@ -89,7 +89,7 @@ set nowritebackup
set noswapfile
Creating the backup file in a directory outside of WebDAV doesn't help in
-this case, because it still does the file renaming which is turned of by
+this case, because it still does the file renaming which is turned off by
'nowritebackup'.
cdaver
From d0a4f481baba773d49f2b5bb086e47e6fb7c7976 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 9 Nov 2022 19:15:16 +0100
Subject: [PATCH 039/247] use sensible sections
---
doc/README.WebDAV | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/doc/README.WebDAV b/doc/README.WebDAV
index 5f281dc45..ea0f6d003 100644
--- a/doc/README.WebDAV
+++ b/doc/README.WebDAV
@@ -1,5 +1,5 @@
WebDAV
------------------------------------------------
+========
SeedDMS has support for WebDAV which allows to easily add, delete,
move, copy and modify documents. All operating systems have support
@@ -29,7 +29,7 @@ the content of document or creating a new
version if a document is saved.
Configuring davfs2
-===================
+-------------------
On Linux it is quite simple to mount the SeedDMS WebDAV server with
davfs2. Just place a line like the following in your /etc/fstab
@@ -51,15 +51,14 @@ and possibly add your login data to /etc/davfs2/secrets
/media/webdav admin secret
Making applications work with WebDAV
-=====================================
+-------------------------------------
Various programms have differnt strategies to save files to disc and
prevent data lost under all circumstances. Those strategies often don't
work very well an a WebDAV-Server. The following will list some of those
strategies.
-VIM
-=========================
+### VIM
vim does a lot more than just reading and writing the file you want
to edit. It creates swap and backup files for data recovery if vim crashes
@@ -92,8 +91,7 @@ Creating the backup file in a directory outside of WebDAV doesn't help in
this case, because it still does the file renaming which is turned off by
'nowritebackup'.
-cdaver
-========
+### cdaver
cadaver is a webdav client similar to classical command line based ftp clients.
It can be used to browse through the folders, downloads and uploads files, and
From cbf68b7ab64480e36b7a4b195d1bc158381d0cb2 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 9 Nov 2022 19:33:26 +0100
Subject: [PATCH 040/247] explain how to set an auto command in vim
---
doc/README.WebDAV | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/doc/README.WebDAV b/doc/README.WebDAV
index ea0f6d003..81ce83a1d 100644
--- a/doc/README.WebDAV
+++ b/doc/README.WebDAV
@@ -87,6 +87,12 @@ set nobackup
set nowritebackup
set noswapfile
+If you want to restrict the settings to the directory where the dms
+is mounted by webdav, e.g. /media/webdav, you can set an auto command
+in .vimrc
+
+autocmd BufNewFile,BufRead /media/webdav/* set nobackup nowritebackup noswapfile
+
Creating the backup file in a directory outside of WebDAV doesn't help in
this case, because it still does the file renaming which is turned off by
'nowritebackup'.
From 650339c519338b06ac0061da9d143b885139e102 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 10 Nov 2022 08:24:07 +0100
Subject: [PATCH 041/247] return id of attribute as int
---
restapi/index.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/restapi/index.php b/restapi/index.php
index b7c68cd0d..fd4274d49 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -56,14 +56,14 @@ class RestapiController { /* {{{ */
foreach($attributes as $attrdefid=>$attribute) {
$attrdef = $attribute->getAttributeDefinition();
$attrvalues[] = array(
- 'id'=>$attrdef->getId(),
+ 'id'=>(int) $attrdef->getId(),
'name'=>$attrdef->getName(),
'value'=>$attribute->getValue()
);
}
}
return $attrvalues;
- }
+ } /* }}} */
protected function __getDocumentData($document) { /* {{{ */
$data = array(
From ebf7fb75918f10cc7aa64592e5f3aeca6df92f30 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 10 Nov 2022 08:24:52 +0100
Subject: [PATCH 042/247] change json field 'version-attributes' to
'version_attributes'
---
restapi/index.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/restapi/index.php b/restapi/index.php
index fd4274d49..efa9b9a67 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -110,7 +110,7 @@ class RestapiController { /* {{{ */
}
$attributes = $this->__getAttributesData($lc);
if($attributes) {
- $data['version-attributes'] = $attributes;
+ $data['version_attributes'] = $attributes;
}
return $data;
} /* }}} */
From 25c2d0319064c932367eb1db58634c67833b5804 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 10 Nov 2022 08:27:00 +0100
Subject: [PATCH 043/247] add hook to add additional routes
---
restapi/index.php | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/restapi/index.php b/restapi/index.php
index efa9b9a67..f9fcecbce 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -2611,9 +2611,6 @@ class TestController { /* {{{ */
} /* }}} */
} /* }}} */
-//$app = new Slim(array('mode'=>'development', '_session.handler'=>null));
-$app = new \Slim\App();
-
/* Middleware for authentication */
class Auth { /* {{{ */
@@ -2706,6 +2703,8 @@ class Auth { /* {{{ */
}
} /* }}} */
+$app = new \Slim\App();
+
$container = $app->getContainer();
$container['dms'] = $dms;
$container['config'] = $settings;
@@ -2798,6 +2797,14 @@ $app->get('/attributedefinitions', \RestapiController::class.':getAttributeDefin
$app->put('/attributedefinitions/{id}/name', \RestapiController::class.':changeAttributeDefinitionName');
$app->get('/echo/{data}', \TestController::class.':echoData');
$app->get('/statstotal', \RestapiController::class.':getStatsTotal');
+
+if(isset($GLOBALS['SEEDDMS_HOOKS']['initRestAPI'])) {
+ foreach($GLOBALS['SEEDDMS_HOOKS']['initRestAPI'] as $hookObj) {
+ if (method_exists($hookObj, 'addRoute')) {
+ $hookObj->addRoute($app);
+ }
+ }
+}
+
$app->run();
-?>
From 28f78baed0d528d1dc6536e8c5832d2c52690bf6 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 10 Nov 2022 08:27:39 +0100
Subject: [PATCH 044/247] add changes in 5.1.28 (mostly restapi)
---
CHANGELOG | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CHANGELOG b/CHANGELOG
index 71ef00400..2164d8de7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -14,6 +14,9 @@
- clear login failures when login by webdav succeeds
- output log of restapi in LogManagement
- new hook to add more tabs for sections in LogManagement
+- rest api returns version attributes as 'version_attributes' (was
+ 'version-attributes'), each attribute also contains the name
+- new hook in rest api to add more routes in extensions
--------------------------------------------------------------------------------
Changes in version 5.1.27
From 28c2670504f9f6c3582482cc234712ada4e4a292 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 11 Nov 2022 10:42:28 +0100
Subject: [PATCH 045/247] add a random sequence number deviation
---
op/op.Ajax.php | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/op/op.Ajax.php b/op/op.Ajax.php
index 364188a13..d881c20b4 100644
--- a/op/op.Ajax.php
+++ b/op/op.Ajax.php
@@ -819,10 +819,11 @@ switch($command) {
$controller->setParam('filetype', $fileType);
$controller->setParam('userfiletype', $userfiletype);
$minmax = $folder->getDocumentsMinMax();
+ $deviation = rand(10, 1000)/10;
if($settings->_defaultDocPosition == 'start')
- $controller->setParam('sequence', $minmax['min'] - 1);
+ $controller->setParam('sequence', $minmax['min'] - $deviation);
else
- $controller->setParam('sequence', $minmax['max'] + 1);
+ $controller->setParam('sequence', $minmax['max'] + $deviation);
$controller->setParam('reviewers', $reviewers);
$controller->setParam('approvers', $approvers);
$controller->setParam('reqversion', 1);
From b587a4f2a1453607f055349cb6a8743262af5fda Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 11 Nov 2022 10:46:48 +0100
Subject: [PATCH 046/247] more changes in 5.1.28
---
CHANGELOG | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CHANGELOG b/CHANGELOG
index 2164d8de7..19c3fda23 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -17,6 +17,8 @@
- rest api returns version attributes as 'version_attributes' (was
'version-attributes'), each attribute also contains the name
- new hook in rest api to add more routes in extensions
+- uploaded serveral documents at once by fast upload will assign random
+ sequence number to allow manually sorting the documents afterwards
--------------------------------------------------------------------------------
Changes in version 5.1.27
From b786e42bb3499a3d7c0059b6eec6d8744ee23d6c Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 11 Nov 2022 14:47:42 +0100
Subject: [PATCH 047/247] fix inclusion of php files
---
op/op.Acl.php | 2 +-
op/op.AddToTransmittal.php | 1 +
op/op.CancelCheckOut.php | 1 +
op/op.CheckInDocument.php | 1 +
op/op.CheckOutDocument.php | 2 +-
op/op.RoleMgr.php | 2 +-
op/op.SchedulerTaskMgr.php | 2 +-
op/op.TransmittalDownload.php | 2 +-
op/op.TransmittalMgr.php | 2 +-
9 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/op/op.Acl.php b/op/op.Acl.php
index 3289109e4..fc7f35baf 100644
--- a/op/op.Acl.php
+++ b/op/op.Acl.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
require_once("../inc/inc.Settings.php");
-require_once("../inc/inc.LogInit.php");
require_once("../inc/inc.Utils.php");
+require_once("../inc/inc.LogInit.php");
require_once("../inc/inc.Language.php");
require_once("../inc/inc.Init.php");
require_once("../inc/inc.Extension.php");
diff --git a/op/op.AddToTransmittal.php b/op/op.AddToTransmittal.php
index de8d6c466..d81ca2133 100644
--- a/op/op.AddToTransmittal.php
+++ b/op/op.AddToTransmittal.php
@@ -18,6 +18,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.CancelCheckOut.php b/op/op.CancelCheckOut.php
index c13ac2404..bc4d5bab0 100644
--- a/op/op.CancelCheckOut.php
+++ b/op/op.CancelCheckOut.php
@@ -17,6 +17,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.CheckInDocument.php b/op/op.CheckInDocument.php
index 41f4a1407..47853f199 100644
--- a/op/op.CheckInDocument.php
+++ b/op/op.CheckInDocument.php
@@ -17,6 +17,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
diff --git a/op/op.CheckOutDocument.php b/op/op.CheckOutDocument.php
index f6569ef22..1e22c7ffc 100644
--- a/op/op.CheckOutDocument.php
+++ b/op/op.CheckOutDocument.php
@@ -17,8 +17,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.RoleMgr.php b/op/op.RoleMgr.php
index 62878bbb7..d0cdf6cb0 100644
--- a/op/op.RoleMgr.php
+++ b/op/op.RoleMgr.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.SchedulerTaskMgr.php b/op/op.SchedulerTaskMgr.php
index c38c5e595..19f989e36 100644
--- a/op/op.SchedulerTaskMgr.php
+++ b/op/op.SchedulerTaskMgr.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
diff --git a/op/op.TransmittalDownload.php b/op/op.TransmittalDownload.php
index 57abc5b1f..f5e3de544 100644
--- a/op/op.TransmittalDownload.php
+++ b/op/op.TransmittalDownload.php
@@ -20,9 +20,9 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
+include("../inc/inc.Utils.php");
include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
-include("../inc/inc.Utils.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
include("../inc/inc.DBInit.php");
diff --git a/op/op.TransmittalMgr.php b/op/op.TransmittalMgr.php
index 73bbc1f52..f58f6de12 100644
--- a/op/op.TransmittalMgr.php
+++ b/op/op.TransmittalMgr.php
@@ -20,8 +20,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
include("../inc/inc.Utils.php");
+include("../inc/inc.LogInit.php");
include("../inc/inc.Language.php");
include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
From 9c715a7071c9a0831910ce16bc9c72abc58789f6 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 14 Nov 2022 07:55:40 +0100
Subject: [PATCH 048/247] add SeedDMS_Core_DMS::getDuplicateSequenceNo()
---
SeedDMS_Core/Core/inc.ClassDMS.php | 35 ++++++++++++++++++++++++++++++
SeedDMS_Core/package.xml | 1 +
2 files changed, 36 insertions(+)
diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php
index e234625fe..d2557f542 100644
--- a/SeedDMS_Core/Core/inc.ClassDMS.php
+++ b/SeedDMS_Core/Core/inc.ClassDMS.php
@@ -3194,6 +3194,41 @@ class SeedDMS_Core_DMS {
} /* }}} */
+ /**
+ * Returns folders which contain documents with none unique sequence number
+ *
+ * This method is for finding folders with documents not having a
+ * unique sequence number. Those documents cannot propperly be sorted
+ * by sequence and changing their position is impossible if more than
+ * two documents with the same sequence number exists, e.g.
+ * doc 1: 3
+ * doc 2: 5
+ * doc 3: 5
+ * doc 4: 5
+ * doc 5: 7
+ * If document 4 was to be moved between doc 1 and 2 it get sequence
+ * number 4 ((5+3)/2).
+ * But if document 4 was to be moved between doc 2 and 3 it will again
+ * have sequence number 5.
+ *
+ * @return array|bool
+ */
+ function getDuplicateSequenceNo() { /* {{{ */
+ $queryStr = "SELECT DISTINCT `folder` FROM (SELECT `folder`, `sequence`, count(*) c FROM `tblDocuments` GROUP BY `folder`, `sequence` HAVING c > 1) a";
+ $resArr = $this->db->getResultArray($queryStr);
+ if ($resArr === false)
+ return false;
+
+ $folders = array();
+ foreach($resArr as $row) {
+ $folder = $this->getFolder($row['folder']);
+ if($folder)
+ $folders[] = $folder;
+ }
+ return $folders;
+
+ } /* }}} */
+
/**
* Returns a list of reviews, approvals which are not linked
* to a user, group anymore
diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml
index 51e1c0914..1b514eec2 100644
--- a/SeedDMS_Core/package.xml
+++ b/SeedDMS_Core/package.xml
@@ -29,6 +29,7 @@
- SeedDMS_Core_DMS::createPasswordRequest() creates a cryptographically secure hash
- fix sql error when deleting a folder attribute
- add SeedDMS_Core_Attribute::getParsedValue() and use it in SeedDMS_Core_Object::getAttributeValue()
+- add SeedDMS_Core_DMS::getDuplicateSequenceNo()
From e2e52d61b17bb53e54ca1b1d5154761047fdfe0f Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 14 Nov 2022 08:16:51 +0100
Subject: [PATCH 049/247] fix output, add translations
---
views/bootstrap/class.ObjectCheck.php | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/views/bootstrap/class.ObjectCheck.php b/views/bootstrap/class.ObjectCheck.php
index d6e2aa46f..6a6f289fe 100644
--- a/views/bootstrap/class.ObjectCheck.php
+++ b/views/bootstrap/class.ObjectCheck.php
@@ -127,12 +127,13 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
if(is_string($txt))
echo $txt;
else
- echo $this->documentListRow($document, $previewer, false);
+ echo $this->documentListRow($document, $previewer, true);
echo "".$object['msg'];
if($repair)
$document->repair();
echo " ";
$needsrepair = true;
+ echo $this->documentListRowEnd($document);
}
} elseif($object['object']->isType('documentcontent')) {
$document = $object['object']->getDocument();
@@ -184,7 +185,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
print "\n\n";
print "".getMLText("name")." \n";
print "".getMLText("id")." \n";
- print "".getMLText("parent")." \n";
+ print "".getMLText("parent_folder")." \n";
print " \n";
print "".getMLText("error")." \n";
print " \n \n\n";
@@ -194,7 +195,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
echo "".$error['id']." ";
echo "".$error['parent']." ";
echo "".$error['msg']." ";
- echo "getID()."\" formtoken=\"".createFormKey('movefolder')."\">Move ";
+ echo "getID()."\" formtoken=\"".createFormKey('movefolder')."\" title=\"".getMLText("move_into_rootfolder")."\">".getMLText('move')." ";
echo "";
}
print " \n";
@@ -205,6 +206,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
$dms = $this->params['dms'];
$user = $this->params['user'];
$folder = $this->params['folder'];
+ $rootfolder = $this->params['rootfolder'];
$unlinkeddocuments = $this->params['unlinkeddocuments'];
$this->contentHeading(getMLText("unlinked_documents"));
@@ -213,7 +215,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
print "\n\n";
print "".getMLText("name")." \n";
print "".getMLText("id")." \n";
- print "".getMLText("parent")." \n";
+ print "".getMLText("parent_folder")." \n";
print "".getMLText("error")." \n";
print " \n";
print " \n \n\n";
@@ -223,7 +225,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
echo "".$error['id']." ";
echo "".$error['parent']." ";
echo "".$error['msg']." ";
- echo "getID()."\" formtoken=\"".createFormKey('movedocument')."\">Move ";
+ echo "getID()."\" formtoken=\"".createFormKey('movedocument')."\" title=\"".getMLText("move_into_rootfolder")."\">".getMLText('move')." ";
echo "";
}
print " \n";
From 863c3f971c5b67b58ed0eefd52e31208588fe7c4 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 14 Nov 2022 08:39:09 +0100
Subject: [PATCH 050/247] add list of folders containing duplicate sequences
---
out/out.ObjectCheck.php | 1 +
views/bootstrap/class.ObjectCheck.php | 32 +++++++++++++++++++++++++++
2 files changed, 33 insertions(+)
diff --git a/out/out.ObjectCheck.php b/out/out.ObjectCheck.php
index 58248e711..591873cee 100644
--- a/out/out.ObjectCheck.php
+++ b/out/out.ObjectCheck.php
@@ -240,6 +240,7 @@ if($view) {
$view->setParam('nochecksumversions', $nochecksumversions);
$view->setParam('wrongfiletypeversions', $wrongfiletypeversions);
$view->setParam('duplicateversions', $duplicateversions);
+ $view->setParam('duplicatesequences', $duplicatesequences);
$view->setParam('docsinrevision', $docsinrevision);
$view->setParam('docsmissingrevsiondate', $docsmissingrevsiondate);
$view->setParam('docsinreception', $docsinreception);
diff --git a/views/bootstrap/class.ObjectCheck.php b/views/bootstrap/class.ObjectCheck.php
index 6a6f289fe..293bc84b0 100644
--- a/views/bootstrap/class.ObjectCheck.php
+++ b/views/bootstrap/class.ObjectCheck.php
@@ -434,6 +434,36 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
}
} /* }}} */
+ function listDuplicateSequence() { /* {{{ */
+ $dms = $this->params['dms'];
+ $user = $this->params['user'];
+ $folder = $this->params['folder'];
+ $duplicatesequences = $this->params['duplicatesequences'];
+
+ $this->contentHeading(getMLText("duplicate_sequences"));
+
+ if($duplicatesequences) {
+ print "";
+ print "\n";
+ print " \n";
+ print "".getMLText("name")." \n";
+ print "".getMLText("owner")." \n";
+ print "".getMLText("actions")." \n";
+ print " \n\n";
+ foreach($duplicatesequences as $fld) {
+ echo $this->folderListRowStart($fld);
+ $txt = $this->callHook('folderListItem', $fld, true, 'viewfolder');
+ if(is_string($txt))
+ echo $txt;
+ else {
+ echo $this->folderListRow($fld, true);
+ }
+ echo $this->folderListRowEnd($fld);
+ }
+ print "
";
+ }
+} /* }}} */
+
function listDocsInRevisionNoAccess() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
@@ -632,6 +662,7 @@ $(document).ready( function() {
$nofilesizeversions = $this->params['nofilesizeversions'];
$nochecksumversions = $this->params['nochecksumversions'];
$duplicateversions = $this->params['duplicateversions'];
+ $duplicatesequences = $this->params['duplicatesequences'];
$docsinrevision = $this->params['docsinrevision'];
$docsinreception = $this->params['docsinreception'];
$processwithoutusergroup = $this->params['processwithoutusergroup'];
@@ -666,6 +697,7 @@ $(document).ready( function() {
$this->contentHeading(getMLText("object_check_warning"));
$menuitems = [];
$menuitems[] = array('label'=>getMLText('duplicate_content'), 'badge'=>count($duplicateversions), 'attributes'=>array(array('data-href', "#duplicate_content"), array('data-action', "listDuplicateContent")));
+ $menuitems[] = array('label'=>getMLText('duplicate_sequences'), 'badge'=>count($duplicatesequences), 'attributes'=>array(array('data-href', "#duplicate_sequences"), array('data-action', "listDuplicateSequence")));
$menuitems[] = array('label'=>getMLText('docs_in_revision_no_access'), 'badge'=>count($docsinrevision), 'attributes'=>array(array('data-href', "#inrevision_no_access"), array('data-action', "listDocsInRevisionNoAccess")));
$menuitems[] = array('label'=>getMLText('docs_in_reception_no_access'), 'badge'=>count($docsinreception), 'attributes'=>array(array('data-href', "#inreception_no_access"), array('data-action', "listDocsInReceptionNoAccess")));
$menuitems[] = array('label'=>getMLText('docs_with_missing_revision_date'), 'badge'=>count($docsmissingrevsiondate), 'attributes'=>array(array('data-href', "#missing_revision_date"), array('data-action', "listDocsWithMissingRevisionDate")));
From b2fd46dac0b3c8856714a325a75f2f46e1683a7f Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 14 Nov 2022 09:03:41 +0100
Subject: [PATCH 051/247] add SeedDMS_Core_Folder::reorderDocuments()
---
SeedDMS_Core/Core/inc.ClassFolder.php | 34 +++++++++++++++++++++++++++
SeedDMS_Core/package.xml | 2 +-
2 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php
index 11cb88026..f0a3b092a 100644
--- a/SeedDMS_Core/Core/inc.ClassFolder.php
+++ b/SeedDMS_Core/Core/inc.ClassFolder.php
@@ -2068,6 +2068,40 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
return $resArr[0];
} /* }}} */
+ /**
+ * Reorder documents of folder
+ *
+ * Fix the sequence numbers of all documents in the folder, by assigning new
+ * numbers starting from 1 incrementing by 1. This can be necessary if sequence
+ * numbers are not unique which makes manual reordering for documents with
+ * identical sequence numbers impossible.
+ *
+ * @return bool false in case of an error, otherwise true
+ */
+ function reorderDocuments() { /* {{{ */
+ $db = $this->_dms->getDB();
+
+ $queryStr = "SELECT `id` FROM `tblDocuments` WHERE `folder` = " . (int) $this->_id;
+ $resArr = $db->getResultArray($queryStr);
+ if (is_bool($resArr) && $resArr == false)
+ return false;
+
+ $db->startTransaction();
+ $no = 1.0;
+ foreach($resArr as $doc) {
+ $queryStr = "UPDATE `tblDocuments` SET `sequence` = " . $no . " WHERE `id` = ". $doc['id'];
+ if (!$db->getResult($queryStr)) {
+ $db->rollbackTransaction();
+ return false;
+ }
+ $no += 1.0;
+ }
+ $db->commitTransaction();
+
+ return true;
+ } /* }}} */
+
+
}
?>
diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml
index 1b514eec2..5f75fd99e 100644
--- a/SeedDMS_Core/package.xml
+++ b/SeedDMS_Core/package.xml
@@ -29,7 +29,7 @@
- SeedDMS_Core_DMS::createPasswordRequest() creates a cryptographically secure hash
- fix sql error when deleting a folder attribute
- add SeedDMS_Core_Attribute::getParsedValue() and use it in SeedDMS_Core_Object::getAttributeValue()
-- add SeedDMS_Core_DMS::getDuplicateSequenceNo()
+- add SeedDMS_Core_DMS::getDuplicateSequenceNo() and SeedDMS_Core_Folder::reorderDocuments()
From 3b473edd253c43d98b513f4ab8e59cb579455f81 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 14 Nov 2022 16:25:22 +0100
Subject: [PATCH 052/247] add button to reorder docs in a folder if sequence
numbers are not unique
---
out/out.ObjectCheck.php | 6 ++++++
views/bootstrap/class.ObjectCheck.php | 24 ++++++++++++++++++++----
2 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/out/out.ObjectCheck.php b/out/out.ObjectCheck.php
index 591873cee..47f345a0c 100644
--- a/out/out.ObjectCheck.php
+++ b/out/out.ObjectCheck.php
@@ -229,6 +229,11 @@ if(!isset($_GET['action']) || $_GET['action'] == 'listRepair')
else
$repairobjects = null;
+if(isset($_GET['repairfolderid']) && is_numeric($_GET['repairfolderid']))
+ $repairfolder = $dms->getFolder($_GET['repairfolderid']);
+else
+ $repairfolder = null;
+
if($view) {
$view->setParam('folder', $folder);
$view->setParam('showtree', showtree());
@@ -250,6 +255,7 @@ if($view) {
$view->setParam('setchecksum', $setchecksum);
$view->setParam('setfiletype', $setfiletype);
$view->setParam('repair', $repair);
+ $view->setParam('repairfolder', $repairfolder);
$view->setParam('showtree', showtree());
$view->setParam('rootfolder', $rootfolder);
$view->setParam('repairobjects', $repairobjects);
diff --git a/views/bootstrap/class.ObjectCheck.php b/views/bootstrap/class.ObjectCheck.php
index 293bc84b0..c6eb322ca 100644
--- a/views/bootstrap/class.ObjectCheck.php
+++ b/views/bootstrap/class.ObjectCheck.php
@@ -186,8 +186,8 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
print "".getMLText("name")." \n";
print "".getMLText("id")." \n";
print "".getMLText("parent_folder")." \n";
- print " \n";
print "".getMLText("error")." \n";
+// print " \n";
print "\n\n\n";
foreach($unlinkedfolders as $error) {
echo "";
@@ -195,7 +195,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
echo "".$error['id']." ";
echo "".$error['parent']." ";
echo "".$error['msg']." ";
- echo "getID()."\" formtoken=\"".createFormKey('movefolder')."\" title=\"".getMLText("move_into_rootfolder")."\">".getMLText('move')." ";
+// echo "getID()."\" formtoken=\"".createFormKey('movefolder')."\" title=\"".getMLText("move_into_rootfolder")."\">".getMLText('move')." ";
echo " ";
}
print " \n";
@@ -217,7 +217,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
print "".getMLText("id")." \n";
print "".getMLText("parent_folder")." \n";
print "".getMLText("error")." \n";
- print " \n";
+// print " \n";
print "\n\n\n";
foreach($unlinkeddocuments as $error) {
echo "";
@@ -225,7 +225,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
echo "".$error['id']." ";
echo "".$error['parent']." ";
echo "".$error['msg']." ";
- echo "getID()."\" formtoken=\"".createFormKey('movedocument')."\" title=\"".getMLText("move_into_rootfolder")."\">".getMLText('move')." ";
+// echo "getID()."\" formtoken=\"".createFormKey('movedocument')."\" title=\"".getMLText("move_into_rootfolder")."\">".getMLText('move')." ";
echo " ";
}
print " \n";
@@ -438,6 +438,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
$dms = $this->params['dms'];
$user = $this->params['user'];
$folder = $this->params['folder'];
+ $repairfolder = $this->params['repairfolder'];
$duplicatesequences = $this->params['duplicatesequences'];
$this->contentHeading(getMLText("duplicate_sequences"));
@@ -449,6 +450,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
print "".getMLText("name")." \n";
print "".getMLText("owner")." \n";
print "".getMLText("actions")." \n";
+ print " \n";
print "\n\n";
foreach($duplicatesequences as $fld) {
echo $this->folderListRowStart($fld);
@@ -458,6 +460,15 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style {
else {
echo $this->folderListRow($fld, true);
}
+ echo "";
+ if($repairfolder && ($fld->getId() == $repairfolder->getId())) {
+ if($fld->reorderDocuments())
+ echo "Ok";
+ else
+ echo "Error";
+ } else
+ echo "getId()."\" title=\"".getMLText("reorder_documents_in_folder")."\">".getMLText('reorder')." ";
+ echo " ";
echo $this->folderListRowEnd($fld);
}
print " ";
@@ -642,6 +653,11 @@ $(document).ready( function() {
$('#kkkk.ajax').data('action', $(this).data('action'));
$('#kkkk.ajax').trigger('update', {repair: 1, required: $(this).data('required')});
});
+ $('body').on('click', 'a.reorder', function(ev){
+ ev.preventDefault();
+ $('#kkkk.ajax').data('action', $(this).data('action'));
+ $('#kkkk.ajax').trigger('update', {repair: 1, repairfolderid: $(this).data('repairfolderid')});
+ });
$('body').on('click', 'table th a', function(ev){
ev.preventDefault();
$('#kkkk.ajax').data('action', $(this).data('action'));
From 9c1fd788d6840824aea4768c72821dcc1c7ab082 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 14 Nov 2022 17:21:22 +0100
Subject: [PATCH 053/247] use the list of docs ordered by sequence in
reorderDocuments()
---
SeedDMS_Core/Core/inc.ClassFolder.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php
index f0a3b092a..23324676f 100644
--- a/SeedDMS_Core/Core/inc.ClassFolder.php
+++ b/SeedDMS_Core/Core/inc.ClassFolder.php
@@ -2081,7 +2081,7 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
function reorderDocuments() { /* {{{ */
$db = $this->_dms->getDB();
- $queryStr = "SELECT `id` FROM `tblDocuments` WHERE `folder` = " . (int) $this->_id;
+ $queryStr = "SELECT `id` FROM `tblDocuments` WHERE `folder` = " . (int) $this->_id . " ORDER BY `sequence`";
$resArr = $db->getResultArray($queryStr);
if (is_bool($resArr) && $resArr == false)
return false;
From 9c740db936ce999e9c817a479cf7cd79fc2ea8d7 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 14 Nov 2022 17:23:26 +0100
Subject: [PATCH 054/247] add changes of 6.0.21
---
CHANGELOG | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CHANGELOG b/CHANGELOG
index e477f6e5a..45d0fe2db 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,8 @@
--------------------------------------------------------------------------------
Changes in version 6.0.21
--------------------------------------------------------------------------------
+- merge changes up to 5.1.27
+- add new check for documents with identical sequence numbers in a folder
--------------------------------------------------------------------------------
Changes in version 6.0.20
From ad89814db0f4bcce7bcd1bee437e79d4552dcaf9 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 14 Nov 2022 17:39:59 +0100
Subject: [PATCH 055/247] translation updates
---
languages/ar_EG/lang.inc | 6 ++++++
languages/bg_BG/lang.inc | 6 ++++++
languages/ca_ES/lang.inc | 6 ++++++
languages/cs_CZ/lang.inc | 6 ++++++
languages/de_DE/lang.inc | 10 ++++++++--
languages/el_GR/lang.inc | 6 ++++++
languages/en_GB/lang.inc | 10 ++++++++--
languages/es_ES/lang.inc | 6 ++++++
languages/fr_FR/lang.inc | 6 ++++++
languages/hr_HR/lang.inc | 10 ++++++++--
languages/hu_HU/lang.inc | 6 ++++++
languages/id_ID/lang.inc | 6 ++++++
languages/it_IT/lang.inc | 10 ++++++++--
languages/ko_KR/lang.inc | 6 ++++++
languages/lo_LA/lang.inc | 6 ++++++
languages/nb_NO/lang.inc | 6 ++++++
languages/nl_NL/lang.inc | 6 ++++++
languages/pl_PL/lang.inc | 6 ++++++
languages/pt_BR/lang.inc | 6 ++++++
languages/ro_RO/lang.inc | 6 ++++++
languages/ru_RU/lang.inc | 6 ++++++
languages/sk_SK/lang.inc | 6 ++++++
languages/sv_SE/lang.inc | 6 ++++++
languages/tr_TR/lang.inc | 6 ++++++
languages/uk_UA/lang.inc | 6 ++++++
languages/zh_CN/lang.inc | 6 ++++++
languages/zh_TW/lang.inc | 6 ++++++
27 files changed, 170 insertions(+), 8 deletions(-)
diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc
index c5908d269..90724c95d 100644
--- a/languages/ar_EG/lang.inc
+++ b/languages/ar_EG/lang.inc
@@ -514,6 +514,7 @@ URL: [url]',
'dump_remove' => 'ازالة الملف المستخرج',
'duplicates' => 'تكرارات',
'duplicate_content' => 'المحتوى متكرر',
+'duplicate_sequences' => '',
'edit' => 'تعديل',
'edit_attributes' => 'تعديل السمات',
'edit_comment' => 'تعديل تعليق',
@@ -620,6 +621,7 @@ URL: [url]',
'extension_mgr_repository' => 'مستودع إدارة الإضافات',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => 'لائحة الإضافات حسب الإصدار',
'february' => 'فبراير',
@@ -903,6 +905,7 @@ URL: [url]',
'move_clipboard' => 'تحريك القصاصة',
'move_document' => 'تحريك مستند',
'move_folder' => 'تحريك مجلد',
+'move_into_rootfolder' => '',
'my_account' => 'حسابي',
'my_documents' => 'مستنداتي',
'my_transmittals' => 'الإحالات الخاصة بي',
@@ -1045,6 +1048,7 @@ Parent folder: [folder_path]
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: [name] - تم تغيير المالك',
+'parent_folder' => '',
'password' => 'كلمة السر',
'password_already_used' => 'كلمة السر بالفعل تم ارسالها',
'password_expiration' => 'انتهاء صلاحية كلمة السر',
@@ -1094,6 +1098,7 @@ URL: [url]',
'quota_exceeded' => 'لقد قمت بتعدي المساحة المخصصة لك بمقدار [bytes].',
'quota_is_disabled' => 'الغيت الكوتا',
'quota_warning' => 'اقصى مساحة للقرص الصلب تم تعديها بمقدار [bytes]. من فضلك قم بمسح بعض المستندات او اصدارات سابقة منها',
+'readme_loading' => '',
'receipts_accepted' => 'تم الموافقة على الوصول',
'receipts_accepted_latest' => '',
'receipts_not_touched' => 'الوصول غير ملموسة',
@@ -1779,6 +1784,7 @@ URL: [url]',
'set_password' => 'تحديد كلمة السر',
'set_workflow' => 'تحديد مسار العمل',
'show_extension_changelog' => 'تغيير سجل',
+'show_extension_readme' => '',
'show_extension_version_list' => 'لائحة الإصدارات',
'signed_in_as' => 'تسجيل الدخول بإسم',
'sign_in' => 'تسجيل الدخول',
diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc
index 6d75b0eb8..96b83df19 100644
--- a/languages/bg_BG/lang.inc
+++ b/languages/bg_BG/lang.inc
@@ -467,6 +467,7 @@ $text = array(
'dump_remove' => 'Изтрий дъмп',
'duplicates' => '',
'duplicate_content' => '',
+'duplicate_sequences' => '',
'edit' => 'Редактирай',
'edit_attributes' => 'Редактирай атрибути',
'edit_comment' => 'Редактирай коментар',
@@ -569,6 +570,7 @@ $text = array(
'extension_mgr_repository' => '',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => '',
'february' => 'Февруари',
@@ -832,6 +834,7 @@ $text = array(
'move_clipboard' => '',
'move_document' => 'Премести документ',
'move_folder' => 'Премести папка',
+'move_into_rootfolder' => '',
'my_account' => 'Моя акаунт',
'my_documents' => 'Моите документи',
'my_transmittals' => 'Моите предавания',
@@ -944,6 +947,7 @@ $text = array(
'ownership_changed_email_body' => '',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '',
+'parent_folder' => '',
'password' => 'Парола',
'password_already_used' => 'Вече използвана парола',
'password_expiration' => 'Паролата изтича',
@@ -993,6 +997,7 @@ $text = array(
'quota_exceeded' => 'Вашата дискова квота е превишена с [bytes].',
'quota_is_disabled' => '',
'quota_warning' => 'Вашето max. използуване на диска е превишена с [bytes]. Please remove documents or previous versions.',
+'readme_loading' => '',
'receipts_accepted' => '',
'receipts_accepted_latest' => '',
'receipts_not_touched' => '',
@@ -1642,6 +1647,7 @@ $text = array(
'set_password' => 'Установи парола',
'set_workflow' => 'Установи процес',
'show_extension_changelog' => '',
+'show_extension_readme' => '',
'show_extension_version_list' => '',
'signed_in_as' => 'Вход като',
'sign_in' => 'вход',
diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc
index ff1d3e5c6..bf00e8f78 100644
--- a/languages/ca_ES/lang.inc
+++ b/languages/ca_ES/lang.inc
@@ -472,6 +472,7 @@ URL: [url]',
'dump_remove' => 'Eliminar fitxer de bolcat',
'duplicates' => '',
'duplicate_content' => '',
+'duplicate_sequences' => '',
'edit' => 'editar',
'edit_attributes' => 'Editar atributs',
'edit_comment' => 'Editar comentari',
@@ -574,6 +575,7 @@ URL: [url]',
'extension_mgr_repository' => '',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => '',
'february' => 'Febrer',
@@ -837,6 +839,7 @@ URL: [url]',
'move_clipboard' => '',
'move_document' => 'Moure document',
'move_folder' => 'Moure directori',
+'move_into_rootfolder' => '',
'my_account' => 'El meu compte',
'my_documents' => 'Els meus documents',
'my_transmittals' => 'Documents enviats per mi',
@@ -949,6 +952,7 @@ URL: [url]',
'ownership_changed_email_body' => '',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '',
+'parent_folder' => '',
'password' => 'Contrasenya',
'password_already_used' => '',
'password_expiration' => '',
@@ -998,6 +1002,7 @@ URL: [url]',
'quota_exceeded' => '',
'quota_is_disabled' => '',
'quota_warning' => '',
+'readme_loading' => '',
'receipts_accepted' => '',
'receipts_accepted_latest' => '',
'receipts_not_touched' => '',
@@ -1647,6 +1652,7 @@ URL: [url]',
'set_password' => '',
'set_workflow' => '',
'show_extension_changelog' => '',
+'show_extension_readme' => '',
'show_extension_version_list' => '',
'signed_in_as' => 'Connectat com',
'sign_in' => 'sign in',
diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc
index 26cb89c69..830a942d2 100644
--- a/languages/cs_CZ/lang.inc
+++ b/languages/cs_CZ/lang.inc
@@ -538,6 +538,7 @@ URL: [url]',
'dump_remove' => 'Odstranit soubor zálohy',
'duplicates' => 'Duplikáty',
'duplicate_content' => 'Duplicitní obsah',
+'duplicate_sequences' => '',
'edit' => 'upravit',
'edit_attributes' => 'Editovat atributy',
'edit_comment' => 'Upravit komentář',
@@ -644,6 +645,7 @@ URL: [url]',
'extension_mgr_repository' => 'Dostupný',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => 'Verze',
'february' => 'Únor',
@@ -934,6 +936,7 @@ URL: [url]',
'move_clipboard' => 'Přesun schránky',
'move_document' => 'Přesunout dokument',
'move_folder' => 'Přesun složky',
+'move_into_rootfolder' => '',
'my_account' => 'Můj účet',
'my_documents' => 'Moje dokumenty',
'my_transmittals' => 'Moje přenosy',
@@ -1076,6 +1079,7 @@ Uživatel: [username]
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: [name] - Vlastník změněn',
+'parent_folder' => '',
'password' => 'Heslo',
'password_already_used' => 'Heslo již použité',
'password_expiration' => 'Vypršení platnosti hesla',
@@ -1129,6 +1133,7 @@ Pokud budete mít problém s přihlášením i po změně hesla, kontaktujte Adm
'quota_exceeded' => 'Vaše kvóta disku je překročena o [bytes].',
'quota_is_disabled' => 'Podpora kvót je v současné době zakázána v nastavení. Nastavení uživatelských kvót nebude mít žádný vliv, dokud se znovu neaktivuje.',
'quota_warning' => 'Vaše maximální využití disku je překročeno o [bajtů]. Prosím, odstraňte dokumenty nebo předchozí verze.',
+'readme_loading' => '',
'receipts_accepted' => '[no_receipts] potvrzení přijetí již přijato',
'receipts_accepted_latest' => '',
'receipts_not_touched' => '[no_receipts] potvrzení přijetí nebylo dotčeno',
@@ -1851,6 +1856,7 @@ Jméno: [username]
'set_password' => 'Nastavení hesla',
'set_workflow' => 'Nastavit workflow',
'show_extension_changelog' => 'Zobrazit Changelog',
+'show_extension_readme' => '',
'show_extension_version_list' => 'Zobrazit seznam verzí',
'signed_in_as' => 'Přihlášen jako',
'sign_in' => 'Přihlásit',
diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc
index 7ad280448..7528ab0d6 100644
--- a/languages/de_DE/lang.inc
+++ b/languages/de_DE/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 (3143), dgrutsch (22)
+// Translators: Admin (3150), dgrutsch (22)
$text = array(
'2_factor_auth' => '2-Faktor Authentifizierung',
@@ -632,13 +632,14 @@ URL: [url]
',
'dropfolder_metadata' => 'Metadaten der zu importierenen Dateien',
'dropupload' => 'Direkt Hochladen',
'drop_files_here' => 'Dateien hier hin ziehen!',
-'drop_files_here_or_click' => 'Dateien hier hin ziehen oder Klicken!',
+'drop_files_here_or_click' => 'Dateien hier hin ziehen oder Klicken zum Hochladen!',
'dump_creation' => 'DB dump erzeugen',
'dump_creation_warning' => 'Mit dieser Operation können Sie einen Dump der Datenbank erzeugen. Nach der Erstellung wird der Dump im Datenordner Ihres Servers gespeichert.',
'dump_list' => 'Vorhandene DB dumps',
'dump_remove' => 'DB dump löschen',
'duplicates' => 'Duplikate',
'duplicate_content' => 'Doppelte Dateien',
+'duplicate_sequences' => 'Doppelte Sequenznummer in einem Ordner',
'edit' => 'Bearbeiten',
'edit_attributes' => 'Attribute bearbeiten',
'edit_comment' => 'Kommentar bearbeiten',
@@ -751,6 +752,7 @@ URL: [url]',
'extension_mgr_repository' => 'Verfügbar',
'extension_mgr_upload_disabled' => 'Der Upload neuer Erweiterungen ist nicht möglich, weil dies in den Einstellungen ausgeschaltet ist.',
'extension_missing_name' => 'Kein Erweiterungsname übergeben',
+'extension_readme' => 'Readme',
'extension_toggle_error' => 'Konnte Erweiterung nicht aus/einschalten',
'extension_version_list' => 'Versionen',
'february' => 'Februar',
@@ -1077,6 +1079,7 @@ URL: [url]',
'move_clipboard' => 'Zwischenablage in Ordner verschieben',
'move_document' => 'Verschieben',
'move_folder' => 'Verschieben',
+'move_into_rootfolder' => 'In den Wurzelordner verschieben',
'my_account' => 'Mein Profil',
'my_documents' => 'Meine Dokumente',
'my_transmittals' => 'Meine Dokumentenlisten',
@@ -1256,6 +1259,7 @@ Neuer Besitzer: [new_owner]
Benutzer: [username]
URL: [url]',
'ownership_changed_email_subject' => '[sitename]: [name] - Besitzer geändert',
+'parent_folder' => 'Elternordner',
'password' => 'Passwort',
'password_already_used' => 'Passwort schon einmal verwendet',
'password_expiration' => 'Ablauf eines Passworts',
@@ -1321,6 +1325,7 @@ Sollen Sie danach immer noch Probleme bei der Anmeldung haben, dann kontaktieren
'quota_exceeded' => 'Ihr maximal verfügbarer Plattenplatz wurde um [bytes] überschritten.',
'quota_is_disabled' => 'Quota-Unterstützung ist zur Zeit ausgeschaltet. Benutzer-Quota werden ignoriert bis Quota-Unterstützung in den Einstellungen eingeschaltet wird.',
'quota_warning' => 'Ihr maximal verfügbarer Plattenplatz wurde um [bytes] überschritten. Bitte löschen Sie Dokumente oder ältere Versionen.',
+'readme_loading' => 'Bitte warten, bis die Readme geladen ist ...',
'receipts_accepted' => '[no_receipts] Empfangsbestätigungen',
'receipts_accepted_latest' => '(davon [no_receipts] in letzter Version)',
'receipts_not_touched' => '[no_receipts] offene Empfangsbestätigungen',
@@ -2183,6 +2188,7 @@ Sollten Sie kein Passwort bekommen haben, dann nutzen Sie bitte die Passwort-Ver
'set_password' => 'Passwort setzen',
'set_workflow' => 'Workflow zuweisen',
'show_extension_changelog' => 'Zeige Versionshistorie',
+'show_extension_readme' => 'Readme anzeigen',
'show_extension_version_list' => 'Zeige Liste der Versionen',
'signed_in_as' => 'Angemeldet als',
'sign_in' => 'Anmelden',
diff --git a/languages/el_GR/lang.inc b/languages/el_GR/lang.inc
index 445841412..1cf1edc89 100644
--- a/languages/el_GR/lang.inc
+++ b/languages/el_GR/lang.inc
@@ -467,6 +467,7 @@ $text = array(
'dump_remove' => '',
'duplicates' => '',
'duplicate_content' => '',
+'duplicate_sequences' => '',
'edit' => 'Επεξεργασία',
'edit_attributes' => '',
'edit_comment' => 'Επεξερασία σχόλιου',
@@ -569,6 +570,7 @@ $text = array(
'extension_mgr_repository' => '',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => '',
'february' => 'Φεβρουάριος',
@@ -832,6 +834,7 @@ $text = array(
'move_clipboard' => '',
'move_document' => 'Μετακίνηση εγγράφου',
'move_folder' => 'Μετακίνηση φακέλου',
+'move_into_rootfolder' => '',
'my_account' => 'Ο Λογαριασμός μου',
'my_documents' => 'Τα έγγραφα μου',
'my_transmittals' => 'Οι Διαβιβάσεις μου',
@@ -955,6 +958,7 @@ URL: [url]',
'ownership_changed_email_body' => '',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '',
+'parent_folder' => '',
'password' => '',
'password_already_used' => '',
'password_expiration' => '',
@@ -1004,6 +1008,7 @@ URL: [url]',
'quota_exceeded' => '',
'quota_is_disabled' => '',
'quota_warning' => '',
+'readme_loading' => '',
'receipts_accepted' => '',
'receipts_accepted_latest' => '',
'receipts_not_touched' => '',
@@ -1653,6 +1658,7 @@ URL: [url]',
'set_password' => '',
'set_workflow' => '',
'show_extension_changelog' => '',
+'show_extension_readme' => '',
'show_extension_version_list' => '',
'signed_in_as' => 'Σύνδεση σαν',
'sign_in' => 'Σύνδεση',
diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc
index 7dfdbbb90..7dad80431 100644
--- a/languages/en_GB/lang.inc
+++ b/languages/en_GB/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 (2238), archonwang (3), dgrutsch (9), netixw (14)
+// Translators: Admin (2245), archonwang (3), dgrutsch (9), netixw (14)
$text = array(
'2_factor_auth' => '2-factor authentication',
@@ -632,13 +632,14 @@ URL: [url]',
'dropfolder_metadata' => 'Metadata of files to be imported',
'dropupload' => 'Fast upload',
'drop_files_here' => 'Drop files here!',
-'drop_files_here_or_click' => 'Drop files here or click!',
+'drop_files_here_or_click' => 'Drop files here or click to upload!',
'dump_creation' => 'DB dump creation',
'dump_creation_warning' => 'With this operation you can create a dump file of your database content. After the creation the dump file will be saved in the data folder of your server.',
'dump_list' => 'Existings dump files',
'dump_remove' => 'Remove dump file',
'duplicates' => 'Duplicates',
'duplicate_content' => 'Duplicate Content',
+'duplicate_sequences' => 'Duplicate sequence numbers in a folder',
'edit' => 'Edit',
'edit_attributes' => 'Edit attributes',
'edit_comment' => 'Edit comment',
@@ -751,6 +752,7 @@ URL: [url]',
'extension_mgr_repository' => 'Available',
'extension_mgr_upload_disabled' => 'Uploading new extensions is not possible because it is disabled in the configuraton.',
'extension_missing_name' => 'No extension name given',
+'extension_readme' => 'Readme',
'extension_toggle_error' => 'Could not toggle extension',
'extension_version_list' => 'Versions',
'february' => 'February',
@@ -1078,6 +1080,7 @@ URL: [url]',
'move_clipboard' => 'Move clipboard',
'move_document' => 'Move document',
'move_folder' => 'Move Folder',
+'move_into_rootfolder' => 'Move into root folder',
'my_account' => 'My Account',
'my_documents' => 'My Documents',
'my_transmittals' => 'My Transmittals',
@@ -1259,6 +1262,7 @@ New owner: [new_owner]
User: [username]
URL: [url]',
'ownership_changed_email_subject' => '[sitename]: [name] - Owner changed',
+'parent_folder' => 'Parent folder',
'password' => 'Password',
'password_already_used' => 'Password already used',
'password_expiration' => 'Password expiration',
@@ -1324,6 +1328,7 @@ If you still have problems to login, then please contact your administrator.',
'quota_exceeded' => 'Your disk quota is exceeded by [bytes].',
'quota_is_disabled' => 'Quota support is currently disabled in the settings. Setting a user quota will have no effect until it is enabled again.',
'quota_warning' => 'Your maximum disc usage is exceeded by [bytes]. Please remove documents or previous versions.',
+'readme_loading' => 'Pleae wait, until the Readme is loaded ...',
'receipts_accepted' => '[no_receipts] receipts already accepted',
'receipts_accepted_latest' => '(being [no_receipts] in latest version)',
'receipts_not_touched' => '[no_receipts] receipts not being touched',
@@ -2186,6 +2191,7 @@ If you did not receive a password, please use the password forgotten function on
'set_password' => 'Set Password',
'set_workflow' => 'Set Workflow',
'show_extension_changelog' => 'Show Changelog',
+'show_extension_readme' => 'Show Readme',
'show_extension_version_list' => 'Show list of versions',
'signed_in_as' => 'Signed in as',
'sign_in' => 'Sign in',
diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc
index a797e9995..c445d883e 100644
--- a/languages/es_ES/lang.inc
+++ b/languages/es_ES/lang.inc
@@ -527,6 +527,7 @@ URL: [url]',
'dump_remove' => 'Eliminar fichero de volcado',
'duplicates' => 'Duplicados',
'duplicate_content' => 'Contenido duplicado',
+'duplicate_sequences' => '',
'edit' => 'editar',
'edit_attributes' => 'Editar atributos',
'edit_comment' => 'Editar comentario',
@@ -633,6 +634,7 @@ URL: [url]',
'extension_mgr_repository' => 'Disponible',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => 'Versiones',
'february' => 'Febrero',
@@ -922,6 +924,7 @@ URL: [url]',
'move_clipboard' => 'Mover portapaprles',
'move_document' => 'Mover documento',
'move_folder' => 'Mover carpeta',
+'move_into_rootfolder' => '',
'my_account' => 'Mi cuenta',
'my_documents' => 'Mis documentos',
'my_transmittals' => 'Mi transmision',
@@ -1064,6 +1067,7 @@ Usuario: [username]
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: [name] - Propietario modificado',
+'parent_folder' => '',
'password' => 'Contraseña',
'password_already_used' => 'La contraseña ya está en uso',
'password_expiration' => 'Caducidad de la contraseña',
@@ -1121,6 +1125,7 @@ Si continua teniendo problemas de acceso, por favor contacte con el administrado
'quota_exceeded' => 'Su cuota de disco se ha excedido en [bytes].',
'quota_is_disabled' => 'La cuota está actualmente deshabilitada en las opciones. Establecer una cuota de usuario no tendrá efecto hasta que sea habilitada de nuevo.',
'quota_warning' => 'El máximo de uso de disco se ha excedido en [bytes]. Por favor eliminar documentos o versiones anteriores.',
+'readme_loading' => '',
'receipts_accepted' => '',
'receipts_accepted_latest' => '',
'receipts_not_touched' => '',
@@ -1806,6 +1811,7 @@ URL: [url]',
'set_password' => 'Establecer contraseña',
'set_workflow' => 'Establecer Flujo de Trabajo',
'show_extension_changelog' => 'Mostrar log de cambios',
+'show_extension_readme' => '',
'show_extension_version_list' => 'Lista corta de versiones',
'signed_in_as' => 'Conectado como',
'sign_in' => 'Conectar',
diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc
index fdd49deb4..bdebee968 100644
--- a/languages/fr_FR/lang.inc
+++ b/languages/fr_FR/lang.inc
@@ -625,6 +625,7 @@ URL : [url]',
'dump_remove' => 'Supprimer fichier de sauvegarde',
'duplicates' => 'Doublons',
'duplicate_content' => 'Contenu en double',
+'duplicate_sequences' => '',
'edit' => 'Modifier',
'edit_attributes' => 'Modifier les attributs',
'edit_comment' => 'Modifier le commentaire',
@@ -737,6 +738,7 @@ URL : [url]',
'extension_mgr_repository' => 'Disponibles',
'extension_mgr_upload_disabled' => 'Le chargement d\'extension n\'est pas activé',
'extension_missing_name' => 'Nom d’extension manquant',
+'extension_readme' => '',
'extension_toggle_error' => 'Impossible d’activer/désactiver l’extension',
'extension_version_list' => 'Versions',
'february' => 'Février',
@@ -1064,6 +1066,7 @@ URL : [url]',
'move_clipboard' => 'Déplacer le contenu du presse-papier',
'move_document' => 'Déplacer le document',
'move_folder' => 'Déplacer le dossier',
+'move_into_rootfolder' => '',
'my_account' => 'Mon compte',
'my_documents' => 'Mes documents',
'my_transmittals' => 'Mes transmissions',
@@ -1246,6 +1249,7 @@ Nouveau propriétaire : [new_owner]
Utilisateur : [username]
URL : [url]',
'ownership_changed_email_subject' => '[sitename] : [name] - Propriétaire modifié',
+'parent_folder' => '',
'password' => 'Mot de passe',
'password_already_used' => 'Mot de passe déjà utilisé',
'password_expiration' => 'Expiration du mot de passe',
@@ -1309,6 +1313,7 @@ En cas de problème persistant, veuillez contacter votre administrateur.',
'quota_exceeded' => 'Votre quota de disque est dépassé de [bytes].',
'quota_is_disabled' => 'La prise en charge des quotas est actuellement désactivée dans les réglages. Affecter un quota utilisateur n’aura pas d’effet jusqu’à ce qu’il soit de nouveau activé.',
'quota_warning' => 'Votre quota d’espace disque est dépassé de [bytes]. Veuillez supprimer des documents ou d\'anciennes versions.',
+'readme_loading' => '',
'receipts_accepted' => '[no_receipts] réceptions déjà confirmées',
'receipts_accepted_latest' => '(dont [no_receipts] dans la dernière version)',
'receipts_not_touched' => '[no_receipts] réceptions non amorcées',
@@ -2169,6 +2174,7 @@ Nom : [username]
'set_password' => 'Définir mot de passe',
'set_workflow' => 'Définir le Workflow',
'show_extension_changelog' => 'Afficher le journal des modifications',
+'show_extension_readme' => '',
'show_extension_version_list' => 'Afficher la liste des versions',
'signed_in_as' => 'Connecté en tant que',
'sign_in' => 'Connexion',
diff --git a/languages/hr_HR/lang.inc b/languages/hr_HR/lang.inc
index b780ad153..b3507f1ba 100644
--- a/languages/hr_HR/lang.inc
+++ b/languages/hr_HR/lang.inc
@@ -19,10 +19,10 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
-// Translators: Admin (1249), marbanas (16)
+// Translators: Admin (1250), marbanas (16)
$text = array(
-'2_factor_auth' => '',
+'2_factor_auth' => '2-faktorska autentikacija',
'2_factor_auth_info' => '',
'2_fact_auth_current_secret' => '',
'2_fact_auth_new_secret' => '',
@@ -526,6 +526,7 @@ Internet poveznica: [url]',
'dump_remove' => 'Ukloni datoteku za odlaganje',
'duplicates' => 'duplikati',
'duplicate_content' => 'Duplicirani sadržaj',
+'duplicate_sequences' => '',
'edit' => 'Uredi',
'edit_attributes' => 'Uredi atribute',
'edit_comment' => 'Uredi komentar',
@@ -632,6 +633,7 @@ Internet poveznica: [url]',
'extension_mgr_repository' => 'Dostupno',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => 'Inačice',
'february' => 'Veljača',
@@ -915,6 +917,7 @@ Internet poveznica: [url]',
'move_clipboard' => 'Premjesti međuspremnik',
'move_document' => 'Premjesti dokument',
'move_folder' => 'Premjesti mapu',
+'move_into_rootfolder' => '',
'my_account' => 'Moj korisnički račun',
'my_documents' => 'Moji dokumenti',
'my_transmittals' => 'Moja proslijeđivanja',
@@ -1056,6 +1059,7 @@ Korisnik: [username]
Internet poveznica: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: [name] - Promijenjen vlasnik',
+'parent_folder' => '',
'password' => 'Lozinka',
'password_already_used' => 'Lozinka se već koristi',
'password_expiration' => 'Istek lozinke',
@@ -1113,6 +1117,7 @@ Ako i dalje imate problema s prijavom, molimo kontaktirajte Vašeg administrator
'quota_exceeded' => 'Vaša kvota na disku je premašena za [bytes].',
'quota_is_disabled' => 'Podrška kvoti je trenutno onemogućena u postavkama. Postavka korisničke kvote neće imati utjecaja dok se ponovno ne omogući.',
'quota_warning' => 'Vaš maksimalni prostor na disku je premašen za [bytes]. Molimo uklonite dokumente ili prethodne verzije.',
+'readme_loading' => '',
'receipts_accepted' => '',
'receipts_accepted_latest' => '',
'receipts_not_touched' => '',
@@ -1815,6 +1820,7 @@ Internet poveznica: [url]',
'set_password' => 'Postavi lozinku',
'set_workflow' => 'Postavi tok rada',
'show_extension_changelog' => '',
+'show_extension_readme' => '',
'show_extension_version_list' => '',
'signed_in_as' => 'Prijavljen kao',
'sign_in' => 'Prijava u sustav',
diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc
index 7923e22f7..f1e433b1a 100644
--- a/languages/hu_HU/lang.inc
+++ b/languages/hu_HU/lang.inc
@@ -521,6 +521,7 @@ URL: [url]',
'dump_remove' => 'Adatbázis mentés eltávolítása',
'duplicates' => '',
'duplicate_content' => 'Duplikált tartalom',
+'duplicate_sequences' => '',
'edit' => 'Szerkesztés',
'edit_attributes' => 'Jellemzők szerkesztése',
'edit_comment' => 'Megjegyzés szerkesztése',
@@ -627,6 +628,7 @@ URL: [url]',
'extension_mgr_repository' => 'Telepíthető',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => 'Verziók',
'february' => 'Február',
@@ -910,6 +912,7 @@ URL: [url]',
'move_clipboard' => 'Vágólapra helyez',
'move_document' => 'Dokumentum áthelyezése',
'move_folder' => 'Könyvtár áthelyezése',
+'move_into_rootfolder' => '',
'my_account' => 'Saját hozzáférés',
'my_documents' => 'Saját dokumentumok',
'my_transmittals' => 'Átviteleim',
@@ -1052,6 +1055,7 @@ Felhasználó: [username]
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: [name] - Tulajdonos megváltozott',
+'parent_folder' => '',
'password' => 'Jelszó',
'password_already_used' => 'Jelszó korábban használva volt',
'password_expiration' => 'Jelszó lejárat',
@@ -1109,6 +1113,7 @@ Amennyiben problémákba ütközik a bejelentkezés során, kérjük vegye fel a
'quota_exceeded' => 'Túllépte a lemezterület korlátot [bytes].',
'quota_is_disabled' => 'Kvóta támogatás jelenleg le van tiltva a beállításoknál. Felhasználói korlát beállítások nem kerülnek érvényesítésre amíg nincs újra engedélyezve.',
'quota_warning' => 'Túllépte lemez korlátot [bytes] bájttal. Kérjük távolítson el dokumentumokat vagy korábbi változatokat.',
+'readme_loading' => '',
'receipts_accepted' => '',
'receipts_accepted_latest' => '',
'receipts_not_touched' => '',
@@ -1793,6 +1798,7 @@ URL: [url]',
'set_password' => 'Jelszó beállítása',
'set_workflow' => 'Munkafolyamat beállítása',
'show_extension_changelog' => '',
+'show_extension_readme' => '',
'show_extension_version_list' => '',
'signed_in_as' => 'Bejelentkezve mint',
'sign_in' => 'Bejelentkezés',
diff --git a/languages/id_ID/lang.inc b/languages/id_ID/lang.inc
index de7ad1880..ff46a94f2 100644
--- a/languages/id_ID/lang.inc
+++ b/languages/id_ID/lang.inc
@@ -565,6 +565,7 @@ URL: [url]',
'dump_remove' => 'Hapus file sampah',
'duplicates' => 'Duplikasi',
'duplicate_content' => '',
+'duplicate_sequences' => '',
'edit' => 'Ubah',
'edit_attributes' => 'Ubah label',
'edit_comment' => 'Ubah komentar',
@@ -672,6 +673,7 @@ URL: [url]',
'extension_mgr_repository' => 'Tersedia',
'extension_mgr_upload_disabled' => 'Mengunggah ekstensi baru tidak dimungkinkan karena dinonaktifkan di konfigurasi.',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => 'Tidak dapat mengaktifkan ekstensi',
'extension_version_list' => 'Versi',
'february' => 'Februari',
@@ -966,6 +968,7 @@ URL: [url]',
'move_clipboard' => 'Pindah clipboard',
'move_document' => 'Pindah dokumen',
'move_folder' => 'Pindah Folder',
+'move_into_rootfolder' => '',
'my_account' => 'Akun Saya',
'my_documents' => 'Dokumen Saya',
'my_transmittals' => 'Transmisi Saya',
@@ -1129,6 +1132,7 @@ Pemilik baru: [new_owner]
Pengguna: [username]
URL: [url]',
'ownership_changed_email_subject' => '[sitename]: [name] - Pemilik diterapkan',
+'parent_folder' => '',
'password' => 'Kata sandi',
'password_already_used' => 'Kata sandi telah digunakan',
'password_expiration' => 'Kata sandi telah kadaluwarsa',
@@ -1194,6 +1198,7 @@ Jika Anda masih mengalami masalah untuk login, silakan hubungi administrator And
'quota_exceeded' => '',
'quota_is_disabled' => 'Dukungan kuota saat ini dinonaktifkan di pengaturan. Menetapkan kuota pengguna tidak akan berpengaruh hingga diaktifkan kembali.',
'quota_warning' => '',
+'readme_loading' => '',
'receipts_accepted' => '[no_receipts] kuitansi sudah diterima',
'receipts_accepted_latest' => '(menjadi [no_receipts] dalam versi terbaru)',
'receipts_not_touched' => '',
@@ -1867,6 +1872,7 @@ Jika Anda tidak menerima kata sandi, silakan gunakan fitur lupa kata sandi di ha
'set_password' => 'Setel Kata Sandi',
'set_workflow' => 'Setel Alur Kerja',
'show_extension_changelog' => 'Tampilkan Changelog',
+'show_extension_readme' => '',
'show_extension_version_list' => 'Tampilkan daftar versi',
'signed_in_as' => 'Masuk sebagai',
'sign_in' => 'Masuk',
diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc
index 271c9fa0c..26bbc25eb 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 (2057), rickr (144), s.pnt (26)
+// Translators: Admin (2058), rickr (144), s.pnt (26)
$text = array(
'2_factor_auth' => 'Autorizzazione a due fattori',
@@ -531,6 +531,7 @@ URL: [url]',
'dump_remove' => 'Cancella il file di dump',
'duplicates' => 'Duplicati',
'duplicate_content' => 'Contenuto duplicato',
+'duplicate_sequences' => '',
'edit' => 'Modifica',
'edit_attributes' => 'Modifica gli attributi',
'edit_comment' => 'Modifica il commento',
@@ -637,6 +638,7 @@ URL: [url]',
'extension_mgr_repository' => 'Disponibile',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => 'Versioni',
'february' => 'Febbraio',
@@ -920,6 +922,7 @@ URL: [url]',
'move_clipboard' => 'Sposta appunti',
'move_document' => 'Sposta documento',
'move_folder' => 'Sposta cartella',
+'move_into_rootfolder' => '',
'my_account' => 'Account personale',
'my_documents' => 'Documenti personali',
'my_transmittals' => 'Mie trasmissioni',
@@ -1062,6 +1065,7 @@ Utente: [username]
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: [name] - Cambio di proprietario',
+'parent_folder' => '',
'password' => 'Password',
'password_already_used' => 'Password già usata',
'password_expiration' => 'Scadenza password',
@@ -1119,6 +1123,7 @@ Dovessero esserci ancora problemi al login, prego contatta l\'amministratore di
'quota_exceeded' => 'La quota-disco è stata superata di [bytes].',
'quota_is_disabled' => 'Il supporto per le quote è attualmente disattivato nelle impostazioni. L\'impostazione di una quota-utente non avrà alcun effetto finché tale funzionalità non verrà nuovamente attivata.',
'quota_warning' => 'Il vostro utilizzo massimo di spazio è stato superato di [bytes]. Si prega di rimuovere documenti o versioni obsolete.',
+'readme_loading' => '',
'receipts_accepted' => '[no_receipts] ricevute già accettate',
'receipts_accepted_latest' => '',
'receipts_not_touched' => '[no_receipts] ricevute non gestite',
@@ -1360,7 +1365,7 @@ URL: [url]',
'search' => 'Ricerca',
'search_fulltext' => 'Ricerca fulltext',
'search_in' => 'Cerca in',
-'search_mode' => '',
+'search_mode' => 'Modalità di ricerca',
'search_mode_and' => 'tutte le parole',
'search_mode_documents' => 'Solo documenti',
'search_mode_folders' => 'Solo cartelle',
@@ -1842,6 +1847,7 @@ Name: [username]
'set_password' => 'Imposta password',
'set_workflow' => 'Imposta il flusso di lavoro',
'show_extension_changelog' => 'Registro delle modifiche dell\'estensione',
+'show_extension_readme' => '',
'show_extension_version_list' => 'Mostra lista delle versioni',
'signed_in_as' => 'Utente',
'sign_in' => 'Accesso',
diff --git a/languages/ko_KR/lang.inc b/languages/ko_KR/lang.inc
index de8f2db0b..496ac5b74 100644
--- a/languages/ko_KR/lang.inc
+++ b/languages/ko_KR/lang.inc
@@ -527,6 +527,7 @@ URL: [url]',
'dump_remove' => '덤프 파일 제거',
'duplicates' => '',
'duplicate_content' => '중복 내용',
+'duplicate_sequences' => '',
'edit' => '편집',
'edit_attributes' => '속성 편집',
'edit_comment' => '주석 고치기',
@@ -633,6 +634,7 @@ URL: [url]',
'extension_mgr_repository' => '',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => '',
'february' => '2월',
@@ -916,6 +918,7 @@ URL: [url]',
'move_clipboard' => '이동 클립 보드',
'move_document' => '문서 옮기기',
'move_folder' => '폴더 이동',
+'move_into_rootfolder' => '',
'my_account' => '내 계정',
'my_documents' => '내 문서',
'my_transmittals' => '내 송부',
@@ -1058,6 +1061,7 @@ URL : [url]',
URL : [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename] : [name] - 소유자 변경',
+'parent_folder' => '',
'password' => '암호',
'password_already_used' => '예전에 쓰인 암호',
'password_expiration' => '암호 만료',
@@ -1107,6 +1111,7 @@ URL : [url]',
'quota_exceeded' => '당신은 디스크 할당량 [bytes]을 초과한다.',
'quota_is_disabled' => '할당량 지원이 설정에서 비활성화되어 있습니다. 다시 활성화 될 때까지 사용자의 할당량 설정은 적용되지 않습니다.',
'quota_warning' => '당신의 최대 디스크 사용량 [bytes] 초과됩니다. 문서 또는 이전 버전을 제거하십시오.',
+'readme_loading' => '',
'receipts_accepted' => '',
'receipts_accepted_latest' => '',
'receipts_not_touched' => '',
@@ -1809,6 +1814,7 @@ URL : [url]',
'set_password' => '비밀번호 설정',
'set_workflow' => '워크플로우 설정',
'show_extension_changelog' => '',
+'show_extension_readme' => '',
'show_extension_version_list' => '',
'signed_in_as' => '로그인',
'sign_in' => '로그인',
diff --git a/languages/lo_LA/lang.inc b/languages/lo_LA/lang.inc
index f21751132..ae23a3e7e 100644
--- a/languages/lo_LA/lang.inc
+++ b/languages/lo_LA/lang.inc
@@ -524,6 +524,7 @@ URL: [url]',
'dump_remove' => 'ລົບແຟ້ມການຖ່າຍໂອນຂໍ້ມູນ',
'duplicates' => 'ລາຍການທີຊໍ້າກັນ',
'duplicate_content' => 'ເນື້ອຫາທີ່ຊໍ້າກັນ',
+'duplicate_sequences' => '',
'edit' => 'ແກ້ໄຂ',
'edit_attributes' => 'ແກ້ໄຂແອັດທີບິວ',
'edit_comment' => 'ແກ້ໄຂຄວາມຄິດເຫັນ',
@@ -630,6 +631,7 @@ URL: [url]',
'extension_mgr_repository' => '',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => '',
'february' => 'ເດືອນ ກຸມພາ',
@@ -913,6 +915,7 @@ URL: [url]',
'move_clipboard' => 'ຍ້າຍຄິບບອດ',
'move_document' => 'ຍ້າຍເອກະສານ',
'move_folder' => 'ຍ້າຍໂຟລເດີ',
+'move_into_rootfolder' => '',
'my_account' => 'ບັນຊີຂອງຂ້ອຍ',
'my_documents' => 'ເອກະສານຂອງຂ້ອຍ',
'my_transmittals' => 'ການຂົນສົ່ງຂອງຂ້ອຍ',
@@ -1055,6 +1058,7 @@ URL: [url]',
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]:[name] - ປ່ຽນເຈົ້າຂອງແລ້ວ',
+'parent_folder' => '',
'password' => 'ລະຫັດຜ່ານ',
'password_already_used' => 'ລະຫັດຜ່ານທີນຳໄຊ້ແລ້ວ',
'password_expiration' => 'ລະຫັດຜ່ານໝົດອາຍຸ',
@@ -1112,6 +1116,7 @@ URL: [url]',
'quota_exceeded' => 'ໂຄຕ້າດິສຂອງເຈົ້າມີຂະໜາດເກີນ [ໄບ]',
'quota_is_disabled' => 'ຂະນະນີ້ການສະນັບສະໜູນໂຄຕ້າຖືກປິດໄຊ້ງານໃນການຕັ້ງຄ່າແລ້ວການກຳນົດໂຄຕ້າຜູ້ໄຊ້ຈະບໍ່ມີຜົນໄດໆ ຈົນກວ່າຈະເປີດໄຊ້ງານອີກຄັ້ງ',
'quota_warning' => 'ການໄຊ້ດິສສູງສຸດຂອງເຈົ້າເກີນ [ໄບຣ] ໂປດລົບເອກະສານຫຼືເວີຊັນກ່ອນໜ້າ',
+'readme_loading' => '',
'receipts_accepted' => 'ໃບບິນຮັບເງີນໄດ້ຮັບການຍອມຮັບແລ້ວ [ບໍມີໃບບິນຮັບເງິນ]',
'receipts_accepted_latest' => '',
'receipts_not_touched' => 'ບໍ່ມີໃບບິນຮັບເງິນ',
@@ -1835,6 +1840,7 @@ URL: [url]',
'set_password' => 'ຕັ້ງລະຫັດຜ່ານ',
'set_workflow' => 'ຕັ້ງຄ່າການທຳງານ',
'show_extension_changelog' => '',
+'show_extension_readme' => '',
'show_extension_version_list' => '',
'signed_in_as' => 'ລົງຊື່ເຂົາໄຊ້ໂດຍ',
'sign_in' => 'ລົງຊື່ເຂົາໄຊ້',
diff --git a/languages/nb_NO/lang.inc b/languages/nb_NO/lang.inc
index 484c2da5b..6cd633703 100644
--- a/languages/nb_NO/lang.inc
+++ b/languages/nb_NO/lang.inc
@@ -538,6 +538,7 @@ URL: [url]',
'dump_remove' => 'Ta bort dumpfil',
'duplicates' => 'Duplikater',
'duplicate_content' => 'Dubliser innehold',
+'duplicate_sequences' => '',
'edit' => 'Rediger',
'edit_attributes' => 'Rediger egenskaper',
'edit_comment' => 'Rediger kommentar',
@@ -644,6 +645,7 @@ URL: [url]',
'extension_mgr_repository' => 'Tilgjengelig',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => 'Versjon',
'february' => 'Februar',
@@ -934,6 +936,7 @@ URL: [url]',
'move_clipboard' => 'Flytt utklippstavlen',
'move_document' => 'Flytte dokument',
'move_folder' => 'Flytte mappe',
+'move_into_rootfolder' => '',
'my_account' => 'Min side',
'my_documents' => 'Mine dokumenter',
'my_transmittals' => 'Mine sendinger',
@@ -1076,6 +1079,7 @@ Bruker: [username]
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: [name] - Eier endret',
+'parent_folder' => '',
'password' => 'Passord',
'password_already_used' => 'Passord allerede brukt',
'password_expiration' => 'Passord utgått',
@@ -1127,6 +1131,7 @@ Om du fortsatt har problemer med innloggingen, kontakt admin.',
'quota_exceeded' => 'Diskkvoten din er overskridet med [bytes].',
'quota_is_disabled' => 'Kvotestøtte er for øyeblikket deaktivert i innstillingene. Å sette en brukerkvote vil ikke ha noen effekt før den er aktivert igjen.',
'quota_warning' => 'Din maksimale lagringskvote er overskredet med [bytes]. Ta bort dokumenter eller tidigere versjoner.',
+'readme_loading' => '',
'receipts_accepted' => '[no_receipts] kvitteringer allerede akseptert',
'receipts_accepted_latest' => '(er [no_receipts] i siste versjon)',
'receipts_not_touched' => '[no_receipts] kvitteringer ikke blir berørt',
@@ -1848,6 +1853,7 @@ Bruker: [username]
'set_password' => 'Angi passord',
'set_workflow' => 'Velg arbeidsflyt',
'show_extension_changelog' => 'Vis forandrings logg',
+'show_extension_readme' => '',
'show_extension_version_list' => 'Vis liste over versjoner',
'signed_in_as' => 'Innlogget som',
'sign_in' => 'Logg inn',
diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc
index 7fdd9db6c..171dc9519 100644
--- a/languages/nl_NL/lang.inc
+++ b/languages/nl_NL/lang.inc
@@ -531,6 +531,7 @@ URL: [url]',
'dump_remove' => 'Verwijder dump bestand',
'duplicates' => 'Doublures',
'duplicate_content' => 'Dubbele inhoud',
+'duplicate_sequences' => '',
'edit' => 'Wijzigen',
'edit_attributes' => 'Bewerk attributen',
'edit_comment' => 'Wijzig commentaar',
@@ -637,6 +638,7 @@ URL: [url]',
'extension_mgr_repository' => 'Beschikbaar',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => 'Naam extensie ontbreekt',
+'extension_readme' => '',
'extension_toggle_error' => 'Omschakelen mislukt',
'extension_version_list' => 'Versies',
'february' => 'februari',
@@ -927,6 +929,7 @@ URL: [url]',
'move_clipboard' => 'Verplaats klembord',
'move_document' => 'Verplaats document',
'move_folder' => 'Map verplaatsen',
+'move_into_rootfolder' => '',
'my_account' => 'Mijn Account',
'my_documents' => 'Mijn Documenten',
'my_transmittals' => 'Mijn zendingen',
@@ -1068,6 +1071,7 @@ Gebruiker: [username]
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: [name] - Eigenaar gewijzigd',
+'parent_folder' => '',
'password' => 'Wachtwoord',
'password_already_used' => 'Wachtwoord al gebruikt',
'password_expiration' => 'Wachtwoord vervaldatum',
@@ -1126,6 +1130,7 @@ Mocht u de komende minuten geen email ontvangen, probeer het dan nogmaals en con
'quota_exceeded' => 'Uw data quotum is overschreden met [bytes].',
'quota_is_disabled' => 'Quota support is momenteel niet actief in de eigenschappen. Een user-quotum instellen zal geen effect hebben tot quota actief zijn',
'quota_warning' => 'Uw maximale datagebruik is overschreden met [bytes]. Gelieve documenten of eerdere versies te verwijderen.',
+'readme_loading' => '',
'receipts_accepted' => '[no_receipts] ontvangen en geaccepteerd',
'receipts_accepted_latest' => '(er zijn [no_receipts] in de nieuwste versie)',
'receipts_not_touched' => '[no_receipts] ontvangen, nog niet behandeld',
@@ -1847,6 +1852,7 @@ Name: [username]
'set_password' => 'Stel wachtwoord in',
'set_workflow' => 'Stel workflow in',
'show_extension_changelog' => 'Toon wijzigingslog',
+'show_extension_readme' => '',
'show_extension_version_list' => 'Toon lijst met versies',
'signed_in_as' => 'Ingelogd als:',
'sign_in' => 'Log in',
diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc
index a638d4d2a..ab5ef1927 100644
--- a/languages/pl_PL/lang.inc
+++ b/languages/pl_PL/lang.inc
@@ -514,6 +514,7 @@ URL: [url]',
'dump_remove' => 'Usuń plik zrzutu',
'duplicates' => 'Duplikaty',
'duplicate_content' => 'Zduplikowana zawartość',
+'duplicate_sequences' => '',
'edit' => 'Edytuj',
'edit_attributes' => 'Zmiana atrybutów',
'edit_comment' => 'Edytuj komentarz',
@@ -620,6 +621,7 @@ URL: [url]',
'extension_mgr_repository' => 'Dostępne',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => 'Wersje',
'february' => 'Luty',
@@ -903,6 +905,7 @@ URL: [url]',
'move_clipboard' => 'Przenieś schowek',
'move_document' => 'Przenieś dokument',
'move_folder' => 'Przenieś folder',
+'move_into_rootfolder' => '',
'my_account' => 'Moje konto',
'my_documents' => 'Moje dokumenty',
'my_transmittals' => 'Moi recenzenci',
@@ -1045,6 +1048,7 @@ Użytkownik: [username]
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: [name] - Zmiana właściciela',
+'parent_folder' => '',
'password' => 'Hasło',
'password_already_used' => 'Hasło jest aktualnie używane',
'password_expiration' => 'Wygaśnięcie hasła',
@@ -1102,6 +1106,7 @@ Jeśli nadal będą problemy z zalogowaniem, prosimy o kontakt z administratorem
'quota_exceeded' => 'Twój limit przydzielonej przestrzeni dyskowej został przekroczony o [bytes].',
'quota_is_disabled' => 'Wsparcie limitów dyskowych jest obecnie wyłączone w ustawieniach. Ustawiony limit dyskowy użytkownika nie będzie działał dopóki wparcie nie zostanie ponownie włączone.',
'quota_warning' => 'Przekroczono użycie dysku o [bytes]. Usuń dokumenty lub poprzednie wersje.',
+'readme_loading' => '',
'receipts_accepted' => 'Potwierdzenia zaakceptowane',
'receipts_accepted_latest' => '(istnieje [no_receipts] w ostatniej wersji)',
'receipts_not_touched' => 'Potwierdzenia nieoglądane',
@@ -1778,6 +1783,7 @@ Name: [username]
'set_password' => 'Zmień hasło',
'set_workflow' => 'Ustaw proces',
'show_extension_changelog' => 'Pokaż Changelog',
+'show_extension_readme' => '',
'show_extension_version_list' => 'Pokaż listę wersji',
'signed_in_as' => 'Zalogowany jako',
'sign_in' => 'Zaloguj się',
diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc
index 57d7c0229..748d8f7f9 100644
--- a/languages/pt_BR/lang.inc
+++ b/languages/pt_BR/lang.inc
@@ -538,6 +538,7 @@ URL: [url]',
'dump_remove' => 'Remover arquivo de despejo',
'duplicates' => 'Duplicados',
'duplicate_content' => 'Conteúdo duplicado',
+'duplicate_sequences' => '',
'edit' => 'editar',
'edit_attributes' => 'Editar atributos',
'edit_comment' => 'Editar comentário',
@@ -644,6 +645,7 @@ URL: [url]',
'extension_mgr_repository' => 'Disponível',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => 'Versões',
'february' => 'Fevereiro',
@@ -934,6 +936,7 @@ URL: [url]',
'move_clipboard' => 'Mover para memória auxiliar',
'move_document' => 'Mover documento',
'move_folder' => 'Mover Pasta',
+'move_into_rootfolder' => '',
'my_account' => 'Minha Conta',
'my_documents' => 'Meus Documentos',
'my_transmittals' => 'Minhas Transmissões',
@@ -1075,6 +1078,7 @@ Usuário: [username]
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: [name] - Proprietário mudou',
+'parent_folder' => '',
'password' => 'Senha',
'password_already_used' => 'Senha já usada',
'password_expiration' => 'Expiração de senha',
@@ -1132,6 +1136,7 @@ Se você ainda tiver problemas para fazer o login, por favor, contate o administ
'quota_exceeded' => 'Sua cota de disco foi ultrapassada em [bytes].',
'quota_is_disabled' => 'Suporte a cota está desativado nas configurações. A definição de cota do usuário não terá efeito até que seja habilitada novamente.',
'quota_warning' => 'Seu uso máximo do disco foi ultrapassado em [bytes]. Por favor, remova documentos ou versões anteriores.',
+'readme_loading' => '',
'receipts_accepted' => '[no_receipts] recibos já aceitos',
'receipts_accepted_latest' => 'recibos aceites mais recentes',
'receipts_not_touched' => '[no_receipts] recibos não tocados',
@@ -1854,6 +1859,7 @@ Nome: [username]
'set_password' => 'Definir Senha',
'set_workflow' => 'Definir fluxo de trabalho',
'show_extension_changelog' => 'Mostrar Changelog',
+'show_extension_readme' => '',
'show_extension_version_list' => 'Exibir Lista de Versões',
'signed_in_as' => 'Logado',
'sign_in' => 'Entre com seu usuário e senha',
diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc
index 59c95cbe7..c95720d0b 100644
--- a/languages/ro_RO/lang.inc
+++ b/languages/ro_RO/lang.inc
@@ -526,6 +526,7 @@ URL: [url]',
'dump_remove' => 'Sterge fișier imagine',
'duplicates' => '',
'duplicate_content' => '',
+'duplicate_sequences' => '',
'edit' => 'Editează',
'edit_attributes' => 'Editează atribute',
'edit_comment' => 'Editează comentariu',
@@ -632,6 +633,7 @@ URL: [url]',
'extension_mgr_repository' => 'Disponibila',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => 'Versiuni',
'february' => 'Februarie',
@@ -915,6 +917,7 @@ URL: [url]',
'move_clipboard' => 'Mută clipboard',
'move_document' => 'Mută document',
'move_folder' => 'Mută Folder',
+'move_into_rootfolder' => '',
'my_account' => 'Contul Meu',
'my_documents' => 'Documentele Mele',
'my_transmittals' => 'Trimiterile mele',
@@ -1057,6 +1060,7 @@ Utilizator: [username]
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: [name] - Proprietar schimbat',
+'parent_folder' => '',
'password' => 'Parolă',
'password_already_used' => 'Parolă folosită deja',
'password_expiration' => 'Expirare parolă',
@@ -1114,6 +1118,7 @@ Dacă aveți în continuare probleme la autentificare, vă rugăm să contactaț
'quota_exceeded' => 'Spatiul tău alocat pe disc este depășit cu [bytes].',
'quota_is_disabled' => 'Spatiu alocat este dezactivată în setări. Stabilirea unui spatiu alocat pentru utilizator nu va avea nici un efect până când setarea este reactivată din nou.',
'quota_warning' => 'Dimensiunea dumneavoastră maximă este depasită cu [bytes]. Vă rugăm să eliminați documente sau versiuni anterioare.',
+'readme_loading' => '',
'receipts_accepted' => '',
'receipts_accepted_latest' => '',
'receipts_not_touched' => '',
@@ -1816,6 +1821,7 @@ URL: [url]',
'set_password' => 'Setare Parolă',
'set_workflow' => 'Setare Workflow',
'show_extension_changelog' => '',
+'show_extension_readme' => '',
'show_extension_version_list' => 'Arata o lista a versiunilor',
'signed_in_as' => 'Autentificat ca',
'sign_in' => 'Sign in',
diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc
index 89c0ecf3a..21014db1f 100644
--- a/languages/ru_RU/lang.inc
+++ b/languages/ru_RU/lang.inc
@@ -526,6 +526,7 @@ URL: [url]',
'dump_remove' => 'Удалить дамп',
'duplicates' => 'Дубликаты',
'duplicate_content' => 'Дублированное содержимое',
+'duplicate_sequences' => '',
'edit' => 'Изменить',
'edit_attributes' => 'Изменить атрибуты',
'edit_comment' => 'Изменить комментарий',
@@ -632,6 +633,7 @@ URL: [url]',
'extension_mgr_repository' => 'Установленные',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => 'Версии',
'february' => 'Февраль',
@@ -915,6 +917,7 @@ URL: [url]',
'move_clipboard' => 'Переместить буфер обмена',
'move_document' => 'Переместить документ',
'move_folder' => 'Переместить каталог',
+'move_into_rootfolder' => '',
'my_account' => 'Моя учётка',
'my_documents' => 'Мои документы',
'my_transmittals' => 'Мои пересылки',
@@ -1056,6 +1059,7 @@ URL: [url]',
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: изменён владелец «[name]»',
+'parent_folder' => '',
'password' => 'Пароль',
'password_already_used' => 'Пароль уже используется',
'password_expiration' => 'Срок действия пароля',
@@ -1111,6 +1115,7 @@ URL: [url]',
'quota_exceeded' => 'Ваша дисковая квота превышена на [bytes].',
'quota_is_disabled' => 'Поддержка квот в настоящее время отключена в настройках.',
'quota_warning' => 'Ваша дисковая квота превышена на [bytes]. Удалите ненужные документы или их предыдущие версии.',
+'readme_loading' => '',
'receipts_accepted' => '',
'receipts_accepted_latest' => '',
'receipts_not_touched' => '',
@@ -1823,6 +1828,7 @@ URL: [url]',
'set_password' => 'Установить пароль',
'set_workflow' => 'Установить процесс',
'show_extension_changelog' => 'Показать журнал изменений',
+'show_extension_readme' => '',
'show_extension_version_list' => 'Показать список версий',
'signed_in_as' => 'Пользователь',
'sign_in' => 'Войти',
diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc
index 3d00e11e6..6e805be12 100644
--- a/languages/sk_SK/lang.inc
+++ b/languages/sk_SK/lang.inc
@@ -538,6 +538,7 @@ URL: [url]',
'dump_remove' => 'Odstrániť vystup',
'duplicates' => 'Duplikáty',
'duplicate_content' => 'Duplicitný obsah',
+'duplicate_sequences' => '',
'edit' => 'upraviť',
'edit_attributes' => 'Uprav parametre',
'edit_comment' => 'Upraviť komentár',
@@ -644,6 +645,7 @@ URL: [url]',
'extension_mgr_repository' => 'Available',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => 'Versions',
'february' => 'Február',
@@ -934,6 +936,7 @@ URL: [url]',
'move_clipboard' => 'Presunúť schránku',
'move_document' => 'Presunúť dokument',
'move_folder' => 'Presunúť zložku',
+'move_into_rootfolder' => '',
'my_account' => 'Môj účet',
'my_documents' => 'Moje dokumenty',
'my_transmittals' => 'My Transmittals',
@@ -1076,6 +1079,7 @@ Používateľ: [username]
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: [name] - Vlastník zmenený',
+'parent_folder' => '',
'password' => 'Heslo',
'password_already_used' => 'Heslo sa už používa',
'password_expiration' => 'Vypršanie hesla',
@@ -1133,6 +1137,7 @@ If you have still problems to login, then please contact your administrator.',
'quota_exceeded' => 'Vaša disková kvóta bola prekročená o [bytes].',
'quota_is_disabled' => 'Podpora kvót je momentálne zakázaná v nastaveniach. Nastavenie kvóty používateľa nebude mať žiadny účinok, kým nebude znovu aktivovaná.',
'quota_warning' => 'Maximálne využitie disku je prekročené o [bytes]. Odstráňte dokumenty alebo predchádzajúce verzie.',
+'readme_loading' => '',
'receipts_accepted' => '[no_receipts] receipts already accepted',
'receipts_accepted_latest' => '',
'receipts_not_touched' => '[no_receipts] receipts not being touched',
@@ -1856,6 +1861,7 @@ Meno: [username]
'set_password' => 'Nastaviť heslo',
'set_workflow' => 'Set Workflow',
'show_extension_changelog' => 'Show Changelog',
+'show_extension_readme' => '',
'show_extension_version_list' => 'Show list of versions',
'signed_in_as' => 'Prihlásený ako',
'sign_in' => 'Prihlásiť sa',
diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc
index ea4c3ed0a..e5fee5ec5 100644
--- a/languages/sv_SE/lang.inc
+++ b/languages/sv_SE/lang.inc
@@ -532,6 +532,7 @@ URL: [url]',
'dump_remove' => 'Ta bort dumpfil',
'duplicates' => 'Dubletter',
'duplicate_content' => 'Duplicera innehåll',
+'duplicate_sequences' => '',
'edit' => 'Ändra',
'edit_attributes' => 'Ändra attribut',
'edit_comment' => 'Ändra kommentar',
@@ -638,6 +639,7 @@ URL: [url]',
'extension_mgr_repository' => '',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => '',
'february' => 'februari',
@@ -921,6 +923,7 @@ URL: [url]',
'move_clipboard' => 'Flytta urklipp',
'move_document' => 'Flytta dokument',
'move_folder' => 'Flytta katalog',
+'move_into_rootfolder' => '',
'my_account' => 'Min Sida',
'my_documents' => 'Mina dokument',
'my_transmittals' => 'Mina överföringar',
@@ -1063,6 +1066,7 @@ Användare: [username]
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: [name] - Ägare har ändrats',
+'parent_folder' => '',
'password' => 'Lösenord',
'password_already_used' => 'Lösenordet används redan',
'password_expiration' => 'Lösenord utgår',
@@ -1117,6 +1121,7 @@ Om du fortfarande har problem med inloggningen, kontakta administratören.',
'quota_exceeded' => 'Din minneskvot har överskridits med [bytes].',
'quota_is_disabled' => 'Kvotstöd är för närvarande inaktiverad i inställningarna. Ett värde för användarkvot kommer inte att ha någon effekt förrän den är aktiverad igen.',
'quota_warning' => 'Din maximala lagringskvot har överskridits med [bytes]. Ta bort dokument eller tidigare versioner.',
+'readme_loading' => '',
'receipts_accepted' => '',
'receipts_accepted_latest' => '',
'receipts_not_touched' => '',
@@ -1829,6 +1834,7 @@ Kommentar: [comment]',
'set_password' => 'Ange lösenord',
'set_workflow' => 'Välj arbetsflöde',
'show_extension_changelog' => '',
+'show_extension_readme' => '',
'show_extension_version_list' => '',
'signed_in_as' => 'Inloggad som',
'sign_in' => 'Logga in',
diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc
index 7dfe3251b..9d8818ed1 100644
--- a/languages/tr_TR/lang.inc
+++ b/languages/tr_TR/lang.inc
@@ -520,6 +520,7 @@ URL: [url]',
'dump_remove' => 'Dump dosyasını sil',
'duplicates' => '',
'duplicate_content' => 'içeriği_klonla',
+'duplicate_sequences' => '',
'edit' => 'Düzenle',
'edit_attributes' => 'Nitelikleri düzenle',
'edit_comment' => 'Açıklamayı düzenle',
@@ -626,6 +627,7 @@ URL: [url]',
'extension_mgr_repository' => 'Mevcut',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => 'Veysionlar',
'february' => 'Şubat',
@@ -909,6 +911,7 @@ URL: [url]',
'move_clipboard' => 'Panoyu taşı',
'move_document' => 'Dokümanı taşı',
'move_folder' => 'Klasörü Taşı',
+'move_into_rootfolder' => '',
'my_account' => 'Hesabım',
'my_documents' => 'Dokümanlarım',
'my_transmittals' => 'Çevirilerim',
@@ -1051,6 +1054,7 @@ Kullanıcı: [username]
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: [name] - Sahip değişti',
+'parent_folder' => '',
'password' => 'Parola',
'password_already_used' => 'Bu parola zaten kullanılmış',
'password_expiration' => 'Parola kullanım süresi',
@@ -1110,6 +1114,7 @@ Giriş yaparken halen sorun yaşıyorsanız lütfen sistem yöneticinizle görü
'quota_exceeded' => 'Size ayrılan disk kotası [bytes] aşıldı.',
'quota_is_disabled' => 'Kota desteği ayarlardan kapatılmış durumda. Açılana kadar kullanıcıya kota tanımlamanın bir etkisi olmaz.',
'quota_warning' => 'Size ayrılan disk kotası [bytes] aşıldı. Lütfen gereksiz olduğunu düşündüğünüz dokümanları veya eski versiyonları silin.',
+'readme_loading' => '',
'receipts_accepted' => '',
'receipts_accepted_latest' => '',
'receipts_not_touched' => '',
@@ -1795,6 +1800,7 @@ URL: [url]',
'set_password' => 'Parola Belirle',
'set_workflow' => 'İş Akışı Tanımla',
'show_extension_changelog' => '',
+'show_extension_readme' => '',
'show_extension_version_list' => 'Versiyonları görüntüle',
'signed_in_as' => 'Giriş yapan kullanıcı',
'sign_in' => 'Giriş',
diff --git a/languages/uk_UA/lang.inc b/languages/uk_UA/lang.inc
index c3150f174..1e97c88b6 100644
--- a/languages/uk_UA/lang.inc
+++ b/languages/uk_UA/lang.inc
@@ -526,6 +526,7 @@ URL: [url]',
'dump_remove' => 'Видалити дамп',
'duplicates' => '',
'duplicate_content' => 'Дубльований вміст',
+'duplicate_sequences' => '',
'edit' => 'Змінити',
'edit_attributes' => 'Змінити атрибути',
'edit_comment' => 'Змінити коментар',
@@ -632,6 +633,7 @@ URL: [url]',
'extension_mgr_repository' => '',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => '',
'february' => 'Лютий',
@@ -915,6 +917,7 @@ URL: [url]',
'move_clipboard' => 'Перемістити буфер обміну',
'move_document' => 'Перемістити документ',
'move_folder' => 'Перемістити каталог',
+'move_into_rootfolder' => '',
'my_account' => 'Мій обліковий запис',
'my_documents' => 'Мої документи',
'my_transmittals' => 'Мої перенесення',
@@ -1056,6 +1059,7 @@ URL: [url]',
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: змінено власника «[name]»',
+'parent_folder' => '',
'password' => 'Пароль',
'password_already_used' => 'Пароль вже використовується',
'password_expiration' => 'Термін використання паролю',
@@ -1111,6 +1115,7 @@ URL: [url]',
'quota_exceeded' => 'Ваша дискова квота перевищена на [bytes].',
'quota_is_disabled' => 'Квотування відключено',
'quota_warning' => 'Ваша дискова квота перевищена на [bytes]. Видаліть непотрібні документи або їх попередні версії.',
+'readme_loading' => '',
'receipts_accepted' => '',
'receipts_accepted_latest' => '',
'receipts_not_touched' => '',
@@ -1816,6 +1821,7 @@ URL: [url]',
'set_password' => 'Встановити пароль',
'set_workflow' => 'Вказати процес',
'show_extension_changelog' => '',
+'show_extension_readme' => '',
'show_extension_version_list' => '',
'signed_in_as' => 'Користувач',
'sign_in' => 'Увійти',
diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc
index bf8a2dd0e..ee4aeb3b5 100644
--- a/languages/zh_CN/lang.inc
+++ b/languages/zh_CN/lang.inc
@@ -526,6 +526,7 @@ URL: [url]',
'dump_remove' => '删除转储文件',
'duplicates' => '复制',
'duplicate_content' => '重复的内容',
+'duplicate_sequences' => '',
'edit' => '编辑',
'edit_attributes' => '编辑属性',
'edit_comment' => '编辑说明',
@@ -634,6 +635,7 @@ URL: [url]',
'extension_mgr_repository' => '可得到',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => '版本列表',
'february' => '二 月',
@@ -917,6 +919,7 @@ URL: [url]',
'move_clipboard' => '移动剪切板',
'move_document' => '移动文档',
'move_folder' => '移动文件夹',
+'move_into_rootfolder' => '',
'my_account' => '我的账户',
'my_documents' => '我的文档',
'my_transmittals' => '我的传送',
@@ -1059,6 +1062,7 @@ URL: [url]',
URL: [url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: [name] - 所有者已更新',
+'parent_folder' => '',
'password' => '密码',
'password_already_used' => '密码已被使用',
'password_expiration' => '密码过期',
@@ -1116,6 +1120,7 @@ URL: [url]',
'quota_exceeded' => '您的磁盘配额已超过 [bytes]。',
'quota_is_disabled' => '配额的支持',
'quota_warning' => '您的磁盘最大使用量已超过 [bytes]。请删除文档或以前的版本。',
+'readme_loading' => '',
'receipts_accepted' => '已收到收据',
'receipts_accepted_latest' => '',
'receipts_not_touched' => '未获取收据[no_receipts]',
@@ -1803,6 +1808,7 @@ URL: [url]',
'set_password' => '设定密码',
'set_workflow' => '设置工作流',
'show_extension_changelog' => '显示更新记录',
+'show_extension_readme' => '',
'show_extension_version_list' => '显示版本列表',
'signed_in_as' => '登录为',
'sign_in' => '登录',
diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc
index a04043ebb..b6331d790 100644
--- a/languages/zh_TW/lang.inc
+++ b/languages/zh_TW/lang.inc
@@ -538,6 +538,7 @@ URL: [url]',
'dump_remove' => '刪除轉儲檔',
'duplicates' => '重複項',
'duplicate_content' => '重複內容',
+'duplicate_sequences' => '',
'edit' => '編輯',
'edit_attributes' => '編輯屬性',
'edit_comment' => '編輯說明',
@@ -644,6 +645,7 @@ URL: [url]',
'extension_mgr_repository' => '可用',
'extension_mgr_upload_disabled' => '',
'extension_missing_name' => '',
+'extension_readme' => '',
'extension_toggle_error' => '',
'extension_version_list' => '版本',
'february' => '二 月',
@@ -934,6 +936,7 @@ URL: [url]',
'move_clipboard' => '移動剪貼簿',
'move_document' => '移動文件',
'move_folder' => '移動資料夾',
+'move_into_rootfolder' => '',
'my_account' => '我的帳戶',
'my_documents' => '我的文件',
'my_transmittals' => '我的傳送',
@@ -1076,6 +1079,7 @@ URL: [url]',
網址:[url]',
'ownership_changed_email_body_html' => '',
'ownership_changed_email_subject' => '[sitename]: [name] - 擁有者已改變',
+'parent_folder' => '',
'password' => '密碼',
'password_already_used' => '密碼已使用',
'password_expiration' => '密碼過期',
@@ -1131,6 +1135,7 @@ URL: [url]',
'quota_exceeded' => '您的磁盤配額超出了[bytes]。',
'quota_is_disabled' => '當前在設置中禁用了配額支持。除非再次啟用,否則設置使用者配額將無效。',
'quota_warning' => '您的最大光盤使用量超出了[bytes]。請刪除文檔或以前的版本。',
+'readme_loading' => '',
'receipts_accepted' => '[no_receipts]張收據已被接受',
'receipts_accepted_latest' => '(最新版本為[no_receipts])',
'receipts_not_touched' => '[no_receipts]收據未觸及',
@@ -1854,6 +1859,7 @@ URL: [url]',
'set_password' => '設定密碼',
'set_workflow' => '設定工作流程',
'show_extension_changelog' => '顯示變更日誌',
+'show_extension_readme' => '',
'show_extension_version_list' => '版本列表',
'signed_in_as' => '登錄為',
'sign_in' => '登入',
From 38b0cbda7f3cf7bec8709271d52c39b3229ce176 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 15 Nov 2022 16:03:52 +0100
Subject: [PATCH 056/247] replace space by tabs
---
SeedDMS_Core/Core/inc.ClassDMS.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php
index d2557f542..7adec5e8b 100644
--- a/SeedDMS_Core/Core/inc.ClassDMS.php
+++ b/SeedDMS_Core/Core/inc.ClassDMS.php
@@ -840,8 +840,8 @@ class SeedDMS_Core_DMS {
*/
function getDocumentContent($id) { /* {{{ */
- if (!is_numeric($id)) return false;
- if ($id < 1) return false;
+ if (!is_numeric($id)) return false;
+ if ($id < 1) return false;
$queryStr = "SELECT * FROM `tblDocumentContent` WHERE `id` = ".(int) $id;
$resArr = $this->db->getResultArray($queryStr);
From 8e47c444b2be173736d1a05db7f4f49282379fd1 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 15 Nov 2022 16:04:15 +0100
Subject: [PATCH 057/247] better checking form mimetype!=null in setMimeType()
---
SeedDMS_Core/Core/inc.ClassDocument.php | 3 +++
1 file changed, 3 insertions(+)
diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php
index 34677a6c8..41c8b226f 100644
--- a/SeedDMS_Core/Core/inc.ClassDocument.php
+++ b/SeedDMS_Core/Core/inc.ClassDocument.php
@@ -3237,6 +3237,9 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
function setMimeType($newMimetype) { /* {{{ */
$db = $this->_document->getDMS()->getDB();
+ if(!$newMimetype)
+ return false;
+
$newMimetype = trim($newMimetype);
if(!$newMimetype)
From aa18d3f8832a4c136c2d04a62dddd96f42d7cdb2 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 15 Nov 2022 16:05:06 +0100
Subject: [PATCH 058/247] add new function getMimeType()
---
inc/inc.Utils.php | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php
index e13394421..f94f73c57 100644
--- a/inc/inc.Utils.php
+++ b/inc/inc.Utils.php
@@ -395,6 +395,34 @@ function getFilenameByDocname($content) { /* {{{ */
return mb_ereg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $filename);
} /* }}} */
+/**
+ * Return the mimetype of a given file
+ *
+ * This functions uses finfo but will correct some mimetypes which are
+ * not propperly determined or could be more specific, e.g. text/plain
+ * which is actually text/markdown. In thoses cases
+ * the file extension will be taken into account.
+ *
+ * @param string $filename name of file on disc
+ * @return string mimetype
+ */
+function getMimeType($filename) { /* {{{ */
+ $finfo = finfo_open(FILEINFO_MIME_TYPE);
+ $mimetype = finfo_file($finfo, $filename);
+
+ switch($mimetype) {
+ case 'application/octet-stream':
+ case 'text/plain':
+ $lastDotIndex = strrpos($filename, ".");
+ if($lastDotIndex === false) $fileType = ".";
+ else $fileType = substr($name, $lastDotIndex);
+ if($fileType == '.md')
+ $mimetype = 'text/markdown';
+ break;
+ }
+ return $mimetype;
+} /* }}} */
+
function getLogger($prefix='', $mask=PEAR_LOG_INFO) { /* {{{ */
global $settings;
From f52e950283c3770d2752dfb72b3378b0412c8c78 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 15 Nov 2022 16:05:27 +0100
Subject: [PATCH 059/247] add command 'setmimetype'
---
op/op.Ajax.php | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/op/op.Ajax.php b/op/op.Ajax.php
index d881c20b4..0fa6bc4b6 100644
--- a/op/op.Ajax.php
+++ b/op/op.Ajax.php
@@ -658,6 +658,37 @@ switch($command) {
}
break; /* }}} */
+ case 'setmimetype': /* {{{ */
+ if($user && $user->isAdmin()) {
+ if(checkFormKey('setmimetype', 'GET')) {
+ $content = $dms->getDocumentContent($_REQUEST['contentid']);
+ if($content) {
+ $document = $content->getDocument();
+ if ($document->getAccessMode($user) >= M_READWRITE) {
+ $realmimetype = getMimeType($dms->contentDir . $content->getPath());
+ if (!$content->setMimeType($realmimetype)) {
+ header('Content-Type: application/json');
+ echo json_encode(array('success'=>false, 'message'=>'Error setting mimetype', 'data'=>''));
+ } else {
+ header('Content-Type: application/json');
+ echo json_encode(array('success'=>true, 'message'=>getMLText('splash_mimetype_changed'), 'data'=>''));
+ add_log_line();
+ }
+ } else {
+ header('Content-Type: application/json');
+ echo json_encode(array('success'=>false, 'message'=>getMLText('access_denied'), 'data'=>''));
+ }
+ } else {
+ header('Content-Type: application/json');
+ echo json_encode(array('success'=>false, 'message'=>getMLText('invalid_doc_id'), 'data'=>''));
+ }
+ } else {
+ header('Content-Type: application/json');
+ echo json_encode(array('success'=>false, 'message'=>getMLText('invalid_request_token'), 'data'=>''));
+ }
+ }
+ break; /* }}} */
+
case 'submittranslation': /* {{{ */
if($settings->_showMissingTranslations) {
if($user && !empty($_POST['phrase'])) {
From 2e0c369b2579a6474f2efcfdfa796e9cec928b93 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 15 Nov 2022 16:05:53 +0100
Subject: [PATCH 060/247] allow to set mimetype if is possibly wrong
---
views/bootstrap/class.ViewDocument.php | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php
index 8002ee211..4a950ee55 100644
--- a/views/bootstrap/class.ViewDocument.php
+++ b/views/bootstrap/class.ViewDocument.php
@@ -345,9 +345,10 @@ $(document).ready( function() {
print "".htmlspecialchars($file->getName())." \n";
if($file->getName() != $file->getOriginalFileName())
print "".htmlspecialchars($file->getOriginalFileName())." \n";
- if ($file_exists)
+ if ($file_exists) {
+ $realmimetype = getMimeType($dms->contentDir . $file->getPath());
print "".SeedDMS_Core_File::format_filesize(filesize($dms->contentDir . $file->getPath())) ." bytes, ".htmlspecialchars($file->getMimeType())." ";
- else print "".htmlspecialchars($file->getMimeType())." - ".getMLText("document_deleted")." ";
+ } else print "".htmlspecialchars($file->getMimeType())." - ".getMLText("document_deleted")." ";
print "".getMLText("uploaded_by")." getEmail())."\">".htmlspecialchars($responsibleUser->getFullName())." ";
print "".getLongReadableDate($file->getDate())." ";
@@ -736,6 +737,11 @@ $(document).ready( function() {
if ($file_exists) {
print "". SeedDMS_Core_File::format_filesize($latestContent->getFileSize()) .", ";
print htmlspecialchars($latestContent->getMimeType());
+ if($user->isAdmin()) {
+ $realmimetype = getMimeType($dms->contentDir . $latestContent->getPath());
+ if($realmimetype != $latestContent->getMimeType())
+ echo " getId()."\" data-param3=\"formtoken=".createFormKey('setmimetype')."\" title=\"".htmlspecialchars($realmimetype)."\"> ";
+ }
if(in_array($latestContent->getMimeType(), ['image/jpeg', 'image/jpg', 'image/png', 'image/bmp'])) {
$imsize = getimagesize($dms->contentDir . $latestContent->getPath(), $moreinfo);
if(!empty($moreinfo['APP13'])) {
From 581841bc4240991e432204dbfc9295d35ee396cc Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 15 Nov 2022 16:06:31 +0100
Subject: [PATCH 061/247] click on .ajax-click will always call op/op.Ajax.php
---
views/bootstrap/styles/application.js | 8 +++++++-
views/bootstrap4/styles/application.js | 8 +++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/views/bootstrap/styles/application.js b/views/bootstrap/styles/application.js
index 13beb2f18..096c057d4 100644
--- a/views/bootstrap/styles/application.js
+++ b/views/bootstrap/styles/application.js
@@ -549,7 +549,13 @@ $(document).ready( function() {
$("body").on("click", ".ajax-click", function() { /* {{{ */
var element = $(this);
- var url = element.data('href')+"?"+element.data('param1');
+ var url = seeddms_webroot+"op/op.Ajax.php"+"?"+element.data('param1');
+ var param2 = element.data('param2');
+ var param3 = element.data('param3');
+ if(typeof param2 !== 'undefined')
+ url += "&"+param2;
+ if(typeof param3 !== 'undefined')
+ url += "&"+param3;
$.ajax({
type: 'GET',
url: url,
diff --git a/views/bootstrap4/styles/application.js b/views/bootstrap4/styles/application.js
index bcf9d170d..b2d729c12 100644
--- a/views/bootstrap4/styles/application.js
+++ b/views/bootstrap4/styles/application.js
@@ -580,7 +580,13 @@ $(document).ready( function() {
$("body").on("click", ".ajax-click", function() { /* {{{ */
var element = $(this);
- var url = element.data('href')+"?"+element.data('param1');
+ var url = seeddms_webroot+"op/op.Ajax.php"+"?"+element.data('param1');
+ var param2 = element.data('param2');
+ var param3 = element.data('param3');
+ if(typeof param2 !== 'undefined')
+ url += "&"+param2;
+ if(typeof param3 !== 'undefined')
+ url += "&"+param3;
$.ajax({
type: 'GET',
url: url,
From 08d10d2cc018f5900524ab7833b0c43fbb7c65f3 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 15 Nov 2022 16:07:06 +0100
Subject: [PATCH 062/247] get mimetype without encoding which simplifies the
code
---
webdav/webdav.php | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/webdav/webdav.php b/webdav/webdav.php
index 1a9967497..a893d1374 100644
--- a/webdav/webdav.php
+++ b/webdav/webdav.php
@@ -658,11 +658,9 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
}
fclose($fp);
- $finfo = new finfo(FILEINFO_MIME);
+ $finfo = new finfo(FILEINFO_MIME_TYPE);
$mimetype = $finfo->file($tmpFile);
- $tmp = explode(';', $mimetype);
- $mimetype = $tmp[0];
$lastDotIndex = strrpos($name, ".");
if($lastDotIndex === false) $fileType = ".";
else $fileType = substr($name, $lastDotIndex);
From 83770f7521db905c27552dbe7a4d710c10f3c6ec Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 15 Nov 2022 16:15:24 +0100
Subject: [PATCH 063/247] fix getMimetype()
---
inc/inc.Utils.php | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php
index f94f73c57..68235566d 100644
--- a/inc/inc.Utils.php
+++ b/inc/inc.Utils.php
@@ -407,20 +407,20 @@ function getFilenameByDocname($content) { /* {{{ */
* @return string mimetype
*/
function getMimeType($filename) { /* {{{ */
- $finfo = finfo_open(FILEINFO_MIME_TYPE);
- $mimetype = finfo_file($finfo, $filename);
+ $finfo = finfo_open(FILEINFO_MIME_TYPE);
+ $mimetype = finfo_file($finfo, $filename);
- switch($mimetype) {
- case 'application/octet-stream':
- case 'text/plain':
- $lastDotIndex = strrpos($filename, ".");
- if($lastDotIndex === false) $fileType = ".";
- else $fileType = substr($name, $lastDotIndex);
- if($fileType == '.md')
- $mimetype = 'text/markdown';
- break;
- }
- return $mimetype;
+ switch($mimetype) {
+ case 'application/octet-stream':
+ case 'text/plain':
+ $lastDotIndex = strrpos($filename, ".");
+ if($lastDotIndex === false) $fileType = ".";
+ else $fileType = substr($filename, $lastDotIndex);
+ if($fileType == '.md')
+ $mimetype = 'text/markdown';
+ break;
+ }
+ return $mimetype;
} /* }}} */
function getLogger($prefix='', $mask=PEAR_LOG_INFO) { /* {{{ */
From 0e8f9c516497c76ed91796b3a69e52a8acf386c0 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 17 Nov 2022 11:30:07 +0100
Subject: [PATCH 064/247] fix copyright and description of class
---
SeedDMS_Core/Core/inc.FileUtils.php | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/SeedDMS_Core/Core/inc.FileUtils.php b/SeedDMS_Core/Core/inc.FileUtils.php
index 04dc79ae2..c0b0f1b8e 100644
--- a/SeedDMS_Core/Core/inc.FileUtils.php
+++ b/SeedDMS_Core/Core/inc.FileUtils.php
@@ -9,19 +9,21 @@
* @author Uwe Steinmann
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
- * 2010 Uwe Steinmann
+ * 2010-2022 Uwe Steinmann
* @version Release: @package_version@
*/
/**
- * Class to represent a user in the document management system
+ * Class to file operation in the document management system
+ * Use the methods of this class only for files below the content
+ * directory but not for temporäry files, cache files or log files.
*
* @category DMS
* @package SeedDMS_Core
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
- * 2010 Uwe Steinmann
+ * 2010-2022 Uwe Steinmann
* @version Release: @package_version@
*/
class SeedDMS_Core_File {
From 7716d3ad54693b28ad049fddfbf4cddcd108df16 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 17 Nov 2022 11:31:12 +0100
Subject: [PATCH 065/247] add method mimetype()
---
SeedDMS_Core/Core/inc.FileUtils.php | 33 +++++++++++++++++++++++++++--
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/SeedDMS_Core/Core/inc.FileUtils.php b/SeedDMS_Core/Core/inc.FileUtils.php
index c0b0f1b8e..ac09421b0 100644
--- a/SeedDMS_Core/Core/inc.FileUtils.php
+++ b/SeedDMS_Core/Core/inc.FileUtils.php
@@ -80,8 +80,37 @@ class SeedDMS_Core_File {
} /* }}} */
/**
- * @param $size
- * @param array $sizes
+ * Return the mimetype of a given file
+ *
+ * This method uses finfo to determine the mimetype
+ * but will correct some mimetypes which are
+ * not propperly determined or could be more specific, e.g. text/plain
+ * when it is actually text/markdown. In thoses cases
+ * the file extension will be taken into account.
+ *
+ * @param string $filename name of file on disc
+ * @return string mimetype
+ */
+ static function mimetype($filename) { /* {{{ */
+ $finfo = finfo_open(FILEINFO_MIME_TYPE);
+ $mimetype = finfo_file($finfo, $filename);
+
+ switch($mimetype) {
+ case 'application/octet-stream':
+ case 'text/plain':
+ $lastDotIndex = strrpos($filename, ".");
+ if($lastDotIndex === false) $fileType = ".";
+ else $fileType = substr($filename, $lastDotIndex);
+ if($fileType == '.md')
+ $mimetype = 'text/markdown';
+ break;
+ }
+ return $mimetype;
+ } /* }}} */
+
+ /**
+ * @param integer $size
+ * @param array $sizes list of units for 10^0, 10^3, 10^6, ..., 10^(n*3) bytes
* @return string
*/
static function format_filesize($size, $sizes = array('Bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB')) { /* {{{ */
From 62c2606d098606e817cbf8f45907d1966824f3c5 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 17 Nov 2022 11:32:05 +0100
Subject: [PATCH 066/247] add file_exists(), improve parse_filesize()
---
SeedDMS_Core/Core/inc.FileUtils.php | 30 ++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/SeedDMS_Core/Core/inc.FileUtils.php b/SeedDMS_Core/Core/inc.FileUtils.php
index ac09421b0..b9e6e638b 100644
--- a/SeedDMS_Core/Core/inc.FileUtils.php
+++ b/SeedDMS_Core/Core/inc.FileUtils.php
@@ -121,18 +121,22 @@ class SeedDMS_Core_File {
} /* }}} */
/**
+ * Parses a string like '[0-9]+ *[BKMGT]*' into an integer
+ * B,K,M,G,T stand for byte, kilo byte, mega byte, giga byte, tera byte
+ * If the last character is omitted, bytes are assumed.
+ *
* @param $str
* @return bool|int
*/
static function parse_filesize($str) { /* {{{ */
- preg_replace('/\s\s+/', '', $str);
- if(in_array(strtoupper(substr($str, -1)), array('B','K','M','G'))) {
- $value = (int) substr($str, 0, -1);
- $unit = substr($str, -1, 1);
- } else {
- return (int) $str;
- }
- switch(strtoupper($unit)) {
+ if(!preg_match('/^([0-9]+) *([BKMGT]*)$/', trim($str), $matches))
+ return false;
+ $value = $matches[1];
+ $unit = $matches[2] ? $matches[2] : 'B';
+ switch($unit) {
+ case 'T':
+ return $value * 1024 * 1024 * 1024 *1024;
+ break;
case 'G':
return $value * 1024 * 1024 * 1024;
break;
@@ -143,13 +147,21 @@ class SeedDMS_Core_File {
return $value * 1024;
break;
default;
- return $value;
+ return (int) $value;
break;
}
/** @noinspection PhpUnreachableStatementInspection */
return false;
} /* }}} */
+ /**
+ * @param $file
+ * @return string
+ */
+ static function file_exists($file) { /* {{{ */
+ return file_exists($file);
+ } /* }}} */
+
/**
* @param $file
* @return string
From f9328a5b7ca7d831b7694b20ed3abd1e784b534e Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 17 Nov 2022 11:32:45 +0100
Subject: [PATCH 067/247] add text/markdown in fileExtension()
---
SeedDMS_Core/Core/inc.FileUtils.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/SeedDMS_Core/Core/inc.FileUtils.php b/SeedDMS_Core/Core/inc.FileUtils.php
index b9e6e638b..058e06701 100644
--- a/SeedDMS_Core/Core/inc.FileUtils.php
+++ b/SeedDMS_Core/Core/inc.FileUtils.php
@@ -172,7 +172,7 @@ class SeedDMS_Core_File {
/**
* @param $string mimetype
- * @return string
+ * @return string file extension with the dot or an empty string
*/
static function fileExtension($mimetype) { /* {{{ */
switch($mimetype) {
@@ -267,6 +267,7 @@ class SeedDMS_Core_File {
'text/x-log' => 'log',
'audio/x-m4a' => 'm4a',
'application/vnd.mpegurl' => 'm4u',
+ 'text/markdown' => 'md',
'audio/midi' => 'mid',
'application/vnd.mif' => 'mif',
'video/quicktime' => 'mov',
From 09f6dc64a6e533da8ac4927b8a168fc2c35a091c Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 17 Nov 2022 11:33:34 +0100
Subject: [PATCH 068/247] removeDir() does not require a leading dir separator
---
SeedDMS_Core/Core/inc.FileUtils.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SeedDMS_Core/Core/inc.FileUtils.php b/SeedDMS_Core/Core/inc.FileUtils.php
index 058e06701..a1b8102c5 100644
--- a/SeedDMS_Core/Core/inc.FileUtils.php
+++ b/SeedDMS_Core/Core/inc.FileUtils.php
@@ -449,7 +449,7 @@ class SeedDMS_Core_File {
continue;
else if (is_dir($path . DIRECTORY_SEPARATOR . $entry))
{
- if (!self::removeDir($path . DIRECTORY_SEPARATOR . $entry . "/"))
+ if (!self::removeDir($path . DIRECTORY_SEPARATOR . $entry ))
return false;
}
else
From e719f311672c9ccbd3be8c893f450a4a1a91db56 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 17 Nov 2022 11:33:43 +0100
Subject: [PATCH 069/247] fix moveDir() which didn't work at all
---
SeedDMS_Core/Core/inc.FileUtils.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/SeedDMS_Core/Core/inc.FileUtils.php b/SeedDMS_Core/Core/inc.FileUtils.php
index a1b8102c5..43289fce8 100644
--- a/SeedDMS_Core/Core/inc.FileUtils.php
+++ b/SeedDMS_Core/Core/inc.FileUtils.php
@@ -496,10 +496,10 @@ class SeedDMS_Core_File {
*/
static function moveDir($sourcePath, $targetPath) { /* {{{ */
/** @noinspection PhpUndefinedFunctionInspection */
- if (!copyDir($sourcePath, $targetPath))
+ if (!self::copyDir($sourcePath, $targetPath))
return false;
/** @noinspection PhpUndefinedFunctionInspection */
- return removeDir($sourcePath);
+ return self::removeDir($sourcePath);
} /* }}} */
// code by Kioob (php.net manual)
From 2c96fb5a1cbb7cab4b17bc1d38781ab2ea78aac0 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 17 Nov 2022 11:34:28 +0100
Subject: [PATCH 070/247] remove getMimeType(), it has been moved to
SeedDMS_Core
---
inc/inc.Utils.php | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php
index 68235566d..e13394421 100644
--- a/inc/inc.Utils.php
+++ b/inc/inc.Utils.php
@@ -395,34 +395,6 @@ function getFilenameByDocname($content) { /* {{{ */
return mb_ereg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $filename);
} /* }}} */
-/**
- * Return the mimetype of a given file
- *
- * This functions uses finfo but will correct some mimetypes which are
- * not propperly determined or could be more specific, e.g. text/plain
- * which is actually text/markdown. In thoses cases
- * the file extension will be taken into account.
- *
- * @param string $filename name of file on disc
- * @return string mimetype
- */
-function getMimeType($filename) { /* {{{ */
- $finfo = finfo_open(FILEINFO_MIME_TYPE);
- $mimetype = finfo_file($finfo, $filename);
-
- switch($mimetype) {
- case 'application/octet-stream':
- case 'text/plain':
- $lastDotIndex = strrpos($filename, ".");
- if($lastDotIndex === false) $fileType = ".";
- else $fileType = substr($filename, $lastDotIndex);
- if($fileType == '.md')
- $mimetype = 'text/markdown';
- break;
- }
- return $mimetype;
-} /* }}} */
-
function getLogger($prefix='', $mask=PEAR_LOG_INFO) { /* {{{ */
global $settings;
From 820370d713a0fe676a48dc3e281f975be35e7103 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 17 Nov 2022 11:35:34 +0100
Subject: [PATCH 071/247] getMimeType() is now SeedDMS_Core_File::mimetype()
---
op/op.Ajax.php | 2 +-
views/bootstrap/class.ViewDocument.php | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/op/op.Ajax.php b/op/op.Ajax.php
index 0fa6bc4b6..be2db89a3 100644
--- a/op/op.Ajax.php
+++ b/op/op.Ajax.php
@@ -665,7 +665,7 @@ switch($command) {
if($content) {
$document = $content->getDocument();
if ($document->getAccessMode($user) >= M_READWRITE) {
- $realmimetype = getMimeType($dms->contentDir . $content->getPath());
+ $realmimetype = SeedDMS_Core_File::mimetype($dms->contentDir . $content->getPath());
if (!$content->setMimeType($realmimetype)) {
header('Content-Type: application/json');
echo json_encode(array('success'=>false, 'message'=>'Error setting mimetype', 'data'=>''));
diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php
index 4a950ee55..06614a509 100644
--- a/views/bootstrap/class.ViewDocument.php
+++ b/views/bootstrap/class.ViewDocument.php
@@ -346,7 +346,7 @@ $(document).ready( function() {
if($file->getName() != $file->getOriginalFileName())
print "".htmlspecialchars($file->getOriginalFileName())." \n";
if ($file_exists) {
- $realmimetype = getMimeType($dms->contentDir . $file->getPath());
+ $realmimetype = SeedDMS_Core_File::mimetype($dms->contentDir . $file->getPath());
print "".SeedDMS_Core_File::format_filesize(filesize($dms->contentDir . $file->getPath())) ." bytes, ".htmlspecialchars($file->getMimeType())." ";
} else print "".htmlspecialchars($file->getMimeType())." - ".getMLText("document_deleted")." ";
@@ -738,7 +738,7 @@ $(document).ready( function() {
print "". SeedDMS_Core_File::format_filesize($latestContent->getFileSize()) .", ";
print htmlspecialchars($latestContent->getMimeType());
if($user->isAdmin()) {
- $realmimetype = getMimeType($dms->contentDir . $latestContent->getPath());
+ $realmimetype = SeedDMS_Core_File::mimetype($dms->contentDir . $latestContent->getPath());
if($realmimetype != $latestContent->getMimeType())
echo " getId()."\" data-param3=\"formtoken=".createFormKey('setmimetype')."\" title=\"".htmlspecialchars($realmimetype)."\"> ";
}
From d06f33abeb05eb7411f120d1c8d9c20a2dff3cc4 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 17 Nov 2022 13:10:46 +0100
Subject: [PATCH 072/247] all file operations use methods of SeedDMS_Core_File
---
SeedDMS_Core/Core/inc.ClassDocument.php | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php
index 41c8b226f..482075f39 100644
--- a/SeedDMS_Core/Core/inc.ClassDocument.php
+++ b/SeedDMS_Core/Core/inc.ClassDocument.php
@@ -2013,7 +2013,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
}
foreach($resArr as $res) {
$file = $this->_dms->contentDir . $this->getDir().'r'.$res['reviewLogID'];
- if(file_exists($file))
+ if(SeedDMS_Core_File::file_exists($file))
SeedDMS_Core_File::removeFile($file);
}
}
@@ -2042,7 +2042,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
}
foreach($resArr as $res) {
$file = $this->_dms->contentDir . $this->getDir().'a'.$res['approveLogID'];
- if(file_exists($file))
+ if(SeedDMS_Core_File::file_exists($file))
SeedDMS_Core_File::removeFile($file);
}
}
@@ -2085,7 +2085,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
return false;
}
- if (file_exists( $this->_dms->contentDir.$version->getPath() ))
+ if (SeedDMS_Core_File::file_exists( $this->_dms->contentDir.$version->getPath() ))
if (!SeedDMS_Core_File::removeFile( $this->_dms->contentDir.$version->getPath() )) {
$db->rollbackTransaction();
return false;
@@ -2447,7 +2447,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
return false;
}
- if (file_exists( $this->_dms->contentDir . $file->getPath() )){
+ if (SeedDMS_Core_File::file_exists( $this->_dms->contentDir . $file->getPath() )){
if (!SeedDMS_Core_File::removeFile( $this->_dms->contentDir . $file->getPath() )) {
$db->rollbackTransaction();
return false;
@@ -2514,7 +2514,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
// TODO: versioning file?
- if (file_exists( $this->_dms->contentDir . $this->getDir() ))
+ if (SeedDMS_Core_File::file_exists( $this->_dms->contentDir . $this->getDir() ))
if (!SeedDMS_Core_File::removeDir( $this->_dms->contentDir . $this->getDir() )) {
$db->rollbackTransaction();
return false;
@@ -3665,7 +3665,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
}
foreach($res as &$t) {
$filename = $this->_dms->contentDir . $this->_document->getDir().'r'.$t['reviewLogID'];
- if(file_exists($filename))
+ if(SeedDMS_Core_File::file_exists($filename))
$t['file'] = $filename;
else
$t['file'] = '';
@@ -3845,7 +3845,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
}
foreach($res as &$t) {
$filename = $this->_dms->contentDir . $this->_document->getDir().'a'.$t['approveLogID'];
- if(file_exists($filename))
+ if(SeedDMS_Core_File::file_exists($filename))
$t['file'] = $filename;
else
$t['file'] = '';
@@ -5460,7 +5460,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
$dms = $this->_document->getDMS();
$db = $this->_dms->getDB();
- if(file_exists($this->_dms->contentDir.$this->_document->getDir() . $this->_version . $this->_fileType)) {
+ if(SeedDMS_Core_File::file_exists($this->_dms->contentDir.$this->_document->getDir() . $this->_version . $this->_fileType)) {
if(strlen($this->_fileType) < 2) {
switch($this->_mimeType) {
case "application/pdf":
@@ -5485,7 +5485,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
break;
}
}
- } elseif(file_exists($this->_document->getDir() . $this->_version . '.')) {
+ } elseif(SeedDMS_Core_File::file_exists($this->_document->getDir() . $this->_version . '.')) {
echo "no file";
} else {
echo $this->_dms->contentDir.$this->_document->getDir() . $this->_version . $this->_fileType;
From b45bc9d57cf2e73862b963c1df6419bb3fa916aa Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 17 Nov 2022 13:10:53 +0100
Subject: [PATCH 073/247] update notes of 5.1.28
---
SeedDMS_Core/package.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml
index 5f75fd99e..64ab0ac6f 100644
--- a/SeedDMS_Core/package.xml
+++ b/SeedDMS_Core/package.xml
@@ -30,6 +30,8 @@
- fix sql error when deleting a folder attribute
- add SeedDMS_Core_Attribute::getParsedValue() and use it in SeedDMS_Core_Object::getAttributeValue()
- add SeedDMS_Core_DMS::getDuplicateSequenceNo() and SeedDMS_Core_Folder::reorderDocuments()
+- add SeedDMS_Core_File::mimetype(), fix SeedDMS_Core_File::moveDir()
+- all file operations use methods of SeedDMS_Core_File
From 2e4b19e4efc0c44382a00609b728797b44f124c3 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 17 Nov 2022 17:43:55 +0100
Subject: [PATCH 074/247] fix counting of login failures if both ldap and db
authentication is done
---
CHANGELOG | 1 +
controllers/class.Login.php | 9 +++++++++
inc/inc.ClassDbAuthentication.php | 6 ------
inc/inc.ClassLdapAuthentication.php | 6 ------
4 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index 19c3fda23..9ffacd301 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -19,6 +19,7 @@
- new hook in rest api to add more routes in extensions
- uploaded serveral documents at once by fast upload will assign random
sequence number to allow manually sorting the documents afterwards
+- fix counting of login failures if both ldap and db authentication is done
--------------------------------------------------------------------------------
Changes in version 5.1.27
diff --git a/controllers/class.Login.php b/controllers/class.Login.php
index 3d6f5634a..b8bec3cfa 100644
--- a/controllers/class.Login.php
+++ b/controllers/class.Login.php
@@ -116,6 +116,15 @@ class SeedDMS_Controller_Login extends SeedDMS_Controller_Common {
/* If the user is still not authenticated, then exit with an error */
if(!is_object($user)) {
+ /* if counting of login failures is turned on, then increment its value */
+ if($settings->_loginFailure) {
+ $user = $dms->getUserByLogin($login);
+ if($user) {
+ $failures = $user->addLoginFailure();
+ if($failures >= $settings->_loginFailure)
+ $user->setDisabled(true);
+ }
+ }
$this->callHook('loginFailed');
$this->setErrorMsg("login_error_text");
return false;
diff --git a/inc/inc.ClassDbAuthentication.php b/inc/inc.ClassDbAuthentication.php
index ebd44e685..fbee7f3c9 100644
--- a/inc/inc.ClassDbAuthentication.php
+++ b/inc/inc.ClassDbAuthentication.php
@@ -43,12 +43,6 @@ class SeedDMS_DbAuthentication extends SeedDMS_Authentication {
// Assume that the password has been sent via HTTP POST. It would be careless
// (and dangerous) for passwords to be sent via GET.
if (!seed_pass_verify($password, $user->getPwd())) {
- /* if counting of login failures is turned on, then increment its value */
- if($settings->_loginFailure) {
- $failures = $user->addLoginFailure();
- if($failures >= $settings->_loginFailure)
- $user->setDisabled(true);
- }
$user = false;
}
}
diff --git a/inc/inc.ClassLdapAuthentication.php b/inc/inc.ClassLdapAuthentication.php
index a62ff280d..9f8f66dc6 100644
--- a/inc/inc.ClassLdapAuthentication.php
+++ b/inc/inc.ClassLdapAuthentication.php
@@ -134,12 +134,6 @@ class SeedDMS_LdapAuthentication extends SeedDMS_Authentication {
}
}
} elseif($user) {
- $userid = $user->getID();
- if($settings->_loginFailure) {
- $failures = $user->addLoginFailure();
- if($failures >= $settings->_loginFailure)
- $user->setDisabled(true);
- }
$user = false;
}
ldap_close($ds);
From bafa55b4890e0a31c7f0c878a4e6914869d88c99 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 18 Nov 2022 11:15:27 +0100
Subject: [PATCH 075/247] fix typo, update copyright
---
SeedDMS_Core/Core/inc.ClassDocument.php | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php
index 482075f39..966710335 100644
--- a/SeedDMS_Core/Core/inc.ClassDocument.php
+++ b/SeedDMS_Core/Core/inc.ClassDocument.php
@@ -103,7 +103,7 @@ define("S_LOG_SLEEPING", -3);
/**
* Class to represent a document in the document management system
*
- * A document in SeedDMS is similar to files in a regular file system.
+ * A document in SeedDMS is similar to a file in a regular file system.
* Documents may have any number of content elements
* ({@link SeedDMS_Core_DocumentContent}). These content elements are often
* called versions ordered in a timely manner. The most recent content element
@@ -118,7 +118,7 @@ define("S_LOG_SLEEPING", -3);
* @author Markus Westphal, Malcolm Cowe, Matteo Lucarelli,
* Uwe Steinmann
* @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe,
- * 2010 Matteo Lucarelli, 2010 Uwe Steinmann
+ * 2010 Matteo Lucarelli, 2010-2022 Uwe Steinmann
* @version Release: @package_version@
*/
class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
@@ -2917,7 +2917,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
* Uwe Steinmann
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
- * 2010 Uwe Steinmann
+ * 2010-2022 Uwe Steinmann
* @version Release: @package_version@
*/
class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
@@ -5511,7 +5511,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
* Uwe Steinmann
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
- * 2010 Uwe Steinmann
+ * 2010-2022 Uwe Steinmann
* @version Release: @package_version@
*/
class SeedDMS_Core_DocumentLink { /* {{{ */
@@ -5643,7 +5643,7 @@ class SeedDMS_Core_DocumentLink { /* {{{ */
* Uwe Steinmann
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
- * 2010 Uwe Steinmann
+ * 2010-2022 Uwe Steinmann
* @version Release: @package_version@
*/
class SeedDMS_Core_DocumentFile { /* {{{ */
@@ -5959,7 +5959,7 @@ class SeedDMS_Core_DocumentFile { /* {{{ */
* Uwe Steinmann
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
- * 2010 Uwe Steinmann
+ * 2010-2022 Uwe Steinmann
* @version Release: @package_version@
*/
class SeedDMS_Core_AddContentResultSet { /* {{{ */
From a9feb3e182e5494106c16e4337dcfddbe8f4e780 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 18 Nov 2022 11:20:18 +0100
Subject: [PATCH 076/247] change namespace of iterators from SeedDMS to
SeedDMS\Core
---
SeedDMS_Core/Core/inc.ClassIterator.php | 2 +-
SeedDMS_Core/package.xml | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/SeedDMS_Core/Core/inc.ClassIterator.php b/SeedDMS_Core/Core/inc.ClassIterator.php
index ca6bdccbe..ffb8133dc 100644
--- a/SeedDMS_Core/Core/inc.ClassIterator.php
+++ b/SeedDMS_Core/Core/inc.ClassIterator.php
@@ -1,5 +1,5 @@
From 8d2becb0ca5b49a2df95b9960ac56d82905748a9 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 18 Nov 2022 11:20:38 +0100
Subject: [PATCH 077/247] change namespace of iterators from SeedDMS to
SeedDMS\Core
---
inc/inc.Utils.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php
index e13394421..dda92a894 100644
--- a/inc/inc.Utils.php
+++ b/inc/inc.Utils.php
@@ -1109,7 +1109,7 @@ class SeedDMS_JwtToken { /* {{{ */
class SeedDMS_FolderTree { /* {{{ */
public function __construct($folder, $callback) { /* {{{ */
- $iter = new \SeedDMS\RecursiveFolderIterator($folder);
+ $iter = new \SeedDMS\Core\RecursiveFolderIterator($folder);
$iter2 = new RecursiveIteratorIterator($iter, RecursiveIteratorIterator::SELF_FIRST);
foreach($iter2 as $ff) {
call_user_func($callback, $ff, $iter2->getDepth());
From c9ea05b2633e98ca9491d6353b8782c04ee4842c Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 18 Nov 2022 11:22:08 +0100
Subject: [PATCH 078/247] fix target to create api doc
---
Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index cc2deac8d..64114fe21 100644
--- a/Makefile
+++ b/Makefile
@@ -62,7 +62,9 @@ repository:
doc:
$(PHPDOC) -d SeedDMS_Core --ignore 'getusers.php,getfoldertree.php,config.php,reverselookup.php' --force -t html
+# Download apigen with
+# composer create-project --no-dev apigen/apigen:^7.0@alpha tools/apigen
apidoc:
- apigen generate -s SeedDMS_Core --exclude tests -d html
+ tools/apigen/bin/apigen SeedDMS_Core/Core --exclude "tests/*" --output html
.PHONY: doc webdav webapp repository
From 4e1e126783a7f53459aece1e371fccab61b9f2ee Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 21 Nov 2022 16:32:06 +0100
Subject: [PATCH 079/247] propperly rollback addDocument() if add categories
fails
---
SeedDMS_Core/Core/inc.ClassFolder.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php
index 23324676f..59ab9b811 100644
--- a/SeedDMS_Core/Core/inc.ClassFolder.php
+++ b/SeedDMS_Core/Core/inc.ClassFolder.php
@@ -1059,7 +1059,11 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
}
if($categories) {
- $document->setCategories($categories);
+ if(!$document->setCategories($categories)) {
+ $document->remove();
+ $db->rollbackTransaction();
+ return false;
+ }
}
if($attributes) {
From c93d42228db644ed1ccab5312cc78c5886d811b0 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 21 Nov 2022 16:32:37 +0100
Subject: [PATCH 080/247] start new version 5.1.29
---
SeedDMS_Core/package.xml | 40 ++++++++++++++++++++++++++++------------
1 file changed, 28 insertions(+), 12 deletions(-)
diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml
index 9701ea3f9..8427b476e 100644
--- a/SeedDMS_Core/package.xml
+++ b/SeedDMS_Core/package.xml
@@ -12,11 +12,11 @@
uwe@steinmann.cx
yes
- 2022-11-07
+ 2022-11-21
13:44:55
- 5.1.28
- 5.1.28
+ 5.1.29
+ 5.1.29
stable
@@ -24,15 +24,7 @@
GPL License
-- fix SeedDMS_Core_User::getDocumentContents()
-- fix SeedDMS_Core_File::fileExtension()
-- SeedDMS_Core_DMS::createPasswordRequest() creates a cryptographically secure hash
-- fix sql error when deleting a folder attribute
-- add SeedDMS_Core_Attribute::getParsedValue() and use it in SeedDMS_Core_Object::getAttributeValue()
-- add SeedDMS_Core_DMS::getDuplicateSequenceNo() and SeedDMS_Core_Folder::reorderDocuments()
-- add SeedDMS_Core_File::mimetype(), fix SeedDMS_Core_File::moveDir()
-- all file operations use methods of SeedDMS_Core_File
-- change namespace of iterators from SeedDMS to SeedDMS\Core
+- SeedDMS_Core_Folder::addDocument() does rollback transaction propperly when setting document categories fail
@@ -2016,5 +2008,29 @@ add method SeedDMS_Core_DatabaseAccess::setLogFp()
- pass an array as an attribute to search() will OR each element
+
+ 2022-11-07
+ 13:44:55
+
+ 5.1.28
+ 5.1.28
+
+
+ stable
+ stable
+
+ GPL License
+
+- fix SeedDMS_Core_User::getDocumentContents()
+- fix SeedDMS_Core_File::fileExtension()
+- SeedDMS_Core_DMS::createPasswordRequest() creates a cryptographically secure hash
+- fix sql error when deleting a folder attribute
+- add SeedDMS_Core_Attribute::getParsedValue() and use it in SeedDMS_Core_Object::getAttributeValue()
+- add SeedDMS_Core_DMS::getDuplicateSequenceNo() and SeedDMS_Core_Folder::reorderDocuments()
+- add SeedDMS_Core_File::mimetype(), fix SeedDMS_Core_File::moveDir()
+- all file operations use methods of SeedDMS_Core_File
+- change namespace of iterators from SeedDMS to SeedDMS\Core
+
+
From 0073b00c5ed3a86066973d54c8272b3048f43459 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 21 Nov 2022 16:33:02 +0100
Subject: [PATCH 081/247] fix calling changeFolderAccess()
---
restapi/index.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/restapi/index.php b/restapi/index.php
index f9fcecbce..982b9f98a 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -2268,19 +2268,19 @@ class RestapiController { /* {{{ */
} /* }}} */
function addUserAccessToFolder($request, $response, $args) { /* {{{ */
- return changeFolderAccess($request, $response, $args, 'add', 'user');
+ return $this->changeFolderAccess($request, $response, $args, 'add', 'user');
} /* }}} */
function addGroupAccessToFolder($request, $response, $args) { /* {{{ */
- return changeFolderAccess($request, $response, $args, 'add', 'group');
+ return $this->changeFolderAccess($request, $response, $args, 'add', 'group');
} /* }}} */
function removeUserAccessFromFolder($request, $response, $args) { /* {{{ */
- return changeFolderAccess($request, $response, $args, 'remove', 'user');
+ return $this->changeFolderAccess($request, $response, $args, 'remove', 'user');
} /* }}} */
function removeGroupAccessFromFolder($request, $response, $args) { /* {{{ */
- return changeFolderAccess($request, $response, $args, 'remove', 'group');
+ return $this->changeFolderAccess($request, $response, $args, 'remove', 'group');
} /* }}} */
function changeFolderAccess($request, $response, $args, $operationType, $userOrGroup) { /* {{{ */
From 4fe2f97fea131149935efb382da7262949c77078 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 21 Nov 2022 16:33:38 +0100
Subject: [PATCH 082/247] js code for drag&drop upload is added even if user
has no access on folder
---
views/bootstrap/class.ViewFolder.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/views/bootstrap/class.ViewFolder.php b/views/bootstrap/class.ViewFolder.php
index ba6ca4306..469d80185 100644
--- a/views/bootstrap/class.ViewFolder.php
+++ b/views/bootstrap/class.ViewFolder.php
@@ -235,7 +235,7 @@ $('body').on('click', '.order-btn', function(ev) {
if($showtree == 1)
$this->printNewTreeNavigationJs($folder->getID(), M_READ, 0, 'maintree', ($expandFolderTree == 1) ? -1 : 3, $orderby);
- if ($enableDropUpload && $folder->getAccessMode($user) >= M_READWRITE) {
+ if ($enableDropUpload /*&& $folder->getAccessMode($user) >= M_READWRITE*/) {
echo "SeedDMSUpload.setUrl('".$this->params['settings']->_httpRoot."op/op.Ajax.php');";
echo "SeedDMSUpload.setAbortBtnLabel('".getMLText("cancel")."');";
echo "SeedDMSUpload.setEditBtnLabel('".getMLText("edit_document_props")."');";
From 3af5b0f94361e273ff32baf17495dd4bc7bd1e76 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 22 Nov 2022 06:52:44 +0100
Subject: [PATCH 083/247] new version 5.1.29
---
CHANGELOG | 6 ++++++
inc/inc.Version.php | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG b/CHANGELOG
index 9ffacd301..63de07fee 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,9 @@
+--------------------------------------------------------------------------------
+ Changes in version 5.1.29
+--------------------------------------------------------------------------------
+- fix php errors in restapi
+- fix 'maximum size' error when uploading a file with drag&drop
+
--------------------------------------------------------------------------------
Changes in version 5.1.28
--------------------------------------------------------------------------------
diff --git a/inc/inc.Version.php b/inc/inc.Version.php
index 2ef1672af..552f28df9 100644
--- a/inc/inc.Version.php
+++ b/inc/inc.Version.php
@@ -20,7 +20,7 @@
class SeedDMS_Version { /* {{{ */
- const _number = "5.1.28";
+ const _number = "5.1.29";
const _string = "SeedDMS";
function __construct() {
From 823d98b261dfd9c4b4667f7d41b0d02f0ab9f7a9 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 24 Nov 2022 09:44:23 +0100
Subject: [PATCH 084/247] add a render function for hashed passwords
---
op/op.ImportUsers.php | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/op/op.ImportUsers.php b/op/op.ImportUsers.php
index bd86036dd..af34d607c 100644
--- a/op/op.ImportUsers.php
+++ b/op/op.ImportUsers.php
@@ -49,6 +49,10 @@ function getPasswordPlainData($colname, $coldata, $objdata) { /* {{{ */
return $objdata;
} /* }}} */
+function renderPasswordHashedData($colname, $objdata) { /* {{{ */
+ return substr($objdata[$colname], 0, 16).'...';
+} /* }}} */
+
function renderPasswordPlainData($colname, $objdata) { /* {{{ */
return $objdata[$colname];
} /* }}} */
@@ -181,6 +185,8 @@ if (isset($_FILES['userdata']) && $_FILES['userdata']['error'] == 0) {
$colmap[$i] = array("getFolderData", "renderFolderData", $colname);
} elseif(in_array($colname, array('quota'))) {
$colmap[$i] = array("getQuotaData", "renderQuotaData", $colname);
+ } elseif(in_array($colname, array('passenc'))) {
+ $colmap[$i] = array("getBaseData", "renderPasswordHashedData", $colname);
} elseif(in_array($colname, array('password'))) {
/* getPasswordPlainData() will set 'passenc' */
$colmap[$i] = array("getPasswordPlainData", "renderPasswordPlainData", 'passenc');
From 63ca342576082e7780a53585e20e7526b2d5f3e3 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 24 Nov 2022 09:44:43 +0100
Subject: [PATCH 085/247] show warning if import file has no users or misses a
header line
---
views/bootstrap/class.ImportUsers.php | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/views/bootstrap/class.ImportUsers.php b/views/bootstrap/class.ImportUsers.php
index 6d5eef3a5..d06e18b15 100644
--- a/views/bootstrap/class.ImportUsers.php
+++ b/views/bootstrap/class.ImportUsers.php
@@ -120,6 +120,11 @@ class SeedDMS_View_ImportUsers extends SeedDMS_Theme_Style {
}
*/
echo "";
+ } else {
+ if($colmap)
+ $this->warningMsg(getMLText('import_users_no_users'));
+ else
+ $this->warningMsg(getMLText('import_users_no_column_mapping'));
}
$this->columnEnd();
$this->rowEnd();
From 7854f75c8c1e53b8064e2301229f1f0338252d70 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 24 Nov 2022 11:01:14 +0100
Subject: [PATCH 086/247] add unsafe-inline to csp rule, because of jquery
3.6.1
---
views/bootstrap4/class.Bootstrap4.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php
index 0568bd0f6..80f0ecfc4 100644
--- a/views/bootstrap4/class.Bootstrap4.php
+++ b/views/bootstrap4/class.Bootstrap4.php
@@ -57,9 +57,11 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common {
* X-Content-Security-Policy is deprecated, Firefox understands
* Content-Security-Policy since version 23+
* 'worker-src blob:' is needed for cytoscape
+ * 'unsafe-inline' is needed for jquery 3.6.1 when loading the remote
+ * content of a modal box
*/
$csp_rules = [];
- $csp_rule = "script-src 'self' 'unsafe-eval'";
+ $csp_rule = "script-src 'self' 'unsafe-eval' 'unsafe-inline'";
if($this->nonces) {
$csp_rule .= " 'nonce-".implode("' 'nonce-", $this->nonces)."'";
}
From d3d7956f4ea6bf59dd8e5fd063fc27372a76ea05 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 24 Nov 2022 11:01:31 +0100
Subject: [PATCH 087/247] set data-remote of button to open a modal box with
content loaded from remote
---
views/bootstrap4/class.Bootstrap4.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php
index 80f0ecfc4..db21e46ef 100644
--- a/views/bootstrap4/class.Bootstrap4.php
+++ b/views/bootstrap4/class.Bootstrap4.php
@@ -1363,8 +1363,10 @@ function getOverallStatusIcon($status) { /* {{{ */
function getModalBoxLinkAttributes($config) { /* {{{ */
$attrs = array();
$attrs[] = array('data-target', '#'.$config['target']);
- if(isset($config['remote']))
+ if(isset($config['remote'])) {
$attrs[] = array('href', $config['remote']);
+ $attrs[] = array('data-remote', $config['remote']);
+ }
$attrs[] = array('data-toggle', 'modal');
$attrs[] = array('role', 'button');
if(isset($config['class'])) {
From 3e61d93049dfce6c2b695d184a900411a5512ee9 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 24 Nov 2022 11:02:07 +0100
Subject: [PATCH 088/247] add changes for 5.1.29
---
CHANGELOG | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG b/CHANGELOG
index 63de07fee..35816796c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -3,6 +3,7 @@
--------------------------------------------------------------------------------
- fix php errors in restapi
- fix 'maximum size' error when uploading a file with drag&drop
+- update jquery to 3.6.1 (only bootstrap4 theme)
--------------------------------------------------------------------------------
Changes in version 5.1.28
From 53389d9054fa460c93a11fa8c781d8e7f24428e6 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 24 Nov 2022 12:38:59 +0100
Subject: [PATCH 089/247] do cookie handling and session update only if logged
in via web page
---
controllers/class.Login.php | 134 +++++++++++++++++++-----------------
1 file changed, 70 insertions(+), 64 deletions(-)
diff --git a/controllers/class.Login.php b/controllers/class.Login.php
index b8bec3cfa..d30739bf0 100644
--- a/controllers/class.Login.php
+++ b/controllers/class.Login.php
@@ -35,9 +35,10 @@ class SeedDMS_Controller_Login extends SeedDMS_Controller_Common {
$dms = $this->params['dms'];
$settings = $this->params['settings'];
$session = $this->params['session'];
- $sesstheme = $this->params['sesstheme'];
- $referuri = $this->params['referuri'];
- $lang = $this->params['lang'];
+ $source = isset($this->params['source']) ? $this->params['source'] : '';
+ $sesstheme = $this->getParam('sesstheme');
+ $referuri = $this->getParam('referuri');
+ $lang = $this->getParam('lang');
$login = $this->params['login'];
$pwd = $this->params['pwd'];
@@ -75,7 +76,7 @@ class SeedDMS_Controller_Login extends SeedDMS_Controller_Common {
* return false and if the hook doesn't care at all, if must return null.
*/
if(!$user) {
- $user = $this->callHook('authenticate');
+ $user = $this->callHook('authenticate', $source);
if(false === $user) {
if(empty($this->errormsg))
$this->setErrorMsg("authentication_failed");
@@ -166,73 +167,78 @@ class SeedDMS_Controller_Login extends SeedDMS_Controller_Common {
/* Clear login failures if login was successful */
$user->clearLoginFailures();
- // Capture the user's language and theme settings.
- if ($lang) {
- $user->setLanguage($lang);
- } else {
- $lang = $user->getLanguage();
- if (strlen($lang)==0) {
- $lang = $settings->_language;
+ /* Setting the theme and language and all the cookie handling is
+ * only done when authentication was requested from a weg page.
+ */
+ if($source == 'web') {
+ // Capture the user's language and theme settings.
+ if ($lang) {
$user->setLanguage($lang);
- }
- }
- if ($sesstheme) {
- $user->setTheme($sesstheme);
- }
- else {
- $sesstheme = $user->getTheme();
- /* Override the theme if the user doesn't have one or the default theme
- * shall override it.
- */
- if (strlen($sesstheme)==0 || !empty($settings->_overrideTheme)) {
- $sesstheme = $settings->_theme;
- // $user->setTheme($sesstheme);
- }
- }
-
- // Delete all sessions that are more than 1 week or the configured
- // cookie lifetime old. Probably not the most
- // reliable place to put this check -- move to inc.Authentication.php?
- if($settings->_cookieLifetime)
- $lifetime = intval($settings->_cookieLifetime);
- else
- $lifetime = 7*86400;
- if(!$session->deleteByTime($lifetime)) {
- $this->setErrorMsg("error_occured");
- return false;
- }
-
- if (isset($_COOKIE["mydms_session"])) {
- /* This part will never be reached unless the session cookie is kept,
- * but op.Logout.php deletes it. Keeping a session could be a good idea
- * for retaining the clipboard data, but the user id in the session should
- * be set to 0 which is not possible due to foreign key constraints.
- * So for now op.Logout.php will delete the cookie as always
- */
- /* Load session */
- $dms_session = $_COOKIE["mydms_session"];
- if(!$resArr = $session->load($dms_session)) {
- /* Turn off http only cookies if jumploader is enabled */
- setcookie("mydms_session", $dms_session, time()-3600, $settings->_httpRoot, null, false, true); //delete cookie
- header("Location: " . $settings->_httpRoot . "out/out.Login.php?referuri=".$referuri);
- exit;
} else {
- $session->updateAccess($dms_session);
- $session->setUser($userid);
+ $lang = $user->getLanguage();
+ if (strlen($lang)==0) {
+ $lang = $settings->_language;
+ $user->setLanguage($lang);
+ }
}
- } else {
- // Create new session in database
- if(!$id = $session->create(array('userid'=>$userid, 'theme'=>$sesstheme, 'lang'=>$lang))) {
+ if ($sesstheme) {
+ $user->setTheme($sesstheme);
+ }
+ else {
+ $sesstheme = $user->getTheme();
+ /* Override the theme if the user doesn't have one or the default theme
+ * shall override it.
+ */
+ if (strlen($sesstheme)==0 || !empty($settings->_overrideTheme)) {
+ $sesstheme = $settings->_theme;
+ // $user->setTheme($sesstheme);
+ }
+ }
+
+ // Delete all sessions that are more than 1 week or the configured
+ // cookie lifetime old. Probably not the most
+ // reliable place to put this check -- move to inc.Authentication.php?
+ if($settings->_cookieLifetime)
+ $lifetime = intval($settings->_cookieLifetime);
+ else
+ $lifetime = 7*86400;
+ if(!$session->deleteByTime($lifetime)) {
$this->setErrorMsg("error_occured");
return false;
}
- // Set the session cookie.
- if($settings->_cookieLifetime)
- $lifetime = time() + intval($settings->_cookieLifetime);
- else
- $lifetime = 0;
- setcookie("mydms_session", $id, $lifetime, $settings->_httpRoot, null, false, true);
+ if (isset($_COOKIE["mydms_session"])) {
+ /* This part will never be reached unless the session cookie is kept,
+ * but op.Logout.php deletes it. Keeping a session could be a good idea
+ * for retaining the clipboard data, but the user id in the session should
+ * be set to 0 which is not possible due to foreign key constraints.
+ * So for now op.Logout.php will delete the cookie as always
+ */
+ /* Load session */
+ $dms_session = $_COOKIE["mydms_session"];
+ if(!$resArr = $session->load($dms_session)) {
+ /* Turn off http only cookies if jumploader is enabled */
+ setcookie("mydms_session", $dms_session, time()-3600, $settings->_httpRoot, null, false, true); //delete cookie
+ header("Location: " . $settings->_httpRoot . "out/out.Login.php?referuri=".$referuri);
+ exit;
+ } else {
+ $session->updateAccess($dms_session);
+ $session->setUser($userid);
+ }
+ } else {
+ // Create new session in database
+ if(!$id = $session->create(array('userid'=>$userid, 'theme'=>$sesstheme, 'lang'=>$lang))) {
+ $this->setErrorMsg("error_occured");
+ return false;
+ }
+
+ // Set the session cookie.
+ if($settings->_cookieLifetime)
+ $lifetime = time() + intval($settings->_cookieLifetime);
+ else
+ $lifetime = 0;
+ setcookie("mydms_session", $id, $lifetime, $settings->_httpRoot, null, false, true);
+ }
}
if($this->callHook('postLogin', $user)) {
From ec38938d8df7cc03a9fb7af2cff82e7b434a9642 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 24 Nov 2022 12:39:37 +0100
Subject: [PATCH 090/247] include Log.php
---
webdav/index.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/webdav/index.php b/webdav/index.php
index a6be8fa13..c34f450c3 100644
--- a/webdav/index.php
+++ b/webdav/index.php
@@ -1,6 +1,7 @@
Date: Thu, 24 Nov 2022 12:39:57 +0100
Subject: [PATCH 091/247] set 'source' = 'web' for controller
---
op/op.Login.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/op/op.Login.php b/op/op.Login.php
index 04519ce8a..ab3dc455d 100644
--- a/op/op.Login.php
+++ b/op/op.Login.php
@@ -84,6 +84,7 @@ add_log_line();
$controller->setParam('login', $login);
$controller->setParam('pwd', $pwd);
+$controller->setParam('source', 'web');
$controller->setParam('lang', $lang);
$controller->setParam('sesstheme', $sesstheme);
$controller->setParam('referuri', $referuri);
From 4e528975b899ab5a637c9d6605e32d88add632dd Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 24 Nov 2022 12:40:25 +0100
Subject: [PATCH 092/247] use Login controller
---
webdav/webdav.php | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/webdav/webdav.php b/webdav/webdav.php
index a893d1374..69faf1d23 100644
--- a/webdav/webdav.php
+++ b/webdav/webdav.php
@@ -153,6 +153,25 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
if($this->logger)
$this->logger->log('check_auth: type='.$type.', user='.$user.'', PEAR_LOG_INFO);
+ $controller = Controller::factory('Login', array('dms'=>$this->dms));
+ $controller->setParam('login', $user);
+ $controller->setParam('pwd', $pass);
+ $controller->setParam('source', 'webdav');
+ if(!$controller()) {
+ if($this->logger) {
+ $this->logger->log($controller->getErrorMsg(), PEAR_LOG_NOTICE);
+ $this->logger->log('check_auth: error authenicating user '.$user, PEAR_LOG_NOTICE);
+ }
+ return false;
+ }
+
+ if($this->logger)
+ $this->logger->log('check_auth: type='.$type.', user='.$user.' authenticated', PEAR_LOG_INFO);
+
+ $this->user = $controller->getUser();
+
+ return true;
+
$userobj = false;
/* Authenticate against LDAP server {{{ */
From e4be5465be5dcc00d2ef50f1c726d05fd4e51fb6 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 24 Nov 2022 17:16:43 +0100
Subject: [PATCH 093/247] issue propper err msg when view access is prohibited
---
out/out.AddDocument.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/out/out.AddDocument.php b/out/out.AddDocument.php
index b00a6884c..84df7af84 100644
--- a/out/out.AddDocument.php
+++ b/out/out.AddDocument.php
@@ -34,7 +34,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
if (!$accessop->check_view_access($view, $_GET)) {
- UI::exitError(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName()))),getMLText("access_denied"));
+ UI::exitError(getMLText("folder_title", array("foldername" => '')),getMLText("access_denied"));
}
if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) {
From 1488cdcfca5b7f1b8a224910120b161ddb51edf6 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 25 Nov 2022 13:45:27 +0100
Subject: [PATCH 094/247] use predefined key for translation of parameter
description
---
views/bootstrap/class.SchedulerTaskMgr.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/views/bootstrap/class.SchedulerTaskMgr.php b/views/bootstrap/class.SchedulerTaskMgr.php
index 554266025..8460d88e2 100644
--- a/views/bootstrap/class.SchedulerTaskMgr.php
+++ b/views/bootstrap/class.SchedulerTaskMgr.php
@@ -225,7 +225,7 @@ $(document).ready( function() {
'checked'=>false,
),
array(
- 'help'=>$param['description']
+ 'help'=>isset($param['description']) ? $param['description'] : getMLText("task_".$extname."_".$taskname."_".$param['name']."_desc")
)
);
break;
@@ -240,7 +240,7 @@ $(document).ready( function() {
'required'=>false
),
array(
- 'help'=>$param['description']
+ 'help'=>isset($param['description']) ? $param['description'] : getMLText("task_".$extname."_".$taskname."_".$param['name']."_desc")
)
);
break;
@@ -256,7 +256,7 @@ $(document).ready( function() {
'options'=>$param['options'],
),
array(
- 'help'=>$param['description']
+ 'help'=>isset($param['description']) ? $param['description'] : getMLText("task_".$extname."_".$taskname."_".$param['name']."_desc")
)
);
break;
@@ -271,7 +271,7 @@ $(document).ready( function() {
'required'=>false
),
array(
- 'help'=>$param['description']
+ 'help'=>isset($param['description']) ? $param['description'] : getMLText("task_".$extname."_".$taskname."_".$param['name']."_desc")
)
);
break;
From 182418c8564378afbbca22c16d414aafd8c56695 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 25 Nov 2022 15:06:49 +0100
Subject: [PATCH 095/247] allow parameter of type 'folder' and 'users'
---
views/bootstrap/class.SchedulerTaskMgr.php | 26 ++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/views/bootstrap/class.SchedulerTaskMgr.php b/views/bootstrap/class.SchedulerTaskMgr.php
index 8460d88e2..156df1b37 100644
--- a/views/bootstrap/class.SchedulerTaskMgr.php
+++ b/views/bootstrap/class.SchedulerTaskMgr.php
@@ -420,6 +420,32 @@ $(document).ready( function() {
)
);
break;
+ case "folder":
+ $folderid = $task->getParameter()[$param['name']];
+ $this->formField(
+ getMLText('task_'.$task->getExtension()."_".$task->getTask()."_".$param['name']),
+ $this->getFolderChooserHtml("form".$extname.$confkey, M_READ, -1, $folderid ? $dms->getFolder($folderid) : 0, 'params['.$param['name']."]")
+ );
+ break;
+ case "users":
+ $userids = $task->getParameter()[$param['name']];
+ $users = $dms->getAllUsers();
+ foreach ($users as $currUser) {
+ if (!$currUser->isGuest())
+ $options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin().' - '.$currUser->getFullName()), in_array($currUser->getID(), $userids), array(array('data-subtitle', htmlspecialchars($currUser->getEmail()))));
+ }
+ $this->formField(
+ getMLText('task_'.$task->getExtension()."_".$task->getTask()."_".$param['name']),
+ array(
+ 'element'=>'select',
+ 'class'=>'chzn-select',
+ 'name'=>'params['.$param['name'].'][]',
+ 'multiple'=>isset($param['multiple']) ? $param['multiple'] : false,
+ 'attributes'=>array(array('data-placeholder', getMLText('select_value'), array('data-no_results_text', getMLText('unknown_value')))),
+ 'options'=>$options
+ )
+ );
+ break;
default:
$this->formField(
getMLText("task_".$task->getExtension()."_".$task->getTask()."_".$param['name']),
From 0f0ba034491d2d01dcf328ed681564fb7b0a15e4 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 28 Nov 2022 21:35:41 +0100
Subject: [PATCH 096/247] remove constructor and class vars from abstract class
---
inc/inc.ClassAuthentication.php | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/inc/inc.ClassAuthentication.php b/inc/inc.ClassAuthentication.php
index 29e57ed20..d9a66315b 100644
--- a/inc/inc.ClassAuthentication.php
+++ b/inc/inc.ClassAuthentication.php
@@ -24,34 +24,6 @@
*/
abstract class SeedDMS_Authentication
{
- /**
- * DMS object
- *
- * @var SeedDMS_Core_DMS
- * @access protected
- */
- protected $dms;
-
- /**
- * DMS settings
- *
- * @var Settings
- * @access protected
- */
- protected $settings;
-
- /**
- * Constructor
- *
- * @param SeedDMS_Core_DMS $dms DMS object
- * @param Settings $settings DMS settings
- */
- function __construct($dms, $settings) /* {{{ */
- {
- $this->dms = $dms;
- $this->settings = $settings;
- } /* }}} */
-
/**
* Do Authentication
*
From 28a4a24613e046b32deb77f58ecf68d469024c77 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 28 Nov 2022 21:36:40 +0100
Subject: [PATCH 097/247] add constructor, authenticate() returns null if
authentication fails
---
inc/inc.ClassDbAuthentication.php | 16 +++++++++++-----
inc/inc.ClassLdapAuthentication.php | 13 +++++++++++--
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/inc/inc.ClassDbAuthentication.php b/inc/inc.ClassDbAuthentication.php
index fbee7f3c9..2d65e8516 100644
--- a/inc/inc.ClassDbAuthentication.php
+++ b/inc/inc.ClassDbAuthentication.php
@@ -24,6 +24,15 @@ require_once "inc.ClassAuthentication.php";
*/
class SeedDMS_DbAuthentication extends SeedDMS_Authentication {
+ var $dms;
+
+ var $settings;
+
+ public function __construct($dms, $settings) { /* {{{ */
+ $this->dms = $dms;
+ $this->settings = $settings;
+ } /* }}} */
+
/**
* Do Authentication
*
@@ -32,18 +41,15 @@ class SeedDMS_DbAuthentication extends SeedDMS_Authentication {
* @return object|boolean user object if authentication was successful otherwise false
*/
public function authenticate($username, $password) { /* {{{ */
- $settings = $this->settings;
$dms = $this->dms;
// Try to find user with given login.
if($user = $dms->getUserByLogin($username)) {
$userid = $user->getID();
- // Check if password matches (if not a guest user)
- // Assume that the password has been sent via HTTP POST. It would be careless
- // (and dangerous) for passwords to be sent via GET.
+ // Check if password matches
if (!seed_pass_verify($password, $user->getPwd())) {
- $user = false;
+ $user = null;
}
}
diff --git a/inc/inc.ClassLdapAuthentication.php b/inc/inc.ClassLdapAuthentication.php
index 9f8f66dc6..64995f8e6 100644
--- a/inc/inc.ClassLdapAuthentication.php
+++ b/inc/inc.ClassLdapAuthentication.php
@@ -24,6 +24,15 @@ require_once "inc.ClassAuthentication.php";
*/
class SeedDMS_LdapAuthentication extends SeedDMS_Authentication {
+ var $dms;
+
+ var $settings;
+
+ public function __construct($dms, $settings) { /* {{{ */
+ $this->dms = $dms;
+ $this->settings = $settings;
+ } /* }}} */
+
/**
* Do ldap authentication
*
@@ -84,7 +93,7 @@ class SeedDMS_LdapAuthentication extends SeedDMS_Authentication {
$bind = @ldap_bind($ds);
}
$dn = false;
- /* If bind succeed, then get the dn of for the user */
+ /* If bind succeed, then get the dn of the user */
if ($bind) {
if (isset($settings->_ldapFilter) && strlen($settings->_ldapFilter) > 0) {
$search = ldap_search($ds, $settings->_ldapBaseDN, "(&(".$ldapSearchAttribut.$username.")".$settings->_ldapFilter.")");
@@ -106,7 +115,7 @@ class SeedDMS_LdapAuthentication extends SeedDMS_Authentication {
$dn = $tmpDN;
}
- /* No do the actual authentication of the user */
+ /* Now do the actual authentication of the user */
$bind = @ldap_bind($ds, $dn, $password);
$user = $dms->getUserByLogin($username);
if($user === false) {
From f7ebe8882274f958acc11c0367bb4fd3086d5d0f Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 28 Nov 2022 21:40:42 +0100
Subject: [PATCH 098/247] add authentication service
---
controllers/class.Login.php | 5 ++
inc/inc.AuthenticationInit.php | 42 ++++++++++++
inc/inc.ClassAuthenticationService.php | 88 ++++++++++++++++++++++++++
inc/inc.DBInit.php | 1 +
op/op.Login.php | 1 +
5 files changed, 137 insertions(+)
create mode 100644 inc/inc.AuthenticationInit.php
create mode 100644 inc/inc.ClassAuthenticationService.php
diff --git a/controllers/class.Login.php b/controllers/class.Login.php
index d30739bf0..18412dbe5 100644
--- a/controllers/class.Login.php
+++ b/controllers/class.Login.php
@@ -35,6 +35,7 @@ class SeedDMS_Controller_Login extends SeedDMS_Controller_Common {
$dms = $this->params['dms'];
$settings = $this->params['settings'];
$session = $this->params['session'];
+ $authenticator = $this->params['authenticator'];
$source = isset($this->params['source']) ? $this->params['source'] : '';
$sesstheme = $this->getParam('sesstheme');
$referuri = $this->getParam('referuri');
@@ -98,6 +99,9 @@ class SeedDMS_Controller_Login extends SeedDMS_Controller_Common {
}
}
+ $user = $authenticator->authenticate($login, $pwd);
+
+ if(0) {
/* Authenticate against LDAP server {{{ */
if (!is_object($user) && isset($settings->_ldapHost) && strlen($settings->_ldapHost)>0) {
require_once("../inc/inc.ClassLdapAuthentication.php");
@@ -114,6 +118,7 @@ class SeedDMS_Controller_Login extends SeedDMS_Controller_Common {
$authobj = new SeedDMS_DbAuthentication($dms, $settings);
$user = $authobj->authenticate($login, $pwd);
} /* }}} */
+ }
/* If the user is still not authenticated, then exit with an error */
if(!is_object($user)) {
diff --git a/inc/inc.AuthenticationInit.php b/inc/inc.AuthenticationInit.php
new file mode 100644
index 000000000..f7beb05b6
--- /dev/null
+++ b/inc/inc.AuthenticationInit.php
@@ -0,0 +1,42 @@
+
+ * @copyright Copyright (C) 2002-2005 Markus Westphal,
+ * 2006-2008 Malcolm Cowe, 2010-2022 Uwe Steinmann
+ * @version Release: @package_version@
+ */
+
+require_once('inc.ClassAuthenticationService.php');
+require_once('inc.ClassDbAuthentication.php');
+require_once('inc.ClassLdapAuthentication.php');
+
+global $logger;
+$authenticator = new SeedDMS_AuthenticationService($logger, $settings);
+
+if(isset($GLOBALS['SEEDDMS_HOOKS']['authentication'])) {
+ foreach($GLOBALS['SEEDDMS_HOOKS']['authentication'] as $authenticationObj) {
+ if(method_exists($authenticationObj, 'preAddService')) {
+ $authenticationObj->preAddService($dms, $authenticator);
+ }
+ }
+}
+
+$authenticator->addService(new SeedDMS_DbAuthentication($dms, $settings), 'db');
+if(isset($settings->_ldapHost) && strlen($settings->_ldapHost)>0) {
+ $authenticator->addService(new SeedDMS_LdapAuthentication($dms, $settings), 'ldap');
+}
+
+if(isset($GLOBALS['SEEDDMS_HOOKS']['authentication'])) {
+ foreach($GLOBALS['SEEDDMS_HOOKS']['authentication'] as $authenticationObj) {
+ if(method_exists($authenticationObj, 'postAddService')) {
+ $authenticationObj->postAddService($dms, $authenticator);
+ }
+ }
+}
+
diff --git a/inc/inc.ClassAuthenticationService.php b/inc/inc.ClassAuthenticationService.php
new file mode 100644
index 000000000..41119877a
--- /dev/null
+++ b/inc/inc.ClassAuthenticationService.php
@@ -0,0 +1,88 @@
+
+ * @copyright Copyright (C) 2016 Uwe Steinmann
+ * @version Release: @package_version@
+ */
+
+/**
+ * Implementation of authentication service
+ *
+ * @category DMS
+ * @package SeedDMS
+ * @author Uwe Steinmann
+ * @copyright Copyright (C) 2016 Uwe Steinmann
+ * @version Release: @package_version@
+ */
+class SeedDMS_AuthenticationService {
+ /**
+ * List of services for authenticating user
+ */
+ protected $services;
+
+ /*
+ * List of servives with errors
+ */
+ protected $errors;
+
+ /*
+ * Service for logging
+ */
+ protected $logger;
+
+ /*
+ * Configuration
+ */
+ protected $settings;
+
+ public function __construct($logger = null, $settings = null) { /* {{{ */
+ $this->services = array();
+ $this->errors = array();
+ $this->logger = $logger;
+ $this->settings = $settings;
+ } /* }}} */
+
+ public function addService($service, $name='') { /* {{{ */
+ if(!$name)
+ $name = md5(uniqid());
+ $this->services[$name] = $service;
+ $this->errors[$name] = true;
+ } /* }}} */
+
+ public function getServices() { /* {{{ */
+ return $this->services;
+ } /* }}} */
+
+ public function getErrors() { /* {{{ */
+ return $this->errors;
+ } /* }}} */
+
+ public function authenticate($username, $password) { /* {{{ */
+ $user = null;
+ foreach($this->services as $name => $service) {
+ $this->logger->log('Authentication service \''.$name.'\'', PEAR_LOG_INFO);
+ $user = $service->authenticate($username, $password);
+ if($user === false) {
+ $this->errors[$name] = false;
+ if($this->logger)
+ $this->logger->log('Authentication service \''.$name.'\': Authentication of user \''.$username.'\' failed.', PEAR_LOG_ERR);
+ return false;
+ } elseif($user === null) {
+ if($this->logger)
+ $this->logger->log('Authentication service \''.$name.'\': Authentication of user \''.$username.'\' disregarded.', PEAR_LOG_ERR);
+ } else {
+ if($this->logger)
+ $this->logger->log('Authentication service \''.$name.'\': Authentication of user \''.$username.'\' successful.', PEAR_LOG_INFO);
+ $this->errors[$name] = true;
+ return $user;
+ }
+ }
+ return $user;
+ } /* }}} */
+}
diff --git a/inc/inc.DBInit.php b/inc/inc.DBInit.php
index 40a2df262..ec6036cc7 100644
--- a/inc/inc.DBInit.php
+++ b/inc/inc.DBInit.php
@@ -68,3 +68,4 @@ if(isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) {
require_once("inc.ConversionInit.php");
require_once('inc.FulltextInit.php');
+require_once('inc.AuthenticationInit.php');
diff --git a/op/op.Login.php b/op/op.Login.php
index ab3dc455d..1ea6c36af 100644
--- a/op/op.Login.php
+++ b/op/op.Login.php
@@ -89,6 +89,7 @@ $controller->setParam('lang', $lang);
$controller->setParam('sesstheme', $sesstheme);
$controller->setParam('referuri', $referuri);
$controller->setParam('session', $session);
+$controller->setParam('authenticator', $authenticator);
if(!$controller()) {
$session = null;
add_log_line("login failed", PEAR_LOG_ERR);
From e9b3b25b64ab85efdfb2e2fb02fa92b351a57773 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 29 Nov 2022 10:44:19 +0100
Subject: [PATCH 099/247] pass notification and authentication service to
ServeRequest
---
webdav/index.php | 2 +-
webdav/webdav.php | 126 ++++++++++++++++++----------------------------
2 files changed, 50 insertions(+), 78 deletions(-)
diff --git a/webdav/index.php b/webdav/index.php
index c34f450c3..a33249766 100644
--- a/webdav/index.php
+++ b/webdav/index.php
@@ -39,7 +39,7 @@ if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) {
include("webdav.php");
$server = new HTTP_WebDAV_Server_SeedDMS();
-$server->ServeRequest($dms, $logger, $notifier);
+$server->ServeRequest($dms, $settings, $logger, $notifier, $authenticator);
//$files = array();
//$options = array('path'=>'/Test1/subdir', 'depth'=>1);
//echo $server->MKCOL(&$options);
diff --git a/webdav/webdav.php b/webdav/webdav.php
index 69faf1d23..891b0685c 100644
--- a/webdav/webdav.php
+++ b/webdav/webdav.php
@@ -32,7 +32,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
var $logger = null;
/**
- * A reference to a notifier
+ * A reference to a notification service
*
* This is set by ServeRequest
*
@@ -41,6 +41,16 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
*/
var $notifier = null;
+ /**
+ * A reference to the authentication service
+ *
+ * This is set by ServeRequest
+ *
+ * @access private
+ * @var object
+ */
+ var $authenticator = null;
+
/**
* Currently logged in user
*
@@ -77,7 +87,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
* @access public
* @param object $dms reference to DMS
*/
- function ServeRequest($dms = null, $logger = null, $notifier = null) /* {{{ */
+ function ServeRequest($dms = null, $settings = null, $logger = null, $notifier = null, $authenticator = null) /* {{{ */
{
// set root directory, defaults to webserver document root if not set
if ($dms) {
@@ -86,12 +96,22 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
return false;
}
+ // set settings
+ if ($settings) {
+ $this->settings = $settings;
+ } else {
+ return false;
+ }
+
// set logger
$this->logger = $logger;
- // set notifier
+ // set notification service
$this->notifier = $notifier;
+ // set authentication service
+ $this->authenticator = $authenticator;
+
// special treatment for litmus compliance test
// reply on its identifier header
// not needed for the test itself but eases debugging
@@ -148,12 +168,11 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
*/
function check_auth($type, $user, $pass) /* {{{ */
{
- global $settings;
-
if($this->logger)
$this->logger->log('check_auth: type='.$type.', user='.$user.'', PEAR_LOG_INFO);
$controller = Controller::factory('Login', array('dms'=>$this->dms));
+ $controller->setParam('authenticator', $this->authenticator);
$controller->setParam('login', $user);
$controller->setParam('pwd', $pass);
$controller->setParam('source', 'webdav');
@@ -171,51 +190,6 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$this->user = $controller->getUser();
return true;
-
- $userobj = false;
-
- /* Authenticate against LDAP server {{{ */
- if (!$userobj && isset($settings->_ldapHost) && strlen($settings->_ldapHost)>0) {
- require_once("../inc/inc.ClassLdapAuthentication.php");
- $authobj = new SeedDMS_LdapAuthentication($this->dms, $settings);
- $userobj = $authobj->authenticate($user, $pass);
- if($userobj && $this->logger)
- $this->logger->log('check_auth: type='.$type.', user='.$user.' authenticated against LDAP', PEAR_LOG_INFO);
- } /* }}} */
-
- /* Authenticate against SeedDMS database {{{ */
- if(!$userobj) {
- require_once("../inc/inc.ClassDbAuthentication.php");
- $authobj = new SeedDMS_DbAuthentication($this->dms, $settings);
- $userobj = $authobj->authenticate($user, $pass);
- if($userobj && $this->logger)
- $this->logger->log('check_auth: type='.$type.', user='.$user.' authenticated against database', PEAR_LOG_INFO);
- } /* }}} */
-
- if(!$userobj) {
- if($this->logger)
- $this->logger->log('check_auth: No such user '.$user, PEAR_LOG_NOTICE);
- return false;
- }
-
- if(($userobj->getID() == $settings->_guestID) && (!$settings->_enableGuestLogin)) {
- if($this->logger)
- $this->logger->log('check_auth: Login as guest is not allowed', PEAR_LOG_NOTICE);
- return false;
- }
-
- if($userobj->isDisabled())
- return false;
-
- if($userobj->isAdmin() && ($_SERVER['REMOTE_ADDR'] != $settings->_adminIP ) && ( $settings->_adminIP != ""))
- return false;
-
- /* Clear login failures if login was successful */
- $userobj->clearLoginFailures();
-
- $this->user = $userobj;
-
- return true;
} /* }}} */
@@ -463,6 +437,8 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$info["props"][] = $this->mkprop("SeedDMS:", "keywords", $keywords);
$info["props"][] = $this->mkprop("SeedDMS:", "id", $obj->getID());
$info["props"][] = $this->mkprop("SeedDMS:", "version", $content->getVersion());
+ if($content->getComment())
+ $info["props"][] = $this->mkprop("SeedDMS:", "version-comment", $content->getComment());
$status = $content->getStatus();
$info["props"][] = $this->mkprop("SeedDMS:", "status", $status['status']);
$info["props"][] = $this->mkprop("SeedDMS:", "status-comment", $status['comment']);
@@ -645,7 +621,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
*/
function PUT(&$options) /* {{{ */
{
- global $settings, $fulltextservice;
+ global $fulltextservice;
$this->log_options('PUT', $options);
@@ -731,7 +707,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$name == $lc->getOriginalFileName() &&
$fileType == $lc->getFileType() &&
$mimetype == $lc->getMimeType() &&
- $settings->_enableWebdavReplaceDoc) {
+ $this->settings->_enableWebdavReplaceDoc) {
if($this->logger)
$this->logger->log('PUT: replacing latest version', PEAR_LOG_INFO);
if(!$document->replaceContent($lc->getVersion(), $this->user, $tmpFile, $name, $fileType, $mimetype)) {
@@ -749,12 +725,12 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$reviewers = array('i'=>[], 'g'=>[]);
$approvers = array('i'=>[], 'g'=>[]);
$workflow = null;
- if($settings->_workflowMode == 'traditional' || $settings->_workflowMode == 'traditional_only_approval') {
- if($settings->_workflowMode == 'traditional') {
+ if($this->settings->_workflowMode == 'traditional' || $this->settings->_workflowMode == 'traditional_only_approval') {
+ if($this->settings->_workflowMode == 'traditional') {
$reviewers = getMandatoryReviewers($document->getFolder(), $this->user);
}
$approvers = getMandatoryApprovers($document->getFolder(), $this->user);
- } elseif($settings->_workflowMode == 'advanced') {
+ } elseif($this->settings->_workflowMode == 'advanced') {
if($workflows = $this->user->getMandatoryWorkflows()) {
$workflow = array_shift($workflows);
}
@@ -803,7 +779,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
/* Check if name already exists in the folder */
/*
- if(!$settings->_enableDuplicateDocNames) {
+ if(!$this->settings->_enableDuplicateDocNames) {
if($folder->hasDocumentByName($name)) {
return "403 Forbidden";
}
@@ -813,12 +789,12 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$reviewers = array('i'=>[], 'g'=>[]);
$approvers = array('i'=>[], 'g'=>[]);
$workflow = null;
- if($settings->_workflowMode == 'traditional' || $settings->_workflowMode == 'traditional_only_approval') {
- if($settings->_workflowMode == 'traditional') {
+ if($this->settings->_workflowMode == 'traditional' || $this->settings->_workflowMode == 'traditional_only_approval') {
+ if($this->settings->_workflowMode == 'traditional') {
$reviewers = getMandatoryReviewers($folder, $this->user);
}
$approvers = getMandatoryApprovers($folder, $this->user);
- } elseif($settings->_workflowMode == 'advanced') {
+ } elseif($this->settings->_workflowMode == 'advanced') {
if($workflows = $this->user->getMandatoryWorkflows()) {
$workflow = array_shift($workflows);
}
@@ -841,7 +817,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$controller->setParam('filetype', $fileType);
$controller->setParam('userfiletype', $mimetype);
$minmax = $folder->getDocumentsMinMax();
- if($settings->_defaultDocPosition == 'start')
+ if($this->settings->_defaultDocPosition == 'start')
$controller->setParam('sequence', $minmax['min'] - 1);
else
$controller->setParam('sequence', $minmax['max'] + 1);
@@ -854,8 +830,8 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$controller->setParam('workflow', $workflow);
$controller->setParam('notificationgroups', array());
$controller->setParam('notificationusers', array());
- $controller->setParam('maxsizeforfulltext', $settings->_maxSizeForFullText);
- $controller->setParam('defaultaccessdocs', $settings->_defaultAccessDocs);
+ $controller->setParam('maxsizeforfulltext', $this->settings->_maxSizeForFullText);
+ $controller->setParam('defaultaccessdocs', $this->settings->_defaultAccessDocs);
if(!$document = $controller()) {
// if(!$res = $folder->addDocument($name, '', 0, $this->user, '', array(), $tmpFile, $name, $fileType, $mimetype, 0, array(), array(), 0, "")) {
unlink($tmpFile);
@@ -883,8 +859,6 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
*/
function MKCOL($options) /* {{{ */
{
- global $settings;
-
$this->log_options('MKCOL', $options);
$path = $options["path"];
@@ -963,7 +937,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
*/
function DELETE($options) /* {{{ */
{
- global $settings, $fulltextservice;
+ global $fulltextservice;
$this->log_options('DELETE', $options);
@@ -1036,8 +1010,6 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
*/
function MOVE($options) /* {{{ */
{
- global $settings;
-
$this->log_options('MOVE', $options);
// no copying to different WebDAV Servers yet
@@ -1112,7 +1084,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
/* Set the new Folder of the source object */
if(get_class($objsource) == $this->dms->getClassname('document')) {
/* Check if name already exists in the folder */
- if(!$settings->_enableDuplicateDocNames) {
+ if(!$this->settings->_enableDuplicateDocNames) {
if($newdocname) {
if($objdest->hasDocumentByName($newdocname)) {
return "403 Forbidden";
@@ -1136,7 +1108,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
}
} elseif(get_class($objsource) == $this->dms->getClassname('folder')) {
/* Check if name already exists in the folder */
- if(!$settings->_enableDuplicateSubFolderNames) {
+ if(!$this->settings->_enableDuplicateSubFolderNames) {
if($newdocname) {
if($objdest->hasSubFolderByName($newdocname)) {
return "403 Forbidden";
@@ -1173,7 +1145,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
*/
function COPY($options) /* {{{ */
{
- global $settings, $fulltextservice;
+ global $fulltextservice;
$this->log_options('COPY', $options);
@@ -1273,7 +1245,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
/* Check if name already exists in the folder */
/*
- if(!$settings->_enableDuplicateDocNames) {
+ if(!$this->settings->_enableDuplicateDocNames) {
if($objdest->hasDocumentByName($newdocname)) {
return "403 Forbidden";
}
@@ -1283,12 +1255,12 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$reviewers = array('i'=>[], 'g'=>[]);
$approvers = array('i'=>[], 'g'=>[]);
$workflow = null;
- if($settings->_workflowMode == 'traditional' || $settings->_workflowMode == 'traditional_only_approval') {
- if($settings->_workflowMode == 'traditional') {
+ if($this->settings->_workflowMode == 'traditional' || $this->settings->_workflowMode == 'traditional_only_approval') {
+ if($this->settings->_workflowMode == 'traditional') {
$reviewers = getMandatoryReviewers($objdest, $this->user);
}
$approvers = getMandatoryApprovers($objdest, $this->user);
- } elseif($settings->_workflowMode == 'advanced') {
+ } elseif($this->settings->_workflowMode == 'advanced') {
if($workflows = $this->user->getMandatoryWorkflows()) {
$workflow = array_shift($workflows);
}
@@ -1315,7 +1287,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$controller->setParam('filetype', $content->getFileType());
$controller->setParam('userfiletype', $content->getMimeType());
$minmax = $objdest->getDocumentsMinMax();
- if($settings->_defaultDocPosition == 'start')
+ if($this->settings->_defaultDocPosition == 'start')
$controller->setParam('sequence', $minmax['min'] - 1);
else
$controller->setParam('sequence', $minmax['max'] + 1);
@@ -1328,8 +1300,8 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$controller->setParam('workflow', $workflow);
$controller->setParam('notificationgroups', array());
$controller->setParam('notificationusers', array());
- $controller->setParam('maxsizeforfulltext', $settings->_maxSizeForFullText);
- $controller->setParam('defaultaccessdocs', $settings->_defaultAccessDocs);
+ $controller->setParam('maxsizeforfulltext', $this->settings->_maxSizeForFullText);
+ $controller->setParam('defaultaccessdocs', $this->settings->_defaultAccessDocs);
if(!$document = $controller()) {
if($this->logger)
$this->logger->log('COPY: error copying object', PEAR_LOG_ERR);
From 6a24ce5d10aecff80d622e9a262eda1574f12989 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 29 Nov 2022 10:46:34 +0100
Subject: [PATCH 100/247] documentation on how to use swagger
---
doc/README.Swagger | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 doc/README.Swagger
diff --git a/doc/README.Swagger b/doc/README.Swagger
new file mode 100644
index 000000000..576339a5e
--- /dev/null
+++ b/doc/README.Swagger
@@ -0,0 +1,13 @@
+Swagger
+========
+
+Swagger is used to describe a rest api. SeedDMS ships a swagger.yaml file
+in the restapi directory. You can load this file into a swagger editor, e.g.
+http://petstore.swagger.io/ or http://editor.swagger.io/
+You may as well set up your own swagger-ui installation as described at
+https://medium.com/@tatianaensslin/how-to-add-swagger-ui-to-php-server-code-f1610c01dc03
+
+Your apache needs to have the module 'header' enabled, because some HTTP headers
+are set when the file swagger.yaml is accessed by the editor.
+
+Currently, the swagger.yaml shipped with SeedDMS uses still swagger 2.0
From c87eb6c6f0182d8af5ae6d7981c4dac291ef6478 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 29 Nov 2022 10:49:01 +0100
Subject: [PATCH 101/247] add changs for 5.1.29
---
CHANGELOG | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG b/CHANGELOG
index 35816796c..90c74d1cc 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,6 +4,7 @@
- fix php errors in restapi
- fix 'maximum size' error when uploading a file with drag&drop
- update jquery to 3.6.1 (only bootstrap4 theme)
+- introduce authentication service
--------------------------------------------------------------------------------
Changes in version 5.1.28
From 8a01102cf54ba3c1c3185ddd9bd579ff8b52be02 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 29 Nov 2022 10:49:37 +0100
Subject: [PATCH 102/247] add documentation on how to use the scheduler
---
doc/README.Scheduler.md | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 doc/README.Scheduler.md
diff --git a/doc/README.Scheduler.md b/doc/README.Scheduler.md
new file mode 100644
index 000000000..9bd20772c
--- /dev/null
+++ b/doc/README.Scheduler.md
@@ -0,0 +1,26 @@
+Scheduler
+==========
+
+The scheduler in SeedDMS manages frequently run tasks. It is very similar
+to regular unix cron jobs. A task in SeedDMS is an instanciation of a task
+class which itself is defined by an extension or SeedDMS itself.
+SeedDMS has some predefined classes e.g. core::expireddocs.
+
+In order for tasks to be runnalbe, a user `cli_scheduler` must exists in
+SeedDMS.
+
+All tasks are executed by a single cronjob in the directory `utils`
+
+> */5 * * * * /home/www-data/seeddms60x/seeddms/utils/seeddms-schedulercli --mode=run
+
+Please keep in mind, that the php interpreter used for the cronjob may be
+different from the php interpreter used für the web application. Hence, two
+different php.ini files might be used. php and the php extensions may differ as
+well. This can cause some extensions to be disabled and consequently some task
+classes are not defined.
+
+`utils/seeddms-schedulercli` can also be run on the command line. If you
+do that, run it with the same system user used for the web server. On Debian
+this is www-data. Hence run it like
+
+sudo -u www-data utils/seeddms-schedulercli --mode=list
From e8192d281309f6b744f0f7e615cacea396f57a68 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 29 Nov 2022 17:31:54 +0100
Subject: [PATCH 103/247] add $skiproot and $sep parameter to
getFolderPathPlain()
---
SeedDMS_Core/Core/inc.ClassFolder.php | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php
index 59ab9b811..50b90b489 100644
--- a/SeedDMS_Core/Core/inc.ClassFolder.php
+++ b/SeedDMS_Core/Core/inc.ClassFolder.php
@@ -782,17 +782,20 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
* Run str_replace(' / ', '/', $path) on it to get a valid unix
* file system path.
*
+ * @param bool $skiproot skip the name of the root folder and start with $sep
+ * @param string $sep separator between path elements
* @return string path separated with ' / '
*/
- function getFolderPathPlain() { /* {{{ */
+ function getFolderPathPlain($skiproot = false, $sep = ' / ') { /* {{{ */
$path="";
$folderPath = $this->getPath();
- for ($i = 0; $i < count($folderPath); $i++) {
- $path .= $folderPath[$i]->getName();
+ for ($i = 0; $i < count($folderPath); $i++) {
+ if($i > 0 || !$skiproot)
+ $path .= $folderPath[$i]->getName();
if ($i +1 < count($folderPath))
- $path .= " / ";
+ $path .= $sep;
}
- return $path;
+ return trim($path);
} /* }}} */
/**
From a5e975caa5e13ac605c893c095e3ebfc213e8675 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 29 Nov 2022 17:33:04 +0100
Subject: [PATCH 104/247] searchfolder returns full path of folder
---
op/op.Ajax.php | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/op/op.Ajax.php b/op/op.Ajax.php
index be2db89a3..74099d4db 100644
--- a/op/op.Ajax.php
+++ b/op/op.Ajax.php
@@ -161,7 +161,8 @@ switch($command) {
$result = array();
foreach($hits['folders'] as $hit) {
if($hit->getAccessMode($user, 'search') >= M_READ)
- $result[] = $hit->getID().'#'.$basefolder->getName().'/'.$hit->getName();
+ //$result[] = $hit->getID().'#'.$basefolder->getName().'/'.$hit->getName();
+ $result[] = $hit->getID().'#'.$hit->getFolderPathPlain(true, '/');
}
header('Content-Type: application/json');
echo json_encode($result);
@@ -172,7 +173,8 @@ switch($command) {
$subfolders = SeedDMS_Core_DMS::filterAccess($subfolders, $user, M_READ);
$result = array();
foreach($subfolders as $subfolder) {
- $result[] = $subfolder->getID().'#'.$basefolder->getName().'/'.$subfolder->getName();
+ //$result[] = $subfolder->getID().'#'.$basefolder->getName().'/'.$subfolder->getName();
+ $result[] = $subfolder->getID().'#'.$subfolder->getFolderPathPlain(true, '/');
}
header('Content-Type: application/json');
echo json_encode($result);
@@ -187,7 +189,7 @@ switch($command) {
$result = array();
foreach($hits['folders'] as $hit) {
if($hit->getAccessMode($user, 'search') >= M_READ)
- $result[] = $hit->getID().'#'.$hit->getName();
+ $result[] = $hit->getID().'#'.$hit->getFolderPathPlain(true, '/');
}
header('Content-Type: application/json');
echo json_encode($result);
From 55df94a993d17e9ccb5fce37a92a7326009ed218 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 29 Nov 2022 17:34:29 +0100
Subject: [PATCH 105/247] use authentication service
---
restapi/index.php | 32 +++++++++-----------------------
1 file changed, 9 insertions(+), 23 deletions(-)
diff --git a/restapi/index.php b/restapi/index.php
index 982b9f98a..dfc14ad23 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -63,7 +63,7 @@ class RestapiController { /* {{{ */
}
}
return $attrvalues;
- } /* }}} */
+ } /* }}} */
protected function __getDocumentData($document) { /* {{{ */
$data = array(
@@ -232,6 +232,7 @@ class RestapiController { /* {{{ */
$dms = $this->container->dms;
$settings = $this->container->config;
$logger = $this->container->logger;
+ $authenticator = $this->container->authenticator;
$params = $request->getParsedBody();
if(empty($params['user']) || empty($params['pass'])) {
@@ -240,23 +241,7 @@ class RestapiController { /* {{{ */
}
$username = $params['user'];
$password = $params['pass'];
-
- // $userobj = $dms->getUserByLogin($username);
- $userobj = null;
-
- /* Authenticate against LDAP server {{{ */
- if (!$userobj && isset($settings->_ldapHost) && strlen($settings->_ldapHost)>0) {
- require_once("../inc/inc.ClassLdapAuthentication.php");
- $authobj = new SeedDMS_LdapAuthentication($dms, $settings);
- $userobj = $authobj->authenticate($username, $password);
- } /* }}} */
-
- /* Authenticate against SeedDMS database {{{ */
- if(!$userobj) {
- require_once("../inc/inc.ClassDbAuthentication.php");
- $authobj = new SeedDMS_DbAuthentication($dms, $settings);
- $userobj = $authobj->authenticate($username, $password);
- } /* }}} */
+ $userobj = $authenticator->authenticate($username, $password);
if(!$userobj) {
setcookie("mydms_session", '', time()-3600, $settings->_httpRoot);
@@ -2712,6 +2697,7 @@ $container['conversionmgr'] = $conversionmgr;
$container['logger'] = $logger;
$container['fulltextservice'] = $fulltextservice;
$container['notifier'] = $notifier;
+$container['authenticator'] = $authenticator;
$app->add(new Auth($container));
// Make CORS preflighted request possible
@@ -2799,11 +2785,11 @@ $app->get('/echo/{data}', \TestController::class.':echoData');
$app->get('/statstotal', \RestapiController::class.':getStatsTotal');
if(isset($GLOBALS['SEEDDMS_HOOKS']['initRestAPI'])) {
- foreach($GLOBALS['SEEDDMS_HOOKS']['initRestAPI'] as $hookObj) {
- if (method_exists($hookObj, 'addRoute')) {
- $hookObj->addRoute($app);
- }
- }
+ foreach($GLOBALS['SEEDDMS_HOOKS']['initRestAPI'] as $hookObj) {
+ if (method_exists($hookObj, 'addRoute')) {
+ $hookObj->addRoute($app);
+ }
+ }
}
$app->run();
From 92ba1a9e769c430e3c3c5225c5672a9bb4f88171 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 29 Nov 2022 17:35:32 +0100
Subject: [PATCH 106/247] focus folder selection after loading page
---
views/bootstrap/class.MoveDocument.php | 6 ++++++
views/bootstrap/class.MoveFolder.php | 5 +++++
2 files changed, 11 insertions(+)
diff --git a/views/bootstrap/class.MoveDocument.php b/views/bootstrap/class.MoveDocument.php
index 380d4a627..a3c40ddd3 100644
--- a/views/bootstrap/class.MoveDocument.php
+++ b/views/bootstrap/class.MoveDocument.php
@@ -34,6 +34,12 @@ class SeedDMS_View_MoveDocument extends SeedDMS_Theme_Style {
function js() { /* {{{ */
header('Content-Type: application/javascript; charset=UTF-8');
+?>
+$(document).ready( function() {
+ $('input[id^=choosefoldersearch]').focus();
+});
+printFolderChooserJs("form1");
} /* }}} */
diff --git a/views/bootstrap/class.MoveFolder.php b/views/bootstrap/class.MoveFolder.php
index 6f4ecc696..e8574e8ba 100644
--- a/views/bootstrap/class.MoveFolder.php
+++ b/views/bootstrap/class.MoveFolder.php
@@ -34,6 +34,11 @@ class SeedDMS_View_MoveFolder extends SeedDMS_Theme_Style {
function js() { /* {{{ */
header('Content-Type: application/javascript; charset=UTF-8');
+?>
+$(document).ready( function() {
+ $('input[id^=choosefoldersearch]').focus();
+});
+printFolderChooserJs("form1");
} /* }}} */
From cd5a39b50f4b1ea467f94d446950a62910f8ae13 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 29 Nov 2022 17:36:17 +0100
Subject: [PATCH 107/247] make breakcrumps capable of drag&drop
---
views/bootstrap/class.Bootstrap.php | 8 ++++----
views/bootstrap4/class.Bootstrap4.php | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php
index 6f0dd0ed1..e00b4c75d 100644
--- a/views/bootstrap/class.Bootstrap.php
+++ b/views/bootstrap/class.Bootstrap.php
@@ -468,17 +468,17 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$txtpath = "";
for ($i = 0; $i < count($path); $i++) {
$txtpath .= "";
- if ($i +1 < count($path)) {
- $txtpath .= "params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\" data-droptarget=\"folder_".$path[$i]->getID()."\" rel=\"folder_".$path[$i]->getID()."\" class=\"table-row-folder droptarget\" data-uploadformtoken=\"".createFormKey('')."\" formtoken=\"".createFormKey('')."\">".
+ if ($i+1 < count($path)) {
+ $txtpath .= " params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\" data-droptarget=\"folder_".$path[$i]->getID()."\" rel=\"folder_".$path[$i]->getID()."\" data-name=\"".htmlspecialchars($path[$i]->getName())."\" class=\"table-row-folder droptarget\" data-uploadformtoken=\"".createFormKey('')."\" formtoken=\"".createFormKey('')."\">".
htmlspecialchars($path[$i]->getName())." ";
}
else {
- $txtpath .= ($tagAll ? "params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\">".htmlspecialchars($path[$i]->getName())." " : htmlspecialchars($path[$i]->getName()));
+ $txtpath .= ($tagAll ? "params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\" data-droptarget=\"folder_".$path[$i]->getID()."\" rel=\"folder_".$path[$i]->getID()."\" data-name=\"".htmlspecialchars($path[$i]->getName())."\" class=\"table-row-folder droptarget\" data-uploadformtoken=\"".createFormKey('')."\" formtoken=\"".createFormKey('')."\">".htmlspecialchars($path[$i]->getName())." " : htmlspecialchars($path[$i]->getName()));
}
$txtpath .= " / ";
}
if($document)
- $txtpath .= "params['settings']->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getId()."\">".htmlspecialchars($document->getName())." ";
+ $txtpath .= "params['settings']->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getId()."\" class=\"table-document-row\" rel=\"document_".$document->getId()."\" data-name=\"".htmlspecialchars($document->getName())."\" formtoken=\"".createFormKey('')."\">".htmlspecialchars($document->getName())." ";
return '';
} /* }}} */
diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php
index db21e46ef..5b82a1a8e 100644
--- a/views/bootstrap4/class.Bootstrap4.php
+++ b/views/bootstrap4/class.Bootstrap4.php
@@ -471,16 +471,16 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$txtpath = "";
for ($i = 0; $i < count($path); $i++) {
$txtpath .= "";
- if ($i +1 < count($path)) {
- $txtpath .= "params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\" data-droptarget=\"folder_".$path[$i]->getID()."\" rel=\"folder_".$path[$i]->getID()."\" class=\"table-row-folder droptarget\" data-uploadformtoken=\"".createFormKey('')."\" formtoken=\"".createFormKey('')."\">".
+ if ($i+1 < count($path)) {
+ $txtpath .= " params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\" data-droptarget=\"folder_".$path[$i]->getID()."\" rel=\"folder_".$path[$i]->getID()."\" data-name=\"".htmlspecialchars($path[$i]->getName())."\" class=\"table-row-folder droptarget\" data-uploadformtoken=\"".createFormKey('')."\" formtoken=\"".createFormKey('')."\">".
htmlspecialchars($path[$i]->getName())." ";
}
else {
- $txtpath .= ($tagAll ? "params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\">".htmlspecialchars($path[$i]->getName())." " : htmlspecialchars($path[$i]->getName()));
+ $txtpath .= ($tagAll ? "params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\" data-droptarget=\"folder_".$path[$i]->getID()."\" rel=\"folder_".$path[$i]->getID()."\" data-name=\"".htmlspecialchars($path[$i]->getName())."\" class=\"table-row-folder droptarget\" data-uploadformtoken=\"".createFormKey('')."\" formtoken=\"".createFormKey('')."\">".htmlspecialchars($path[$i]->getName())." " : htmlspecialchars($path[$i]->getName()));
}
}
if($document)
- $txtpath .= " params['settings']->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getId()."\">".htmlspecialchars($document->getName())." ";
+ $txtpath .= "params['settings']->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getId()."\" class=\"table-document-row\" rel=\"document_".$document->getId()."\" data-name=\"".htmlspecialchars($document->getName())."\" formtoken=\"".createFormKey('')."\">".htmlspecialchars($document->getName())." ";
return ''.$txtpath.' ';
} /* }}} */
From 11d134e35a8bc4b27e0370c3a4e134b11b29bb1a Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 29 Nov 2022 17:36:59 +0100
Subject: [PATCH 108/247] last element of breadcrumb has a link
---
views/bootstrap/class.ViewFolder.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/views/bootstrap/class.ViewFolder.php b/views/bootstrap/class.ViewFolder.php
index 469d80185..0f930c652 100644
--- a/views/bootstrap/class.ViewFolder.php
+++ b/views/bootstrap/class.ViewFolder.php
@@ -457,7 +457,7 @@ $('body').on('click', '.order-btn', function(ev) {
if(is_string($txt))
echo $txt;
else {
- $this->pageNavigation($this->getFolderPathHTML($folder), "view_folder", $folder);
+ $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder);
}
echo $this->callHook('preContent');
From 57ab966404525a022789a2a61579aea032dcdb1c Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 29 Nov 2022 17:37:25 +0100
Subject: [PATCH 109/247] add changes of 5.1.29
---
SeedDMS_Core/package.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml
index 8427b476e..164db26fa 100644
--- a/SeedDMS_Core/package.xml
+++ b/SeedDMS_Core/package.xml
@@ -25,6 +25,7 @@
GPL License
- SeedDMS_Core_Folder::addDocument() does rollback transaction propperly when setting document categories fail
+- add $skiproot and $sep parameter to SeedDMS_Core_Folder::getFolderPathPlain()
From de61d9f1f3582a6ded2f2659dc72c998df904a7e Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 29 Nov 2022 21:46:07 +0100
Subject: [PATCH 110/247] set error msg if extension list cannot be fetched
---
inc/inc.ClassExtensionMgr.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/inc/inc.ClassExtensionMgr.php b/inc/inc.ClassExtensionMgr.php
index 07e7d51d3..a80f3ac21 100644
--- a/inc/inc.ClassExtensionMgr.php
+++ b/inc/inc.ClassExtensionMgr.php
@@ -660,6 +660,7 @@ class SeedDMS_Extension_Mgr {
}
file_put_contents($this->cachedir."/".self::repos_list_file, $file);
} else {
+ $this->errmsgs[] = 'Could not fetch cxtension list';
return false;
}
}
From e40f7e6a258f6b986302bfd88f311a6d22690851 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 5 Dec 2022 09:18:36 +0100
Subject: [PATCH 111/247] fix typo
---
inc/inc.ClassExtensionMgr.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/inc/inc.ClassExtensionMgr.php b/inc/inc.ClassExtensionMgr.php
index a80f3ac21..ae2e036c1 100644
--- a/inc/inc.ClassExtensionMgr.php
+++ b/inc/inc.ClassExtensionMgr.php
@@ -660,7 +660,7 @@ class SeedDMS_Extension_Mgr {
}
file_put_contents($this->cachedir."/".self::repos_list_file, $file);
} else {
- $this->errmsgs[] = 'Could not fetch cxtension list';
+ $this->errmsgs[] = 'Could not fetch extension list';
return false;
}
}
From 99569a34352fc4e430d510d733879d8c48f73042 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 6 Dec 2022 11:15:51 +0100
Subject: [PATCH 112/247] fix possible xss attack
---
views/bootstrap/class.TriggerWorkflow.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/views/bootstrap/class.TriggerWorkflow.php b/views/bootstrap/class.TriggerWorkflow.php
index 0cc18bd70..e1907061f 100644
--- a/views/bootstrap/class.TriggerWorkflow.php
+++ b/views/bootstrap/class.TriggerWorkflow.php
@@ -104,7 +104,7 @@ $(document).ready(function() {
'required'=>false
)
);
- $this->formSubmit(getMLText("action_".strtolower($action->getName()), array(), $action->getName()));
+ $this->formSubmit(getMLText("action_".strtolower($action->getName()), array(), htmlspecialchars($action->getName())));
?>
Date: Wed, 7 Dec 2022 17:03:11 +0100
Subject: [PATCH 113/247] $width passed to getFileName() is optional
---
SeedDMS_Preview/Preview/Previewer.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/SeedDMS_Preview/Preview/Previewer.php b/SeedDMS_Preview/Preview/Previewer.php
index 327f5e099..4381313bf 100644
--- a/SeedDMS_Preview/Preview/Previewer.php
+++ b/SeedDMS_Preview/Preview/Previewer.php
@@ -52,10 +52,15 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
* @param integer $width width of preview image
* @return string file name of preview image
*/
- public function getFileName($object, $width) { /* {{{ */
+ public function getFileName($object, $width=0) { /* {{{ */
if(!$object)
return false;
+ if($width == 0)
+ $width = $this->width;
+ else
+ $width = intval($width);
+
$document = $object->getDocument();
$dms = $document->_dms;
$dir = $this->previewDir.'/'.$document->getDir();
From 291b62eeb27d605cf90b2ae51c5fb54eddd4b1a5 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 8 Dec 2022 14:44:49 +0100
Subject: [PATCH 114/247] getFolderPathPlain(): add sep as prefix if skiproot
is true
---
SeedDMS_Core/Core/inc.ClassFolder.php | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php
index 50b90b489..3d041043c 100644
--- a/SeedDMS_Core/Core/inc.ClassFolder.php
+++ b/SeedDMS_Core/Core/inc.ClassFolder.php
@@ -778,8 +778,8 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
/**
* Returns a file system path
*
- * This path contains spaces around the slashes for better readability.
- * Run str_replace(' / ', '/', $path) on it to get a valid unix
+ * This path contains by default spaces around the slashes for better readability.
+ * Run str_replace(' / ', '/', $path) on it or pass '/' as $sep to get a valid unix
* file system path.
*
* @param bool $skiproot skip the name of the root folder and start with $sep
@@ -787,13 +787,14 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
* @return string path separated with ' / '
*/
function getFolderPathPlain($skiproot = false, $sep = ' / ') { /* {{{ */
- $path="";
+ $path="".$sep;
$folderPath = $this->getPath();
for ($i = 0; $i < count($folderPath); $i++) {
- if($i > 0 || !$skiproot)
+ if($i > 0 || !$skiproot) {
$path .= $folderPath[$i]->getName();
- if ($i +1 < count($folderPath))
- $path .= $sep;
+ if ($i+1 < count($folderPath))
+ $path .= $sep;
+ }
}
return trim($path);
} /* }}} */
From 56bd5c00e4bf84b66abe0ccf13906713b3d475a9 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 8 Dec 2022 14:45:31 +0100
Subject: [PATCH 115/247] set resolution of pdf to 72dpi, using 36dpi will not
allow previes wider than 298px
---
inc/inc.ClassConversionServicePdfToImage.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/inc/inc.ClassConversionServicePdfToImage.php b/inc/inc.ClassConversionServicePdfToImage.php
index 7dd3cb5b9..d42bed80f 100644
--- a/inc/inc.ClassConversionServicePdfToImage.php
+++ b/inc/inc.ClassConversionServicePdfToImage.php
@@ -50,8 +50,12 @@ class SeedDMS_ConversionServicePdfToImage extends SeedDMS_ConversionServiceBase
$imagick = new Imagick();
/* Setting a smaller resolution will speed up the conversion
* A resolution of 72,72 will create a 596x842 image
+ * Setting it to 36,36 will create a 298x421 image which should
+ * be sufficient in most cases, but keep in mind that images are
+ * not scaled up. Hence, a width of 400px still results in a 298px
+ * wide image
*/
- $imagick->setResolution(36,36);
+ $imagick->setResolution(72,72);
$page = 0;
if(!empty($params['page']) && intval($params['page']) > 0)
$page = intval($params['page'])-1;
From ecb0258186f11e7c555046e96a2fba110622662f Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 8 Dec 2022 14:48:10 +0100
Subject: [PATCH 116/247] fix filename of attachment
---
restapi/index.php | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/restapi/index.php b/restapi/index.php
index dfc14ad23..d21be66c8 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -1417,7 +1417,7 @@ class RestapiController { /* {{{ */
return $response->withHeader('Content-Type', 'image/png')
->withHeader('Content-Description', 'File Transfer')
->withHeader('Content-Transfer-Encoding', 'binary')
- ->withHeader('Content-Disposition', 'attachment; filename=preview-"' . $document->getID() . "-" . $object->getVersion() . "-" . $width . ".png" . '"')
+ ->withHeader('Content-Disposition', 'attachment; filename="preview-' . $document->getID() . "-" . $object->getVersion() . "-" . $width . ".png" . '"')
->withHeader('Content-Length', $previewer->getFilesize($object))
->withBody($stream);
} else {
@@ -2597,7 +2597,7 @@ class TestController { /* {{{ */
} /* }}} */
/* Middleware for authentication */
-class Auth { /* {{{ */
+class RestapiAuth { /* {{{ */
private $container;
@@ -2619,7 +2619,17 @@ class Auth { /* {{{ */
// $this->container has the DI
$dms = $this->container->dms;
$settings = $this->container->config;
- $logger = $this->container->logger;
+ $logger = $this->container->logger;
+ $userobj = null;
+ if($this->container->has('userobj'))
+ $userobj = $this->container->userobj;
+
+ if($userobj) {
+ $response = $next($request, $response);
+ return $response;
+ }
+
+ $logger->log("Invoke middleware for method ".$request->getMethod()." on '".$request->getUri()->getPath()."'", PEAR_LOG_INFO);
$logger->log("Access with method ".$request->getMethod()." on '".$request->getUri()->getPath()."'".(isset($this->container->environment['HTTP_ORIGIN']) ? " with origin ".$this->container->environment['HTTP_ORIGIN'] : ''), PEAR_LOG_INFO);
if($settings->_apiOrigin && isset($this->container->environment['HTTP_ORIGIN'])) {
$logger->log("Checking origin", PEAR_LOG_DEBUG);
@@ -2698,7 +2708,16 @@ $container['logger'] = $logger;
$container['fulltextservice'] = $fulltextservice;
$container['notifier'] = $notifier;
$container['authenticator'] = $authenticator;
-$app->add(new Auth($container));
+
+$app->add(new RestapiAuth($container));
+
+if(isset($GLOBALS['SEEDDMS_HOOKS']['initRestAPI'])) {
+ foreach($GLOBALS['SEEDDMS_HOOKS']['initRestAPI'] as $hookObj) {
+ if (method_exists($hookObj, 'addMiddleware')) {
+ $hookObj->addMiddleware($app);
+ }
+ }
+}
// Make CORS preflighted request possible
$app->options('/{routes:.+}', function ($request, $response, $args) {
From 6341e13ca671ea7c3a9aa6a7ad3c3252cdc32f62 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 8 Dec 2022 14:48:36 +0100
Subject: [PATCH 117/247] show path of document/folder in typeahead search
---
views/bootstrap/class.Search.php | 4 ++--
views/bootstrap/styles/application.css | 5 +++++
views/bootstrap/styles/application.js | 4 ++--
views/bootstrap4/styles/application.css | 5 +++++
views/bootstrap4/styles/application.js | 4 ++--
5 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php
index f1d3f4827..ff2ea8341 100644
--- a/views/bootstrap/class.Search.php
+++ b/views/bootstrap/class.Search.php
@@ -367,10 +367,10 @@ function typeahead() { /* {{{ */
foreach ($entries as $entry) {
if($entry->isType('document')) {
// $recs[] = 'D'.$entry->getName();
- $recs[] = array('type'=>'D', 'id'=>$entry->getId(), 'name'=>$entry->getName());
+ $recs[] = array('type'=>'D', 'id'=>$entry->getId(), 'name'=>$entry->getName(), 'path'=>$entry->getParent()->getFolderPathPlain(true, '/'));
} elseif($entry->isType('folder')) {
// $recs[] = 'F'.$entry->getName();
- $recs[] = array('type'=>'F', 'id'=>$entry->getId(), 'name'=>$entry->getName());
+ $recs[] = array('type'=>'F', 'id'=>$entry->getId(), 'name'=>$entry->getName(), 'path'=>$entry->getParent()->getFolderPathPlain(true, '/'));
}
}
}
diff --git a/views/bootstrap/styles/application.css b/views/bootstrap/styles/application.css
index 10d2c690c..bc4abf2c2 100644
--- a/views/bootstrap/styles/application.css
+++ b/views/bootstrap/styles/application.css
@@ -265,6 +265,11 @@ span.datepicker {
span.datepicker input {
max-width: 100px;
}
+
+div.typeahead span.path {
+ font-size: 85%;
+ color: #888;
+}
/* Sidenav for Docs
* -------------------------------------------------- */
diff --git a/views/bootstrap/styles/application.js b/views/bootstrap/styles/application.js
index 096c057d4..8cafbb25d 100644
--- a/views/bootstrap/styles/application.js
+++ b/views/bootstrap/styles/application.js
@@ -148,9 +148,9 @@ function initMost() {
**/
highlighter : function (item) {
if(item.type.charAt(0) == 'D')
- return ' ' + item.name.replace(/ ' + item.name.replace(/' + item.path + ' ';
else if(item.type.charAt(0) == 'F')
- return ' ' + item.name.replace(/ ' + item.name.replace(/' + item.path + ' ';
else
return ' ' + item.name.replace(/ ' + item.name.replace(/ ' + item.name.replace(/' + item.path + ' ';
else if(item.type.charAt(0) == 'F')
- return ' ' + item.name.replace(/ ' + item.name.replace(/' + item.path + ' ';
else
return ' ' + item.name.replace(/
Date: Fri, 9 Dec 2022 10:51:05 +0100
Subject: [PATCH 118/247] add optional parameter $order to find()
---
SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
index fd2ec197c..084f355d0 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
@@ -179,7 +179,7 @@ class SeedDMS_SQLiteFTS_Indexer {
* @return boolean false in case of an error, otherwise array with elements
* 'count', 'hits', 'facets'. 'hits' is an array of SeedDMS_SQLiteFTS_QueryHit
*/
- public function find($query, $limit=array()) { /* {{{ */
+ public function find($query, $limit=array(), $order=array()) { /* {{{ */
if(!$this->_conn)
return false;
@@ -232,10 +232,26 @@ class SeedDMS_SQLiteFTS_Indexer {
$sql = "SELECT ".$this->_rawid.", documentid FROM docs";
if($query)
$sql .= " WHERE docs MATCH ".$this->_conn->quote($query);
- if($this->_ftstype == 'fts5')
+ if($this->_ftstype == 'fts5') {
//$sql .= " ORDER BY rank";
- // boost documentid, title and comment
- $sql .= " ORDER BY bm25(docs, 10.0, 10.0, 10.0)";
+ // boost documentid, record_type, title, comment, keywords, category, mimetype, origfilename, owner, content, created unindexed, users, status, path
+ if(!empty($order['by'])) {
+ switch($order['by']) {
+ case "title":
+ $sql .= " ORDER BY title";
+ break;
+ case "created":
+ $sql .= " ORDER BY created";
+ break;
+ default:
+ $sql .= " ORDER BY bm25(docs, 10.0, 0.0, 10.0, 5.0, 5.0, 10.0)";
+ }
+ if(!empty($order['dir'])) {
+ if($order['dir'] == 'desc')
+ $sql .= " DESC";
+ }
+ }
+ }
if(!empty($limit['limit']))
$sql .= " LIMIT ".(int) $limit['limit'];
if(!empty($limit['offset']))
From 68f19b87c3b95128a1aec7a2ac317b33307f089c Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 9 Dec 2022 10:51:43 +0100
Subject: [PATCH 119/247] add optional parameter $col and $query to terms()
---
SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php | 29 ++++++++++++++++++++-----
1 file changed, 23 insertions(+), 6 deletions(-)
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
index 084f355d0..4a00502f2 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
@@ -334,16 +334,33 @@ class SeedDMS_SQLiteFTS_Indexer {
/**
* Return list of terms in index
*
- * This function does nothing!
+ * @return array list of SeedDMS_SQLiteFTS_Term
*/
- public function terms() { /* {{{ */
+ public function terms($query='', $col='') { /* {{{ */
if(!$this->_conn)
return false;
- if($this->_ftstype == 'fts5')
- $sql = "SELECT term, col, doc as occurrences FROM docs_terms WHERE col!='*' ORDER BY col";
- else
- $sql = "SELECT term, col, occurrences FROM docs_terms WHERE col!='*' ORDER BY col";
+ if($this->_ftstype == 'fts5') {
+ $sql = "SELECT term, col, doc as occurrences FROM docs_terms";
+ if($query || $col) {
+ $sql .= " WHERE";
+ if($query) {
+ $sql .= " term like '".$query."%'";
+ if($col)
+ $sql .= " AND";
+ }
+ if($col)
+ $sql .= " col = '".$col."'";
+ }
+ $sql .= " ORDER BY col, occurrences desc";
+ } else {
+ $sql = "SELECT term, col, occurrences FROM docs_terms WHERE col!='*'";
+ if($query)
+ $sql .= " AND term like '".$query."%'";
+ if($col)
+ $sql .= " AND col = '".$col."'";
+ $sql .= " ORDER BY col, occurrences desc";
+ }
$res = $this->_conn->query($sql);
$terms = array();
if($res) {
From a8034350ef80ecaa35cffea36bae78b818a45224 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 9 Dec 2022 10:52:08 +0100
Subject: [PATCH 120/247] fix documentation of count()
---
SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
index 4a00502f2..c018e4d6a 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
@@ -373,8 +373,9 @@ class SeedDMS_SQLiteFTS_Indexer {
} /* }}} */
/**
- * Return list of documents in index
+ * Return number of documents in index
*
+ * @return interger number of documents
*/
public function count() { /* {{{ */
$sql = "SELECT count(*) c FROM docs";
From 5fc160a8dc22a90955e6e719784cb920574fbff0 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 9 Dec 2022 10:52:33 +0100
Subject: [PATCH 121/247] add optional parameter $order to search() which is
passed to find()
---
SeedDMS_SQLiteFTS/SQLiteFTS/Search.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Search.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Search.php
index d6ba6b6a7..8ff430b47 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/Search.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Search.php
@@ -70,7 +70,7 @@ class SeedDMS_SQliteFTS_Search {
* @param object $index SQlite FTS index
* @return object instance of SeedDMS_Lucene_Search
*/
- function search($term, $fields=array(), $limit=array()) { /* {{{ */
+ function search($term, $fields=array(), $limit=array(), $order=array()) { /* {{{ */
$querystr = '';
$term = trim($term);
if($term) {
@@ -140,7 +140,7 @@ class SeedDMS_SQliteFTS_Search {
$querystr .= '*)';
}
try {
- $result = $this->index->find($querystr, $limit);
+ $result = $this->index->find($querystr, $limit, $order);
$recs = array();
foreach($result["hits"] as $hit) {
$recs[] = array('id'=>$hit->id, 'document_id'=>$hit->documentid);
From b50ca0321d627d5efd767f634bc24a84e5f98955 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 9 Dec 2022 10:53:15 +0100
Subject: [PATCH 122/247] start new version 1.0.18
---
SeedDMS_SQLiteFTS/package.xml | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/SeedDMS_SQLiteFTS/package.xml b/SeedDMS_SQLiteFTS/package.xml
index a862245cf..21b220640 100644
--- a/SeedDMS_SQLiteFTS/package.xml
+++ b/SeedDMS_SQLiteFTS/package.xml
@@ -11,11 +11,11 @@
uwe@steinmann.cx
yes
- 2022-03-04
+ 2022-12-09
08:57:44
- 1.0.17
- 1.0.17
+ 1.0.18
+ 1.0.18
stable
@@ -23,8 +23,8 @@
GPL License
-- throw exeption in find() instead of returning false
-- fix query if rootFolder or startFolder is set
+- add optional parameter $order to SeedDMS_SQLiteFTS_Indexer::find()
+- add optional parameters $query and $col to SeedDMS_SQLiteFTS_Indexer::terms()
@@ -353,5 +353,22 @@ add user to list of terms
- add class SeedDMS_SQLiteFTS_Field
+
+ 2022-03-04
+ 08:57:44
+
+ 1.0.17
+ 1.0.17
+
+
+ stable
+ stable
+
+ GPL License
+
+- throw exeption in find() instead of returning false
+- fix query if rootFolder or startFolder is set
+
+
From 8340f9eb64aac5f2df4cca77da42dd979c01aa0a Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 9 Dec 2022 10:54:06 +0100
Subject: [PATCH 123/247] add style for div.fulltextinfo > span:hover
---
views/bootstrap/styles/application.css | 4 ++++
views/bootstrap4/styles/application.css | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/views/bootstrap/styles/application.css b/views/bootstrap/styles/application.css
index bc4abf2c2..68898a15b 100644
--- a/views/bootstrap/styles/application.css
+++ b/views/bootstrap/styles/application.css
@@ -270,6 +270,10 @@ div.typeahead span.path {
font-size: 85%;
color: #888;
}
+
+div.fulltextinfo > span:hover {
+ background-color: lightblue;
+}
/* Sidenav for Docs
* -------------------------------------------------- */
diff --git a/views/bootstrap4/styles/application.css b/views/bootstrap4/styles/application.css
index 927e7bdcc..3a487f668 100644
--- a/views/bootstrap4/styles/application.css
+++ b/views/bootstrap4/styles/application.css
@@ -280,6 +280,10 @@ div.typeahead span.path {
font-size: 85%;
color: #888;
}
+
+div.fulltextinfo > span:hover {
+ background-color: lightblue;
+}
/* Sidenav for Docs
* -------------------------------------------------- */
From a00883c100db9980a44fcd139d89c54bfe68a55a Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 9 Dec 2022 10:54:28 +0100
Subject: [PATCH 124/247] set class of container, put terms in span
---
views/bootstrap/class.IndexInfo.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/views/bootstrap/class.IndexInfo.php b/views/bootstrap/class.IndexInfo.php
index dc0e0f0f5..d578638c9 100644
--- a/views/bootstrap/class.IndexInfo.php
+++ b/views/bootstrap/class.IndexInfo.php
@@ -44,11 +44,11 @@ class SeedDMS_View_IndexInfo extends SeedDMS_Theme_Style {
$numDocs = $index->count();
echo "".$numDocs." ".getMLText('documents')." ";
- $this->contentContainerStart();
+ $this->contentContainerStart('fulltextinfo');
for ($id = 0; $id < $numDocs; $id++) {
if (!$index->isDeleted($id)) {
if($hit = $index->getDocument($id))
- echo "document_id."\">".htmlspecialchars($hit->title)." \n";
+ echo "document_id."\">".htmlspecialchars($hit->title)." ";
}
}
$this->contentContainerEnd();
@@ -62,10 +62,10 @@ class SeedDMS_View_IndexInfo extends SeedDMS_Theme_Style {
if($field)
$this->contentContainerEnd();
echo "".htmlspecialchars($term->field)." ";
- $this->contentContainerStart();
+ $this->contentContainerStart('fulltextinfo');
$field = $term->field;
}
- echo htmlspecialchars($term->text)."\n";
+ echo ''.htmlspecialchars($term->text)." ";
// echo "_occurrence."\">".htmlspecialchars($term->text)." \n";
}
$this->contentContainerEnd();
From 35e2f86dba710a6e3db2f18dcbdabc16d90c6a69 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sat, 10 Dec 2022 12:58:37 +0100
Subject: [PATCH 125/247] add parameter $filter to find()
---
SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
index c018e4d6a..10d3d63ae 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
@@ -179,15 +179,22 @@ class SeedDMS_SQLiteFTS_Indexer {
* @return boolean false in case of an error, otherwise array with elements
* 'count', 'hits', 'facets'. 'hits' is an array of SeedDMS_SQLiteFTS_QueryHit
*/
- public function find($query, $limit=array(), $order=array()) { /* {{{ */
+ public function find($query, $filter, $limit=array(), $order=array()) { /* {{{ */
if(!$this->_conn)
return false;
/* First count some records for facets */
foreach(array('owner', 'mimetype', 'category') as $facetname) {
$sql = "SELECT `".$facetname."`, count(*) AS `c` FROM `docs`";
- if($query)
+ if($query) {
$sql .= " WHERE docs MATCH ".$this->_conn->quote($query);
+ }
+ if($filter) {
+ if($query)
+ $sql .= " AND ".$filter;
+ else
+ $sql .= " WHERE ".$filter;
+ }
$res = $this->_conn->query($sql." GROUP BY `".$facetname."`");
if(!$res)
throw new SeedDMS_SQLiteFTS_Exception("Counting records in facet \"$facetname\" failed.");
@@ -219,6 +226,12 @@ class SeedDMS_SQLiteFTS_Indexer {
$sql = "SELECT `record_type`, count(*) AS `c` FROM `docs`";
if($query)
$sql .= " WHERE docs MATCH ".$this->_conn->quote($query);
+ if($filter) {
+ if($query)
+ $sql .= " AND ".$filter;
+ else
+ $sql .= " WHERE ".$filter;
+ }
$res = $this->_conn->query($sql." GROUP BY `record_type`");
if(!$res)
throw new SeedDMS_SQLiteFTS_Exception("Counting records in facet \"record_type\" failed.");
@@ -232,6 +245,12 @@ class SeedDMS_SQLiteFTS_Indexer {
$sql = "SELECT ".$this->_rawid.", documentid FROM docs";
if($query)
$sql .= " WHERE docs MATCH ".$this->_conn->quote($query);
+ if($filter) {
+ if($query)
+ $sql .= " AND ".$filter;
+ else
+ $sql .= " WHERE ".$filter;
+ }
if($this->_ftstype == 'fts5') {
//$sql .= " ORDER BY rank";
// boost documentid, record_type, title, comment, keywords, category, mimetype, origfilename, owner, content, created unindexed, users, status, path
From 276ca2c5f4433d711690102b468a06d02dc3cabd Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sat, 10 Dec 2022 12:59:13 +0100
Subject: [PATCH 126/247] allow to filter search by creation date
---
SeedDMS_SQLiteFTS/SQLiteFTS/Search.php | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Search.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Search.php
index 8ff430b47..22c43a1e5 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/Search.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Search.php
@@ -139,8 +139,20 @@ class SeedDMS_SQliteFTS_Search {
$querystr .= str_replace(':', 'x', $fields['startFolder']->getFolderList().$fields['startFolder']->getID().':');
$querystr .= '*)';
}
+
+ $filterstr = '';
+ if(!empty($fields['created_start'])) {
+ if($filterstr)
+ $filterstr .= ' AND ';
+ $filterstr .= '(created>='.$fields['created_start'].')';
+ }
+ if(!empty($fields['created_end'])) {
+ if($filterstr)
+ $filterstr .= ' AND ';
+ $filterstr .= '(created<'.$fields['created_end'].')';
+ }
try {
- $result = $this->index->find($querystr, $limit, $order);
+ $result = $this->index->find($querystr, $filterstr, $limit, $order);
$recs = array();
foreach($result["hits"] as $hit) {
$recs[] = array('id'=>$hit->id, 'document_id'=>$hit->documentid);
From 995fd1968493123d7817dd25e5bdfba790528d8a Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sat, 10 Dec 2022 12:59:32 +0100
Subject: [PATCH 127/247] remove spaces
---
op/op.AddDocument.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php
index 03e42468e..d1f6a7abd 100644
--- a/op/op.AddDocument.php
+++ b/op/op.AddDocument.php
@@ -427,7 +427,7 @@ foreach($file_ary as $file) {
}
}
}
-
+
add_log_line("?name=".$name."&folderid=".$folderid);
}
From 1e178fb1c3f4071a79f30e5217b050274aad69b6 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sat, 10 Dec 2022 13:01:46 +0100
Subject: [PATCH 128/247] use formSubmit() instead of plain html for submit
button
---
views/bootstrap/class.Settings.php | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php
index 2bb683f42..936bf828a 100644
--- a/views/bootstrap/class.Settings.php
+++ b/views/bootstrap/class.Settings.php
@@ -680,9 +680,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
_configFilePath)) {
-?>
-
-formSubmit(" ".getMLText('save'));
}
?>
From c31250089e1b3f92555393df88713411ee34516d Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sat, 10 Dec 2022 13:05:22 +0100
Subject: [PATCH 129/247] use formSubmit() instead of plain html for submit
button
---
views/bootstrap/class.ExtensionMgr.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/views/bootstrap/class.ExtensionMgr.php b/views/bootstrap/class.ExtensionMgr.php
index 01d91845b..c2383c972 100644
--- a/views/bootstrap/class.ExtensionMgr.php
+++ b/views/bootstrap/class.ExtensionMgr.php
@@ -320,7 +320,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
@@ -374,7 +374,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
- = getMLText('force_update')?>
+ formSubmit(" " . getMLText('force_update'));?>
From 22d59a61edae8addd8dc29d1a1ac4026b06903bf Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sat, 10 Dec 2022 13:07:26 +0100
Subject: [PATCH 130/247] add neutral submit button
---
views/bootstrap/class.Bootstrap.php | 3 +++
views/bootstrap4/class.Bootstrap4.php | 3 +++
2 files changed, 6 insertions(+)
diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php
index e00b4c75d..a3af58a5f 100644
--- a/views/bootstrap/class.Bootstrap.php
+++ b/views/bootstrap/class.Bootstrap.php
@@ -1208,6 +1208,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
case 'danger':
$class = 'btn-danger';
break;
+ case 'neutral':
+ $class = '';
+ break;
case 'primary':
default:
$class = 'btn-primary';
diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php
index 5b82a1a8e..4dd80e56a 100644
--- a/views/bootstrap4/class.Bootstrap4.php
+++ b/views/bootstrap4/class.Bootstrap4.php
@@ -1212,6 +1212,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
case 'danger':
$class = 'btn-danger';
break;
+ case 'neutral':
+ $class = '';
+ break;
case 'primary':
default:
$class = 'btn-primary';
From 6ae0eb38d966fcf58cac15c4ccfd71fc5623150d Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sat, 10 Dec 2022 13:12:21 +0100
Subject: [PATCH 131/247] use formSubmit() instead of plain html for submit
button
---
views/bootstrap/class.RemoveFolder.php | 2 +-
views/bootstrap/class.RemoveFolderFiles.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/views/bootstrap/class.RemoveFolder.php b/views/bootstrap/class.RemoveFolder.php
index 713462875..4b3f4b258 100644
--- a/views/bootstrap/class.RemoveFolder.php
+++ b/views/bootstrap/class.RemoveFolder.php
@@ -47,7 +47,7 @@ class SeedDMS_View_RemoveFolder extends SeedDMS_Theme_Style {
-
+ formSubmit(" " . getMLText('rm_folder'), '', '', 'danger'); ?>
contentEnd();
diff --git a/views/bootstrap/class.RemoveFolderFiles.php b/views/bootstrap/class.RemoveFolderFiles.php
index 5081fd13d..71aa08162 100644
--- a/views/bootstrap/class.RemoveFolderFiles.php
+++ b/views/bootstrap/class.RemoveFolderFiles.php
@@ -48,7 +48,7 @@ class SeedDMS_View_RemoveFolderFiles extends SeedDMS_Bootstrap_Style {
htmlspecialchars($folder->getName())));?>
- ">
+ formSubmit(getMLText('accept'),'','',"neutral"); ?>
contentContainerEnd();
From ad19678e8629e5d9f2e3f82de7e3b425a13b0f92 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sat, 10 Dec 2022 13:47:32 +0100
Subject: [PATCH 132/247] add secondary submit button
---
views/bootstrap/class.Bootstrap.php | 3 +++
views/bootstrap4/class.Bootstrap4.php | 3 +++
2 files changed, 6 insertions(+)
diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php
index a3af58a5f..035e390e0 100644
--- a/views/bootstrap/class.Bootstrap.php
+++ b/views/bootstrap/class.Bootstrap.php
@@ -1208,6 +1208,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
case 'danger':
$class = 'btn-danger';
break;
+ case 'secondary':
+ $class = 'btn-secondary';
+ break;
case 'neutral':
$class = '';
break;
diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php
index 4dd80e56a..1bf5b646d 100644
--- a/views/bootstrap4/class.Bootstrap4.php
+++ b/views/bootstrap4/class.Bootstrap4.php
@@ -1212,6 +1212,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
case 'danger':
$class = 'btn-danger';
break;
+ case 'secondary':
+ $class = 'btn-secondary';
+ break;
case 'neutral':
$class = '';
break;
From 3477b1fc9b16462dde1f1f57719fdea1432993e2 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sat, 10 Dec 2022 13:48:11 +0100
Subject: [PATCH 133/247] use formSubmit() instead of plain html for submit
button
---
views/bootstrap/class.AttributeMgr.php | 2 +-
views/bootstrap/class.Calendar.php | 2 +-
views/bootstrap/class.Categories.php | 2 +-
views/bootstrap/class.DefaultKeywords.php | 4 +--
views/bootstrap/class.EditEvent.php | 2 +-
views/bootstrap/class.EditOnline.php | 4 +--
views/bootstrap/class.RemoveArchive.php | 4 +--
views/bootstrap/class.RemoveDocument.php | 2 +-
views/bootstrap/class.RemoveDocumentFile.php | 6 ++--
views/bootstrap/class.RemoveDump.php | 4 +--
views/bootstrap/class.RemoveEvent.php | 2 +-
views/bootstrap/class.RemoveGroup.php | 2 +-
views/bootstrap/class.RemoveLog.php | 2 +-
views/bootstrap/class.RemoveUser.php | 2 +-
.../class.RemoveUserFromProcesses.php | 34 +++++++++----------
views/bootstrap/class.RemoveVersion.php | 2 +-
views/bootstrap/class.UserDefaultKeywords.php | 8 ++---
17 files changed, 41 insertions(+), 43 deletions(-)
diff --git a/views/bootstrap/class.AttributeMgr.php b/views/bootstrap/class.AttributeMgr.php
index b3fe8817d..9864705f6 100644
--- a/views/bootstrap/class.AttributeMgr.php
+++ b/views/bootstrap/class.AttributeMgr.php
@@ -182,7 +182,7 @@ $(document).ready( function() {
-
+ formSubmit(' '.getMLText('rm_attrdef'),'','','secondary');?>
">
htmlspecialchars($event["name"])));?>
-
+ formSubmit(" ".getMLText('delete'),'','','danger'); ?>
contentContainerEnd();
diff --git a/views/bootstrap/class.Categories.php b/views/bootstrap/class.Categories.php
index f2688277b..639e73125 100644
--- a/views/bootstrap/class.Categories.php
+++ b/views/bootstrap/class.Categories.php
@@ -92,7 +92,7 @@ $(document).ready( function() {
-
+ formSubmit(' '.getMLText('rm_document_category'),'','','danger');?>
-
+ formSubmit(' '.getMLText('rm_default_keyword_category'),'','','danger');?>
-
+ formSubmit(' '.getMLText('new_default_keywords'),'','','primary');?>
diff --git a/views/bootstrap/class.EditEvent.php b/views/bootstrap/class.EditEvent.php
index 061a1b803..99d6547e8 100644
--- a/views/bootstrap/class.EditEvent.php
+++ b/views/bootstrap/class.EditEvent.php
@@ -122,7 +122,7 @@ $(document).ready(function() {
-
+ formSubmit(' '.getMLText('save'),'','','neutral');?>
getId() == $luser->getId()) {
echo $this->warningMsg(getMLText('edit_online_warning'));
-?>
-
-formSubmit(' '.getMLText('save'),'update','','primary');
} else {
echo $this->errorMsg(getMLText('edit_online_not_allowed'));
}
diff --git a/views/bootstrap/class.RemoveArchive.php b/views/bootstrap/class.RemoveArchive.php
index 46130c3dd..9930105b5 100644
--- a/views/bootstrap/class.RemoveArchive.php
+++ b/views/bootstrap/class.RemoveArchive.php
@@ -46,8 +46,8 @@ class SeedDMS_View_RemoveArchive extends SeedDMS_Theme_Style {
?>
contentEnd();
diff --git a/views/bootstrap/class.RemoveDocument.php b/views/bootstrap/class.RemoveDocument.php
index a3e43fa49..6c7700320 100644
--- a/views/bootstrap/class.RemoveDocument.php
+++ b/views/bootstrap/class.RemoveDocument.php
@@ -49,7 +49,7 @@ class SeedDMS_View_RemoveDocument extends SeedDMS_Theme_Style {
contentEnd();
diff --git a/views/bootstrap/class.RemoveDocumentFile.php b/views/bootstrap/class.RemoveDocumentFile.php
index 00d4762f6..c835e2fde 100644
--- a/views/bootstrap/class.RemoveDocumentFile.php
+++ b/views/bootstrap/class.RemoveDocumentFile.php
@@ -47,9 +47,9 @@ class SeedDMS_View_RemoveDocumentFile extends SeedDMS_Theme_Style {
?>
contentEnd();
diff --git a/views/bootstrap/class.RemoveDump.php b/views/bootstrap/class.RemoveDump.php
index f676b51e2..c9a380bde 100644
--- a/views/bootstrap/class.RemoveDump.php
+++ b/views/bootstrap/class.RemoveDump.php
@@ -43,12 +43,12 @@ class SeedDMS_View_RemoveDump extends SeedDMS_Theme_Style {
$this->contentHeading(getMLText("dump_remove"));
?>
contentEnd();
diff --git a/views/bootstrap/class.RemoveEvent.php b/views/bootstrap/class.RemoveEvent.php
index 27748211d..45bbaacab 100644
--- a/views/bootstrap/class.RemoveEvent.php
+++ b/views/bootstrap/class.RemoveEvent.php
@@ -49,7 +49,7 @@ class SeedDMS_View_RemoveEvent extends SeedDMS_Bootstrap_Style {
">
htmlspecialchars($event["name"])));?>
-
+ formSubmit(' '.getMLText('delete'),'','','neutral');?>
contentContainerEnd();
diff --git a/views/bootstrap/class.RemoveGroup.php b/views/bootstrap/class.RemoveGroup.php
index 2146c517d..7b8305af3 100644
--- a/views/bootstrap/class.RemoveGroup.php
+++ b/views/bootstrap/class.RemoveGroup.php
@@ -49,7 +49,7 @@ class SeedDMS_View_RemoveGroup extends SeedDMS_Theme_Style {
warningMsg(getMLText("confirm_rm_group", array ("groupname" => htmlspecialchars($group->getName()))));
?>
-
+formSubmit(' '.getMLText('rm_group'),'','','danger');?>
contentEnd();
diff --git a/views/bootstrap/class.RemoveLog.php b/views/bootstrap/class.RemoveLog.php
index 736c34318..40ef4fecd 100644
--- a/views/bootstrap/class.RemoveLog.php
+++ b/views/bootstrap/class.RemoveLog.php
@@ -53,7 +53,7 @@ class SeedDMS_View_RemoveLog extends SeedDMS_Theme_Style {
}
$this->warningMsg(getMLText("confirm_rm_log", array ("logname" => implode(', ', $lognames))));
?>
-
+ <formSubmit(' '.getMLText('rm_file'),'','','danger');?>/p>
contentEnd();
diff --git a/views/bootstrap/class.RemoveUser.php b/views/bootstrap/class.RemoveUser.php
index 361a6bdd5..e808cecfd 100644
--- a/views/bootstrap/class.RemoveUser.php
+++ b/views/bootstrap/class.RemoveUser.php
@@ -74,7 +74,7 @@ class SeedDMS_View_RemoveUser extends SeedDMS_Theme_Style {
?>
-
+ formSubmit(' '.getMLText('rm_user'),'','','danger');?>
diff --git a/views/bootstrap/class.RemoveUserFromProcesses.php b/views/bootstrap/class.RemoveUserFromProcesses.php
index 9f0bc8938..3dceb9835 100644
--- a/views/bootstrap/class.RemoveUserFromProcesses.php
+++ b/views/bootstrap/class.RemoveUserFromProcesses.php
@@ -199,24 +199,24 @@ $(document).ready( function() {
}
}
echo "\n";
- $options = array(array(0, getMLText('do_no_transfer_to_user')));
- foreach ($allusers as $currUser) {
- if ($currUser->isGuest() || ($currUser->getID() == $rmuser->getID()) )
- continue;
+ $options = array(array(0, getMLText('do_no_transfer_to_user')));
+ foreach ($allusers as $currUser) {
+ if ($currUser->isGuest() || ($currUser->getID() == $rmuser->getID()) )
+ continue;
- if ($rmuser && $currUser->getID()==$rmuser->getID()) $selected=$count;
- $options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin()." - ".$currUser->getFullName()));
- }
- $this->formField(
- getMLText("transfer_process_to_user"),
- array(
- 'element'=>'select',
- 'name'=>'assignTo',
- 'class'=>'chzn-select',
- 'options'=>$options
- )
- );
- echo ' '.getMLText('transfer_processes_to_user').' ';
+ if ($rmuser && $currUser->getID()==$rmuser->getID()) $selected=$count;
+ $options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin()." - ".$currUser->getFullName()));
+ }
+ $this->formField(
+ getMLText("transfer_process_to_user"),
+ array(
+ 'element'=>'select',
+ 'name'=>'assignTo',
+ 'class'=>'chzn-select',
+ 'options'=>$options
+ )
+ );
+ $this->formSubmit(' '.getMLText('transfer_processes_to_user'),'','','primary');
echo '';
}
} /* }}} */
diff --git a/views/bootstrap/class.RemoveVersion.php b/views/bootstrap/class.RemoveVersion.php
index 40e9869e7..6b1b8b430 100644
--- a/views/bootstrap/class.RemoveVersion.php
+++ b/views/bootstrap/class.RemoveVersion.php
@@ -49,7 +49,7 @@ class SeedDMS_View_RemoveVersion extends SeedDMS_Theme_Style {
-
+ formSubmit(' '.getMLText('rm_version'),'','','danger');?>
contentEnd();
diff --git a/views/bootstrap/class.UserDefaultKeywords.php b/views/bootstrap/class.UserDefaultKeywords.php
index f7931c12e..70f60d8e6 100644
--- a/views/bootstrap/class.UserDefaultKeywords.php
+++ b/views/bootstrap/class.UserDefaultKeywords.php
@@ -139,7 +139,7 @@ $(document).ready(function() {
- ">
+ formSubmit(' '.getMLText('rm_default_keyword_category'),'','','danger');?>
@@ -151,7 +151,7 @@ $(document).ready(function() {
-
+ formSubmit(' '.getMLText('save'),'','','neutral');?>
@@ -170,14 +170,14 @@ $(document).ready(function() {
">
">
-
+ formSubmit(' '.getMLText('save'),'','','neutral');?>
From aeb0e4f1de082353983d037f5caf5732039d5573 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sat, 10 Dec 2022 14:18:07 +0100
Subject: [PATCH 134/247] use formSubmit() instead of plain html for submit
button
---
views/bootstrap/class.CheckInDocument.php | 2 +-
views/bootstrap/class.RemoveTransmittal.php | 2 +-
views/bootstrap/class.RoleMgr.php | 2 +-
views/bootstrap/class.SchedulerTaskMgr.php | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/views/bootstrap/class.CheckInDocument.php b/views/bootstrap/class.CheckInDocument.php
index 4dbe2b4e4..42df6c10f 100644
--- a/views/bootstrap/class.CheckInDocument.php
+++ b/views/bootstrap/class.CheckInDocument.php
@@ -698,7 +698,7 @@ $(document).ready(function() {
- ">
+ formSubmit(getMLText('cancel_checkout'),'','','danger');?>
-
+formSubmit(' '.getMLText('rm_transmittal'),'','','danger');?>
-
+ formSubmit(' '.getMLText('rm_role'),'','','neutral');?>
-
+ formSubmit(' '.getMLText('save'),'','','primary');?>
@@ -469,7 +469,7 @@ $(document).ready( function() {
-
+ formSubmit(' '.getMLText('save'),'','','primary');?>
From 45221b815403efa56841bbc7c1355b5fe7ded168 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 11 Dec 2022 15:34:30 +0100
Subject: [PATCH 135/247] add changes of 5.1.29
---
CHANGELOG | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG b/CHANGELOG
index 90c74d1cc..d876f1e65 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,6 +5,7 @@
- fix 'maximum size' error when uploading a file with drag&drop
- update jquery to 3.6.1 (only bootstrap4 theme)
- introduce authentication service
+- new hook in restapi to add middleware
--------------------------------------------------------------------------------
Changes in version 5.1.28
From c786635f9c0c84282593f01099b7b4679358f8d1 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 11 Dec 2022 16:56:05 +0100
Subject: [PATCH 136/247] fix inclusion of php files
---
utils/schedulercli.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/schedulercli.php b/utils/schedulercli.php
index e0f0ef6c6..e45e9432f 100644
--- a/utils/schedulercli.php
+++ b/utils/schedulercli.php
@@ -59,8 +59,8 @@ if(isset($options['mode'])) {
}
include($myincpath."/inc/inc.Settings.php");
-include($myincpath."/inc/inc.LogInit.php");
include($myincpath."/inc/inc.Utils.php");
+include($myincpath."/inc/inc.LogInit.php");
include($myincpath."/inc/inc.Init.php");
include($myincpath."/inc/inc.Language.php");
include($myincpath."/inc/inc.Extension.php");
From c53e27efff756c27a65a3b361dd8ba1f5a2aaffb Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 13 Dec 2022 17:43:47 +0100
Subject: [PATCH 137/247] make getFileName() public
---
SeedDMS_Preview/Preview/PdfPreviewer.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SeedDMS_Preview/Preview/PdfPreviewer.php b/SeedDMS_Preview/Preview/PdfPreviewer.php
index 53086867c..c58f8c343 100644
--- a/SeedDMS_Preview/Preview/PdfPreviewer.php
+++ b/SeedDMS_Preview/Preview/PdfPreviewer.php
@@ -48,7 +48,7 @@ class SeedDMS_Preview_PdfPreviewer extends SeedDMS_Preview_Base {
* @param object $object document content or document file
* @return string file name of preview image
*/
- protected function getFileName($object) { /* {{{ */
+ public function getFileName($object) { /* {{{ */
if(!$object)
return false;
From a81f51c17c3a13d6f9ed877bf5ce7bb496390e51 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 15 Dec 2022 12:35:02 +0100
Subject: [PATCH 138/247] add new field 'indexed'
---
SeedDMS_Lucene/Lucene/IndexedDocument.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/SeedDMS_Lucene/Lucene/IndexedDocument.php b/SeedDMS_Lucene/Lucene/IndexedDocument.php
index 0ac27a583..dd426ff74 100644
--- a/SeedDMS_Lucene/Lucene/IndexedDocument.php
+++ b/SeedDMS_Lucene/Lucene/IndexedDocument.php
@@ -149,8 +149,9 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document {
if($version) {
$this->addField(Zend_Search_Lucene_Field::Keyword('mimetype', $version->getMimeType()));
$this->addField(Zend_Search_Lucene_Field::Keyword('origfilename', $version->getOriginalFileName(), 'utf-8'));
+ $this->addField(Zend_Search_Lucene_Field::UnIndexed('created', $version->getDate()));
if(!$nocontent)
- $this->addField(Zend_Search_Lucene_Field::UnIndexed('created', $version->getDate()));
+ $this->addField(Zend_Search_Lucene_Field::UnIndexed('indexed', time()));
if($attributes = $version->getAttributes()) {
foreach($attributes as $attribute) {
$attrdef = $attribute->getAttributeDefinition();
From 20d368ec9981afc541704d8d2688303fa9b30ddd Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 15 Dec 2022 12:35:16 +0100
Subject: [PATCH 139/247] add new field 'indexed'
---
SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php | 4 +++-
SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php | 13 +++++++------
SeedDMS_SQLiteFTS/SQLiteFTS/QueryHit.php | 1 +
SeedDMS_SQLiteFTS/SQLiteFTS/Term.php | 3 ++-
4 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php b/SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php
index ab553bd96..bb14f710e 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php
@@ -151,8 +151,9 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
if($version) {
$this->addField(SeedDMS_SQLiteFTS_Field::Keyword('mimetype', $version->getMimeType()));
$this->addField(SeedDMS_SQLiteFTS_Field::Keyword('origfilename', $version->getOriginalFileName()));
+ $this->addField(SeedDMS_SQLiteFTS_Field::Keyword('created', $version->getDate(), 'unindexed'));
if(!$nocontent)
- $this->addField(SeedDMS_SQLiteFTS_Field::Keyword('created', $version->getDate(), 'unindexed'));
+ $this->addField(SeedDMS_SQLiteFTS_Field::Keyword('indexed', time(), 'unindexed'));
if($attributes = $version->getAttributes()) {
foreach($attributes as $attribute) {
$attrdef = $attribute->getAttributeDefinition();
@@ -226,6 +227,7 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
$this->addField(SeedDMS_SQLiteFTS_Field::Keyword('document_id', 'F'.$document->getID()));
$this->addField(SeedDMS_SQLiteFTS_Field::Keyword('record_type', 'folder'));
$this->addField(SeedDMS_SQLiteFTS_Field::Keyword('created', $document->getDate(), 'unindexed'));
+ $this->addField(SeedDMS_SQLiteFTS_Field::Keyword('indexed', time(), 'unindexed'));
}
} /* }}} */
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
index 10d3d63ae..bb9585c73 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
@@ -77,9 +77,9 @@ class SeedDMS_SQLiteFTS_Indexer {
$version = SQLite3::version();
if(self::ftstype == 'fts4') {
if($version['versionNumber'] >= 3008000)
- $sql = 'CREATE VIRTUAL TABLE docs USING fts4(documentid, record_type, title, comment, keywords, category, mimetype, origfilename, owner, content, created, users, status, path, notindexed=created, matchinfo=fts3)';
+ $sql = 'CREATE VIRTUAL TABLE docs USING fts4(documentid, record_type, title, comment, keywords, category, mimetype, origfilename, owner, content, created, indexed, users, status, path, notindexed=created, notindexed=indexed, matchinfo=fts3)';
else
- $sql = 'CREATE VIRTUAL TABLE docs USING fts4(documentid, record_type, title, comment, keywords, category, mimetype, origfilename, owner, content, created, users, status, path, matchinfo=fts3)';
+ $sql = 'CREATE VIRTUAL TABLE docs USING fts4(documentid, record_type, title, comment, keywords, category, mimetype, origfilename, owner, content, created, indexed, users, status, path, matchinfo=fts3)';
$res = $index->_conn->exec($sql);
if($res === false) {
return null;
@@ -90,7 +90,7 @@ class SeedDMS_SQLiteFTS_Indexer {
return null;
}
} elseif(self::ftstype == 'fts5') {
- $sql = 'CREATE VIRTUAL TABLE docs USING fts5(documentid, record_type, title, comment, keywords, category, mimetype, origfilename, owner, content, created unindexed, users, status, path)';
+ $sql = 'CREATE VIRTUAL TABLE docs USING fts5(documentid, record_type, title, comment, keywords, category, mimetype, origfilename, owner, content, created unindexed, indexed unindexed, users, status, path)';
$res = $index->_conn->exec($sql);
if($res === false) {
return null;
@@ -123,7 +123,7 @@ class SeedDMS_SQLiteFTS_Indexer {
if(!$this->_conn)
return false;
- foreach(array('comment', 'keywords', 'category', 'content', 'mimetype', 'origfilename', 'status', 'created') as $kk) {
+ foreach(array('comment', 'keywords', 'category', 'content', 'mimetype', 'origfilename', 'status', 'created', 'indexed') as $kk) {
try {
${$kk} = $doc->getFieldValue($kk);
} catch (Exception $e) {
@@ -135,7 +135,7 @@ class SeedDMS_SQLiteFTS_Indexer {
if($res === false) {
return false;
}
- $sql = "INSERT INTO docs (documentid, record_type, title, comment, keywords, category, owner, content, mimetype, origfilename, created, users, status, path) VALUES (".$this->_conn->quote($doc->getFieldValue('document_id')).", ".$this->_conn->quote($doc->getFieldValue('record_type')).", ".$this->_conn->quote($doc->getFieldValue('title')).", ".$this->_conn->quote($comment).", ".$this->_conn->quote($keywords).", ".$this->_conn->quote($category).", ".$this->_conn->quote($doc->getFieldValue('owner')).", ".$this->_conn->quote($content).", ".$this->_conn->quote($mimetype).", ".$this->_conn->quote($origfilename).", ".(int)$created.", ".$this->_conn->quote($doc->getFieldValue('users')).", ".$this->_conn->quote($status).", ".$this->_conn->quote($doc->getFieldValue('path'))/*time()*/.")";
+ $sql = "INSERT INTO docs (documentid, record_type, title, comment, keywords, category, owner, content, mimetype, origfilename, created, indexed, users, status, path) VALUES (".$this->_conn->quote($doc->getFieldValue('document_id')).", ".$this->_conn->quote($doc->getFieldValue('record_type')).", ".$this->_conn->quote($doc->getFieldValue('title')).", ".$this->_conn->quote($comment).", ".$this->_conn->quote($keywords).", ".$this->_conn->quote($category).", ".$this->_conn->quote($doc->getFieldValue('owner')).", ".$this->_conn->quote($content).", ".$this->_conn->quote($mimetype).", ".$this->_conn->quote($origfilename).", ".(int)$created.", ".(int)$indexed.", ".$this->_conn->quote($doc->getFieldValue('users')).", ".$this->_conn->quote($status).", ".$this->_conn->quote($doc->getFieldValue('path'))/*time()*/.")";
$res = $this->_conn->exec($sql);
if($res === false) {
return false;
@@ -324,7 +324,7 @@ class SeedDMS_SQLiteFTS_Indexer {
if(!$this->_conn)
return false;
- $sql = "SELECT ".$this->_rawid.", documentid, title, comment, owner, keywords, category, mimetype, origfilename, created, users, status, path".($content ? ", content" : "")." FROM docs WHERE ".$this->_rawid."='".$id."'";
+ $sql = "SELECT ".$this->_rawid.", documentid, title, comment, owner, keywords, category, mimetype, origfilename, created, indexed, users, status, path".($content ? ", content" : "")." FROM docs WHERE ".$this->_rawid."='".$id."'";
$res = $this->_conn->query($sql);
$doc = false;
if($res) {
@@ -341,6 +341,7 @@ class SeedDMS_SQLiteFTS_Indexer {
$doc->addField(SeedDMS_SQLiteFTS_Field::Keyword('origfilename', $rec['origfilename']));
$doc->addField(SeedDMS_SQLiteFTS_Field::Text('owner', $rec['owner']));
$doc->addField(SeedDMS_SQLiteFTS_Field::Keyword('created', $rec['created']));
+ $doc->addField(SeedDMS_SQLiteFTS_Field::Keyword('indexed', $rec['indexed']));
$doc->addField(SeedDMS_SQLiteFTS_Field::Text('users', $rec['users']));
$doc->addField(SeedDMS_SQLiteFTS_Field::Keyword('status', $rec['status']));
$doc->addField(SeedDMS_SQLiteFTS_Field::Keyword('path', $rec['path']));
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/QueryHit.php b/SeedDMS_SQLiteFTS/SQLiteFTS/QueryHit.php
index facbd9519..843be973d 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/QueryHit.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/QueryHit.php
@@ -53,6 +53,7 @@ class SeedDMS_SQLiteFTS_QueryHit {
*/
public function __construct(SeedDMS_SQLiteFTS_Indexer $index) { /* {{{ */
$this->_index = $index;
+ $this->_document = null;
} /* }}} */
/**
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Term.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Term.php
index 462d6123e..e31ff56bc 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/Term.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Term.php
@@ -60,7 +60,8 @@ class SeedDMS_SQLiteFTS_Term {
9 => 'created',
10 => 'user',
11 => 'status',
- 12 => 'path'
+ 12 => 'path',
+ 13 => 'indexed',
);
/* fts5 pass the column name in $col, fts4 uses an integer */
if(is_int($col))
From 0186e1af00799133504df6fac0f661c6a4493f56 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 15 Dec 2022 12:36:35 +0100
Subject: [PATCH 140/247] check field indexed instead of created
---
views/bootstrap/class.Indexer.php | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/views/bootstrap/class.Indexer.php b/views/bootstrap/class.Indexer.php
index 743e108c6..75dd4200f 100644
--- a/views/bootstrap/class.Indexer.php
+++ b/views/bootstrap/class.Indexer.php
@@ -42,17 +42,17 @@ class SeedDMS_View_Indexer_Process_Folder { /* {{{ */
if(($this->numdocs == 0) || !($hit = $lucenesearch->getFolder($folder->getId()))) {
echo " getID()."\" class=\"indexme indexstatus\" data-docid=\"F".$folder->getID()."\">".getMLText('index_waiting')." ";
} else {
- /* Check if the attribute created is set or has a value older
+ /* Check if the attribute indexed is set or has a value older
* than the lastet content. Documents without such an attribute
* where added when a new document was added to the dms. In such
* a case the document content wasn't indexed.
*/
try {
- $created = (int) $hit->getDocument()->getFieldValue('created');
+ $indexed = (int) $hit->getDocument()->getFieldValue('indexed');
} catch (/* Zend_Search_Lucene_ */Exception $e) {
- $created = 0;
+ $indexed = 0;
}
- if($created >= $folder->getDate() && !$this->forceupdate) {
+ if($indexed >= $folder->getDate() && !$this->forceupdate) {
echo "getID()."\" class=\"indexstatus\" data-docid=\"F".$folder->getID()."\">".getMLText('index_document_unchanged')." ";
} else {
$this->fulltextservice->Indexer()->delete($hit->id);
@@ -70,18 +70,18 @@ class SeedDMS_View_Indexer_Process_Folder { /* {{{ */
if(($this->numdocs == 0) || !($hit = $lucenesearch->getDocument($document->getId()))) {
echo " getID()."\" class=\"indexme indexstatus\" data-docid=\"D".$document->getID()."\">".getMLText('index_waiting')." ";
} else {
- /* Check if the attribute created is set or has a value older
+ /* Check if the attribute indexed is set or has a value older
* than the lastet content. Documents without such an attribute
* where added when a new document was added to the dms. In such
* a case the document content wasn't indexed.
*/
try {
- $created = (int) $hit->getDocument()->getFieldValue('created');
+ $indexed = (int) $hit->getDocument()->getFieldValue('indexed');
} catch (/* Zend_Search_Lucene_ */Exception $e) {
- $created = 0;
+ $indexed = 0;
}
$content = $document->getLatestContent();
- if($created >= $content->getDate() && !$this->forceupdate) {
+ if($indexed >= $content->getDate() && !$this->forceupdate) {
echo "getID()."\" class=\"indexstatus\" data-docid=\"D".$document->getID()."\">".getMLText('index_document_unchanged')." ";
} else {
$this->fulltextservice->Indexer()->delete($hit->id);
From 61db1313a32d2745e4f00edf6d86ffba6ff2065f Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 15 Dec 2022 12:36:57 +0100
Subject: [PATCH 141/247] add translation of 'Processing ...', use getMLText()
---
views/bootstrap/class.Indexer.php | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/views/bootstrap/class.Indexer.php b/views/bootstrap/class.Indexer.php
index 75dd4200f..34b5435f5 100644
--- a/views/bootstrap/class.Indexer.php
+++ b/views/bootstrap/class.Indexer.php
@@ -132,7 +132,7 @@ function check_queue() {
}
var command = '';
docid = funcArray.pop();
- $('#status_'+docid).html('Processsing ...');
+ $('#status_'+docid).html('= getMLText('index_processing') ?>');
if(docid[0] == 'F') {
command = 'indexfolder';
} else {
@@ -161,11 +161,11 @@ function check_queue() {
// console.log('success ' + data.data);
if(data.success) {
if(data.cmd)
- $('#status_'+data.data).html('');
+ $('#status_'+data.data).html('= getMLText('index_done') ?>');
else
- $('#status_'+data.data).html('= getMLText('index_done').' ('.getMLText('index_no_content').')'; ?>');
+ $('#status_'+data.data).html('= getMLText('index_done').' ('.getMLText('index_no_content').')' ?>');
} else {
- $('#status_'+data.data).html('');
+ $('#status_'+data.data).html('= getMLText('index_error') ?>');
noty({
text: 'Docid: ' + data.data + ' (' + data.mimetype + ')
' + 'Cmd: ' + data.cmd + '
' + data.message,
type: 'error',
@@ -196,7 +196,7 @@ $(document).ready( function() {
$('.indexme').each(function(index) {
var element = $(this);
var docid = element.data('docid');
- element.html('');
+ element.html('= getMLText('index_pending') ?>');
funcArray.push(docid);
});
docstoindex = funcArray.length;
@@ -235,13 +235,13 @@ div.folder {font-weight: bold; line-height: 20px; margin-top: 10px;}
-
+ = getMLText('overall_indexing_progress') ?>
-
+
= getMLText('indexing_tasks_in_queue') ?>
Date: Thu, 15 Dec 2022 12:46:54 +0100
Subject: [PATCH 142/247] fulltext index uses 'indexed' instead of 'created'
---
inc/inc.Tasks.php | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/inc/inc.Tasks.php b/inc/inc.Tasks.php
index 9d8868465..f198808c3 100644
--- a/inc/inc.Tasks.php
+++ b/inc/inc.Tasks.php
@@ -157,17 +157,17 @@ class SeedDMS_Task_Indexer_Process_Folder { /* {{{ */
echo "(Timeout)".PHP_EOL;
}
} else {
- /* Check if the attribute created is set or has a value older
+ /* Check if the attribute indexed is set or has a value older
* than the lastet content. Folders without such an attribute
* where added when a new folder was added to the dms. In such
* a case the folder content wasn't indexed.
*/
try {
- $created = (int) $hit->getDocument()->getFieldValue('created');
+ $indexed = (int) $hit->getDocument()->getFieldValue('indexed');
} catch (/* Zend_Search_Lucene_ */Exception $e) {
- $created = 0;
+ $indexed = 0;
}
- if($created >= $folder->getDate() && !$this->forceupdate) {
+ if($indexed >= $folder->getDate() && !$this->forceupdate) {
echo "(".getMLText('index_folder_unchanged').")".PHP_EOL;
} else {
$this->fulltextservice->Indexer()->delete($hit->id);
@@ -212,18 +212,18 @@ class SeedDMS_Task_Indexer_Process_Folder { /* {{{ */
echo "(Timeout)".PHP_EOL;
}
} else {
- /* Check if the attribute created is set or has a value older
+ /* Check if the attribute indexed is set or has a value older
* than the lastet content. Documents without such an attribute
* where added when a new document was added to the dms. In such
* a case the document content wasn't indexed.
*/
try {
- $created = (int) $hit->getDocument()->getFieldValue('created');
+ $indexed = (int) $hit->getDocument()->getFieldValue('indexed');
} catch (/* Zend_Search_Lucene_ */Exception $e) {
- $created = 0;
+ $indexed = 0;
}
$content = $document->getLatestContent();
- if($created >= $content->getDate() && !$this->forceupdate) {
+ if($indexed >= $content->getDate() && !$this->forceupdate) {
echo "(".getMLText('index_document_unchanged').")".PHP_EOL;
} else {
$this->fulltextservice->Indexer()->delete($hit->id);
From ed036819e7b67584900b68542a8530ab87e92045 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sat, 17 Dec 2022 14:07:55 +0100
Subject: [PATCH 143/247] set currenttab from GET if available
---
out/out.ViewFolder.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/out/out.ViewFolder.php b/out/out.ViewFolder.php
index e4880beed..935b291a6 100644
--- a/out/out.ViewFolder.php
+++ b/out/out.ViewFolder.php
@@ -100,7 +100,7 @@ if($view) {
$view->setParam('offset', $offset);
$view->setParam('limit', $limit);
$view->setParam('onepage', $settings->_onePageMode); // do most navigation by reloading areas of pages with ajax
- $view->setParam('currenttab', 'folderinfo');
+ $view->setParam('currenttab', isset($_GET['currenttab']) ? $_GET['currenttab'] : "folderinfo");
$view($_GET);
exit;
}
From edabd515f18bd349d23d3047c57dd7998eb275d5 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 18 Dec 2022 12:41:39 +0100
Subject: [PATCH 144/247] use methods in style to create tabs
---
views/bootstrap/class.ExtensionMgr.php | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/views/bootstrap/class.ExtensionMgr.php b/views/bootstrap/class.ExtensionMgr.php
index c2383c972..db44c3928 100644
--- a/views/bootstrap/class.ExtensionMgr.php
+++ b/views/bootstrap/class.ExtensionMgr.php
@@ -307,11 +307,11 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
$this->columnStart(8);
?>
-
+ showStartPaneContent('installed', (!$currenttab || $currenttab == 'installed')); ?>
formSubmit(" " . getMLText('refresh'));?>
-
+ showEndPaneContent('installed', $currenttab); ?>
-
+ showStartPaneContent('repository', ($currenttab == 'repository')); ?>
\n";
print "
\n\n";
@@ -376,8 +376,8 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
formSubmit(" " . getMLText('force_update'));?>
-
-
+
+ showEndPaneContent('repository', $currenttab); ?>
columnEnd();
From 79b1560a270eba335695f57463b39e216b9ce877 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 18 Dec 2022 12:46:29 +0100
Subject: [PATCH 145/247] fix typo
---
CHANGELOG | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG b/CHANGELOG
index d876f1e65..fc144fc55 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -26,7 +26,7 @@
- rest api returns version attributes as 'version_attributes' (was
'version-attributes'), each attribute also contains the name
- new hook in rest api to add more routes in extensions
-- uploaded serveral documents at once by fast upload will assign random
+- uploaded several documents at once by fast upload will assign random
sequence number to allow manually sorting the documents afterwards
- fix counting of login failures if both ldap and db authentication is done
From d72422eb36c31618311ff9ce71ed86a5bf6e95e6 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 19 Dec 2022 16:00:28 +0100
Subject: [PATCH 146/247] add second column with error messages
---
views/bootstrap/class.Indexer.php | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/views/bootstrap/class.Indexer.php b/views/bootstrap/class.Indexer.php
index 34b5435f5..4ac0b3cf5 100644
--- a/views/bootstrap/class.Indexer.php
+++ b/views/bootstrap/class.Indexer.php
@@ -165,6 +165,7 @@ function check_queue() {
else
$('#status_'+data.data).html('= getMLText('index_done').' ('.getMLText('index_no_content').')' ?>');
} else {
+ $('#update_messages').append('Docid: ' + data.data + ' (' + data.mimetype + ')
' + '
Cmd: ' + data.cmd + '
' + data.message+'
');
$('#status_'+data.data).html('= getMLText('index_error') ?>');
noty({
text: 'Docid: ' + data.data + ' (' + data.mimetype + ')
' + 'Cmd: ' + data.cmd + '
' + data.message,
@@ -218,6 +219,8 @@ $(document).ready( function() {
$this->globalNavigation();
$this->contentStart();
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
+ $this->rowStart();
+ $this->columnStart(6);
$this->contentHeading(getMLText("update_fulltext_index"));
if($fulltextservice) {
$index = $fulltextservice->Indexer();
@@ -230,7 +233,6 @@ div.folder {font-weight: bold; line-height: 20px; margin-top: 10px;}
.progress {margin-bottom: 2px;}
.bar-legend {text-align: right; font-size: 85%; margin-bottom: 15px;}
-
@@ -247,7 +249,13 @@ div.folder {font-weight: bold; line-height: 20px; margin-top: 10px;}
$folderprocess = new SeedDMS_View_Indexer_Process_Folder($fulltextservice, $forceupdate);
call_user_func(array($folderprocess, 'process'), $folder, -1);
$tree = new SeedDMS_FolderTree($folder, array($folderprocess, 'process'));
- echo "
";
+ $this->columnEnd();
+ $this->columnStart(6);
+ $this->contentHeading(getMLText("update_fulltext_messages"));
+ echo '
';
+ echo '
';
+ $this->columnEnd();
+ $this->rowEnd();
$index->commit();
$index->optimize();
From 6233ac59ff808b185be09f8596b59d36d887492f Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 20 Dec 2022 13:45:53 +0100
Subject: [PATCH 147/247] log transactions
---
SeedDMS_Core/Core/inc.DBAccessPDO.php | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php
index 1c3a48a9f..cd0161658 100644
--- a/SeedDMS_Core/Core/inc.DBAccessPDO.php
+++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php
@@ -447,9 +447,15 @@ class SeedDMS_Core_DatabaseAccess {
$this->_conn->beginTransaction();
}
$this->_intransaction++;
+ if($this->_logfp) {
+ fwrite($this->_logfp, microtime()." START ".$htis->_intransaction."\n");
+ }
} /* }}} */
function rollbackTransaction() { /* {{{ */
+ if($this->_logfp) {
+ fwrite($this->_logfp, microtime()." ROLLBACK ".$htis->_intransaction."\n");
+ }
if($this->_intransaction == 1) {
$this->_conn->rollBack();
}
@@ -457,6 +463,9 @@ class SeedDMS_Core_DatabaseAccess {
} /* }}} */
function commitTransaction() { /* {{{ */
+ if($this->_logfp) {
+ fwrite($this->_logfp, microtime()." COMMIT ".$htis->_intransaction."\n");
+ }
if($this->_intransaction == 1) {
$this->_conn->commit();
}
From 41721467acb0b313da98ad2f744f50b86e237e1b Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 20 Dec 2022 15:54:47 +0100
Subject: [PATCH 148/247] focus search field after loading page
---
views/bootstrap/class.ViewFolder.php | 3 +++
1 file changed, 3 insertions(+)
diff --git a/views/bootstrap/class.ViewFolder.php b/views/bootstrap/class.ViewFolder.php
index 0f930c652..9827acd10 100644
--- a/views/bootstrap/class.ViewFolder.php
+++ b/views/bootstrap/class.ViewFolder.php
@@ -137,6 +137,9 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Theme_Style {
header('Content-Type: application/javascript; charset=UTF-8');
parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'confirm_transfer_link_document', 'transfer_content', 'link_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder'));
?>
+$(document).ready(function() {
+ $('#searchfield').focus();
+});
seeddms_folder = = $folder->getID() ?>;
function folderSelectedmaintree(id, name) {
From 06e9f41ec17351c0172e786b515f49ce4eef92f5 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 20 Dec 2022 15:55:37 +0100
Subject: [PATCH 149/247] replace plain html in formField() method
---
views/bootstrap/class.ChangePassword.php | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/views/bootstrap/class.ChangePassword.php b/views/bootstrap/class.ChangePassword.php
index 335fc9270..a6fe8046c 100644
--- a/views/bootstrap/class.ChangePassword.php
+++ b/views/bootstrap/class.ChangePassword.php
@@ -35,8 +35,8 @@ class SeedDMS_View_ChangePassword extends SeedDMS_Theme_Style {
header('Content-Type: application/javascript; charset=UTF-8');
parent::jsTranslations(array('js_form_error', 'js_form_errors'));
?>
-document.form1.newpassword.focus();
$(document).ready(function() {
+ $('#newpassword').focus();
$("#form1").validate({
rules: {
newpasswordrepeat: {
@@ -78,7 +78,16 @@ $(document).ready(function() {
$this->contentContainerStart();
$this->formField(
getMLText("password"),
- ' '
+ array(
+ 'element'=>'input',
+ 'type'=>'password',
+ 'id'=>'newpassword',
+ 'name'=>'newpassword',
+ 'autocomplete'=>'off',
+ 'required'=>true,
+ 'class'=>'pwd',
+ 'attributes'=>[['rel', 'strengthbar']]
+ )
);
if($passwordstrength > 0) {
$this->formField(
From 8940a3b3388e415a23ba60e05e0afdadb69ace68 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 1 Jan 2023 09:18:52 +0100
Subject: [PATCH 150/247] timeout can be passed to constructor
---
inc/inc.ClassConversionServiceExec.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/inc/inc.ClassConversionServiceExec.php b/inc/inc.ClassConversionServiceExec.php
index 3931c0fb7..eff1d5ab1 100644
--- a/inc/inc.ClassConversionServiceExec.php
+++ b/inc/inc.ClassConversionServiceExec.php
@@ -91,11 +91,11 @@ class SeedDMS_ConversionServiceExec extends SeedDMS_ConversionServiceBase {
}
} /* }}} */
- public function __construct($from, $to, $cmd) {
+ public function __construct($from, $to, $cmd, $timeout=5) {
$this->from = $from;
$this->to = $to;
$this->cmd = $cmd;
- $this->timeout = 5;
+ $this->timeout = ((int) $timeout) ? (int) $timeout : 5;
}
public function getInfo() {
From c67cc6ede4ffe928e3ccecf670dd62e54bf12a1c Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 1 Jan 2023 09:21:01 +0100
Subject: [PATCH 151/247] turn off auto commit for mysql
---
SeedDMS_Core/Core/inc.DBAccessPDO.php | 1 +
SeedDMS_Core/package.xml | 1 +
2 files changed, 2 insertions(+)
diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php
index cd0161658..11f2541dc 100644
--- a/SeedDMS_Core/Core/inc.DBAccessPDO.php
+++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php
@@ -301,6 +301,7 @@ class SeedDMS_Core_DatabaseAccess {
switch($this->_driver) {
case 'mysql':
$this->_conn->exec('SET NAMES utf8');
+ $this->_conn->setAttribute(PDO::ATTR_AUTOCOMMIT, FALSE);
/* Turn this on if you want strict checking of default values, etc. */
/* $this->_conn->exec("SET SESSION sql_mode = 'STRICT_TRANS_TABLES'"); */
/* The following is the default on Ubuntu 16.04 */
diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml
index 164db26fa..ad0716151 100644
--- a/SeedDMS_Core/package.xml
+++ b/SeedDMS_Core/package.xml
@@ -26,6 +26,7 @@
- SeedDMS_Core_Folder::addDocument() does rollback transaction propperly when setting document categories fail
- add $skiproot and $sep parameter to SeedDMS_Core_Folder::getFolderPathPlain()
+- turn off auto commit for mysql
From f4b8eb05b77697cdff3f456ad4526b3409af4dc9 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 1 Jan 2023 09:22:11 +0100
Subject: [PATCH 152/247] set timeout of SeedDMS_ConversionServiceExec
---
inc/inc.ConversionInit.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/inc/inc.ConversionInit.php b/inc/inc.ConversionInit.php
index a1ccb56e6..880e488f1 100644
--- a/inc/inc.ConversionInit.php
+++ b/inc/inc.ConversionInit.php
@@ -5,19 +5,19 @@ $conversionmgr = new SeedDMS_ConversionMgr();
if(!empty($settings->_converters['preview'])) {
foreach($settings->_converters['preview'] as $mimetype=>$cmd) {
- $conversionmgr->addService(new SeedDMS_ConversionServiceExec($mimetype, 'image/png', $cmd))->setLogger($logger);
+ $conversionmgr->addService(new SeedDMS_ConversionServiceExec($mimetype, 'image/png', $cmd), $settings->_cmdTimeout)->setLogger($logger);
}
}
if(!empty($settings->_converters['pdf'])) {
foreach($settings->_converters['pdf'] as $mimetype=>$cmd) {
- $conversionmgr->addService(new SeedDMS_ConversionServiceExec($mimetype, 'application/pdf', $cmd))->setLogger($logger);
+ $conversionmgr->addService(new SeedDMS_ConversionServiceExec($mimetype, 'application/pdf', $cmd, $settings->_cmdTimeout))->setLogger($logger);
}
}
if(!empty($settings->_converters['fulltext'])) {
foreach($settings->_converters['fulltext'] as $mimetype=>$cmd) {
- $conversionmgr->addService(new SeedDMS_ConversionServiceExec($mimetype, 'text/plain', $cmd))->setLogger($logger);
+ $conversionmgr->addService(new SeedDMS_ConversionServiceExec($mimetype, 'text/plain', $cmd, $settings->_cmdTimeout))->setLogger($logger);
}
}
From 7202d85e5541d5d946661cd8f5f522dc3db11404 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 1 Jan 2023 09:23:04 +0100
Subject: [PATCH 153/247] fix indention of lines
---
restapi/index.php | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/restapi/index.php b/restapi/index.php
index d21be66c8..a988a63f2 100644
--- a/restapi/index.php
+++ b/restapi/index.php
@@ -2619,17 +2619,17 @@ class RestapiAuth { /* {{{ */
// $this->container has the DI
$dms = $this->container->dms;
$settings = $this->container->config;
- $logger = $this->container->logger;
- $userobj = null;
- if($this->container->has('userobj'))
- $userobj = $this->container->userobj;
+ $logger = $this->container->logger;
+ $userobj = null;
+ if($this->container->has('userobj'))
+ $userobj = $this->container->userobj;
- if($userobj) {
- $response = $next($request, $response);
- return $response;
- }
+ if($userobj) {
+ $response = $next($request, $response);
+ return $response;
+ }
- $logger->log("Invoke middleware for method ".$request->getMethod()." on '".$request->getUri()->getPath()."'", PEAR_LOG_INFO);
+ $logger->log("Invoke middleware for method ".$request->getMethod()." on '".$request->getUri()->getPath()."'", PEAR_LOG_INFO);
$logger->log("Access with method ".$request->getMethod()." on '".$request->getUri()->getPath()."'".(isset($this->container->environment['HTTP_ORIGIN']) ? " with origin ".$this->container->environment['HTTP_ORIGIN'] : ''), PEAR_LOG_INFO);
if($settings->_apiOrigin && isset($this->container->environment['HTTP_ORIGIN'])) {
$logger->log("Checking origin", PEAR_LOG_DEBUG);
From 5bd69596c98a1df05d5943f15e7ecc7a89894b2f Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 1 Jan 2023 19:58:28 +0100
Subject: [PATCH 154/247] add slim middleware for authenticating with session
---
inc/inc.ClassAuthenticationMiddleware.php | 73 +++++++++++++++++++++++
1 file changed, 73 insertions(+)
create mode 100644 inc/inc.ClassAuthenticationMiddleware.php
diff --git a/inc/inc.ClassAuthenticationMiddleware.php b/inc/inc.ClassAuthenticationMiddleware.php
new file mode 100644
index 000000000..5ddb846d7
--- /dev/null
+++ b/inc/inc.ClassAuthenticationMiddleware.php
@@ -0,0 +1,73 @@
+container = $container;
+ }
+
+ /**
+ * Example middleware invokable class
+ *
+ * @param \Psr\Http\Message\ServerRequestInterface $request PSR7 request
+ * @param \Psr\Http\Message\ResponseInterface $response PSR7 response
+ * @param callable $next Next middleware
+ *
+ * @return \Psr\Http\Message\ResponseInterface
+ */
+ public function __invoke($request, $response, $next) {
+ // $this->container has the DI
+ $dms = $this->container->dms;
+ $settings = $this->container->config;
+ $logger = $this->container->logger;
+ $userobj = null;
+ if($this->container->has('userobj'))
+ $userobj = $this->container->userobj;
+
+ if($userobj) {
+ $response = $next($request, $response);
+ return $response;
+ }
+
+ $logger->log("Invoke middleware for method ".$request->getMethod()." on '".$request->getUri()->getPath()."'", PEAR_LOG_INFO);
+ require_once("inc/inc.ClassSession.php");
+ $session = new SeedDMS_Session($dms->getDb());
+ if (isset($_COOKIE["mydms_session"])) {
+ $dms_session = $_COOKIE["mydms_session"];
+ $logger->log("Session key: ".$dms_session, PEAR_LOG_DEBUG);
+ if(!$resArr = $session->load($dms_session)) {
+ /* Delete Cookie */
+ setcookie("mydms_session", $dms_session, time()-3600, $settings->_httpRoot);
+ $logger->log("Session for id '".$dms_session."' has gone", PEAR_LOG_ERR);
+ return $response->withStatus(403);
+ }
+
+ /* Load user data */
+ $userobj = $dms->getUser($resArr["userID"]);
+ if (!is_object($userobj)) {
+ /* Delete Cookie */
+ setcookie("mydms_session", $dms_session, time()-3600, $settings->_httpRoot);
+ if($settings->_enableGuestLogin) {
+ if(!($userobj = $dms->getUser($settings->_guestID)))
+ return $response->withStatus(403);
+ } else
+ return $response->withStatus(403);
+ }
+ if($userobj->isAdmin()) {
+ if($resArr["su"]) {
+ if(!($userobj = $dms->getUser($resArr["su"])))
+ return $response->withStatus(403);
+ }
+ }
+ $dms->setUser($userobj);
+ } else {
+ return $response->withStatus(403);
+ }
+ $this->container['userobj'] = $userobj;
+
+ $response = $next($request, $response);
+ return $response;
+ }
+} /* }}} */
From e30032f028d739cc52dec0225a150356b1ffa5f6 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 1 Jan 2023 19:59:29 +0100
Subject: [PATCH 155/247] move init of notification into DBInit.php
---
inc/inc.Authentication.php | 4 ----
inc/inc.DBInit.php | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/inc/inc.Authentication.php b/inc/inc.Authentication.php
index a94b601f6..ade988137 100644
--- a/inc/inc.Authentication.php
+++ b/inc/inc.Authentication.php
@@ -12,8 +12,6 @@
* @version Release: @package_version@
*/
-require_once("inc.ClassNotificationService.php");
-require_once("inc.ClassEmailNotify.php");
require_once("inc.ClassSession.php");
require_once("inc.ClassAccessOperation.php");
@@ -95,8 +93,6 @@ if($settings->_useHomeAsRootFolder && !$user->isAdmin() && $user->getHomeFolder(
$dms->setRootFolderID($user->getHomeFolder());
}
-require_once('inc/inc.Notification.php');
-
/* Include additional language file for view
* This file must set $LANG[xx][]
*/
diff --git a/inc/inc.DBInit.php b/inc/inc.DBInit.php
index ec6036cc7..7c1eff742 100644
--- a/inc/inc.DBInit.php
+++ b/inc/inc.DBInit.php
@@ -69,3 +69,7 @@ if(isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) {
require_once("inc.ConversionInit.php");
require_once('inc.FulltextInit.php');
require_once('inc.AuthenticationInit.php');
+require_once("inc.ClassNotificationService.php");
+require_once("inc.ClassEmailNotify.php");
+require_once('inc.Notification.php');
+
From d291c18eabe1492e44f4cee16508899c72a7fc74 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 1 Jan 2023 20:00:27 +0100
Subject: [PATCH 156/247] add logger, conversionmgr, authenticator, etc to
container
---
index.php | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/index.php b/index.php
index 4b30fbbcb..af3d42456 100644
--- a/index.php
+++ b/index.php
@@ -53,11 +53,19 @@ if(true) {
};
};
$app = new \Slim\App($c);
+ $container = $app->getContainer();
+ $container['dms'] = $dms;
+ $container['config'] = $settings;
+ $container['conversionmgr'] = $conversionmgr;
+ $container['logger'] = $logger;
+ $container['fulltextservice'] = $fulltextservice;
+ $container['notifier'] = $notifier;
+ $container['authenticator'] = $authenticator;
if(isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) {
if (method_exists($hookObj, 'addRoute')) {
- $hookObj->addRoute(array('dms'=>$dms, 'app'=>$app, 'settings'=>$settings));
+ $hookObj->addRoute(array('dms'=>$dms, 'app'=>$app, 'settings'=>$settings, 'conversionmgr'=>$conversionmgr, 'authenticator'=>$authenticator, 'fulltextservice'=>$fulltextservice, 'logger'=>$logger));
// } else {
// include("inc/inc.Authentication.php");
// if (method_exists($hookObj, 'addRouteAfterAuthentication')) {
From 0e55c95171b8c2aa2b925f76f8b89bcdcfa62c0c Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 2 Jan 2023 12:26:31 +0100
Subject: [PATCH 157/247] remove old converters
---
SeedDMS_Preview/Preview/PdfPreviewer.php | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/SeedDMS_Preview/Preview/PdfPreviewer.php b/SeedDMS_Preview/Preview/PdfPreviewer.php
index c58f8c343..ba9c79ad9 100644
--- a/SeedDMS_Preview/Preview/PdfPreviewer.php
+++ b/SeedDMS_Preview/Preview/PdfPreviewer.php
@@ -27,18 +27,6 @@ class SeedDMS_Preview_PdfPreviewer extends SeedDMS_Preview_Base {
function __construct($previewDir, $timeout=5, $xsendfile=true) { /* {{{ */
parent::__construct($previewDir, $timeout, $xsendfile);
$this->converters = array(
- 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
- 'application/vnd.oasis.opendocument.text' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
- 'text/rtf' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
- 'application/msword' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
- 'application/vnd.ms-excel' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
- 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
- 'text/plain' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
- 'application/postscript' => "ps2pdf '%f' - > '%o'",
- 'image/jpeg' => "convert '%f' pdf:- > '%o'",
- 'image/png' => "convert '%f' pdf:- > '%o'",
- 'image/gif' => "convert '%f' pdf:- > '%o'",
- 'video/mp4' => "convert '%f[1-20]' pdf:- > '%o'",
);
} /* }}} */
From be62540c69b7dda0f47bcc1b3698531ee78e06a8 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 2 Jan 2023 12:26:48 +0100
Subject: [PATCH 158/247] set $new when creating preview
---
SeedDMS_Preview/Preview/PdfPreviewer.php | 3 +++
1 file changed, 3 insertions(+)
diff --git a/SeedDMS_Preview/Preview/PdfPreviewer.php b/SeedDMS_Preview/Preview/PdfPreviewer.php
index ba9c79ad9..73a335821 100644
--- a/SeedDMS_Preview/Preview/PdfPreviewer.php
+++ b/SeedDMS_Preview/Preview/PdfPreviewer.php
@@ -116,9 +116,11 @@ class SeedDMS_Preview_PdfPreviewer extends SeedDMS_Preview_Base {
} elseif(isset($this->converters['*'])) {
$cmd = str_replace(array('%f', '%o', '%m'), array($infile, $target.'.pdf', $mimetype), $this->converters['*']);
}
+
if($cmd) {
try {
self::execWithTimeout($cmd, $this->timeout);
+ $new = true;
} catch(Exception $e) {
$this->lastpreviewfile = '';
return false;
@@ -127,6 +129,7 @@ class SeedDMS_Preview_PdfPreviewer extends SeedDMS_Preview_Base {
}
return true;
}
+ $new = false;
return true;
} /* }}} */
From c9f3a2c33575688e5e2ec5baefc94d4d15da729e Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 2 Jan 2023 19:34:14 +0100
Subject: [PATCH 159/247] get class name for 'documentfile'
---
SeedDMS_Core/Core/inc.ClassDMS.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php
index 7adec5e8b..99c150c0a 100644
--- a/SeedDMS_Core/Core/inc.ClassDMS.php
+++ b/SeedDMS_Core/Core/inc.ClassDMS.php
@@ -381,6 +381,7 @@ class SeedDMS_Core_DMS {
$this->classnames['folder'] = 'SeedDMS_Core_Folder';
$this->classnames['document'] = 'SeedDMS_Core_Document';
$this->classnames['documentcontent'] = 'SeedDMS_Core_DocumentContent';
+ $this->classnames['documentfile'] = 'SeedDMS_Core_DocumentFile';
$this->classnames['user'] = 'SeedDMS_Core_User';
$this->classnames['group'] = 'SeedDMS_Core_Group';
$this->callbacks = array();
From ff5e6e630224e98df1be3d76830c9f55c80fcab2 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 2 Jan 2023 19:34:48 +0100
Subject: [PATCH 160/247] use getClassname() for getting class of documentfile
---
SeedDMS_Core/Core/inc.ClassDocument.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php
index 966710335..d9f11610d 100644
--- a/SeedDMS_Core/Core/inc.ClassDocument.php
+++ b/SeedDMS_Core/Core/inc.ClassDocument.php
@@ -2341,7 +2341,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
if ((is_bool($resArr) && !$resArr) || count($resArr)==0) return false;
$resArr = $resArr[0];
- $file = new SeedDMS_Core_DocumentFile($resArr["id"], $this, $resArr["userID"], $resArr["comment"], $resArr["date"], $resArr["dir"], $resArr["fileType"], $resArr["mimeType"], $resArr["orgFileName"], $resArr["name"],$resArr["version"],$resArr["public"]);
+ $classname = $this->_dms->getClassname('documentfile');
+ $file = new $classname($resArr["id"], $this, $resArr["userID"], $resArr["comment"], $resArr["date"], $resArr["dir"], $resArr["fileType"], $resArr["mimeType"], $resArr["orgFileName"], $resArr["name"],$resArr["version"],$resArr["public"]);
$user = $this->_dms->getLoggedInUser();
if($file->getAccessMode($user) >= M_READ)
return $file;
@@ -2382,8 +2383,9 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
$this->_documentFiles = array($hash=>array());
$user = $this->_dms->getLoggedInUser();
+ $classname = $this->_dms->getClassname('documentfile');
foreach ($resArr as $row) {
- $file = new SeedDMS_Core_DocumentFile($row["id"], $this, $row["userID"], $row["comment"], $row["date"], $row["dir"], $row["fileType"], $row["mimeType"], $row["orgFileName"], $row["name"], $row["version"], $row["public"]);
+ $file = new $classname($row["id"], $this, $row["userID"], $row["comment"], $row["date"], $row["dir"], $row["fileType"], $row["mimeType"], $row["orgFileName"], $row["name"], $row["version"], $row["public"]);
if($file->getAccessMode($user) >= M_READ)
array_push($this->_documentFiles[$hash], $file);
}
From 8418bb962d2b5ba2bc7d9e25ead0df83f49e7d3e Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 2 Jan 2023 19:35:35 +0100
Subject: [PATCH 161/247] use get getClassname() for getting class of
documentfile
---
SeedDMS_Preview/Preview/Previewer.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SeedDMS_Preview/Preview/Previewer.php b/SeedDMS_Preview/Preview/Previewer.php
index 4381313bf..57b2a66ef 100644
--- a/SeedDMS_Preview/Preview/Previewer.php
+++ b/SeedDMS_Preview/Preview/Previewer.php
@@ -68,7 +68,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
case $dms->getClassname('documentcontent'):
$target = $dir.'p'.$object->getVersion().'-'.$width;
break;
- case "SeedDMS_Core_DocumentFile":
+ case $dms->getClassname('documentfile'):
$target = $dir.'f'.$object->getID().'-'.$width;
break;
default:
From 91e20d72af50e2a8eb371b41b2c050bca56d5b86 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 2 Jan 2023 19:36:07 +0100
Subject: [PATCH 162/247] start new version 1.5.0
---
SeedDMS_Preview/package.xml | 31 +++++++++++++++++++++++++------
1 file changed, 25 insertions(+), 6 deletions(-)
diff --git a/SeedDMS_Preview/package.xml b/SeedDMS_Preview/package.xml
index 5dd1e4b41..4e385c123 100644
--- a/SeedDMS_Preview/package.xml
+++ b/SeedDMS_Preview/package.xml
@@ -11,11 +11,11 @@
uwe@steinmann.cx
yes
- 2021-10-16
+ 2023-01-02
09:49:39
- 1.4.0
- 1.4.0
+ 1.5.0
+ 1.5.0
stable
@@ -23,8 +23,7 @@
GPL License
-- use new conversion service if available
-- createRawPreview() checks early if a converter exists
+- add previewer which creates txt
@@ -38,6 +37,9 @@
+
+
+
@@ -49,7 +51,7 @@
- 4.3.0
+ 7.4.0
1.5.4
@@ -488,5 +490,22 @@ update package description
preview image was actually created
+
+ 2021-10-16
+ 09:49:39
+
+ 1.4.0
+ 1.4.0
+
+
+ stable
+ stable
+
+ GPL License
+
+- use new conversion service if available
+- createRawPreview() checks early if a converter exists
+
+
From 388cf0d136e83a65448ebaa5add51b9dc030e076 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 2 Jan 2023 19:36:22 +0100
Subject: [PATCH 163/247] update release notes
---
SeedDMS_Core/package.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml
index ad0716151..6cfa5d734 100644
--- a/SeedDMS_Core/package.xml
+++ b/SeedDMS_Core/package.xml
@@ -27,6 +27,7 @@
- SeedDMS_Core_Folder::addDocument() does rollback transaction propperly when setting document categories fail
- add $skiproot and $sep parameter to SeedDMS_Core_Folder::getFolderPathPlain()
- turn off auto commit for mysql
+- add class name for 'documentfile'
From eefb0f5ad34b331700e345ee032fefc028e00239 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 3 Jan 2023 14:00:28 +0100
Subject: [PATCH 164/247] include TxtPreviewer.php
---
SeedDMS_Preview/Preview.php | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/SeedDMS_Preview/Preview.php b/SeedDMS_Preview/Preview.php
index d19d82943..ce5853001 100644
--- a/SeedDMS_Preview/Preview.php
+++ b/SeedDMS_Preview/Preview.php
@@ -31,4 +31,9 @@ require_once('Preview/Previewer.php');
*/
require_once('Preview/PdfPreviewer.php');
+/**
+ * @uses Preview/PdfPreviewer.php
+ */
+require_once('Preview/TxtPreviewer.php');
+
?>
From 05d7c709ab2fba35a40ca44cb083b6afa91e9ed7 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 3 Jan 2023 14:01:04 +0100
Subject: [PATCH 165/247] callable can be passed for retrieving text content
---
SeedDMS_Lucene/Lucene/IndexedDocument.php | 10 +++++++++-
SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php | 10 +++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/SeedDMS_Lucene/Lucene/IndexedDocument.php b/SeedDMS_Lucene/Lucene/IndexedDocument.php
index dd426ff74..1ee2d93c7 100644
--- a/SeedDMS_Lucene/Lucene/IndexedDocument.php
+++ b/SeedDMS_Lucene/Lucene/IndexedDocument.php
@@ -182,7 +182,15 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document {
if(file_exists($path)) {
$mimetype = $version->getMimeType();
$this->mimetype = $mimetype;
- if(is_object($convcmd) && (get_class($convcmd) == 'SeedDMS_ConversionMgr')) {
+ if(is_callable($convcmd)) {
+ $result = $convcmd($document);
+ if($result['content']) {
+ self::setContent($result['content']);
+ } elseif($result['content'] === false) {
+ $this->errormsg = $result['errormsg'];
+ }
+ $this->cmd = $result['cmd'];
+ } elseif(is_object($convcmd) && (get_class($convcmd) == 'SeedDMS_ConversionMgr')) {
if($service = $convcmd->getService($mimetype, 'text/plain')) {
$content = $convcmd->convert($path, $mimetype, 'text/plain');
if($content) {
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php b/SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php
index bb14f710e..6ab17c461 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php
@@ -183,7 +183,15 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
if(file_exists($path)) {
$mimetype = $version->getMimeType();
$this->mimetype = $mimetype;
- if(is_object($convcmd) && (get_class($convcmd) == 'SeedDMS_ConversionMgr')) {
+ if(is_callable($convcmd)) {
+ $result = $convcmd($document);
+ if($result['content']) {
+ self::setContent($result['content']);
+ } elseif($result['content'] === false) {
+ $this->errormsg = $result['errormsg'];
+ }
+ $this->cmd = $result['cmd'];
+ } elseif(is_object($convcmd) && (get_class($convcmd) == 'SeedDMS_ConversionMgr')) {
if($service = $convcmd->getService($mimetype, 'text/plain')) {
$content = $convcmd->convert($path, $mimetype, 'text/plain');
if($content) {
From 75638089e6090fdb69e00a117e286a921976f772 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 3 Jan 2023 14:04:08 +0100
Subject: [PATCH 166/247] add notes for latest version
---
SeedDMS_Lucene/package.xml | 24 ++++++++++++++++++++----
SeedDMS_SQLiteFTS/package.xml | 3 ++-
2 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/SeedDMS_Lucene/package.xml b/SeedDMS_Lucene/package.xml
index 01192ead0..6b901160b 100644
--- a/SeedDMS_Lucene/package.xml
+++ b/SeedDMS_Lucene/package.xml
@@ -11,11 +11,11 @@
uwe@steinmann.cx
yes
- 2021-05-10
+ 2023-01-03
08:55:43
- 1.1.17
- 1.1.17
+ 1.1.18
+ 1.1.18
stable
@@ -23,7 +23,7 @@
GPL License
-- close pipes in execWithTimeout(), also return exit code of command
+- IndexedDocument() accepts a callable for conversion to text
@@ -368,5 +368,21 @@ Index users with at least read access on the document
- add indexing of folders
+
+ 2021-05-10
+ 08:55:43
+
+ 1.1.17
+ 1.1.17
+
+
+ stable
+ stable
+
+ GPL License
+
+- close pipes in execWithTimeout(), also return exit code of command
+
+
diff --git a/SeedDMS_SQLiteFTS/package.xml b/SeedDMS_SQLiteFTS/package.xml
index 21b220640..452e8f74a 100644
--- a/SeedDMS_SQLiteFTS/package.xml
+++ b/SeedDMS_SQLiteFTS/package.xml
@@ -11,7 +11,7 @@
uwe@steinmann.cx
yes
- 2022-12-09
+ 2023-01-03
08:57:44
1.0.18
@@ -25,6 +25,7 @@
- add optional parameter $order to SeedDMS_SQLiteFTS_Indexer::find()
- add optional parameters $query and $col to SeedDMS_SQLiteFTS_Indexer::terms()
+- IndexedDocument() accepts a callable for conversion to text
From 98e7c58b74f7501713b0f34fefbac563b6908739 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 3 Jan 2023 14:05:32 +0100
Subject: [PATCH 167/247] fulltext service can use new text previewer to create
a cached txt file of a document
---
inc/inc.ClassFulltextService.php | 71 +++++++++++++++++++++++++++++++-
1 file changed, 70 insertions(+), 1 deletion(-)
diff --git a/inc/inc.ClassFulltextService.php b/inc/inc.ClassFulltextService.php
index 33cc46ae7..142943183 100644
--- a/inc/inc.ClassFulltextService.php
+++ b/inc/inc.ClassFulltextService.php
@@ -54,6 +54,7 @@ class SeedDMS_FulltextService {
$this->services = array();
$this->converters = array();
$this->conversionmgr = null;
+ $this->previewer = null;
$this->logger = null;
$this->maxsize = 0;
$this->index = null;
@@ -93,6 +94,73 @@ class SeedDMS_FulltextService {
$this->cmdtimeout = $timeout;
}
+ public function setPreviewer($previewer) {
+ $this->previewer = $previewer;
+ }
+
+ /**
+ * Returns callback function to convert a document into plain text
+ *
+ * This variant just uses the conversion manager and does not
+ * cache the converted document
+ */
+ public function getConversionCallback() { /* {{{ */
+ $conversionmgr = $this->conversionmgr;
+ return function($object) use ($conversionmgr) {
+ $result = ['content'=>false, 'cmd'=>'', 'errormsg'=>''];
+ if(!$conversionmgr)
+ return $result;
+ if($object->isType('document')) {
+ $dms = $object->getDMS();
+ $version = $object->getLatestContent();
+ $mimetype = $version->getMimeType();
+ $path = $dms->contentDir . $version->getPath();
+ if(file_exists($path)) {
+ if($service = $conversionmgr->getService($mimetype, 'text/plain')) {
+ $content = $conversionmgr->convert($path, $mimetype, 'text/plain');
+ if($content) {
+ $result['content'] = $content;
+ } elseif($content === false) {
+ $result['errormsg'] = 'Conversion failed';
+ }
+ $result['cmd'] = get_class($service);
+ } else {
+ $result['cmd'] = 'No service to convert '.$mimetype.' to text/plain';
+ }
+ }
+ }
+ return $result;
+ };
+ } /* }}} */
+
+ /**
+ * Returns callback function to convert a document into plain text
+ *
+ * This variant just uses the text previewer which
+ * caches the converted document
+ */
+ public function getConversionWithPreviewCallback() { /* {{{ */
+ $previewer = $this->previewer;
+ return function($object) use ($previewer) {
+ $result = ['content'=>false, 'cmd'=>'', 'errormsg'=>''];
+ if($object->isType('document')) {
+ $dms = $object->getDMS();
+ $version = $object->getLatestContent();
+ if($previewer->createPreview($version)) {
+ if($previewer->hasPreview($version)) {
+ $filename = $previewer->getFileName($version).'.txt';
+ $result['content'] = file_get_contents($filename);
+ $result['cmd'] = 'previewer '.$previewer->getFileSize($version);
+ }
+ } else {
+ $result['cmd'] = 'previewer';
+ $result['errormsg'] = 'Creating preview failed';
+ }
+ }
+ return $result;
+ };
+ } /* }}} */
+
/**
* Return an indexable document from the given document or folder
*
@@ -108,7 +176,8 @@ class SeedDMS_FulltextService {
$nocontent = $object->getLatestContent()->getFileSize() > $this->maxsize && $this->maxsize && !$forceupdate;
else
$nocontent = true;
- return new $this->services[0]['IndexedDocument']($object->getDMS(), $object, $this->conversionmgr ? $this->conversionmgr : $this->converters, $nocontent, $this->cmdtimeout);
+ $convcallback = $this->getConversionWithPreviewCallback();
+ return new $this->services[0]['IndexedDocument']($object->getDMS(), $object, $convcallback /*$this->conversionmgr ? $this->conversionmgr : $this->converters*/, $nocontent, $this->cmdtimeout);
}
/**
From 29310e7c431090aae68ed78050d76fcf49a3e4f4 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 3 Jan 2023 14:06:24 +0100
Subject: [PATCH 168/247] pass text previewer to fulltext service
---
inc/inc.FulltextInit.php | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/inc/inc.FulltextInit.php b/inc/inc.FulltextInit.php
index ef7954154..2368e5477 100644
--- a/inc/inc.FulltextInit.php
+++ b/inc/inc.FulltextInit.php
@@ -45,5 +45,10 @@ if($settings->_enableFullSearch) {
$fulltextservice->setConversionMgr($conversionmgr);
$fulltextservice->setMaxSize($settings->_maxSizeForFullText);
$fulltextservice->setCmdTimeout($settings->_cmdTimeout);
+ require_once("SeedDMS/Preview.php");
+ $txtpreviewer = new SeedDMS_Preview_TxtPreviewer($settings->_cacheDir, $settings->_cmdTimeout, $settings->_enableXsendfile);
+ if($conversionmgr)
+ $txtpreviewer->setConversionMgr($conversionmgr);
+ $fulltextservice->setPreviewer($txtpreviewer);
}
From d8e9cb570781a47b499d3038784652b94d18d819 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 3 Jan 2023 14:07:05 +0100
Subject: [PATCH 169/247] indexdocument returns propper error msg
---
op/op.Ajax.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/op/op.Ajax.php b/op/op.Ajax.php
index 74099d4db..36c47298c 100644
--- a/op/op.Ajax.php
+++ b/op/op.Ajax.php
@@ -999,9 +999,9 @@ switch($command) {
$ires = $index->addDocument($idoc);
header('Content-Type: application/json');
if(false === $ires) {
- echo json_encode(array('success'=>false, 'message'=>getMLText('error_document_indexed'), 'data'=>$prefix.$object->getID(), 'mimetype'=>$idoc->getMimeType(), 'cmd'=>$idoc->getCmd()));
+ echo json_encode(array('success'=>false, 'message'=>getMLText('error_document_indexed', ['name'=>$object->getName()]), 'data'=>$prefix.$object->getID(), 'mimetype'=>$idoc->getMimeType(), 'cmd'=>$idoc->getCmd()));
} else {
- echo json_encode(array('success'=>true, 'message'=>getMLText('splash_document_indexed'), 'data'=>$prefix.$object->getID(), 'cmd'=>$idoc->getCmd()));
+ echo json_encode(array('success'=>true, 'message'=>getMLText('splash_document_indexed', ['name'=>$object->getName()]), 'data'=>$prefix.$object->getID(), 'cmd'=>$idoc->getCmd()));
}
} else {
header('Content-Type: application/json');
From e54874c3ff388fa211e614a1fad987acff909edc Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 3 Jan 2023 14:07:38 +0100
Subject: [PATCH 170/247] some more documentation
---
inc/inc.ClassConversionMgr.php | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/inc/inc.ClassConversionMgr.php b/inc/inc.ClassConversionMgr.php
index 278d2e510..8e98a44df 100644
--- a/inc/inc.ClassConversionMgr.php
+++ b/inc/inc.ClassConversionMgr.php
@@ -72,18 +72,25 @@ class SeedDMS_ConversionMgr {
* @param string $file name of file to convert
* @param string $from mimetype of input file
* @param string $to mimetype of output file
+ * @param string $target name of target file. If none is given the
+ * content of the converted document will be returned.
+ * @param array $params additional parameter needed for the conversion,
+ * e.g. the width of an image
*
* @return boolean true on success, other false
*/
- public function convert($file, $from, $to, $target=null, $params=array()) {
+ public function convert($file, $from, $to, $target=null, $params=array()) { /* {{{ */
if(isset($this->services[$from][$to])) {
$services = $this->services[$from][$to];
for(end($services); key($services)!==null; prev($services)) {
$service = current($services);
$text = $service->convert($file, $target, $params);
- if($text !== false)
+ if($text === false)
+ return false;
+ if($text)
return $text;
}
}
- }
+ return true;
+ } /* }}} */
}
From 763420843255cde8efa1258de7e45717eaa5dac7 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 3 Jan 2023 14:09:48 +0100
Subject: [PATCH 171/247] script for deleting a docuemnt
---
utils/delete.php | 179 +++++++++++++++++++++++++++++++++++++++++++
utils/seeddms-delete | 9 +++
2 files changed, 188 insertions(+)
create mode 100644 utils/delete.php
create mode 100755 utils/seeddms-delete
diff --git a/utils/delete.php b/utils/delete.php
new file mode 100644
index 000000000..ec7282a38
--- /dev/null
+++ b/utils/delete.php
@@ -0,0 +1,179 @@
+] [-h] [-v] -f -e -d ".PHP_EOL;
+ echo PHP_EOL;
+ echo "Description:".PHP_EOL;
+ echo " This program deletes a folder or document.".PHP_EOL;
+ echo PHP_EOL;
+ echo "Options:".PHP_EOL;
+ echo " -h, --help: print usage information and exit.".PHP_EOL;
+ echo " -v, --version: print version and exit.".PHP_EOL;
+ echo " --config: set alternative config file.".PHP_EOL;
+ echo " -f : id of folder to be deleted".PHP_EOL;
+ echo " -e : id of folder to be emptied".PHP_EOL;
+ echo " -d : id of document to be deleted".PHP_EOL;
+ echo " -u : login name of user".PHP_EOL;
+ echo PHP_EOL;
+ echo "If the user is not given the user with id 1 will be used.".PHP_EOL;
+ echo "The options -d, -e and -f can be passed multiple times or the option value".PHP_EOL;
+ echo "can be a comma separated list of ids.".PHP_EOL;
+} /* }}} */
+
+$version = "0.0.1";
+$shortoptions = "e:f:d:u:hv";
+$longoptions = array('help', 'version', 'config:');
+if(false === ($options = getopt($shortoptions, $longoptions))) {
+ usage();
+ exit(0);
+}
+
+/* Print help and exit */
+if(isset($options['h']) || isset($options['help'])) {
+ usage();
+ exit(0);
+}
+
+/* Print version and exit */
+if(isset($options['v']) || isset($options['verѕion'])) {
+ echo $version.PHP_EOL;
+ exit(0);
+}
+
+/* Set alternative config file */
+if(isset($options['config'])) {
+ define('SEEDDMS_CONFIG_FILE', $options['config']);
+} elseif(isset($_SERVER['SEEDDMS_CONFIG_FILE'])) {
+ define('SEEDDMS_CONFIG_FILE', $_SERVER['SEEDDMS_CONFIG_FILE']);
+}
+
+/* Set folders to be deleted */
+$folderids = array();
+if(isset($options['f'])) {
+ if(is_string($options['f']))
+ $folderids = explode(',', $options['f']);
+ else
+ $folderids = $options['f'];
+}
+
+/* Set folders to be emptied */
+$emptyids = array();
+if(isset($options['e'])) {
+ if(is_string($options['e']))
+ $emptyids = explode(',', $options['e']);
+ else
+ $emptyids = $options['e'];
+}
+
+/* Set documents to be deleted */
+$documentids = array();
+if(isset($options['d'])) {
+ if(is_string($options['d']))
+ $documentids = explode(',', $options['d']);
+ else
+ $documentids = $options['d'];
+}
+
+if(!$documentids && !$folderids && !$emptyids) {
+ echo "Neither folder ids nor document ids were given".PHP_EOL;
+ usage();
+ exit(1);
+}
+
+$username = '';
+if(isset($options['u'])) {
+ $username = $options['u'];
+}
+
+include($myincpath."/inc/inc.Settings.php");
+include($myincpath."/inc/inc.Init.php");
+include($myincpath."/inc/inc.Extension.php");
+include($myincpath."/inc/inc.DBInit.php");
+include($myincpath."/inc/inc.ClassNotificationService.php");
+include($myincpath."/inc/inc.Notification.php");
+include($myincpath."/inc/inc.ClassController.php");
+
+/* Create a global user object {{{ */
+if($username) {
+ if(!($user = $dms->getUserByLogin($username))) {
+ echo "No such user '".$username."'.";
+ exit;
+ }
+} else
+ $user = $dms->getUser(1);
+
+$dms->setUser($user);
+/* }}} */
+
+foreach($folderids as $folderid) {
+ $folder = $dms->getFolder($folderid);
+
+ if (!is_object($folder)) {
+ echo "Could not find folder with id ".$folderid.PHP_EOL;
+ } else {
+
+ if ($folder->getAccessMode($user) < M_READWRITE) {
+ echo "Not sufficient access rights on folder with id ".$folderid.PHP_EOL;
+ } else {
+ $controller = Controller::factory('RemoveFolder', array('dms'=>$dms, 'user'=>$user));
+ $controller->setParam('folder', $folder);
+ $controller->setParam('fulltextservice', $fulltextservice);
+ if(!$document = $controller->run()) {
+ echo "Could not remove folder with id ".$folderid.PHP_EOL;
+ } else {
+ echo "Folder with id ".$folderid." removed.".PHP_EOL;
+ }
+ }
+ }
+}
+
+foreach($emptyids as $folderid) {
+ $folder = $dms->getFolder($folderid);
+
+ if (!is_object($folder)) {
+ echo "Could not find folder with id ".$folderid.PHP_EOL;
+ }
+
+ if ($folder->getAccessMode($user) < M_READWRITE) {
+ echo "Not sufficient access rights on folder with id ".$folderid.PHP_EOL;
+ }
+
+ $controller = Controller::factory('EmptyFolder', array('dms'=>$dms, 'user'=>$user));
+ $controller->setParam('folder', $folder);
+ $controller->setParam('fulltextservice', $fulltextservice);
+ if(!$document = $controller->run()) {
+ echo "Could not empty folder with id ".$folderid.PHP_EOL;
+ } else {
+ echo "Folder with id ".$folderid." emptied.".PHP_EOL;
+ }
+}
+
+foreach($documentids as $documentid) {
+ $document = $dms->getDocument($documentid);
+
+ if (!is_object($document)) {
+ echo "Could not find specified document with id ".$documentid.PHP_EOL;
+ }
+
+ if ($document->getAccessMode($user) < M_READWRITE) {
+ echo "Not sufficient access rights on document with id ".$documentid.PHP_EOL;
+ }
+
+ $controller = Controller::factory('RemoveDocument', array('dms'=>$dms, 'user'=>$user));
+ $controller->setParam('document', $document);
+ $controller->setParam('fulltextservice', $fulltextservice);
+ if(!$document = $controller->run()) {
+ echo "Could not remove document with id ".$documentid.PHP_EOL;
+ } else {
+ echo "Document with id ".$documentid." removed.".PHP_EOL;
+ }
+}
+
diff --git a/utils/seeddms-delete b/utils/seeddms-delete
new file mode 100755
index 000000000..8e1c857fd
--- /dev/null
+++ b/utils/seeddms-delete
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+if [ -z "${SEEDDMS_HOME}" ]; then
+ parentdir=$(dirname "$0")
+ export SEEDDMS_HOME=$(dirname "$parentdir")
+fi
+
+exec php -f "${SEEDDMS_HOME}/utils/delete.php" -- "${@}"
+
From 3633beb98dc9f53d4256e4b86be121f7283a22b9 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 3 Jan 2023 14:13:06 +0100
Subject: [PATCH 172/247] script for informing users about expired documents
---
utils/expireddocs.php | 304 ++++++++++++++++++++++++++++++++++++++
utils/seeddms-expireddocs | 8 +
2 files changed, 312 insertions(+)
create mode 100644 utils/expireddocs.php
create mode 100755 utils/seeddms-expireddocs
diff --git a/utils/expireddocs.php b/utils/expireddocs.php
new file mode 100644
index 000000000..4c5dc2f3c
--- /dev/null
+++ b/utils/expireddocs.php
@@ -0,0 +1,304 @@
+] [-u ] [-h] [-v] [-t] [-q] [-o] [-f ] [-u ] [-w] [-b ] [-c] -d -D ".PHP_EOL;
+ echo PHP_EOL;
+ echo "Description:".PHP_EOL;
+ echo " Check for files which will expire in the next days and inform the".PHP_EOL;
+ echo " the owner and all users watching the document.".PHP_EOL;
+ echo PHP_EOL;
+ echo "Options:".PHP_EOL;
+ echo " -h, --help: print usage information and exit.".PHP_EOL;
+ echo " -v, --version: print version and exit.".PHP_EOL;
+ echo " --config=: set alternative config file.".PHP_EOL;
+ echo " -u : login name of user".PHP_EOL;
+ echo " -w: send mail also to all users watching the document".PHP_EOL;
+ echo " -c: list also categories for each document".PHP_EOL;
+ echo " -f : set From field in notification mail".PHP_EOL;
+ echo " -b : set base for links in html email. The final link will be".PHP_EOL;
+ echo " out/out.ViewDocument.php. The default is".PHP_EOL;
+ echo " http://localhost".PHP_EOL;
+ echo " -d : check till n days in the future (default 14). Days always".PHP_EOL.
+ " start at 00:00:00 and end at 23:59:59. A value of '1' means today.".PHP_EOL;
+ " '-d 2' will search for documents expiring today or tomorrow.".PHP_EOL;
+ echo " -D : start checking in n days in the future (default 0). This value".PHP_EOL.
+ " must be less then -d. A value of 0 means to start checking today.".PHP_EOL.
+ " Any positive number will start checking in n days.".PHP_EOL.
+ " A negative number will look backwards in time.".PHP_EOL.
+ " '-d 10 -D 5' will search for documents expiring in 5 to 10 days.".PHP_EOL.
+ " '-d 10 -D -5' will search for documents which have expired in the last 5 days".PHP_EOL.
+ " or will expire in the next 10 days.".PHP_EOL;
+ echo " -o: list obsolete documents (default: do not list)".PHP_EOL;
+ echo " -t: run in test mode (will not send any mails)".PHP_EOL;
+ echo " -q: be quite (just output error messages)".PHP_EOL;
+} /* }}} */
+
+$version = "0.0.2";
+$tableformat = "%-60s %-14s";
+$tableformathtml = "%s %s ";
+$baseurl = "http://localhost/";
+$mailfrom = "uwe@steinman.cx";
+
+$shortoptions = "u:d:D:f:b:wtqhvo";
+$longoptions = array('help', 'version', 'config:');
+if(false === ($options = getopt($shortoptions, $longoptions))) {
+ usage();
+ exit(0);
+}
+
+/* Print help and exit */
+if(isset($options['h']) || isset($options['help'])) {
+ usage();
+ exit(0);
+}
+
+/* Print version and exit */
+if(isset($options['v']) || isset($options['verѕion'])) {
+ echo $version.PHP_EOL;
+ exit(0);
+}
+
+/* Set alternative config file */
+if(isset($options['config'])) {
+ define('SEEDDMS_CONFIG_FILE', $options['config']);
+} elseif(isset($_SERVER['SEEDDMS_CONFIG_FILE'])) {
+ define('SEEDDMS_CONFIG_FILE', $_SERVER['SEEDDMS_CONFIG_FILE']);
+}
+
+include($myincpath."/inc/inc.Settings.php");
+include($myincpath."/inc/inc.Utils.php");
+include($myincpath."/inc/inc.Init.php");
+include($myincpath."/inc/inc.Language.php");
+include($myincpath."/inc/inc.Extension.php");
+include($myincpath."/inc/inc.DBInit.php");
+
+$LANG['de_DE']['daylyDigestMail'] = 'Tägliche Benachrichtigungsmail';
+$LANG['en_GB']['daylyDigestMail'] = 'Dayly digest mail';
+$LANG['de_DE']['docsExpiringInNDays'] = 'Dokumente, die in den nächsten [days] Tagen ablaufen';
+$LANG['en_GB']['docsExpiringInNDays'] = 'Documents expiring in the next [days] days';
+$LANG['de_DE']['docsExpiringBetween'] = 'Dokumente, die zwischen dem [start] und [end] ablaufen';
+$LANG['en_GB']['docsExpiringBetween'] = 'Documents which expire between [start] and [end]';
+
+require_once('Mail.php');
+require_once('Mail/mime.php');
+
+$usernames = array();
+if(isset($options['u'])) {
+ $usernames = explode(',', $options['u']);
+}
+
+$informwatcher = false;
+if(isset($options['w'])) {
+ $informwatcher = true;
+}
+
+$showcats = false;
+if(isset($options['c'])) {
+ $showcats = true;
+ $tableformathtml = "%s %s %s ";
+}
+
+$days = 14;
+if(isset($options['d'])) {
+ $days = (int) $options['d'];
+}
+$enddays = 0;
+if(isset($options['D'])) {
+ $enddays = (int) $options['D'];
+}
+
+if($enddays >= $days) {
+ echo "Value of -D must be less then value of -d".PHP_EOL;
+ exit(1);
+}
+
+if(isset($options['f'])) {
+ $mailfrom = trim($options['f']);
+}
+
+if(isset($options['b'])) {
+ $baseurl = trim($options['b']);
+}
+
+$showobsolete = false;
+if(isset($options['o'])) {
+ $showobsolete = true;
+}
+
+$dryrun = false;
+if(isset($options['t'])) {
+ $dryrun = true;
+ echo "Running in test mode will not send any mail.".PHP_EOL;
+}
+$quite = false;
+if(isset($options['q'])) {
+ $quite = true;
+}
+
+$startts = strtotime("midnight", time());
+if(!$quite)
+ echo "Checking for documents expiring between ".getLongReadableDate($startts+$enddays*86400)." and ".getLongReadableDate($startts+$days*86400-1).PHP_EOL;
+
+$users = array();
+if(!$usernames) {
+ $users = $dms->getAllUsers();
+} else {
+ /* Create a global user object */
+ foreach($usernames as $username) {
+ if(!$user = $dms->getUserByLogin($username)) {
+ echo "No such user with name '".$username."'".PHP_EOL;
+ exit(1);
+ }
+ $users[] = $user;
+ }
+}
+
+if (!$db->createTemporaryTable("ttstatid") || !$db->createTemporaryTable("ttcontentid")) {
+ echo getMLText("internal_error_exit").PHP_EOL;
+ exit;
+}
+
+foreach($users as $user) {
+ $groups = $user->getGroups();
+ $groupids = array();
+ foreach($groups as $group)
+ $groupids[] = $group->getID();
+ $sendmail = false; /* Set to true if there is something to report */
+ $body = "";
+ $bodyhtml = "".PHP_EOL."".PHP_EOL." ".PHP_EOL."SeedDMS: ".getMLText('daylyDigestMail', array(), "", $user->getLanguage())." ".PHP_EOL." _httpRoot."\" />".PHP_EOL."".PHP_EOL."".PHP_EOL."";
+
+ /*
+ $queryStr = "SELECT `tblDocuments`.* FROM `tblDocuments`".
+ "WHERE `tblDocuments`.`owner` = '".$user->getID()."' ".
+ "AND `tblDocuments`.`expires` < '".($startts + $days*86400)."' ".
+ "AND `tblDocuments`.`expires` > '".($startts)."'";
+ */
+
+ $queryStr = "SELECT DISTINCT a.*, `tblDocumentStatusLog`.* FROM `tblDocuments` a ".
+ "LEFT JOIN `ttcontentid` ON `ttcontentid`.`document` = `a`.`id` ".
+ "LEFT JOIN `tblDocumentContent` ON `a`.`id` = `tblDocumentContent`.`document` AND `tblDocumentContent`.`version` = `ttcontentid`.`maxVersion` ".
+ "LEFT JOIN `tblNotify` b ON a.`id`=b.`target` ".
+ "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` AND `tblDocumentContent`.`version` = `tblDocumentStatus`.`version` ".
+ "LEFT JOIN `ttstatid` ON `ttstatid`.`statusID` = `tblDocumentStatus`.`statusID` ".
+ "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusLogID` = `ttstatid`.`maxLogID` ".
+ "WHERE (a.`owner` = '".$user->getID()."' ".
+ ($informwatcher ? " OR ((b.`userID` = '".$user->getID()."' ".
+ ($groupids ? "or b.`groupID` in (".implode(',', $groupids).")" : "").") ".
+ "AND b.`targetType` = 2) " : "").
+ ") AND a.`expires` < '".($startts + $days*86400)."' ".
+ "AND a.`expires` > '".($startts + $enddays*86400)."' ";
+ if(!$showobsolete)
+ $queryStr .= "AND `tblDocumentStatusLog`.`status` != -2";
+
+ $resArr = $db->getResultArray($queryStr);
+ if (is_bool($resArr) && !$resArr) {
+ echo getMLText("internal_error_exit").PHP_EOL;
+ exit;
+ }
+
+ $body .= "==== ";
+ $body .= getMLText('docsExpiringBetween', array('start'=>getReadableDate($startts + ($enddays)*86400), 'end'=>getReadableDate($startts + ($days)*86400)), "", $user->getLanguage()).PHP_EOL;
+ $body .= "==== ";
+ $body .= $user->getFullname();
+ $body .= PHP_EOL.PHP_EOL;
+ $bodyhtml .= "";
+ $bodyhtml .= getMLText('docsExpiringBetween', array('start'=>getReadableDate($startts + ($enddays)*86400), 'end'=>getReadableDate($startts + ($days)*86400)), "", $user->getLanguage()).PHP_EOL;
+ $bodyhtml .= " ".PHP_EOL;
+ $bodyhtml .= "";
+ $bodyhtml .= $user->getFullname();
+ $bodyhtml .= " ".PHP_EOL;
+ if (count($resArr)>0) {
+ $sendmail = true;
+
+ $body .= sprintf($tableformat.PHP_EOL, getMLText("name", array(), "", $user->getLanguage()), getMLText("expires", array(), "", $user->getLanguage()));
+ $body .= "---------------------------------------------------------------------------------".PHP_EOL;
+ $bodyhtml .= "".PHP_EOL;
+ if($showcats)
+ $bodyhtml .= sprintf($tableformathtml.PHP_EOL, getMLText("name", array(), "", $user->getLanguage()), getMLText("categories", array(), "", $user->getLanguage()), getMLText("expires", array(), "", $user->getLanguage()));
+ else
+ $bodyhtml .= sprintf($tableformathtml.PHP_EOL, getMLText("name", array(), "", $user->getLanguage()), getMLText("expires", array(), "", $user->getLanguage()));
+
+ foreach ($resArr as $res) {
+ if($doc = $dms->getDocument((int) $res['id'])) {
+ $catnames = array();
+ if($cats = $doc->getCategories()) {
+ foreach($cats as $cat)
+ $catnames[] = $cat->getName();
+ }
+ }
+
+ $body .= sprintf($tableformat.PHP_EOL, $res["name"], (!$res["expires"] ? "-":getReadableDate($res["expires"])));
+ if($showcats)
+ $body .= getMLText("categories", array(), "", $user->getLanguage()).": ".implode(', ', $catnames).PHP_EOL;
+ if($showcats)
+ $bodyhtml .= sprintf($tableformathtml.PHP_EOL, ''.htmlspecialchars($res["name"]).' ', implode(', ', $catnames), (!$res["expires"] ? "-":getReadableDate($res["expires"])));
+ else
+ $bodyhtml .= sprintf($tableformathtml.PHP_EOL, ''.htmlspecialchars($res["name"]).' ', (!$res["expires"] ? "-":getReadableDate($res["expires"])));
+ }
+ $bodyhtml .= "
".PHP_EOL;
+
+ } else {
+ $body .= getMLText("no_docs_to_look_at", array(), "", $user->getLanguage()).PHP_EOL.PHP_EOL;
+ $bodyhtml .= "".getMLText("no_docs_to_look_at", array(), "", $user->getLanguage())."
".PHP_EOL.PHP_EOL;
+ }
+
+ if($sendmail) {
+ if($user->getEmail()) {
+ if(!$quite) {
+ echo "Send mail to ".$user->getLogin()." <".$user->getEmail().">".PHP_EOL;
+ echo $body;
+ echo "----------------------------".PHP_EOL.PHP_EOL.PHP_EOL;
+ echo $bodyhtml;
+ }
+
+ if(!$dryrun) {
+ $mime = new Mail_mime(array('eol' => PHP_EOL));
+
+ $mime->setTXTBody($body);
+ $mime->setHTMLBody($bodyhtml);
+
+ $body = $mime->get(array(
+ 'text_encoding'=>'8bit',
+ 'html_encoding'=>'8bit',
+ 'head_charset'=>'utf-8',
+ 'text_charset'=>'utf-8',
+ 'html_charset'=>'utf-8'
+ ));
+ $hdrs = $mime->headers(array('From' => $mailfrom, 'Subject' => 'SeedDMS: '.getMLText('daylyDigestMail', array(), "", $user->getLanguage()), 'Content-Type' => 'text/plain; charset=UTF-8'));
+
+ $mail_params = array();
+ if($settings->_smtpServer) {
+ $mail_params['host'] = $settings->_smtpServer;
+ if($settings->smtpPort) {
+ $mail_params['port'] = $settings->_smtpPort;
+ }
+ if($settings->smtpUser) {
+ $mail_params['auth'] = true;
+ $mail_params['username'] = $settings->_smtpUser;
+ $mail_params['password'] = $settings->_smtpPassword;
+ }
+ $mail = Mail::factory('smtp', $mail_params);
+ } else {
+ $mail = Mail::factory('mail');
+ }
+ $mail->send($user->getEmail(), $hdrs, $body);
+ }
+ } else {
+ if(!$quite) {
+ echo "User ".$user->getLogin()." has no email".PHP_EOL;
+ }
+ }
+ } else {
+ if(!$quite) {
+ echo "No notification for user ".$user->getLogin()." needed".PHP_EOL;
+ }
+ }
+}
diff --git a/utils/seeddms-expireddocs b/utils/seeddms-expireddocs
new file mode 100755
index 000000000..bf95f3e40
--- /dev/null
+++ b/utils/seeddms-expireddocs
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -z "${SEEDDMS_HOME}" ]; then
+ parentdir=$(dirname "$0")
+ export SEEDDMS_HOME=$(dirname "$parentdir")
+fi
+
+php -f ${SEEDDMS_HOME}/utils/expireddocs.php -- "${@}"
From a8ccf1669bc7bff5dfab86ab7006fc2617edae5e Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 3 Jan 2023 14:16:43 +0100
Subject: [PATCH 173/247] script for uploading files from local disc
---
utils/importfs.php | 215 +++++++++++++++++++++++++++++++++++++++++
utils/seeddms-importfs | 7 ++
2 files changed, 222 insertions(+)
create mode 100644 utils/importfs.php
create mode 100755 utils/seeddms-importfs
diff --git a/utils/importfs.php b/utils/importfs.php
new file mode 100644
index 000000000..16323a2f5
--- /dev/null
+++ b/utils/importfs.php
@@ -0,0 +1,215 @@
+] [-h] [-v] -F -d ".PHP_EOL;
+ echo PHP_EOL;
+ echo "Description:".PHP_EOL;
+ echo " This program uploads a directory recursively into a folder of SeedDMS.".PHP_EOL;
+ echo PHP_EOL;
+ echo "Options:".PHP_EOL;
+ echo " -h, --help: print usage information and exit.".PHP_EOL;
+ echo " -v, --version: print version and exit.".PHP_EOL;
+ echo " --config: set alternative config file.".PHP_EOL;
+ echo " --user: use this user for accessing seeddms.".PHP_EOL;
+ echo " --exclude: exlude files/directories by name (defaults to .svn, .gitignore).".PHP_EOL;
+ echo " This must be just the file or directory without the path.".PHP_EOL;
+ echo " --filemtime: take over modification time from file.".PHP_EOL;
+ echo " --foldermtime: take over modification time from folder.".PHP_EOL;
+ echo " --basefolder: creates the base folder".PHP_EOL;
+ echo " -F : id of folder the file is uploaded to".PHP_EOL;
+ echo " -d : upload this directory".PHP_EOL;
+ echo " -e : encoding used by filesystem (defaults to iso-8859-1)".PHP_EOL;
+} /* }}} */
+
+$version = "0.0.1";
+$shortoptions = "d:F:e:hv";
+$longoptions = array('help', 'version', 'user:', 'basefolder', 'filemtime', 'foldermtime', 'exclude:', 'config:');
+if(false === ($options = getopt($shortoptions, $longoptions))) {
+ usage();
+ exit(0);
+}
+
+/* Print help and exit */
+if(!$options || isset($options['h']) || isset($options['help'])) {
+ usage();
+ exit(0);
+}
+
+/* Print version and exit */
+if(isset($options['v']) || isset($options['verѕion'])) {
+ echo $version.PHP_EOL;
+ exit(0);
+}
+
+/* Set encoding of names in filesystem */
+$fsencoding = 'iso-8859-1';
+if(isset($options['e'])) {
+ $fsencoding = $options['e'];
+}
+
+/* Set alternative config file */
+if(isset($options['config'])) {
+ define('SEEDDMS_CONFIG_FILE', $options['config']);
+} elseif(isset($_SERVER['SEEDDMS_CONFIG_FILE'])) {
+ define('SEEDDMS_CONFIG_FILE', $_SERVER['SEEDDMS_CONFIG_FILE']);
+}
+
+$excludefiles = array('.', '..');
+if(isset($options['exclude'])) {
+ if(is_array($options['exclude']))
+ $excludefiles = array_merge($excludefiles, $options['exclude']);
+ else
+ $excludefiles[] = $options['exclude'];
+} else {
+ $excludefiles[] = '.svn';
+ $excludefiles[] = '.gitignore';
+}
+
+if(isset($options['user'])) {
+ $userlogin = $options['user'];
+} else {
+ echo "Missing user".PHP_EOL;
+ usage();
+ exit(1);
+}
+
+/* check if base folder shall be created */
+$createbasefolder = false;
+if(isset($options['basefolder'])) {
+ $createbasefolder = true;
+}
+
+/* check if modification time shall be taken over */
+$filemtime = false;
+if(isset($options['filemtime'])) {
+ $filemtime = true;
+}
+$foldermtime = false;
+if(isset($options['foldermtime'])) {
+ $foldermtime = true;
+}
+
+if(isset($settings->_extraPath))
+ ini_set('include_path', $settings->_extraPath. PATH_SEPARATOR .ini_get('include_path'));
+
+if(isset($options['F'])) {
+ $folderid = (int) $options['F'];
+} else {
+ echo "Missing folder ID".PHP_EOL;
+ usage();
+ exit(1);
+}
+
+$dirname = '';
+if(isset($options['d'])) {
+ $dirname = $options['d'];
+} else {
+ echo "Missing import directory".PHP_EOL;
+ usage();
+ exit(1);
+}
+
+include($myincpath."/inc/inc.Settings.php");
+include($myincpath."/inc/inc.Utils.php");
+include($myincpath."/inc/inc.Init.php");
+include($myincpath."/inc/inc.Language.php");
+include($myincpath."/inc/inc.Extension.php");
+include($myincpath."/inc/inc.DBInit.php");
+include($myincpath."/inc/inc.ClassNotificationService.php");
+include($myincpath."/inc/inc.ClassEmailNotify.php");
+include($myincpath."/inc/inc.ClassController.php");
+
+echo $settings->_contentDir.$settings->_contentOffsetDir.PHP_EOL;
+
+/* Create a global user object */
+if(!($user = $dms->getUserByLogin($userlogin))) {
+ echo "User with login '".$userlogin."' does not exists.";
+ exit;
+}
+
+$folder = $dms->getFolder($folderid);
+if (!is_object($folder)) {
+ echo "Could not find specified folder".PHP_EOL;
+ exit(1);
+}
+
+if ($folder->getAccessMode($user) < M_READWRITE) {
+ echo "Not sufficient access rights".PHP_EOL;
+ exit(1);
+}
+
+function import_folder($dirname, $folder, $filemtime, $foldermtime) {
+ global $user, $excludefiles, $fsencoding;
+
+ $d = dir($dirname);
+ $sequence = 1;
+ while(false !== ($entry = $d->read())) {
+ $path = $dirname.'/'.$entry;
+ if(!in_array($entry, $excludefiles)) {
+ $name = iconv($fsencoding, 'utf-8', basename($path));
+ if(is_file($path)) {
+ $filetmp = $path;
+
+ $reviewers = array();
+ $approvers = array();
+ $comment = '';
+ $version_comment = '';
+ $reqversion = 1;
+ $expires = false;
+ $keywords = '';
+ $categories = array();
+
+ $finfo = finfo_open(FILEINFO_MIME_TYPE);
+ $mimetype = finfo_file($finfo, $path);
+ $lastDotIndex = strrpos($name, ".");
+ if (is_bool($lastDotIndex) && !$lastDotIndex) $filetype = ".";
+ else $filetype = substr($name, $lastDotIndex);
+
+ echo $mimetype." - ".$filetype." - ".$path.PHP_EOL;
+ $res = $folder->addDocument($name, $comment, $expires, $user, $keywords,
+ $categories, $filetmp, $name,
+ $filetype, $mimetype, $sequence, $reviewers,
+ $approvers, $reqversion, $version_comment);
+
+ if (is_bool($res) && !$res) {
+ echo "Could not add document to folder".PHP_EOL;
+ exit(1);
+ }
+ if($filemtime) {
+ $newdoc = $res[0];
+ $newdoc->setDate(filemtime($path));
+ $lc = $newdoc->getLatestContent();
+ $lc->setDate(filemtime($path));
+ }
+ set_time_limit(1200);
+ } elseif(is_dir($path)) {
+ $newfolder = $folder->addSubFolder($name, '', $user, $sequence);
+ if($foldermtime) {
+ $newfolder->setDate(filemtime($path));
+ }
+ import_folder($path, $newfolder, $filemtime, $foldermtime);
+ }
+ $sequence++;
+ }
+ }
+}
+
+if($createbasefolder) {
+ if($newfolder = $folder->addSubFolder(basename($dirname), '', $user, 1)) {
+ if($foldermtime) {
+ $newfolder->setDate(filemtime($dirname));
+ }
+ import_folder($dirname, $newfolder, $filemtime, $foldermtime);
+ }
+} else {
+ import_folder($dirname, $folder, $filemtime, $foldermtime);
+}
+
diff --git a/utils/seeddms-importfs b/utils/seeddms-importfs
new file mode 100755
index 000000000..82ce84188
--- /dev/null
+++ b/utils/seeddms-importfs
@@ -0,0 +1,7 @@
+#!/bin/sh
+if [ -z "${SEEDDMS_HOME}" ]; then
+ parentdir=$(dirname "$0")
+ export SEEDDMS_HOME=$(dirname "$parentdir")
+fi
+
+php -f ${SEEDDMS_HOME}/utils/importfs.php -- "$@"
From 51d8ebbf60f2e63b9437b067a0857fbf5545c49d Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 3 Jan 2023 16:58:40 +0100
Subject: [PATCH 174/247] improve html for listing errors
---
views/bootstrap/class.Indexer.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/views/bootstrap/class.Indexer.php b/views/bootstrap/class.Indexer.php
index 4ac0b3cf5..5549d0f44 100644
--- a/views/bootstrap/class.Indexer.php
+++ b/views/bootstrap/class.Indexer.php
@@ -165,7 +165,7 @@ function check_queue() {
else
$('#status_'+data.data).html('= getMLText('index_done').' ('.getMLText('index_no_content').')' ?>');
} else {
- $('#update_messages').append('Docid: ' + data.data + ' (' + data.mimetype + ')
' + '
Cmd: ' + data.cmd + '
' + data.message+'
');
+ $('#update_messages').append('Docid: ' + data.data + ' (' + data.mimetype + ') ' + 'Cmd: ' + data.cmd + ' ' + data.message+'
');
$('#status_'+data.data).html('= getMLText('index_error') ?>');
noty({
text: 'Docid: ' + data.data + ' (' + data.mimetype + ')
' + 'Cmd: ' + data.cmd + '
' + data.message,
From eb0be965ee5bafa556bb38c52992c80daa5792a8 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 3 Jan 2023 16:59:08 +0100
Subject: [PATCH 175/247] adjust label of checkbox to delete preview images and
text
---
views/bootstrap/class.ClearCache.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/views/bootstrap/class.ClearCache.php b/views/bootstrap/class.ClearCache.php
index 8eef31464..b9b447c50 100644
--- a/views/bootstrap/class.ClearCache.php
+++ b/views/bootstrap/class.ClearCache.php
@@ -48,7 +48,8 @@ class SeedDMS_View_ClearCache extends SeedDMS_Theme_Style {
contentContainerStart('warning');
?>
-
+
+
From d8ed7797c0de657b08582a8c253fa6020c912cef Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 3 Jan 2023 17:00:25 +0100
Subject: [PATCH 176/247] some new phrases
---
languages/ar_EG/lang.inc | 3 +++
languages/bg_BG/lang.inc | 3 +++
languages/ca_ES/lang.inc | 3 +++
languages/cs_CZ/lang.inc | 3 +++
languages/de_DE/lang.inc | 7 +++++--
languages/el_GR/lang.inc | 3 +++
languages/en_GB/lang.inc | 5 ++++-
languages/es_ES/lang.inc | 3 +++
languages/fr_FR/lang.inc | 3 +++
languages/hr_HR/lang.inc | 3 +++
languages/hu_HU/lang.inc | 7 +++++--
languages/id_ID/lang.inc | 3 +++
languages/it_IT/lang.inc | 3 +++
languages/ko_KR/lang.inc | 3 +++
languages/lo_LA/lang.inc | 3 +++
languages/nb_NO/lang.inc | 3 +++
languages/nl_NL/lang.inc | 3 +++
languages/pl_PL/lang.inc | 3 +++
languages/pt_BR/lang.inc | 3 +++
languages/ro_RO/lang.inc | 3 +++
languages/ru_RU/lang.inc | 3 +++
languages/sk_SK/lang.inc | 3 +++
languages/sv_SE/lang.inc | 3 +++
languages/tr_TR/lang.inc | 3 +++
languages/uk_UA/lang.inc | 3 +++
languages/zh_CN/lang.inc | 3 +++
languages/zh_TW/lang.inc | 3 +++
27 files changed, 86 insertions(+), 5 deletions(-)
diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc
index 90724c95d..cd2d4efa8 100644
--- a/languages/ar_EG/lang.inc
+++ b/languages/ar_EG/lang.inc
@@ -755,6 +755,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => 'فهرسة بلا محتوى',
'index_pending' => 'الفهرسة قيد الإنتظار',
+'index_processing' => '',
'index_waiting' => 'الفهرسة قيد الإنتظار',
'individuals' => 'افراد',
'individuals_in_groups' => 'أفراد في المجموعات',
@@ -1086,6 +1087,7 @@ URL: [url]',
'preview' => 'معاينة',
'preview_converters' => 'محول المعاينات',
'preview_images' => 'معاينة الصور',
+'preview_images_text' => '',
'preview_markdown' => 'معاينة التخفيضات',
'preview_pdf' => 'معاينة ملف pdf',
'preview_plain' => 'معاينة سطحية',
@@ -2048,6 +2050,7 @@ URL: [url]',
'update_approvers' => 'تحديثة قائمة الموافقون',
'update_document' => 'تحديث المستند',
'update_fulltext_index' => 'تحديث فهرس النص الكامل',
+'update_fulltext_messages' => '',
'update_info' => 'تحديث المعلومات',
'update_locked_msg' => 'هذا المستند محمي من التعديل.',
'update_recipients' => 'تطوير المستلم',
diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc
index 96b83df19..638bee68a 100644
--- a/languages/bg_BG/lang.inc
+++ b/languages/bg_BG/lang.inc
@@ -684,6 +684,7 @@ $text = array(
'index_folder_updated' => '',
'index_no_content' => '',
'index_pending' => '',
+'index_processing' => '',
'index_waiting' => '',
'individuals' => 'Личности',
'individuals_in_groups' => '',
@@ -985,6 +986,7 @@ $text = array(
'preview' => 'Преглед',
'preview_converters' => '',
'preview_images' => '',
+'preview_images_text' => '',
'preview_markdown' => '',
'preview_pdf' => '',
'preview_plain' => '',
@@ -1902,6 +1904,7 @@ $text = array(
'update_approvers' => 'Обнови списъка с утвърждаващи',
'update_document' => 'Обнови документ',
'update_fulltext_index' => 'Обнови пълнотекстовия индекс',
+'update_fulltext_messages' => '',
'update_info' => 'Обнови информацията',
'update_locked_msg' => 'Този документ е блокиран',
'update_recipients' => '',
diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc
index bf00e8f78..6dc899353 100644
--- a/languages/ca_ES/lang.inc
+++ b/languages/ca_ES/lang.inc
@@ -689,6 +689,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => '',
'index_pending' => '',
+'index_processing' => '',
'index_waiting' => '',
'individuals' => 'Individuals',
'individuals_in_groups' => '',
@@ -990,6 +991,7 @@ URL: [url]',
'preview' => 'Previsualitzar',
'preview_converters' => '',
'preview_images' => '',
+'preview_images_text' => '',
'preview_markdown' => '',
'preview_pdf' => '',
'preview_plain' => '',
@@ -1907,6 +1909,7 @@ URL: [url]',
'update_approvers' => 'Actualitzar llista d\'aprovadors',
'update_document' => 'Actualitzar',
'update_fulltext_index' => 'Update fulltext index',
+'update_fulltext_messages' => '',
'update_info' => 'Actualitzar informació',
'update_locked_msg' => 'Aquest document està bloquejat.',
'update_recipients' => '',
diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc
index 830a942d2..5e1c17a38 100644
--- a/languages/cs_CZ/lang.inc
+++ b/languages/cs_CZ/lang.inc
@@ -786,6 +786,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => 'Nenaindexoval se obsah',
'index_pending' => 'Probíhá indexování',
+'index_processing' => '',
'index_waiting' => 'Čekání',
'individuals' => 'Jednotlivci',
'individuals_in_groups' => 'Členové skupiny',
@@ -1121,6 +1122,7 @@ Pokud budete mít problém s přihlášením i po změně hesla, kontaktujte Adm
'preview' => 'Náhled',
'preview_converters' => 'Náhled převodu dokumentu',
'preview_images' => 'Náhled obrázků',
+'preview_images_text' => '',
'preview_markdown' => 'Náhled úpravy textu Markdown',
'preview_pdf' => 'Náhled jako PDF',
'preview_plain' => 'Náhled jako text',
@@ -2120,6 +2122,7 @@ URL: [url]',
'update_approvers' => 'Aktualizovat seznam schvalovatelů',
'update_document' => 'Aktualizovat',
'update_fulltext_index' => 'Aktualizovat fulltext index',
+'update_fulltext_messages' => '',
'update_info' => 'Aktualizovat informace',
'update_locked_msg' => 'Tento dokument je zamčený.',
'update_recipients' => 'Aktualizovat příjemce',
diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc
index 7528ab0d6..5a6724d31 100644
--- a/languages/de_DE/lang.inc
+++ b/languages/de_DE/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 (3150), dgrutsch (22)
+// Translators: Admin (3154), dgrutsch (22)
$text = array(
'2_factor_auth' => '2-Faktor Authentifizierung',
@@ -854,7 +854,7 @@ Old name: [old_name]
Benutzer: [username]
URL: [url]
',
'folder_renamed_email_subject' => '[sitename]: [name] - Ordner umbenannt',
-'folder_title' => 'SeedDMS - Ordner: [foldername]',
+'folder_title' => 'Ordner: [foldername]',
'foot_note' => '',
'force_update' => 'Aktualisieren',
'friday' => 'Freitag',
@@ -929,6 +929,7 @@ URL: [url]',
'index_folder_updated' => 'Ordner aktualisiert',
'index_no_content' => 'Inhalt nicht indiziert',
'index_pending' => 'Vorgemerkt',
+'index_processing' => 'Verarbeite ...',
'index_waiting' => 'Warte',
'individuals' => 'Einzelpersonen',
'individuals_in_groups' => 'Mitglieder einer Gruppe',
@@ -1313,6 +1314,7 @@ Sollen Sie danach immer noch Probleme bei der Anmeldung haben, dann kontaktieren
'preview' => 'Vorschau',
'preview_converters' => 'Vorschau Dokumentenumwandlung',
'preview_images' => 'Vorschaubilder',
+'preview_images_text' => 'Vorschaubilder und Textinhalt',
'preview_markdown' => 'Markdown',
'preview_pdf' => 'Vorschau als PDF',
'preview_plain' => 'Text',
@@ -2463,6 +2465,7 @@ URL: [url]',
'update_approvers' => 'Liste der Freigebenden aktualisieren',
'update_document' => 'Aktualisieren',
'update_fulltext_index' => 'Aktualisiere Volltext-Index',
+'update_fulltext_messages' => 'Nachrichten',
'update_info' => 'Informationen zur Aktualisierung',
'update_locked_msg' => 'Dieses Dokument wurde gesperrtDie Sperrung wurde von [username] eingerichtet. ',
'update_recipients' => 'Liste der Empfänger aktualisieren',
diff --git a/languages/el_GR/lang.inc b/languages/el_GR/lang.inc
index 1cf1edc89..6def8ae2b 100644
--- a/languages/el_GR/lang.inc
+++ b/languages/el_GR/lang.inc
@@ -684,6 +684,7 @@ $text = array(
'index_folder_updated' => '',
'index_no_content' => '',
'index_pending' => '',
+'index_processing' => '',
'index_waiting' => 'Αναμονή',
'individuals' => 'Άτομα',
'individuals_in_groups' => '',
@@ -996,6 +997,7 @@ URL: [url]',
'preview' => 'προεπισκόπηση',
'preview_converters' => '',
'preview_images' => '',
+'preview_images_text' => '',
'preview_markdown' => '',
'preview_pdf' => '',
'preview_plain' => '',
@@ -1913,6 +1915,7 @@ URL: [url]',
'update_approvers' => '',
'update_document' => 'Ενημέρωση εγγράφου',
'update_fulltext_index' => 'Ενημέρωση της Αρίθμησης Κειμένων',
+'update_fulltext_messages' => '',
'update_info' => '',
'update_locked_msg' => '',
'update_recipients' => '',
diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc
index 7dad80431..e9e6a6162 100644
--- a/languages/en_GB/lang.inc
+++ b/languages/en_GB/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 (2245), archonwang (3), dgrutsch (9), netixw (14)
+// Translators: Admin (2248), archonwang (3), dgrutsch (9), netixw (14)
$text = array(
'2_factor_auth' => '2-factor authentication',
@@ -930,6 +930,7 @@ URL: [url]
',
'index_folder_updated' => 'Folder updated',
'index_no_content' => 'Did not index content',
'index_pending' => 'Pending',
+'index_processing' => 'Processing ...',
'index_waiting' => 'Waiting',
'individuals' => 'Individuals',
'individuals_in_groups' => 'Members of a group',
@@ -1316,6 +1317,7 @@ If you still have problems to login, then please contact your administrator.',
'preview' => 'Preview',
'preview_converters' => 'Preview document conversion',
'preview_images' => 'Preview images',
+'preview_images_text' => 'Preview images and text content',
'preview_markdown' => 'Markdown',
'preview_pdf' => 'Preview as PDF',
'preview_plain' => 'Text',
@@ -2466,6 +2468,7 @@ URL: [url]',
'update_approvers' => 'Update List of Approvers',
'update_document' => 'Update document',
'update_fulltext_index' => 'Update fulltext index',
+'update_fulltext_messages' => 'Messages',
'update_info' => 'Update Information',
'update_locked_msg' => 'This document is locked.',
'update_recipients' => 'Update list of recipients',
diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc
index c445d883e..a982be52c 100644
--- a/languages/es_ES/lang.inc
+++ b/languages/es_ES/lang.inc
@@ -774,6 +774,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => '',
'index_pending' => '',
+'index_processing' => '',
'index_waiting' => 'Esperando',
'individuals' => 'Individuales',
'individuals_in_groups' => 'Miembros del grupo',
@@ -1113,6 +1114,7 @@ Si continua teniendo problemas de acceso, por favor contacte con el administrado
'preview' => 'anterior',
'preview_converters' => 'Vista previa del documento convertido',
'preview_images' => '',
+'preview_images_text' => '',
'preview_markdown' => '',
'preview_pdf' => '',
'preview_plain' => '',
@@ -2075,6 +2077,7 @@ URL: [url]',
'update_approvers' => 'Actualizar lista de aprobadores',
'update_document' => 'Actualizar documento',
'update_fulltext_index' => 'Actualizar índice de texto completo',
+'update_fulltext_messages' => '',
'update_info' => 'Actualizar información',
'update_locked_msg' => 'Este documento está bloqueado.',
'update_recipients' => 'Actualizaar lista de receptores',
diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc
index bdebee968..cac907550 100644
--- a/languages/fr_FR/lang.inc
+++ b/languages/fr_FR/lang.inc
@@ -916,6 +916,7 @@ URL : [url]',
'index_folder_updated' => 'Dossier mis à jour',
'index_no_content' => 'Contenu non indexé',
'index_pending' => 'En attente',
+'index_processing' => '',
'index_waiting' => 'Chargement…',
'individuals' => 'Individuels',
'individuals_in_groups' => 'Membres d’un groupe',
@@ -1301,6 +1302,7 @@ En cas de problème persistant, veuillez contacter votre administrateur.',
'preview' => 'Aperçu',
'preview_converters' => 'Conversion des documents pour prévisualisation',
'preview_images' => 'Miniatures',
+'preview_images_text' => '',
'preview_markdown' => 'Prévisualisation',
'preview_pdf' => 'Prévisualisation en PDF',
'preview_plain' => 'Texte',
@@ -2449,6 +2451,7 @@ URL : [url]',
'update_approvers' => 'Mettre à jour la liste des approbateurs',
'update_document' => 'Mettre à jour',
'update_fulltext_index' => 'Mettre à jour l\'index de recherche plein texte',
+'update_fulltext_messages' => '',
'update_info' => 'Informations de mise à jour',
'update_locked_msg' => 'Ce document est verrouillé.',
'update_recipients' => 'Mettre à jour la liste des destinataires',
diff --git a/languages/hr_HR/lang.inc b/languages/hr_HR/lang.inc
index b3507f1ba..c9fafeb28 100644
--- a/languages/hr_HR/lang.inc
+++ b/languages/hr_HR/lang.inc
@@ -767,6 +767,7 @@ Internet poveznica: [url]',
'index_folder_updated' => '',
'index_no_content' => '',
'index_pending' => '',
+'index_processing' => '',
'index_waiting' => '',
'individuals' => 'Pojedinci',
'individuals_in_groups' => '',
@@ -1105,6 +1106,7 @@ Ako i dalje imate problema s prijavom, molimo kontaktirajte Vašeg administrator
'preview' => 'Predpregled',
'preview_converters' => 'Pretpregled konverzije dokumenta',
'preview_images' => '',
+'preview_images_text' => '',
'preview_markdown' => 'Smanjenje',
'preview_pdf' => '',
'preview_plain' => 'Obični tekst',
@@ -2084,6 +2086,7 @@ Internet poveznica: [url]',
'update_approvers' => 'Ažuriraj popis validatora',
'update_document' => 'Ažuriraj dokument',
'update_fulltext_index' => 'Ažuriraj indeksiranje cijelog teksta',
+'update_fulltext_messages' => '',
'update_info' => 'Info ažuriranje',
'update_locked_msg' => 'Ovaj dokument je zaključan.',
'update_recipients' => 'Izmjena liste primatelja',
diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc
index f1e433b1a..d4f23f05b 100644
--- a/languages/hu_HU/lang.inc
+++ b/languages/hu_HU/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 (648), Kalpy (113), ribaz (1036)
+// Translators: Admin (649), Kalpy (113), ribaz (1036)
$text = array(
'2_factor_auth' => 'Kétfaktoros azonosítás',
@@ -737,7 +737,7 @@ URL: [url]',
'hu_HU' => 'Magyar',
'id' => 'ID',
'identical_version' => 'Az új verzió megegyezik az eredetivel.',
-'id_ID' => '',
+'id_ID' => 'Indonéz',
'import' => 'Import',
'importfs' => '',
'import_extension' => 'Kiterjesztés import',
@@ -762,6 +762,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => '',
'index_pending' => '',
+'index_processing' => '',
'index_waiting' => '',
'individuals' => 'Egyedek',
'individuals_in_groups' => '',
@@ -1101,6 +1102,7 @@ Amennyiben problémákba ütközik a bejelentkezés során, kérjük vegye fel a
'preview' => 'Előnézet',
'preview_converters' => 'A dokumentum átalakításának előnézete',
'preview_images' => 'előnézeti képek',
+'preview_images_text' => '',
'preview_markdown' => '',
'preview_pdf' => '',
'preview_plain' => '',
@@ -2062,6 +2064,7 @@ URL: [url]',
'update_approvers' => 'Jóváhagyók listájának frissítése',
'update_document' => 'Dokumentum frissítése',
'update_fulltext_index' => 'Teljes szöveg index frissítése',
+'update_fulltext_messages' => '',
'update_info' => 'Információ frissítése',
'update_locked_msg' => 'Ez a dokumentum zárolt.',
'update_recipients' => '',
diff --git a/languages/id_ID/lang.inc b/languages/id_ID/lang.inc
index ff46a94f2..0b1f69d52 100644
--- a/languages/id_ID/lang.inc
+++ b/languages/id_ID/lang.inc
@@ -818,6 +818,7 @@ URL: [url]',
'index_folder_updated' => 'Folder diperbarui',
'index_no_content' => '',
'index_pending' => 'Ditunda',
+'index_processing' => '',
'index_waiting' => 'Mengunggu',
'individuals' => 'Perorangan',
'individuals_in_groups' => '',
@@ -1186,6 +1187,7 @@ Jika Anda masih mengalami masalah untuk login, silakan hubungi administrator And
'preview' => 'Pratinjau',
'preview_converters' => 'Pratinjau konversi dokumen',
'preview_images' => 'Pratinjau gambar',
+'preview_images_text' => '',
'preview_markdown' => 'Markdown',
'preview_pdf' => 'Lihat sebagai PDF',
'preview_plain' => 'Text',
@@ -2127,6 +2129,7 @@ Jika Anda tidak menerima kata sandi, silakan gunakan fitur lupa kata sandi di ha
'update_approvers' => 'Perbarui Daftar Penyetuju',
'update_document' => 'Perbarui dokumen',
'update_fulltext_index' => 'Perbarui indek fulltext',
+'update_fulltext_messages' => '',
'update_info' => 'Perbarui Informasi',
'update_locked_msg' => 'Dokumen ini terkunci.',
'update_recipients' => 'Perbarui daftar penerima',
diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc
index 26bbc25eb..b329f50c7 100644
--- a/languages/it_IT/lang.inc
+++ b/languages/it_IT/lang.inc
@@ -772,6 +772,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => 'Non indicizzare contenuti',
'index_pending' => 'Indicizzazione pendente',
+'index_processing' => '',
'index_waiting' => 'Attendi',
'individuals' => 'Singoli',
'individuals_in_groups' => 'I membri de la gruppo',
@@ -1111,6 +1112,7 @@ Dovessero esserci ancora problemi al login, prego contatta l\'amministratore di
'preview' => 'Anteprima',
'preview_converters' => 'Anteprima convesione documento',
'preview_images' => 'Immagini di anteprima',
+'preview_images_text' => '',
'preview_markdown' => 'Riduzione ribasso',
'preview_pdf' => 'Anteprima come PDF',
'preview_plain' => 'Testo',
@@ -2111,6 +2113,7 @@ URL: [url]',
'update_approvers' => 'Aggiornamento lista approvatori',
'update_document' => 'Aggiorna documento',
'update_fulltext_index' => 'Aggiorna indice fulltext',
+'update_fulltext_messages' => '',
'update_info' => 'Aggiorna informazioni',
'update_locked_msg' => 'Questo documento è bloccato.',
'update_recipients' => 'Aggiorna lista cartelle',
diff --git a/languages/ko_KR/lang.inc b/languages/ko_KR/lang.inc
index 496ac5b74..125527d64 100644
--- a/languages/ko_KR/lang.inc
+++ b/languages/ko_KR/lang.inc
@@ -768,6 +768,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => '',
'index_pending' => '',
+'index_processing' => '',
'index_waiting' => '기다리는 중',
'individuals' => '개인',
'individuals_in_groups' => '개별 그룹',
@@ -1099,6 +1100,7 @@ URL : [url]',
'preview' => '미리보기',
'preview_converters' => '문서 변환 미리보기',
'preview_images' => '',
+'preview_images_text' => '',
'preview_markdown' => '마크다운',
'preview_pdf' => '',
'preview_plain' => '텍스트',
@@ -2078,6 +2080,7 @@ URL : [url]',
'update_approvers' => '승인자의 업데이트 목록',
'update_document' => '문서 갱신하기',
'update_fulltext_index' => '업데이트 전체 텍스트 색인',
+'update_fulltext_messages' => '',
'update_info' => '업데이트 정보',
'update_locked_msg' => '이 문서는 잠겨 있습니다.',
'update_recipients' => '받는 사람 업데이트 목록',
diff --git a/languages/lo_LA/lang.inc b/languages/lo_LA/lang.inc
index ae23a3e7e..d8edb5a13 100644
--- a/languages/lo_LA/lang.inc
+++ b/languages/lo_LA/lang.inc
@@ -765,6 +765,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => '',
'index_pending' => 'ລໍຖ້າດຳເນີນການ',
+'index_processing' => '',
'index_waiting' => 'ຖ້າ',
'individuals' => 'ບຸກຄົນ',
'individuals_in_groups' => 'ສະມາຊິກຂອງກຸ່ມ',
@@ -1104,6 +1105,7 @@ URL: [url]',
'preview' => 'ເບີ່ງຕົວຢ່າງ',
'preview_converters' => 'ເບີ່ງຕົວຢ່າງການແປງເອກະສານ',
'preview_images' => 'ເບີ່ງຮູບຕົງຢ່າງ',
+'preview_images_text' => '',
'preview_markdown' => 'ເຮັດເຄື່ອງຫມາຍລົງ',
'preview_pdf' => '',
'preview_plain' => 'ຂໍ້ຄວາມ',
@@ -2104,6 +2106,7 @@ URL: [url]',
'update_approvers' => 'ອັບເດດລາຍຊື່ຜູ້ອະນຸມັດ',
'update_document' => 'ອັບເດດເອກະສານ',
'update_fulltext_index' => 'ອັບເດດດັດຊະນີຂໍ້ຄວາມແບບເຕັມຮູບແບບ',
+'update_fulltext_messages' => '',
'update_info' => 'ອັບເດດຂໍ້ມູນ',
'update_locked_msg' => 'ເອກະສານນີ້ຖືກລັອກ',
'update_recipients' => 'ອັບເດລາຍຊື່ຜູ້ຮັບ',
diff --git a/languages/nb_NO/lang.inc b/languages/nb_NO/lang.inc
index 6cd633703..621c36a29 100644
--- a/languages/nb_NO/lang.inc
+++ b/languages/nb_NO/lang.inc
@@ -786,6 +786,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => 'Indekserte ikke innhold',
'index_pending' => 'Avventer',
+'index_processing' => '',
'index_waiting' => 'Venter',
'individuals' => 'Personer',
'individuals_in_groups' => 'Medlemmer i en gruppe',
@@ -1119,6 +1120,7 @@ Om du fortsatt har problemer med innloggingen, kontakt admin.',
'preview' => 'Forhåndsvisning',
'preview_converters' => 'Forhåndsvis dokumentkonvertering',
'preview_images' => 'Forhåndsvis bilder',
+'preview_images_text' => '',
'preview_markdown' => 'Forminsking',
'preview_pdf' => 'Forhåndsvis som PDF',
'preview_plain' => 'Tekst',
@@ -2117,6 +2119,7 @@ URL: [url]',
'update_approvers' => 'Oppdater liste over godkjennere',
'update_document' => 'Oppdater dokumentet',
'update_fulltext_index' => 'Oppdater fulltekstindeksen',
+'update_fulltext_messages' => '',
'update_info' => 'Oppdater informasjon',
'update_locked_msg' => 'Dette dokumentet er låst.',
'update_recipients' => 'Oppdater liste over mottakere',
diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc
index 171dc9519..c5420ad25 100644
--- a/languages/nl_NL/lang.inc
+++ b/languages/nl_NL/lang.inc
@@ -779,6 +779,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => 'Index heeft geen inhoud',
'index_pending' => 'Indexering moet nog gebeuren',
+'index_processing' => '',
'index_waiting' => 'Indexering wacht',
'individuals' => 'Individuen',
'individuals_in_groups' => 'Individuen in groepen',
@@ -1118,6 +1119,7 @@ Mocht u de komende minuten geen email ontvangen, probeer het dan nogmaals en con
'preview' => 'Voorbeeld',
'preview_converters' => 'Converters',
'preview_images' => 'Voorbeelden',
+'preview_images_text' => '',
'preview_markdown' => 'Voorbeeld in Markdown',
'preview_pdf' => 'Inhoud van het document',
'preview_plain' => 'Voorbeeld in platte tekst',
@@ -2116,6 +2118,7 @@ URL: [url]',
'update_approvers' => 'Bijwerken lijst van [Goedkeurders]',
'update_document' => 'Bijwerken',
'update_fulltext_index' => 'Index voor fulltext search bijwerken',
+'update_fulltext_messages' => '',
'update_info' => 'Update-informatie',
'update_locked_msg' => 'Dit document is geblokkeerd.',
'update_recipients' => 'Update de lijst vanontvangers',
diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc
index ab5ef1927..53770f872 100644
--- a/languages/pl_PL/lang.inc
+++ b/languages/pl_PL/lang.inc
@@ -755,6 +755,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => 'Nie indeksuje zawartości',
'index_pending' => 'Oczekujące',
+'index_processing' => '',
'index_waiting' => 'Oczekiwanie',
'individuals' => 'Indywidualni',
'individuals_in_groups' => 'Członkowie grupy',
@@ -1094,6 +1095,7 @@ Jeśli nadal będą problemy z zalogowaniem, prosimy o kontakt z administratorem
'preview' => 'Podgląd',
'preview_converters' => 'Podgląd konwersji dokumentu',
'preview_images' => 'Podgląd obrazu',
+'preview_images_text' => '',
'preview_markdown' => 'Oznacz w dół',
'preview_pdf' => 'Podgląd PDF',
'preview_plain' => 'Zwykły podgląd',
@@ -2047,6 +2049,7 @@ URL: [url]',
'update_approvers' => 'Aktualizuj listę osób zatwierdzających',
'update_document' => 'Aktualizuj dokument',
'update_fulltext_index' => 'Aktualizuj indeks pełnotekstowy',
+'update_fulltext_messages' => '',
'update_info' => 'Aktualizuj informacje',
'update_locked_msg' => 'Ten dokument jest zablokowany.',
'update_recipients' => 'Zaktualizuj listę odbiorców',
diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc
index 748d8f7f9..4d6f0ff28 100644
--- a/languages/pt_BR/lang.inc
+++ b/languages/pt_BR/lang.inc
@@ -786,6 +786,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => 'Não indexou o conteúdo',
'index_pending' => 'Pendente',
+'index_processing' => '',
'index_waiting' => 'Aguarde...',
'individuals' => 'Indivíduos',
'individuals_in_groups' => 'Members of a group',
@@ -1124,6 +1125,7 @@ Se você ainda tiver problemas para fazer o login, por favor, contate o administ
'preview' => 'visualizar',
'preview_converters' => 'Visualizar a conversão do documento',
'preview_images' => 'Imagens de pré-visualização',
+'preview_images_text' => '',
'preview_markdown' => 'Markdown',
'preview_pdf' => 'Visualizar como PDF',
'preview_plain' => 'Texto',
@@ -2123,6 +2125,7 @@ URL: [url]',
'update_approvers' => 'Atualizar lista de aprovadores',
'update_document' => 'Atualizar',
'update_fulltext_index' => 'Índice de atualização de texto completo',
+'update_fulltext_messages' => '',
'update_info' => 'Atualizar informação',
'update_locked_msg' => 'Este documento está travado.',
'update_recipients' => 'Atualizar lista de destinatários',
diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc
index c95720d0b..95c207800 100644
--- a/languages/ro_RO/lang.inc
+++ b/languages/ro_RO/lang.inc
@@ -767,6 +767,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => '',
'index_pending' => '',
+'index_processing' => '',
'index_waiting' => 'Așteptare',
'individuals' => 'Individuals',
'individuals_in_groups' => '',
@@ -1106,6 +1107,7 @@ Dacă aveți în continuare probleme la autentificare, vă rugăm să contactaț
'preview' => 'Previzualizare',
'preview_converters' => '',
'preview_images' => '',
+'preview_images_text' => '',
'preview_markdown' => '',
'preview_pdf' => '',
'preview_plain' => '',
@@ -2085,6 +2087,7 @@ URL: [url]',
'update_approvers' => 'Actualizare Listă de aprobatori',
'update_document' => 'Actualizare document',
'update_fulltext_index' => 'Actualizare index pe tot textul (fulltext index)',
+'update_fulltext_messages' => '',
'update_info' => 'Informații actualizare',
'update_locked_msg' => 'Acest document este blocat.',
'update_recipients' => '',
diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc
index 21014db1f..6f2929ddc 100644
--- a/languages/ru_RU/lang.inc
+++ b/languages/ru_RU/lang.inc
@@ -767,6 +767,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => '',
'index_pending' => '',
+'index_processing' => '',
'index_waiting' => 'Ожидание',
'individuals' => 'Пользователи',
'individuals_in_groups' => 'Пользователи группы',
@@ -1103,6 +1104,7 @@ URL: [url]',
'preview' => 'Предварительный просмотр',
'preview_converters' => 'Предварительный просмотр конвертации документа',
'preview_images' => '',
+'preview_images_text' => '',
'preview_markdown' => 'Markdown',
'preview_pdf' => '',
'preview_plain' => 'Текст',
@@ -2092,6 +2094,7 @@ URL: [url]',
'update_approvers' => 'Обновить список утверждающих',
'update_document' => 'Обновить документ',
'update_fulltext_index' => 'Обновить полнотекстовый индекс',
+'update_fulltext_messages' => '',
'update_info' => 'Обновить информацию',
'update_locked_msg' => 'Этот документ заблокирован',
'update_recipients' => 'Обновить список получателей',
diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc
index 6e805be12..a5915ef6f 100644
--- a/languages/sk_SK/lang.inc
+++ b/languages/sk_SK/lang.inc
@@ -786,6 +786,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => 'Did not index content',
'index_pending' => 'Pending',
+'index_processing' => '',
'index_waiting' => 'Čakajte',
'individuals' => 'Jednotlivci',
'individuals_in_groups' => 'Členovia skupiny',
@@ -1125,6 +1126,7 @@ If you have still problems to login, then please contact your administrator.',
'preview' => 'Náhľad',
'preview_converters' => 'Ukážka konverzie dokumentu',
'preview_images' => 'Náhľad obrázkov',
+'preview_images_text' => '',
'preview_markdown' => 'Markdown',
'preview_pdf' => 'Preview as PDF',
'preview_plain' => 'Text',
@@ -2125,6 +2127,7 @@ URL: [url]',
'update_approvers' => 'Aktualizovať zoznam schvaľovateľov',
'update_document' => 'Aktualizovať',
'update_fulltext_index' => 'Aktualizovať fulltext index',
+'update_fulltext_messages' => '',
'update_info' => 'Aktualizovať informácie',
'update_locked_msg' => 'Tento dokument je zamknutý.',
'update_recipients' => 'Aktualizovať zoznam recipientov',
diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc
index e5fee5ec5..aa1f8b68a 100644
--- a/languages/sv_SE/lang.inc
+++ b/languages/sv_SE/lang.inc
@@ -773,6 +773,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => '',
'index_pending' => 'Förestående',
+'index_processing' => '',
'index_waiting' => 'Väntar',
'individuals' => 'Personer',
'individuals_in_groups' => 'Medlemmar i en grupp',
@@ -1109,6 +1110,7 @@ Om du fortfarande har problem med inloggningen, kontakta administratören.',
'preview' => 'Förhandsgranskning',
'preview_converters' => 'Konvertering för förhandsgranskning',
'preview_images' => 'Förhandsgranska bilder',
+'preview_images_text' => '',
'preview_markdown' => 'Förminskning',
'preview_pdf' => 'Förhandsgranska som PDF',
'preview_plain' => 'Text',
@@ -2098,6 +2100,7 @@ URL: [url]',
'update_approvers' => 'Uppdatera lista med personer som godkänner',
'update_document' => 'Uppdatera dokument',
'update_fulltext_index' => 'Uppdatera fulltext-index',
+'update_fulltext_messages' => '',
'update_info' => 'Uppdatera information',
'update_locked_msg' => 'Dokumentet är låst',
'update_recipients' => 'Uppdatera lista med mottagare',
diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc
index 9d8818ed1..9bf9d1bb5 100644
--- a/languages/tr_TR/lang.inc
+++ b/languages/tr_TR/lang.inc
@@ -761,6 +761,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => '',
'index_pending' => '',
+'index_processing' => '',
'index_waiting' => 'Bekliyor',
'individuals' => 'Bireysel',
'individuals_in_groups' => 'Ekip Üyeleri',
@@ -1102,6 +1103,7 @@ Giriş yaparken halen sorun yaşıyorsanız lütfen sistem yöneticinizle görü
'preview' => 'Önizle',
'preview_converters' => '',
'preview_images' => '',
+'preview_images_text' => '',
'preview_markdown' => '',
'preview_pdf' => '',
'preview_plain' => '',
@@ -2064,6 +2066,7 @@ URL: [url]',
'update_approvers' => 'Onaylayanlar listesini güncelle',
'update_document' => 'Doküman güncelle',
'update_fulltext_index' => 'Tam metin indeksini güncelle',
+'update_fulltext_messages' => '',
'update_info' => 'Bilgileri Güncelle',
'update_locked_msg' => 'Bu doküman kilitli.',
'update_recipients' => '',
diff --git a/languages/uk_UA/lang.inc b/languages/uk_UA/lang.inc
index 1e97c88b6..92ae8c0ca 100644
--- a/languages/uk_UA/lang.inc
+++ b/languages/uk_UA/lang.inc
@@ -767,6 +767,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => '',
'index_pending' => '',
+'index_processing' => '',
'index_waiting' => '',
'individuals' => 'Користувачі',
'individuals_in_groups' => 'Користувачі групи',
@@ -1103,6 +1104,7 @@ URL: [url]',
'preview' => 'Попередній перегляд',
'preview_converters' => 'Попередній перегляд перетворення документу',
'preview_images' => '',
+'preview_images_text' => '',
'preview_markdown' => 'Markdown',
'preview_pdf' => '',
'preview_plain' => 'Текст',
@@ -2085,6 +2087,7 @@ URL: [url]',
'update_approvers' => 'Оновити список затверджувачів',
'update_document' => 'Оновити документ',
'update_fulltext_index' => 'Оновити повнотекстовий пошук',
+'update_fulltext_messages' => '',
'update_info' => 'Оновити інформацію',
'update_locked_msg' => 'Цей документ заблоковано',
'update_recipients' => 'Оновити список отримувачів',
diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc
index ee4aeb3b5..7913315c8 100644
--- a/languages/zh_CN/lang.inc
+++ b/languages/zh_CN/lang.inc
@@ -769,6 +769,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => '没有索引内容',
'index_pending' => '待处理',
+'index_processing' => '',
'index_waiting' => '等待',
'individuals' => '个人',
'individuals_in_groups' => '组成员',
@@ -1108,6 +1109,7 @@ URL: [url]',
'preview' => '预览',
'preview_converters' => '预览文档',
'preview_images' => '预览图片',
+'preview_images_text' => '',
'preview_markdown' => 'Markdown',
'preview_pdf' => '作为PDF预览',
'preview_plain' => 'TEXT',
@@ -2063,6 +2065,7 @@ URL: [url]',
'update_approvers' => '更新审核人名单',
'update_document' => '更新',
'update_fulltext_index' => '更新全文索引',
+'update_fulltext_messages' => '',
'update_info' => '更新信息',
'update_locked_msg' => '该文档被锁定',
'update_recipients' => '更新收件人列表',
diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc
index b6331d790..51d638b7d 100644
--- a/languages/zh_TW/lang.inc
+++ b/languages/zh_TW/lang.inc
@@ -786,6 +786,7 @@ URL: [url]',
'index_folder_updated' => '',
'index_no_content' => '沒有索引內容',
'index_pending' => '待定',
+'index_processing' => '',
'index_waiting' => '請稍後',
'individuals' => '個人',
'individuals_in_groups' => '小組成員',
@@ -1123,6 +1124,7 @@ URL: [url]',
'preview' => '預覽',
'preview_converters' => '預覽文件轉換',
'preview_images' => '預覽圖像',
+'preview_images_text' => '',
'preview_markdown' => 'Markdown',
'preview_pdf' => '預覽為PDF',
'preview_plain' => '文本',
@@ -2123,6 +2125,7 @@ URL: [url]',
'update_approvers' => '更新審核人名單',
'update_document' => '更新',
'update_fulltext_index' => '更新全文索引',
+'update_fulltext_messages' => '',
'update_info' => '更新資訊',
'update_locked_msg' => '該文件被鎖定',
'update_recipients' => '',
From b5c773a4a3939b706b01e044f95d81fa75fa1159 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 3 Jan 2023 17:53:36 +0100
Subject: [PATCH 177/247] fix php error
---
views/bootstrap/class.ExtensionMgr.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/views/bootstrap/class.ExtensionMgr.php b/views/bootstrap/class.ExtensionMgr.php
index 9fd38afd6..e5b7cbeae 100644
--- a/views/bootstrap/class.ExtensionMgr.php
+++ b/views/bootstrap/class.ExtensionMgr.php
@@ -377,7 +377,10 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style {
formSubmit(" " . getMLText('force_update'));?>
- showEndPaneContent('repository', $currenttab); ?>
+showEndPaneContent('repository', $currenttab);
+?>
columnEnd();
From dbe7f36eb0e01b31408727268b1f4d3c6ccbd334 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 4 Jan 2023 14:30:45 +0100
Subject: [PATCH 178/247] add conversion service from text to image
---
inc/inc.ClassConversionMgr.php | 1 +
inc/inc.ClassConversionServiceTextToImage.php | 143 ++++++++++++++++++
2 files changed, 144 insertions(+)
create mode 100644 inc/inc.ClassConversionServiceTextToImage.php
diff --git a/inc/inc.ClassConversionMgr.php b/inc/inc.ClassConversionMgr.php
index 8e98a44df..94ddd35a9 100644
--- a/inc/inc.ClassConversionMgr.php
+++ b/inc/inc.ClassConversionMgr.php
@@ -16,6 +16,7 @@ require_once("inc/inc.ClassConversionServiceImageToImage.php");
require_once("inc/inc.ClassConversionServiceImageToText.php");
require_once("inc/inc.ClassConversionServicePdfToImage.php");
require_once("inc/inc.ClassConversionServiceTextToText.php");
+require_once("inc/inc.ClassConversionServiceTextToImage.php");
/**
* Implementation of conversion manager
diff --git a/inc/inc.ClassConversionServiceTextToImage.php b/inc/inc.ClassConversionServiceTextToImage.php
new file mode 100644
index 000000000..c34f32d98
--- /dev/null
+++ b/inc/inc.ClassConversionServiceTextToImage.php
@@ -0,0 +1,143 @@
+
+ * @copyright Copyright (C) 2023 Uwe Steinmann
+ * @version Release: @package_version@
+ */
+
+require_once("inc/inc.ClassConversionServiceBase.php");
+
+/**
+ * Implementation of conversion service from text to image
+ *
+ * @category DMS
+ * @package SeedDMS
+ * @author Uwe Steinmann
+ * @copyright Copyright (C) 2023 Uwe Steinmann
+ * @version Release: @package_version@
+ */
+class SeedDMS_ConversionServiceTextToImage extends SeedDMS_ConversionServiceBase {
+ public function __construct($from, $to) {
+ $this->from = $from;
+ $this->to = $to;
+ }
+
+ public function getInfo() {
+ return "Convert with imagick php functions";
+ }
+
+ public function getAdditionalParams() { /* {{{ */
+ return [
+ ['name'=>'width', 'type'=>'number', 'description'=>'Width of converted image'],
+ ['name'=>'page', 'type'=>'number', 'description'=>'Page of text document'],
+ ];
+ } /* }}} */
+
+ private function wordWrapAnnotation($image, $draw, $text, $maxWidth) { /* {{{ */
+ $words = preg_split('%\s%', trim($text), -1, PREG_SPLIT_NO_EMPTY);
+ $lines = array();
+ $i = 0;
+ $lineHeight = 0;
+
+ while (count($words) > 0) {
+ $metrics = $image->queryFontMetrics($draw, implode(' ', array_slice($words, 0, ++$i)));
+ $lineHeight = max($metrics['textHeight'], $lineHeight);
+
+ // check if we have found the word that exceeds the line width
+ if ($metrics['textWidth'] > $maxWidth or count($words) < $i) {
+ // handle case where a single word is longer than the allowed line width (just add this as a word on its own line?)
+ if ($i == 1)
+ $i++;
+
+ $lines[] = implode(' ', array_slice($words, 0, --$i));
+ $words = array_slice($words, $i);
+ $i = 0;
+ }
+ }
+
+ return array($lines, $lineHeight);
+ } /* }}} */
+
+ public function convert($infile, $target = null, $params = array()) { /* {{{ */
+ $boxWidth = 596;
+ $boxHeight = 842;
+ $boxTop = 30;
+ $boxBottom = 30;
+ $boxLeft = 30;
+ $boxRight = 30;
+ $parSep = 10;
+ $fontSize = 10;
+
+ $start = microtime(true);
+ $imagick = new Imagick();
+ /* Setting a smaller resolution will speed up the conversion
+ * A resolution of 72,72 will create a 596x842 image
+ * Setting it to 36,36 will create a 298x421 image which should
+ * be sufficient in most cases, but keep in mind that images are
+ * not scaled up. Hence, a width of 400px still results in a 298px
+ * wide image
+ */
+ $imagick->setResolution(72,72);
+ $page = 0;
+ if(!empty($params['page']) && intval($params['page']) > 0)
+ $page = intval($params['page'])-1;
+ try {
+ if($imagick->newImage($boxWidth, $boxHeight, "white")) {
+ $draw = new ImagickDraw();
+ $draw->setStrokeColor("none");
+ $draw->setFont("Courier");
+ $draw->setFontSize($fontSize);
+ $draw->setTextAlignment(Imagick::ALIGN_LEFT);
+
+ $content = file_get_contents($infile);
+ $lines = preg_split('~\R~',$content);
+ $boxY = $boxTop;
+ $pagecount = 0;
+ foreach($lines as $line) {
+ if($line) {
+ $rlines = $this->wordWrapAnnotation($imagick, $draw, $line, $boxWidth-$boxLeft-$boxRight);
+ foreach($rlines[0] as $rline) {
+ if($pagecount == $page && $boxY < ($boxHeight-$boxBottom)) {
+ $imagick->annotateImage($draw, $boxLeft, $boxY, 0, $rline);
+ }
+ $boxY = $boxY + $rlines[1];
+ }
+ } else {
+ $boxY += $parSep;
+ }
+ if($boxY >= ($boxHeight-$boxBottom)) {
+ $pagecount++;
+ $boxY = $boxTop;
+ if($pagecount > $page)
+ break;
+ }
+ }
+
+ if(!empty($params['width']))
+ $imagick->scaleImage(min((int) $params['width'], $imagick->getImageWidth()), 0);
+ $imagick->setImageFormat('png');
+ $end = microtime(true);
+ if($this->logger) {
+ $this->logger->log('Conversion from '.$this->from.' to '.$this->to.' with text service took '.($end-$start).' sec.', PEAR_LOG_INFO);
+ }
+ if($target) {
+ return $imagick->writeImage($target);
+ } else {
+ return $imagick->getImageBlob();
+ }
+ }
+ } catch (ImagickException $e) {
+ return false;
+ }
+ return false;
+ } /* }}} */
+}
+
+
+
From 2cbe041b60a271107bba128e083d33cb877e0667 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 4 Jan 2023 14:31:28 +0100
Subject: [PATCH 179/247] user getClassname() for SeedDMS_Core_DocumentFile
---
SeedDMS_Preview/Preview/PdfPreviewer.php | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/SeedDMS_Preview/Preview/PdfPreviewer.php b/SeedDMS_Preview/Preview/PdfPreviewer.php
index 73a335821..73a538763 100644
--- a/SeedDMS_Preview/Preview/PdfPreviewer.php
+++ b/SeedDMS_Preview/Preview/PdfPreviewer.php
@@ -31,7 +31,8 @@ class SeedDMS_Preview_PdfPreviewer extends SeedDMS_Preview_Base {
} /* }}} */
/**
- * Return the physical filename of the preview image on disk
+ * Return the physical filename of the preview image on disc
+ * including the path
*
* @param object $object document content or document file
* @return string file name of preview image
@@ -47,7 +48,7 @@ class SeedDMS_Preview_PdfPreviewer extends SeedDMS_Preview_Base {
case $dms->getClassname('documentcontent'):
$target = $dir.'p'.$object->getVersion();
break;
- case "SeedDMS_Core_DocumentFile":
+ case $dms->getClassname('documentfile'):
$target = $dir.'f'.$object->getID();
break;
default:
From 18ea59bfc7ee80ac5fa992041321f1fd4a4a25ea Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 4 Jan 2023 14:31:59 +0100
Subject: [PATCH 180/247] add more documentation
---
SeedDMS_Preview/Preview/Previewer.php | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/SeedDMS_Preview/Preview/Previewer.php b/SeedDMS_Preview/Preview/Previewer.php
index 57b2a66ef..7a6937f11 100644
--- a/SeedDMS_Preview/Preview/Previewer.php
+++ b/SeedDMS_Preview/Preview/Previewer.php
@@ -29,6 +29,16 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
*/
protected $width;
+ /**
+ * Create instance of image previewer
+ *
+ * @param string $previewDir path of base directory where all images are
+ * stored. This directory will have a subdirectory derived from the object id.
+ * @param integer $width default width of an image
+ * @param integer $timeout timeout for shell commands to create a preview image
+ * @param boolean $xsendfile if set to true the apache module xsendfile will
+ * be used.
+ */
function __construct($previewDir, $width=40, $timeout=5, $xsendfile=true) { /* {{{ */
parent::__construct($previewDir, $timeout, $xsendfile);
$this->converters = array(
@@ -46,7 +56,8 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
} /* }}} */
/**
- * Return the physical filename of the preview image on disk
+ * Return the physical filename of the preview image on disc
+ * including the path
*
* @param object $object document content or document file
* @param integer $width width of preview image
@@ -103,6 +114,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
* @param string $mimetype MimeType of input file
* @param integer $width width of generated preview image
* @param string $target optional name of preview image (without extension)
+ * @param boolean $new will be set to true if the preview images was created
* @return boolean true on success, false on failure
*/
public function createRawPreview($infile, $dir, $mimetype, $width=0, $target='', &$new=false) { /* {{{ */
@@ -171,6 +183,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
* @param object $object instance of SeedDMS_Core_DocumentContent
* or SeedDMS_Core_DocumentFile
* @param integer $width desired width of preview image
+ * @param boolean $new will be set to true if the preview images was created
* @return boolean true on success, false on failure
*/
public function createPreview($object, $width=0, &$new=false) { /* {{{ */
From 722b5dfba5ae8e1fe19c627d22c1769410f9948d Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 4 Jan 2023 14:32:16 +0100
Subject: [PATCH 181/247] add converter from text to image
---
doc/README.Converters | 3 +++
1 file changed, 3 insertions(+)
diff --git a/doc/README.Converters b/doc/README.Converters
index e916159dc..dcb694138 100644
--- a/doc/README.Converters
+++ b/doc/README.Converters
@@ -90,6 +90,9 @@ image/jpeg
image/png
convert -resize %wx '%f' 'png:%o'
+text/plain
+ convert -density 100 -resize %wx 'text:%f[0]' 'png:%o'
+
application/pdf
gs -dBATCH -dNOPAUSE -sDEVICE=png16m -dPDFFitPage -r72x72 -sOutputFile=- -dFirstPage=1 -dLastPage=1 -q '%f' | convert -resize %wx png:- '%o'
From a80702e7b88e4390870b5798d3ebb5dd75e281c7 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 4 Jan 2023 14:32:52 +0100
Subject: [PATCH 182/247] add more documentation
---
inc/inc.ClassFulltextService.php | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/inc/inc.ClassFulltextService.php b/inc/inc.ClassFulltextService.php
index 142943183..23309cf6c 100644
--- a/inc/inc.ClassFulltextService.php
+++ b/inc/inc.ClassFulltextService.php
@@ -7,17 +7,27 @@
* @license GPL 2
* @version @version@
* @author Uwe Steinmann
- * @copyright Copyright (C) 2016 Uwe Steinmann
+ * @copyright Copyright (C) 2021-2023 Uwe Steinmann
* @version Release: @package_version@
*/
/**
* Implementation of fulltext service
*
+ * The fulltext service is wrapper around single services for a full text
+ * search. Such a service can be based on Solr, SQlite, etc. It implements
+ * three major methods:
+ * IndexedDocument() for creating an instance of an indexed document
+ * Indexer() for creating an instance of the index
+ * Search() fro creating an instance of a search frontend
+ *
+ * Though this class can manage more than one service, it will only
+ * use the first one.
+ *
* @category DMS
* @package SeedDMS
* @author Uwe Steinmann
- * @copyright Copyright (C) 2016 Uwe Steinmann
+ * @copyright Copyright (C) 2021-2023 Uwe Steinmann
* @version Release: @package_version@
*/
class SeedDMS_FulltextService {
@@ -136,7 +146,7 @@ class SeedDMS_FulltextService {
/**
* Returns callback function to convert a document into plain text
*
- * This variant just uses the text previewer which
+ * This variant uses the text previewer which
* caches the converted document
*/
public function getConversionWithPreviewCallback() { /* {{{ */
@@ -162,7 +172,7 @@ class SeedDMS_FulltextService {
} /* }}} */
/**
- * Return an indexable document from the given document or folder
+ * Return an indexable document based on the given document or folder
*
* @param SeedDMS_Core_Document|SeedDMS_Core_Folder $object document or folder
* to be indexed
@@ -183,7 +193,7 @@ class SeedDMS_FulltextService {
/**
* Returns an instance of the indexer
*
- * The indexer provides access to fulltext index. It allows to add and
+ * The indexer provides access to the fulltext index. It allows to add and
* get documents.
*
* @return object instance of class specified in 'Indexer'
From dd65fe2e35fd0c7a327e59afd9a040e70c953ae9 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 4 Jan 2023 14:33:11 +0100
Subject: [PATCH 183/247] add conversion service from text to png
---
inc/inc.ConversionInit.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/inc/inc.ConversionInit.php b/inc/inc.ConversionInit.php
index 880e488f1..4c2c9e64e 100644
--- a/inc/inc.ConversionInit.php
+++ b/inc/inc.ConversionInit.php
@@ -34,6 +34,10 @@ if(extension_loaded('gd') || extension_loaded('imagick')) {
$conversionmgr->addService(new SeedDMS_ConversionServiceImageToImage('image/gif', 'image/png'))->setLogger($logger);
}
+if(extension_loaded('imagick')) {
+ $conversionmgr->addService(new SeedDMS_ConversionServiceTextToImage('text/plain', 'image/png'))->setLogger($logger);
+}
+
$conversionmgr->addService(new SeedDMS_ConversionServiceImageToText('image/jpeg', 'text/plain'))->setLogger($logger);
$conversionmgr->addService(new SeedDMS_ConversionServiceImageToText('image/jpg', 'text/plain'))->setLogger($logger);
From a9aa87332d8115baf4d14031bf6512cd16af6646 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 4 Jan 2023 14:33:36 +0100
Subject: [PATCH 184/247] add comment that converters are deprecated
---
inc/inc.FulltextInit.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/inc/inc.FulltextInit.php b/inc/inc.FulltextInit.php
index 2368e5477..4a9fcba00 100644
--- a/inc/inc.FulltextInit.php
+++ b/inc/inc.FulltextInit.php
@@ -41,6 +41,7 @@ if($settings->_enableFullSearch) {
$fulltextservice->addService($settings->_fullSearchEngine, $indexconf);
}
}
+ /* setConverters() is deprecated */
$fulltextservice->setConverters(isset($settings->_converters['fulltext']) ? $settings->_converters['fulltext'] : null);
$fulltextservice->setConversionMgr($conversionmgr);
$fulltextservice->setMaxSize($settings->_maxSizeForFullText);
From e28911711b7bdb4580181b85ccde02a829d6b62b Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 08:01:48 +0100
Subject: [PATCH 185/247] make init() static
---
SeedDMS_Lucene/Lucene/Indexer.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SeedDMS_Lucene/Lucene/Indexer.php b/SeedDMS_Lucene/Lucene/Indexer.php
index 7c3b3f68a..bc7321185 100644
--- a/SeedDMS_Lucene/Lucene/Indexer.php
+++ b/SeedDMS_Lucene/Lucene/Indexer.php
@@ -51,7 +51,7 @@ class SeedDMS_Lucene_Indexer {
* Do some initialization
*
*/
- static function init($stopWordsFile='') { /* {{{ */
+ public function init($stopWordsFile='') { /* {{{ */
$analyzer = new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8_CaseInsensitive();
if($stopWordsFile && file_exists($stopWordsFile)) {
$stopWordsFilter = new Zend_Search_Lucene_Analysis_TokenFilter_StopWords();
From b9ac1860cf4fd36fbd58f0aef7fa1e08a1eb31e9 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 08:02:14 +0100
Subject: [PATCH 186/247] use stop words
---
SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php | 42 +++++++++++++++++++++++--
1 file changed, 39 insertions(+), 3 deletions(-)
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
index bb9585c73..697843923 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
@@ -25,18 +25,48 @@
class SeedDMS_SQLiteFTS_Indexer {
/**
- * @var string $ftstype
+ * @var string $_ftstype
* @access protected
*/
protected $_ftstype;
/**
- * @var object $index sqlite index
+ * @var object $_conn sqlite index
* @access protected
*/
protected $_conn;
+ /**
+ * @var array $_stop_words array of stop words
+ * @access protected
+ */
+ protected $_stop_words;
+
const ftstype = 'fts5';
+
+ /**
+ * Remove stopwords from string
+ */
+ protected function strip_stopwords($str = "") { /* {{{ */
+ // 1.) break string into words
+ // [^-\w\'] matches characters, that are not [0-9a-zA-Z_-']
+ // if input is unicode/utf-8, the u flag is needed: /pattern/u
+ $words = preg_split('/[^-\w\']+/u', $str, -1, PREG_SPLIT_NO_EMPTY);
+
+ // 2.) if we have at least 2 words, remove stopwords
+ if(count($words) > 1) {
+ $stopwords = $this->_stop_words;
+ $words = array_filter($words, function ($w) use (&$stopwords) {
+ return ((mb_strlen($w, 'utf-8') > 2) && !isset($stopwords[mb_strtolower($w, "utf- 8")]));
+ });
+ }
+
+ // check if not too much was removed such as "the the" would return empty
+ if(!empty($words))
+ return implode(" ", $words);
+ return $str;
+ } /* }}} */
+
/**
* Constructor
*
@@ -48,6 +78,7 @@ class SeedDMS_SQLiteFTS_Indexer {
$this->_rawid = 'rowid';
else
$this->_rawid = 'docid';
+ $this->_stop_words = [];
} /* }}} */
/**
@@ -109,7 +140,9 @@ class SeedDMS_SQLiteFTS_Indexer {
* Do some initialization
*
*/
- static function init($stopWordsFile='') { /* {{{ */
+ public function init($stopWordsFile='') { /* {{{ */
+ if($stopWordsFile)
+ $this->_stop_words = array_flip(preg_split("/[\s,]+/", file_get_contents($stopWordsFile)));
} /* }}} */
/**
@@ -135,6 +168,9 @@ class SeedDMS_SQLiteFTS_Indexer {
if($res === false) {
return false;
}
+ if($this->_stop_words)
+ $content = $this->strip_stopwords($content);
+
$sql = "INSERT INTO docs (documentid, record_type, title, comment, keywords, category, owner, content, mimetype, origfilename, created, indexed, users, status, path) VALUES (".$this->_conn->quote($doc->getFieldValue('document_id')).", ".$this->_conn->quote($doc->getFieldValue('record_type')).", ".$this->_conn->quote($doc->getFieldValue('title')).", ".$this->_conn->quote($comment).", ".$this->_conn->quote($keywords).", ".$this->_conn->quote($category).", ".$this->_conn->quote($doc->getFieldValue('owner')).", ".$this->_conn->quote($content).", ".$this->_conn->quote($mimetype).", ".$this->_conn->quote($origfilename).", ".(int)$created.", ".(int)$indexed.", ".$this->_conn->quote($doc->getFieldValue('users')).", ".$this->_conn->quote($status).", ".$this->_conn->quote($doc->getFieldValue('path'))/*time()*/.")";
$res = $this->_conn->exec($sql);
if($res === false) {
From 99ee18a336ade768206d269193c37b6f873bd851 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 08:03:13 +0100
Subject: [PATCH 187/247] add note for 1.1.18
---
SeedDMS_SQLiteFTS/package.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/SeedDMS_SQLiteFTS/package.xml b/SeedDMS_SQLiteFTS/package.xml
index 452e8f74a..047d9cae1 100644
--- a/SeedDMS_SQLiteFTS/package.xml
+++ b/SeedDMS_SQLiteFTS/package.xml
@@ -26,6 +26,7 @@
- add optional parameter $order to SeedDMS_SQLiteFTS_Indexer::find()
- add optional parameters $query and $col to SeedDMS_SQLiteFTS_Indexer::terms()
- IndexedDocument() accepts a callable for conversion to text
+- remove stop words from content
From 4540f85745c6347646068c0092ba3645cdbf2000 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 08:04:07 +0100
Subject: [PATCH 188/247] add var $success which is set to false if the
conversion fails
---
inc/inc.ClassConversionServiceBase.php | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/inc/inc.ClassConversionServiceBase.php b/inc/inc.ClassConversionServiceBase.php
index e4b75a474..9ea95812e 100644
--- a/inc/inc.ClassConversionServiceBase.php
+++ b/inc/inc.ClassConversionServiceBase.php
@@ -36,9 +36,15 @@ abstract class SeedDMS_ConversionServiceBase {
*/
protected $logger;
+ /**
+ * @var $success set to false if conversion failed
+ */
+ protected $success;
+
public function __construct() {
$this->from = null;
$this->to = null;
+ $this->success = true;
}
public function setLogger($logger) {
@@ -53,6 +59,10 @@ abstract class SeedDMS_ConversionServiceBase {
return [];
} /* }}} */
+ public function wasSuccessful() { /* {{{ */
+ return $this->success;
+ } /* }}} */
+
/**
* This method does the conversion
*
From 99e7623ea0f9ed931a9b759b64f91b1fc2203471 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 08:04:48 +0100
Subject: [PATCH 189/247] init index with stopwords file
---
op/op.Ajax.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/op/op.Ajax.php b/op/op.Ajax.php
index 36c47298c..f4c5ad884 100644
--- a/op/op.Ajax.php
+++ b/op/op.Ajax.php
@@ -984,6 +984,7 @@ switch($command) {
}
if($object) {
if($index = $fulltextservice->Indexer()) {
+ $index->init($settings->_stopWordsFile);
$idoc = $fulltextservice->IndexedDocument($object, true);
$error = $idoc->getErrorMsg();
if(!$error) {
From f48f649249fd10ec69d75d89bed82c9e51316275 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 08:05:46 +0100
Subject: [PATCH 190/247] call constructor of parent
---
inc/inc.ClassConversionServiceExec.php | 1 +
inc/inc.ClassConversionServiceImageToImage.php | 1 +
inc/inc.ClassConversionServiceImageToText.php | 1 +
inc/inc.ClassConversionServicePdfToImage.php | 2 ++
inc/inc.ClassConversionServiceTextToImage.php | 1 +
inc/inc.ClassConversionServiceTextToText.php | 1 +
6 files changed, 7 insertions(+)
diff --git a/inc/inc.ClassConversionServiceExec.php b/inc/inc.ClassConversionServiceExec.php
index eff1d5ab1..c03c2c441 100644
--- a/inc/inc.ClassConversionServiceExec.php
+++ b/inc/inc.ClassConversionServiceExec.php
@@ -92,6 +92,7 @@ class SeedDMS_ConversionServiceExec extends SeedDMS_ConversionServiceBase {
} /* }}} */
public function __construct($from, $to, $cmd, $timeout=5) {
+ parent::__construct();
$this->from = $from;
$this->to = $to;
$this->cmd = $cmd;
diff --git a/inc/inc.ClassConversionServiceImageToImage.php b/inc/inc.ClassConversionServiceImageToImage.php
index b5c9e7951..27905ad10 100644
--- a/inc/inc.ClassConversionServiceImageToImage.php
+++ b/inc/inc.ClassConversionServiceImageToImage.php
@@ -29,6 +29,7 @@ class SeedDMS_ConversionServiceImageToImage extends SeedDMS_ConversionServiceBas
public $timeout;
public function __construct($from, $to) { /* {{{ */
+ parent::__construct();
$this->from = $from;
$this->to = $to;
$this->timeout = 5;
diff --git a/inc/inc.ClassConversionServiceImageToText.php b/inc/inc.ClassConversionServiceImageToText.php
index 326dba28c..1672d55f2 100644
--- a/inc/inc.ClassConversionServiceImageToText.php
+++ b/inc/inc.ClassConversionServiceImageToText.php
@@ -29,6 +29,7 @@ class SeedDMS_ConversionServiceImageToText extends SeedDMS_ConversionServiceBase
public $timeout;
public function __construct($from, $to) { /* {{{ */
+ parent::__construct();
$this->from = $from;
$this->to = $to;
} /* }}} */
diff --git a/inc/inc.ClassConversionServicePdfToImage.php b/inc/inc.ClassConversionServicePdfToImage.php
index d42bed80f..349565232 100644
--- a/inc/inc.ClassConversionServicePdfToImage.php
+++ b/inc/inc.ClassConversionServicePdfToImage.php
@@ -29,6 +29,7 @@ class SeedDMS_ConversionServicePdfToImage extends SeedDMS_ConversionServiceBase
public $timeout;
public function __construct($from, $to) {
+ parent::__construct();
$this->from = $from;
$this->to = $to;
$this->timeout = 5;
@@ -75,6 +76,7 @@ class SeedDMS_ConversionServicePdfToImage extends SeedDMS_ConversionServiceBase
}
}
} catch (ImagickException $e) {
+ $this->success = false;
return false;
}
return false;
diff --git a/inc/inc.ClassConversionServiceTextToImage.php b/inc/inc.ClassConversionServiceTextToImage.php
index c34f32d98..6c526c695 100644
--- a/inc/inc.ClassConversionServiceTextToImage.php
+++ b/inc/inc.ClassConversionServiceTextToImage.php
@@ -24,6 +24,7 @@ require_once("inc/inc.ClassConversionServiceBase.php");
*/
class SeedDMS_ConversionServiceTextToImage extends SeedDMS_ConversionServiceBase {
public function __construct($from, $to) {
+ parent::__construct();
$this->from = $from;
$this->to = $to;
}
diff --git a/inc/inc.ClassConversionServiceTextToText.php b/inc/inc.ClassConversionServiceTextToText.php
index 5342c9f4d..ae68c6080 100644
--- a/inc/inc.ClassConversionServiceTextToText.php
+++ b/inc/inc.ClassConversionServiceTextToText.php
@@ -24,6 +24,7 @@ require_once("inc/inc.ClassConversionServiceBase.php");
*/
class SeedDMS_ConversionServiceTextToText extends SeedDMS_ConversionServiceBase {
public function __construct($from, $to) {
+ parent::__construct();
$this->from = $from;
$this->to = $to;
}
From 5a778a1b7516d63ad120f89d0901410cba5e2b3c Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 09:02:30 +0100
Subject: [PATCH 191/247] add note about setting papersize for a2ps
---
doc/README.Converters | 3 +++
1 file changed, 3 insertions(+)
diff --git a/doc/README.Converters b/doc/README.Converters
index dcb694138..ed9214126 100644
--- a/doc/README.Converters
+++ b/doc/README.Converters
@@ -103,6 +103,9 @@ application/pdf
text/plain
a2ps -1 -a1 -R -B -o - '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=png16m -dFirstPage=1 -dLastPage=1 -dPDFFitPage -r72x72 -sOutputFile=- -q - | convert -resize %wx png:- 'png:%o'
+ On Linux systems you will have to set the desired value in /etc/papersize for a2ps
+ e.g. a4, or letter
+
application/msword
application/vnd.oasis.opendocument.spreadsheet
application/vnd.oasis.opendocument.text
From a8474b08c6492c648c6880c44b95442f7fb25d36 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 09:34:09 +0100
Subject: [PATCH 192/247] use method wasSuccessful() to check if conversion
succeeded
---
inc/inc.ClassConversionMgr.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/inc/inc.ClassConversionMgr.php b/inc/inc.ClassConversionMgr.php
index 94ddd35a9..a4606327e 100644
--- a/inc/inc.ClassConversionMgr.php
+++ b/inc/inc.ClassConversionMgr.php
@@ -86,7 +86,7 @@ class SeedDMS_ConversionMgr {
for(end($services); key($services)!==null; prev($services)) {
$service = current($services);
$text = $service->convert($file, $target, $params);
- if($text === false)
+ if(!$service->wasSuccessful())
return false;
if($text)
return $text;
From 735fe4235f1b52ee58facdb327c67c357032e8b2 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 09:34:39 +0100
Subject: [PATCH 193/247] set $success to false if exec of command failed
---
inc/inc.ClassConversionServiceExec.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/inc/inc.ClassConversionServiceExec.php b/inc/inc.ClassConversionServiceExec.php
index c03c2c441..71e530732 100644
--- a/inc/inc.ClassConversionServiceExec.php
+++ b/inc/inc.ClassConversionServiceExec.php
@@ -168,6 +168,7 @@ class SeedDMS_ConversionServiceExec extends SeedDMS_ConversionServiceBase {
} catch(Exception $e) {
if($hastempfile)
unlink($tmpfile);
+ $this->success = false;
return false;
}
$end = microtime(true);
From 292ade83e7660b7f2dfbaed36fd911863a8bb72c Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 09:35:13 +0100
Subject: [PATCH 194/247] return empty text if image has no iptc data
---
inc/inc.ClassConversionServiceImageToText.php | 21 +++++++++----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/inc/inc.ClassConversionServiceImageToText.php b/inc/inc.ClassConversionServiceImageToText.php
index 1672d55f2..a0cc2cd86 100644
--- a/inc/inc.ClassConversionServiceImageToText.php
+++ b/inc/inc.ClassConversionServiceImageToText.php
@@ -51,25 +51,24 @@ class SeedDMS_ConversionServiceImageToText extends SeedDMS_ConversionServiceBase
public function convert($infile, $target = null, $params = array()) { /* {{{ */
$start = microtime(true);
$imsize = getimagesize($infile, $moreinfo);
+ $txt = '';
if(!empty($moreinfo['APP13'])) {
- $txt = '';
$iptcdata = iptcparse($moreinfo['APP13']);
foreach(['2#005', '2#015', '2#025', '2#105', '2#080', '2#115', '2#120'] as $key) {
if(isset($iptcdata[$key]))
$txt .= implode(' ', $iptcdata[$key])."\n";
}
$end = microtime(true);
- if($this->logger) {
- $this->logger->log('Conversion from '.$this->from.' to '.$this->to.' by extracting iptc took '.($end-$start).' sec.', PEAR_LOG_INFO);
- }
- if($target) {
- file_put_contents($target, $txt);
- return true;
- } else {
- return $txt;
- }
}
- return false;
+ if($this->logger) {
+ $this->logger->log('Conversion from '.$this->from.' to '.$this->to.' by extracting iptc took '.($end-$start).' sec.', PEAR_LOG_INFO);
+ }
+ if($target) {
+ file_put_contents($target, $txt);
+ return true;
+ } else {
+ return $txt;
+ }
} /* }}} */
}
From 8cdafe49e05beb05a945a67033f217b579403f50 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 09:45:22 +0100
Subject: [PATCH 195/247] remove spaces which prevented reading the stop word
list
---
SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
index 697843923..506af59bc 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
@@ -57,7 +57,7 @@ class SeedDMS_SQLiteFTS_Indexer {
if(count($words) > 1) {
$stopwords = $this->_stop_words;
$words = array_filter($words, function ($w) use (&$stopwords) {
- return ((mb_strlen($w, 'utf-8') > 2) && !isset($stopwords[mb_strtolower($w, "utf- 8")]));
+ return ((mb_strlen($w, 'utf-8') > 2) && !isset($stopwords[mb_strtolower($w, "utf-8")]));
});
}
From ba8a2d5d8778dd758f36ec4f7d810c400ff19164 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 15:07:19 +0100
Subject: [PATCH 196/247] add method getPreviewDir()
---
SeedDMS_Preview/Preview/Base.php | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/SeedDMS_Preview/Preview/Base.php b/SeedDMS_Preview/Preview/Base.php
index 1b67bcfae..d07897b6c 100644
--- a/SeedDMS_Preview/Preview/Base.php
+++ b/SeedDMS_Preview/Preview/Base.php
@@ -135,6 +135,15 @@ class SeedDMS_Preview_Base {
}
} /* }}} */
+ /**
+ * Get preview dir
+ *
+ * @return string name of preview directory on disc
+ */
+ public function getPreviewDir() { /* {{{ */
+ return $this->previewDir;
+ } /* }}} */
+
/**
* Set a list of converters
*
From 58fd8877fbb1352d94748e1b0256fe18246c006e Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 15:08:05 +0100
Subject: [PATCH 197/247] use DIRECTORY_SEPARATOR, add prefix 'png', 'txt',
'pdf' to previewDir
---
SeedDMS_Preview/Preview/PdfPreviewer.php | 10 +++++-----
SeedDMS_Preview/Preview/Previewer.php | 19 +++++--------------
2 files changed, 10 insertions(+), 19 deletions(-)
diff --git a/SeedDMS_Preview/Preview/PdfPreviewer.php b/SeedDMS_Preview/Preview/PdfPreviewer.php
index 73a538763..2a219b476 100644
--- a/SeedDMS_Preview/Preview/PdfPreviewer.php
+++ b/SeedDMS_Preview/Preview/PdfPreviewer.php
@@ -25,7 +25,7 @@
class SeedDMS_Preview_PdfPreviewer extends SeedDMS_Preview_Base {
function __construct($previewDir, $timeout=5, $xsendfile=true) { /* {{{ */
- parent::__construct($previewDir, $timeout, $xsendfile);
+ parent::__construct($previewDir.DIRECTORY_SEPARATOR.'pdf', $timeout, $xsendfile);
$this->converters = array(
);
} /* }}} */
@@ -43,7 +43,7 @@ class SeedDMS_Preview_PdfPreviewer extends SeedDMS_Preview_Base {
$document = $object->getDocument();
$dms = $document->_dms;
- $dir = $this->previewDir.'/'.$document->getDir();
+ $dir = $this->previewDir.DIRECTORY_SEPARATOR.$document->getDir();
switch(get_class($object)) {
case $dms->getClassname('documentcontent'):
$target = $dir.'p'.$object->getVersion();
@@ -90,8 +90,8 @@ class SeedDMS_Preview_PdfPreviewer extends SeedDMS_Preview_Base {
if(!$this->previewDir)
return false;
- if(!is_dir($this->previewDir.'/'.$dir)) {
- if (!SeedDMS_Core_File::makeDir($this->previewDir.'/'.$dir)) {
+ if(!is_dir($this->previewDir.DIRECTORY_SEPARATOR.$dir)) {
+ if (!SeedDMS_Core_File::makeDir($this->previewDir.DIRECTORY_SEPARATOR.$dir)) {
return false;
}
}
@@ -297,7 +297,7 @@ class SeedDMS_Preview_PdfPreviewer extends SeedDMS_Preview_Base {
if(!$this->previewDir)
return false;
- $dir = $this->previewDir.'/'.$document->getDir();
+ $dir = $this->previewDir.DIRECTORY_SEPARATOR.$document->getDir();
if(file_exists($dir) && is_dir($dir)) {
return SeedDMS_Preview_Previewer::recurseRmdir($dir);
} else {
diff --git a/SeedDMS_Preview/Preview/Previewer.php b/SeedDMS_Preview/Preview/Previewer.php
index 7a6937f11..f53780e7a 100644
--- a/SeedDMS_Preview/Preview/Previewer.php
+++ b/SeedDMS_Preview/Preview/Previewer.php
@@ -40,17 +40,8 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
* be used.
*/
function __construct($previewDir, $width=40, $timeout=5, $xsendfile=true) { /* {{{ */
- parent::__construct($previewDir, $timeout, $xsendfile);
+ parent::__construct($previewDir.DIRECTORY_SEPARATOR.'png', $timeout, $xsendfile);
$this->converters = array(
- 'image/png' => "convert -resize %wx '%f' '%o'",
- 'image/gif' => "convert -resize %wx '%f' '%o'",
- 'image/jpg' => "convert -resize %wx '%f' '%o'",
- 'image/jpeg' => "convert -resize %wx '%f' '%o'",
- 'image/svg+xml' => "convert -resize %wx '%f' '%o'",
- 'text/plain' => "convert -resize %wx '%f' '%o'",
- 'application/pdf' => "convert -density 100 -resize %wx '%f[0]' '%o'",
- 'application/postscript' => "convert -density 100 -resize %wx '%f[0]' '%o'",
- 'application/x-compressed-tar' => "tar tzvf '%f' | convert -density 100 -resize %wx text:-[0] '%o'",
);
$this->width = intval($width);
} /* }}} */
@@ -74,7 +65,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
$document = $object->getDocument();
$dms = $document->_dms;
- $dir = $this->previewDir.'/'.$document->getDir();
+ $dir = $this->previewDir.DIRECTORY_SEPARATOR.$document->getDir();
switch(get_class($object)) {
case $dms->getClassname('documentcontent'):
$target = $dir.'p'.$object->getVersion().'-'.$width;
@@ -127,8 +118,8 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
$width = intval($width);
if(!$this->previewDir)
return false;
- if(!is_dir($this->previewDir.'/'.$dir)) {
- if (!SeedDMS_Core_File::makeDir($this->previewDir.'/'.$dir)) {
+ if(!is_dir($this->previewDir.DIRECTORY_SEPARATOR.$dir)) {
+ if (!SeedDMS_Core_File::makeDir($this->previewDir.DIRECTORY_SEPARATOR.$dir)) {
return false;
}
}
@@ -368,7 +359,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
if(!$this->previewDir)
return false;
- $dir = $this->previewDir.'/'.$document->getDir();
+ $dir = $this->previewDir.DIRECTORY_SEPARATOR.$document->getDir();
if(file_exists($dir) && is_dir($dir)) {
return SeedDMS_Preview_Previewer::recurseRmdir($dir);
} else {
From a94eccb6cf00eea03f74aba6ed6c4d2402ba95c6 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 15:09:04 +0100
Subject: [PATCH 198/247] add converter for postscript
---
doc/README.Converters | 3 +++
1 file changed, 3 insertions(+)
diff --git a/doc/README.Converters b/doc/README.Converters
index ed9214126..730466e72 100644
--- a/doc/README.Converters
+++ b/doc/README.Converters
@@ -100,6 +100,9 @@ application/pdf
mutool draw -F png -w %w -q -N -o %o %f 1
+application/postscript
+ convert -density 100 -resize %wx '%f[0]' 'png:%o'
+
text/plain
a2ps -1 -a1 -R -B -o - '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=png16m -dFirstPage=1 -dLastPage=1 -dPDFFitPage -r72x72 -sOutputFile=- -q - | convert -resize %wx png:- 'png:%o'
From b01dd7655cfcd7d710b7cf0b7ef6fb50e4e5f9e7 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 15:09:25 +0100
Subject: [PATCH 199/247] separate cache by png, txt, and pdf
---
controllers/class.ClearCache.php | 14 ++++++++++++--
views/bootstrap/class.ClearCache.php | 8 +++++++-
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/controllers/class.ClearCache.php b/controllers/class.ClearCache.php
index 770abcdea..aef34fc5e 100644
--- a/controllers/class.ClearCache.php
+++ b/controllers/class.ClearCache.php
@@ -29,8 +29,18 @@ class SeedDMS_Controller_ClearCache extends SeedDMS_Controller_Common {
$post = $this->params['post'];
$ret = '';
- if(!empty($post['preview'])) {
- $cmd = 'rm -rf '.$settings->_cacheDir.'/[1-9]*';
+ if(!empty($post['previewpng'])) {
+ $cmd = 'rm -rf '.$settings->_cacheDir.'/png/[1-9]*';
+ system($cmd, $ret);
+ }
+
+ if(!empty($post['previewpdf'])) {
+ $cmd = 'rm -rf '.$settings->_cacheDir.'/pdf/[1-9]*';
+ system($cmd, $ret);
+ }
+
+ if(!empty($post['previewtxt'])) {
+ $cmd = 'rm -rf '.$settings->_cacheDir.'/txt/[1-9]*';
system($cmd, $ret);
}
diff --git a/views/bootstrap/class.ClearCache.php b/views/bootstrap/class.ClearCache.php
index b9b447c50..7f5736b7a 100644
--- a/views/bootstrap/class.ClearCache.php
+++ b/views/bootstrap/class.ClearCache.php
@@ -49,7 +49,13 @@ class SeedDMS_View_ClearCache extends SeedDMS_Theme_Style {
$this->contentContainerStart('warning');
?>
-
+
+
+
+
+
+
+
From 4ef60bbf10730efdf461d84ce7b09d550dd1a1ba Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 15:10:21 +0100
Subject: [PATCH 200/247] add note for 5.1.29
---
CHANGELOG | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG b/CHANGELOG
index fc144fc55..2d6d1645d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6,6 +6,7 @@
- update jquery to 3.6.1 (only bootstrap4 theme)
- introduce authentication service
- new hook in restapi to add middleware
+- previews for png, txt, pdf in different directories
--------------------------------------------------------------------------------
Changes in version 5.1.28
From 67163324bb056271800398d41f0483b2f97766e1 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 5 Jan 2023 16:57:18 +0100
Subject: [PATCH 201/247] set end of conversion in any case, not just if iptc
data was found
---
inc/inc.ClassConversionServiceImageToText.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/inc/inc.ClassConversionServiceImageToText.php b/inc/inc.ClassConversionServiceImageToText.php
index a0cc2cd86..76816ea12 100644
--- a/inc/inc.ClassConversionServiceImageToText.php
+++ b/inc/inc.ClassConversionServiceImageToText.php
@@ -58,8 +58,8 @@ class SeedDMS_ConversionServiceImageToText extends SeedDMS_ConversionServiceBase
if(isset($iptcdata[$key]))
$txt .= implode(' ', $iptcdata[$key])."\n";
}
- $end = microtime(true);
}
+ $end = microtime(true);
if($this->logger) {
$this->logger->log('Conversion from '.$this->from.' to '.$this->to.' by extracting iptc took '.($end-$start).' sec.', PEAR_LOG_INFO);
}
From adbea2919a8cdfe383e84ead4552204cf347d72b Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 6 Jan 2023 07:48:32 +0100
Subject: [PATCH 202/247] do not set PDO::ATTR_AUTOCOMMIT because it prevents
sql statements not in a transaction from being executed
---
SeedDMS_Core/Core/inc.DBAccessPDO.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php
index 11f2541dc..c9d986cef 100644
--- a/SeedDMS_Core/Core/inc.DBAccessPDO.php
+++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php
@@ -301,7 +301,7 @@ class SeedDMS_Core_DatabaseAccess {
switch($this->_driver) {
case 'mysql':
$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. */
/* $this->_conn->exec("SET SESSION sql_mode = 'STRICT_TRANS_TABLES'"); */
/* The following is the default on Ubuntu 16.04 */
From 8c86b4f61ce276d3be96dbdf1e7339e8ae91134b Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 6 Jan 2023 11:13:32 +0100
Subject: [PATCH 203/247] output homefolder and link email address
---
views/bootstrap/class.SubstituteUser.php | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/views/bootstrap/class.SubstituteUser.php b/views/bootstrap/class.SubstituteUser.php
index 7ad0d639c..43e2ac02d 100644
--- a/views/bootstrap/class.SubstituteUser.php
+++ b/views/bootstrap/class.SubstituteUser.php
@@ -73,10 +73,12 @@ class SeedDMS_View_SubstituteUser extends SeedDMS_Theme_Style {
echo htmlspecialchars($currUser->getFullName())." (".htmlspecialchars($currUser->getLogin()).")";
if($hasemail)
echo "";
- echo " ";
+ if($currUser->getComment())
+ echo "".htmlspecialchars($currUser->getComment())." ";
if($hasemail)
- echo "".htmlspecialchars($currUser->getEmail())." ";
- echo "".htmlspecialchars($currUser->getComment())." ";
+ echo " getEmail())."\">".htmlspecialchars($currUser->getEmail())." ";
+ if($homefolder = $currUser->getHomeFolder())
+ echo " ".htmlspecialchars($dms->getFolder($homefolder)->getName())." ";
echo "";
echo "";
echo getMLText('role').": ";
From 26e6f24565f4d6a5a34e348846bfbbc3b04711bb Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 6 Jan 2023 13:46:33 +0100
Subject: [PATCH 204/247] fix checking for search result hits
---
out/out.Search.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/out/out.Search.php b/out/out.Search.php
index 7d0a75da4..599004dd6 100644
--- a/out/out.Search.php
+++ b/out/out.Search.php
@@ -202,7 +202,7 @@ if($fullsearch) {
$facets = $searchresult['facets'];
$dcount = 0;
$fcount = 0;
- if($searchresult) {
+ if($searchresult['hits']) {
foreach($searchresult['hits'] as $hit) {
if($hit['document_id'][0] == 'D') {
if($tmp = $dms->getDocument(substr($hit['document_id'], 1))) {
From f98df0efcc2d5af375ec186d323da8c99341243f Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 6 Jan 2023 13:46:58 +0100
Subject: [PATCH 205/247] better legend title
---
views/bootstrap/class.IndexInfo.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/views/bootstrap/class.IndexInfo.php b/views/bootstrap/class.IndexInfo.php
index d578638c9..d5ade2b5c 100644
--- a/views/bootstrap/class.IndexInfo.php
+++ b/views/bootstrap/class.IndexInfo.php
@@ -44,6 +44,7 @@ class SeedDMS_View_IndexInfo extends SeedDMS_Theme_Style {
$numDocs = $index->count();
echo "".$numDocs." ".getMLText('documents')." ";
+ /*
$this->contentContainerStart('fulltextinfo');
for ($id = 0; $id < $numDocs; $id++) {
if (!$index->isDeleted($id)) {
@@ -52,9 +53,10 @@ class SeedDMS_View_IndexInfo extends SeedDMS_Theme_Style {
}
}
$this->contentContainerEnd();
+ */
$terms = $index->terms();
- echo "".count($terms)." Terms ";
+ echo "".count($terms)." overall Terms ";
// echo "";
$field = '';
foreach($terms as $term) {
From b14a421591c8ba601f5755ec5c60ece0101658ec Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 6 Jan 2023 18:41:29 +0100
Subject: [PATCH 206/247] do not auth because browsers do not send cookies to
fetch opensearch desc
---
out/out.OpensearchDesc.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/out/out.OpensearchDesc.php b/out/out.OpensearchDesc.php
index d1240efab..246f80ea7 100644
--- a/out/out.OpensearchDesc.php
+++ b/out/out.OpensearchDesc.php
@@ -28,7 +28,8 @@ require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.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']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
From d35cf5d9f6683edf53d4264e8890982ef4722a7b Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 6 Jan 2023 18:43:18 +0100
Subject: [PATCH 207/247] fix syntax of url, set propper favicon
---
views/bootstrap/class.OpensearchDesc.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/views/bootstrap/class.OpensearchDesc.php b/views/bootstrap/class.OpensearchDesc.php
index 274e45fb3..bbd70aaa6 100644
--- a/views/bootstrap/class.OpensearchDesc.php
+++ b/views/bootstrap/class.OpensearchDesc.php
@@ -42,9 +42,9 @@ class SeedDMS_View_OpensearchDesc extends SeedDMS_Theme_Style {
= $sitename ?>
= $sitename ?>
- = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot ?>styles/= $this->theme ?>/favicon.ico
+ = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot ?>views/= $this->theme ?>/images/favicon.ico
_httpRoot."out/out.Search.php?query={searchTerms}" ?>" />
- _httpRoot."out/out.Search.php?action=opensearchsuggestion&query={searchTerms}" ?>" />
+ _httpRoot."out/out.Search.php?action=opensearchsuggestion&query={searchTerms}" ?>" />
= "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.Search.php" ?>
UTF-8
UTF-8
From 1ec7715b26706afe170631a11238ea17e042c8ac Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sat, 7 Jan 2023 12:18:03 +0100
Subject: [PATCH 208/247] set limit of typeahead search to 15
---
views/bootstrap/styles/application.js | 2 +-
views/bootstrap4/styles/application.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/views/bootstrap/styles/application.js b/views/bootstrap/styles/application.js
index 8cafbb25d..922fc5772 100644
--- a/views/bootstrap/styles/application.js
+++ b/views/bootstrap/styles/application.js
@@ -99,7 +99,7 @@ function initMost() {
// $.get('../restapi/index.php/search', { query: query, limit: 8, mode: 'typeahead' }, function(data) {
var data = {
query: query,
- limit: 18,
+ limit: 15,
// fullsearch: 1,
// creationdate: 1,
// createstart: d.toISOString().split('T')[0],
diff --git a/views/bootstrap4/styles/application.js b/views/bootstrap4/styles/application.js
index a39a2f604..bea3e79dd 100644
--- a/views/bootstrap4/styles/application.js
+++ b/views/bootstrap4/styles/application.js
@@ -104,7 +104,7 @@ function initMost() {
// $.get('../restapi/index.php/search', { query: query, limit: 8, mode: 'typeahead' }, function(data) {
var data = {
query: query,
- limit: 18,
+ limit: 15,
// fullsearch: 1,
// creationdate: 1,
// createstart: d.toISOString().split('T')[0],
From 30ab2f9ef7e8becf9490843f25b2580fc3bce3a5 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sat, 7 Jan 2023 12:18:30 +0100
Subject: [PATCH 209/247] limit can be passed by url parameter, add '*' to
query in typeahead mode
---
out/out.Search.php | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/out/out.Search.php b/out/out.Search.php
index 599004dd6..c28388f2e 100644
--- a/out/out.Search.php
+++ b/out/out.Search.php
@@ -66,11 +66,14 @@ if (isset($_GET["removecategory"]) && is_numeric($_GET["removecategory"]) && $_G
$removecategory = (int) $_GET['removecategory'];
}
+$limit = (isset($_GET["limit"]) && is_numeric($_GET["limit"])) ? (int) $_GET['limit'] : 20;
$fullsearch = ((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext') || !empty($_GET["fullsearch"])) && $settings->_enableFullSearch;
if($fullsearch) {
// Search in Fulltext {{{
if (isset($_GET["query"]) && is_string($_GET["query"])) {
$query = $_GET["query"];
+ if($_GET['action'] == 'typeahead')
+ $query .= '*';
}
else {
$query = "";
@@ -183,7 +186,7 @@ if($fullsearch) {
$searchTime = 0;
} else {
$startTime = getTime();
- $limit = 20;
+// $limit = 20;
$total = 0;
$index = $fulltextservice->Indexer();
if($index) {
@@ -471,7 +474,7 @@ if($fullsearch) {
//
// Default page to display is always one.
$pageNumber=1;
- $limit = 15;
+// $limit = 15;
if (isset($_GET["pg"])) {
if (is_numeric($_GET["pg"]) && $_GET["pg"]>0) {
$pageNumber = (int) $_GET["pg"];
From 3cc749786374522c71a4758e6764d6c7d082a61c Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 8 Jan 2023 16:21:08 +0100
Subject: [PATCH 210/247] fix setting limit
---
SeedDMS_Lucene/Lucene/Search.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SeedDMS_Lucene/Lucene/Search.php b/SeedDMS_Lucene/Lucene/Search.php
index 5ca533d93..d3adb08a4 100644
--- a/SeedDMS_Lucene/Lucene/Search.php
+++ b/SeedDMS_Lucene/Lucene/Search.php
@@ -137,7 +137,7 @@ class SeedDMS_Lucene_Search {
$recs = array();
$c = 0;
foreach($hits as $hit) {
- if($c >= $limit['offset'] && ($c-$limit['offset'] < $limit))
+ if($c >= $limit['offset'] && ($c-$limit['offset'] < $limit['limit']))
$recs[] = array('id'=>$hit->id, 'document_id'=>$hit->document_id);
$c++;
}
From 593792089f9fb0ca9f517a63f7a2e31731a8bd3d Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 8 Jan 2023 16:22:01 +0100
Subject: [PATCH 211/247] implement Zend indexer as singleton in
SeedDMS_Lucene_Indexer
---
SeedDMS_Lucene/Lucene/Indexer.php | 145 +++++++++++++++++++++++++++++-
1 file changed, 143 insertions(+), 2 deletions(-)
diff --git a/SeedDMS_Lucene/Lucene/Indexer.php b/SeedDMS_Lucene/Lucene/Indexer.php
index bc7321185..f0dee91ce 100644
--- a/SeedDMS_Lucene/Lucene/Indexer.php
+++ b/SeedDMS_Lucene/Lucene/Indexer.php
@@ -29,10 +29,23 @@ class SeedDMS_Lucene_Indexer {
*/
protected $indexname;
+ /**
+ * @var string $index lucene index
+ * @access protected
+ */
+ protected $index;
+
+ public function __construct($index) {
+ $this->index = $index;
+ }
+
static function open($conf) { /* {{{ */
try {
$index = Zend_Search_Lucene::open($conf['indexdir']);
- return($index);
+ if($index)
+ return new self($index);
+ else
+ return null;
} catch (Exception $e) {
return null;
}
@@ -41,7 +54,10 @@ class SeedDMS_Lucene_Indexer {
static function create($conf) { /* {{{ */
try {
$index = Zend_Search_Lucene::create($conf['indexdir']);
- return($index);
+ if($index)
+ return new self($index);
+ else
+ return null;
} catch (Exception $e) {
return null;
}
@@ -62,6 +78,131 @@ class SeedDMS_Lucene_Indexer {
Zend_Search_Lucene_Analysis_Analyzer::setDefault($analyzer);
} /* }}} */
+ /**
+ * Add document to index
+ *
+ * @param object $doc indexed document of class
+ * SeedDMS_Lucene_IndexedDocument
+ * @return boolean false in case of an error, otherwise true
+ */
+ function addDocument($doc) { /* {{{ */
+ if(!$this->index)
+ return false;
+ return $this->index->addDocument($doc);
+ } /* }}} */
+
+ /**
+ * Remove document from index
+ *
+ * @param object $id internal id of document
+ * @return boolean false in case of an error, otherwise true
+ */
+ public function delete($id) { /* {{{ */
+ if(!$this->index)
+ return false;
+
+ return $this->index->delete($id);
+ } /* }}} */
+
+ /**
+ * Check if document was deleted
+ *
+ * @param object $id internal id of document
+ * @return boolean true if document was deleted
+ */
+ public function isDeleted($id) { /* {{{ */
+ if(!$this->index)
+ return false;
+
+ return $this->index->isDeleted($id);
+ } /* }}} */
+
+ /**
+ * Search in index
+ *
+ * @param string $query
+ * @return array result
+ */
+ public function find($query) { /* {{{ */
+ if(!$this->index)
+ return false;
+
+ return $this->index->find($query);
+ } /* }}} */
+
+ /**
+ * Get a single document from index
+ *
+ * @param string $id id of document
+ * @return boolean false in case of an error, otherwise true
+ */
+ public function findById($id) { /* {{{ */
+ if(!$this->index)
+ return false;
+
+ return $this->index->findById($id);
+ } /* }}} */
+
+ /**
+ * Get a single document from index
+ *
+ * @param integer $id id of index record
+ * @return boolean false in case of an error, otherwise true
+ */
+ public function getDocument($id, $content=true) { /* {{{ */
+ if(!$this->index)
+ return false;
+
+ return $this->index->getDocument($id);
+ } /* }}} */
+
+ /**
+ * Return list of terms in index
+ *
+ * @return array list of Zend_Lucene_Term
+ */
+ public function terms($prefix='', $col='') { /* {{{ */
+ if(!$this->index)
+ return false;
+
+ return $this->index->terms();
+ } /* }}} */
+
+ /**
+ * Return number of documents in index
+ *
+ * @return interger number of documents
+ */
+ public function count() { /* {{{ */
+ if(!$this->index)
+ return false;
+
+ return $this->index->count();
+ } /* }}} */
+
+ /**
+ * Commit changes
+ *
+ * This function does nothing!
+ */
+ function commit() { /* {{{ */
+ if(!$this->index)
+ return false;
+
+ return $this->index->commit();
+ } /* }}} */
+
+ /**
+ * Optimize index
+ *
+ * This function does nothing!
+ */
+ function optimize() { /* {{{ */
+ if(!$this->index)
+ return false;
+
+ return $this->index->optimize();
+ } /* }}} */
}
?>
From 71b8b197da23ec72cdab7e7227bf29f5c04508a1 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 8 Jan 2023 16:22:52 +0100
Subject: [PATCH 212/247] various minor improvements
---
SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
index 506af59bc..ed86ce32e 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
@@ -54,7 +54,7 @@ class SeedDMS_SQLiteFTS_Indexer {
$words = preg_split('/[^-\w\']+/u', $str, -1, PREG_SPLIT_NO_EMPTY);
// 2.) if we have at least 2 words, remove stopwords
- if(count($words) > 1) {
+ if(!empty($words)) {
$stopwords = $this->_stop_words;
$words = array_filter($words, function ($w) use (&$stopwords) {
return ((mb_strlen($w, 'utf-8') > 2) && !isset($stopwords[mb_strtolower($w, "utf-8")]));
@@ -90,7 +90,7 @@ class SeedDMS_SQLiteFTS_Indexer {
if(file_exists($conf['indexdir'].'/index.db')) {
return new SeedDMS_SQLiteFTS_Indexer($conf['indexdir']);
} else
- return self::create($conf);
+ return static::create($conf);
} /* }}} */
/**
@@ -183,8 +183,7 @@ class SeedDMS_SQLiteFTS_Indexer {
/**
* Remove document from index
*
- * @param object $doc indexed document of class
- * SeedDMS_SQLiteFTS_IndexedDocument
+ * @param object $id internal id of document
* @return boolean false in case of an error, otherwise true
*/
public function delete($id) { /* {{{ */
@@ -215,7 +214,7 @@ class SeedDMS_SQLiteFTS_Indexer {
* @return boolean false in case of an error, otherwise array with elements
* 'count', 'hits', 'facets'. 'hits' is an array of SeedDMS_SQLiteFTS_QueryHit
*/
- public function find($query, $filter, $limit=array(), $order=array()) { /* {{{ */
+ public function find($query, $filter='', $limit=array(), $order=array()) { /* {{{ */
if(!$this->_conn)
return false;
@@ -392,16 +391,16 @@ class SeedDMS_SQLiteFTS_Indexer {
*
* @return array list of SeedDMS_SQLiteFTS_Term
*/
- public function terms($query='', $col='') { /* {{{ */
+ public function terms($prefix='', $col='') { /* {{{ */
if(!$this->_conn)
return false;
if($this->_ftstype == 'fts5') {
$sql = "SELECT term, col, doc as occurrences FROM docs_terms";
- if($query || $col) {
+ if($prefix || $col) {
$sql .= " WHERE";
- if($query) {
- $sql .= " term like '".$query."%'";
+ if($prefix) {
+ $sql .= " term like '".$prefix."%'";
if($col)
$sql .= " AND";
}
@@ -411,8 +410,8 @@ class SeedDMS_SQLiteFTS_Indexer {
$sql .= " ORDER BY col, occurrences desc";
} else {
$sql = "SELECT term, col, occurrences FROM docs_terms WHERE col!='*'";
- if($query)
- $sql .= " AND term like '".$query."%'";
+ if($prefix)
+ $sql .= " AND term like '".$prefix."%'";
if($col)
$sql .= " AND col = '".$col."'";
$sql .= " ORDER BY col, occurrences desc";
From 23c4327382a27a3bc6001a6a53b906d3f2947afd Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 8 Jan 2023 16:23:27 +0100
Subject: [PATCH 213/247] escape html in typeahead action
---
views/bootstrap/class.Search.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php
index ff2ea8341..2526b0db7 100644
--- a/views/bootstrap/class.Search.php
+++ b/views/bootstrap/class.Search.php
@@ -367,10 +367,10 @@ function typeahead() { /* {{{ */
foreach ($entries as $entry) {
if($entry->isType('document')) {
// $recs[] = 'D'.$entry->getName();
- $recs[] = array('type'=>'D', 'id'=>$entry->getId(), 'name'=>$entry->getName(), 'path'=>$entry->getParent()->getFolderPathPlain(true, '/'));
+ $recs[] = array('type'=>'D', 'id'=>$entry->getId(), 'name'=>htmlspecialchars($entry->getName()), 'path'=>htmlspecialchars($entry->getParent()->getFolderPathPlain(true, '/')));
} elseif($entry->isType('folder')) {
// $recs[] = 'F'.$entry->getName();
- $recs[] = array('type'=>'F', 'id'=>$entry->getId(), 'name'=>$entry->getName(), 'path'=>$entry->getParent()->getFolderPathPlain(true, '/'));
+ $recs[] = array('type'=>'F', 'id'=>$entry->getId(), 'name'=>htmlspecialchars($entry->getName()), 'path'=>htmlspecialchars($entry->getParent()->getFolderPathPlain(true, '/')));
}
}
}
From 409df834a3dcfe53004de4f548b001f012a491c1 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Sun, 8 Jan 2023 16:24:02 +0100
Subject: [PATCH 214/247] check for typeahead action without php warnings
---
out/out.Search.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/out/out.Search.php b/out/out.Search.php
index c28388f2e..51618c6bd 100644
--- a/out/out.Search.php
+++ b/out/out.Search.php
@@ -72,7 +72,7 @@ if($fullsearch) {
// Search in Fulltext {{{
if (isset($_GET["query"]) && is_string($_GET["query"])) {
$query = $_GET["query"];
- if($_GET['action'] == 'typeahead')
+ if(isset($_GET['action']) && ($_GET['action'] == 'typeahead'))
$query .= '*';
}
else {
From 732fd81018489393ce1439cd209b9beac405f399 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 9 Jan 2023 15:29:58 +0100
Subject: [PATCH 215/247] add query for record_type
---
SeedDMS_Lucene/Lucene/Search.php | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/SeedDMS_Lucene/Lucene/Search.php b/SeedDMS_Lucene/Lucene/Search.php
index d3adb08a4..6f53ee9ea 100644
--- a/SeedDMS_Lucene/Lucene/Search.php
+++ b/SeedDMS_Lucene/Lucene/Search.php
@@ -89,6 +89,13 @@ class SeedDMS_Lucene_Search {
$querystr .= '")';
}
}
+ if(!empty($fields['record_type'])) {
+ if($querystr)
+ $querystr .= ' && ';
+ $querystr .= '(record_type:';
+ $querystr .= implode(' || record_type:', $fields['record_type']);
+ $querystr .= ')';
+ }
if(!empty($fields['category'])) {
if($querystr)
$querystr .= ' && ';
From 0686cfecf506cec2f40a3fc6c92fdc913a3f6645 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 9 Jan 2023 15:30:18 +0100
Subject: [PATCH 216/247] init only fulltext service which was selected in
configuration
---
inc/inc.FulltextInit.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/inc/inc.FulltextInit.php b/inc/inc.FulltextInit.php
index 4a9fcba00..87687d9bb 100644
--- a/inc/inc.FulltextInit.php
+++ b/inc/inc.FulltextInit.php
@@ -32,8 +32,10 @@ if($settings->_enableFullSearch) {
$indexconf = null;
if(isset($GLOBALS['SEEDDMS_HOOKS']['initFulltext'])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['initFulltext'] as $hookObj) {
- if (method_exists($hookObj, 'initFulltextService')) {
- $indexconf = $hookObj->initFulltextService(array('engine'=>$settings->_fullSearchEngine, 'dms'=>$dms, 'settings'=>$settings));
+ if (method_exists($hookObj, 'isFulltextService') && $hookObj->isFulltextService($settings->_fullSearchEngine)) {
+ if (method_exists($hookObj, 'initFulltextService')) {
+ $indexconf = $hookObj->initFulltextService(array('engine'=>$settings->_fullSearchEngine, 'dms'=>$dms, 'settings'=>$settings));
+ }
}
}
}
From 2310395e46c83fc918d3214fa6435830fdfb3ebf Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 9 Jan 2023 15:30:44 +0100
Subject: [PATCH 217/247] add field record_type
---
SeedDMS_Lucene/Lucene/IndexedDocument.php | 3 +++
1 file changed, 3 insertions(+)
diff --git a/SeedDMS_Lucene/Lucene/IndexedDocument.php b/SeedDMS_Lucene/Lucene/IndexedDocument.php
index 1ee2d93c7..c8e76b26c 100644
--- a/SeedDMS_Lucene/Lucene/IndexedDocument.php
+++ b/SeedDMS_Lucene/Lucene/IndexedDocument.php
@@ -145,6 +145,7 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document {
if($document->isType('document')) {
$this->addField(Zend_Search_Lucene_Field::Keyword('document_id', 'D'.$document->getID()));
+ $this->addField(Zend_Search_Lucene_Field::Keyword('record_type', 'document'));
$version = $document->getLatestContent();
if($version) {
$this->addField(Zend_Search_Lucene_Field::Keyword('mimetype', $version->getMimeType()));
@@ -232,7 +233,9 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document {
}
} elseif($document->isType('folder')) {
$this->addField(Zend_Search_Lucene_Field::Keyword('document_id', 'F'.$document->getID()));
+ $this->addField(Zend_Search_Lucene_Field::Keyword('record_type', 'folder'));
$this->addField(Zend_Search_Lucene_Field::UnIndexed('created', $document->getDate()));
+ $this->addField(Zend_Search_Lucene_Field::UnIndexed('indexed', time()));
}
} /* }}} */
From 5e48d724acc07052be6e6a8f2d3a6917a3097cc5 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 9 Jan 2023 15:31:05 +0100
Subject: [PATCH 218/247] pass terms to view
---
out/out.Search.php | 3 +++
1 file changed, 3 insertions(+)
diff --git a/out/out.Search.php b/out/out.Search.php
index 51618c6bd..99cdb822d 100644
--- a/out/out.Search.php
+++ b/out/out.Search.php
@@ -66,6 +66,7 @@ if (isset($_GET["removecategory"]) && is_numeric($_GET["removecategory"]) && $_G
$removecategory = (int) $_GET['removecategory'];
}
+$terms = [];
$limit = (isset($_GET["limit"]) && is_numeric($_GET["limit"])) ? (int) $_GET['limit'] : 20;
$fullsearch = ((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext') || !empty($_GET["fullsearch"])) && $settings->_enableFullSearch;
if($fullsearch) {
@@ -190,6 +191,7 @@ if($fullsearch) {
$total = 0;
$index = $fulltextservice->Indexer();
if($index) {
+// $terms = $index->terms($_GET['query']);
$lucenesearch = $fulltextservice->Search();
$searchresult = $lucenesearch->search($query, array('record_type'=>$record_type, 'owner'=>$ownernames, 'status'=>$status, 'category'=>$categorynames, 'user'=>$user->isAdmin() ? [] : [$user->getLogin()], 'mimetype'=>$mimetype, 'startFolder'=>$startFolder, 'rootFolder'=>$rootFolder), ($pageNumber == 'all' ? array() : array('limit'=>$limit, 'offset'=>$limit * ($pageNumber-1))));
if($searchresult === false) {
@@ -575,6 +577,7 @@ if($settings->_showSingleSearchHit && count($entries) == 1) {
$view->setParam('changecategory', $changecategory);
$view->setParam('removecategory', $removecategory);
$view->setParam('searchhits', $entries);
+ $view->setParam('terms', $terms);
$view->setParam('totalpages', $totalPages);
$view->setParam('pagenumber', $pageNumber);
$view->setParam('limit', $limit);
From 707082f6b69195b5857e15d6ad72cc0f6f1b644e Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 9 Jan 2023 15:31:30 +0100
Subject: [PATCH 219/247] list terms in auto complete if set
---
views/bootstrap/class.Search.php | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php
index 2526b0db7..92e5d5e5b 100644
--- a/views/bootstrap/class.Search.php
+++ b/views/bootstrap/class.Search.php
@@ -362,19 +362,22 @@ function typeahead() { /* {{{ */
$user = $this->params['user'];
$query = $this->params['query'];
$entries = $this->params['searchhits'];
+ $terms = $this->params['terms'];
$recs = array();
+ $recs[] = array('type'=>'S', 'name'=>$query, 'occurences'=>'');
+ if($terms) {
+ foreach($terms as $term)
+ $recs[] = array('type'=>'S', 'name'=>$term->text, 'occurences'=>$term->_occurrence);
+ }
if($entries) {
foreach ($entries as $entry) {
if($entry->isType('document')) {
-// $recs[] = 'D'.$entry->getName();
$recs[] = array('type'=>'D', 'id'=>$entry->getId(), 'name'=>htmlspecialchars($entry->getName()), 'path'=>htmlspecialchars($entry->getParent()->getFolderPathPlain(true, '/')));
} elseif($entry->isType('folder')) {
-// $recs[] = 'F'.$entry->getName();
$recs[] = array('type'=>'F', 'id'=>$entry->getId(), 'name'=>htmlspecialchars($entry->getName()), 'path'=>htmlspecialchars($entry->getParent()->getFolderPathPlain(true, '/')));
}
}
}
- array_unshift($recs, array('type'=>'S', 'name'=>$query));
header('Content-Type: application/json');
echo json_encode($recs);
} /* }}} */
@@ -829,6 +832,22 @@ function typeahead() { /* {{{ */
)
);
}
+ if(!isset($facets['record_type'])) {
+ $options = array();
+ $options[] = array('document', getMLText('document'), in_array('document', $record_type));
+ $options[] = array('folder', getMLText('folder'), in_array('folder', $record_type));
+ $this->formField(
+ getMLText("record_type"),
+ array(
+ 'element'=>'select',
+ 'class'=>'chzn-select',
+ 'name'=>'record_type[]',
+ 'multiple'=>true,
+ 'attributes'=>array(array('data-placeholder', getMLText('select_record_type'))),
+ 'options'=>$options
+ )
+ );
+ }
if($facets) {
foreach($facets as $facetname=>$values) {
From bc5aa7703c27511ab018a8fadfeacd876795b90c Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 9 Jan 2023 15:32:00 +0100
Subject: [PATCH 220/247] display number of occurences of term
---
views/bootstrap/styles/application.js | 6 +-----
views/bootstrap4/styles/application.js | 6 +-----
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/views/bootstrap/styles/application.js b/views/bootstrap/styles/application.js
index 922fc5772..fef4a5614 100644
--- a/views/bootstrap/styles/application.js
+++ b/views/bootstrap/styles/application.js
@@ -96,13 +96,9 @@ function initMost() {
d.setFullYear(pastYear);
// console.log(d.toISOString().split('T')[0]);
-// $.get('../restapi/index.php/search', { query: query, limit: 8, mode: 'typeahead' }, function(data) {
var data = {
query: query,
limit: 15,
-// fullsearch: 1,
-// creationdate: 1,
-// createstart: d.toISOString().split('T')[0],
action: 'typeahead'
};
/* Return a list of json objects, each containing
@@ -152,7 +148,7 @@ function initMost() {
else if(item.type.charAt(0) == 'F')
return ' ' + item.name.replace(/' + item.path + ' ';
else
- return ' ' + item.name.replace(/ ' + item.name.replace(/ 0 ? ' (' + item.occurences + ')' : '');
},
/* This only works with a modified version of bootstrap typeahead located
* in boostrap-typeahead.js Search for 'render'
diff --git a/views/bootstrap4/styles/application.js b/views/bootstrap4/styles/application.js
index bea3e79dd..208a2f4c3 100644
--- a/views/bootstrap4/styles/application.js
+++ b/views/bootstrap4/styles/application.js
@@ -101,13 +101,9 @@ function initMost() {
d.setFullYear(pastYear);
// console.log(d.toISOString().split('T')[0]);
-// $.get('../restapi/index.php/search', { query: query, limit: 8, mode: 'typeahead' }, function(data) {
var data = {
query: query,
limit: 15,
-// fullsearch: 1,
-// creationdate: 1,
-// createstart: d.toISOString().split('T')[0],
action: 'typeahead'
};
/* Return a list of json objects, each containing
@@ -157,7 +153,7 @@ function initMost() {
else if(item.type.charAt(0) == 'F')
return ' ' + item.name.replace(/' + item.path + ' ';
else
- return ' ' + item.name.replace(/ ' + item.name.replace(/ 0 ? ' (' + item.occurences + ')' : '');
},
/* This only works with a modified version of bootstrap typeahead located
* in boostrap-typeahead.js Search for 'render'
From b1b16e1008e8f21dd3fcfc85f0e5126ec5a223ed Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 9 Jan 2023 15:32:38 +0100
Subject: [PATCH 221/247] output time in secs for indexing
---
utils/indexer.php | 3 +++
1 file changed, 3 insertions(+)
diff --git a/utils/indexer.php b/utils/indexer.php
index 0784c6398..868ebd0c9 100644
--- a/utils/indexer.php
+++ b/utils/indexer.php
@@ -192,6 +192,7 @@ $stats['folder']['update'] = 0;
$stats['document']['add'] = 0;
$stats['document']['unchanged'] = 0;
$stats['document']['update'] = 0;
+$stats['time']['total'] = time();
$numdocs = $fulltextservice->Indexer()->count();
$folder = $dms->getFolder($settings->_rootFolderID);
/* if numdocs is 0, then there is no need to check if a document/folder is already
@@ -201,8 +202,10 @@ tree($dms, $fulltextservice, $folder,'', $numdocs);
$index->commit();
$index->optimize();
+$stats['time']['total'] = time()-$stats['time']['total'];
echo PHP_EOL;
+echo $themes->black("Total Time: ".$stats['time']['total'].' sec.').PHP_EOL;
echo $themes->black("Documents").PHP_EOL;
echo $themes->black(" added: ".$stats['document']['add']).PHP_EOL;
echo $themes->black(" updated: ".$stats['document']['update']).PHP_EOL;
From 095605f85e20a58f38506c61fcf794ac1cecd2bb Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 9 Jan 2023 15:33:56 +0100
Subject: [PATCH 222/247] add text preview
---
SeedDMS_Preview/Preview/TxtPreviewer.php | 306 +++++++++++++++++++++++
1 file changed, 306 insertions(+)
create mode 100644 SeedDMS_Preview/Preview/TxtPreviewer.php
diff --git a/SeedDMS_Preview/Preview/TxtPreviewer.php b/SeedDMS_Preview/Preview/TxtPreviewer.php
new file mode 100644
index 000000000..7826ff793
--- /dev/null
+++ b/SeedDMS_Preview/Preview/TxtPreviewer.php
@@ -0,0 +1,306 @@
+
+ * @copyright Copyright (C) 2010, Uwe Steinmann
+ * @version Release: @package_version@
+ */
+
+
+/**
+ * Class for managing creation of text preview for documents.
+ *
+ * @category DMS
+ * @package SeedDMS_Preview
+ * @version @version@
+ * @author Uwe Steinmann
+ * @copyright Copyright (C) 2011, Uwe Steinmann
+ * @version Release: @package_version@
+ */
+class SeedDMS_Preview_TxtPreviewer extends SeedDMS_Preview_Base {
+
+ function __construct($previewDir, $timeout=5, $xsendfile=true) { /* {{{ */
+ parent::__construct($previewDir.DIRECTORY_SEPARATOR.'txt', $timeout, $xsendfile);
+ $this->converters = array(
+ );
+ } /* }}} */
+
+ /**
+ * Return the physical filename of the preview image on disc
+ * including the path
+ *
+ * @param object $object document content or document file
+ * @return string file name of preview image
+ */
+ public function getFileName($object) { /* {{{ */
+ if(!$object)
+ return false;
+
+ $document = $object->getDocument();
+ $dms = $document->_dms;
+ $dir = $this->previewDir.DIRECTORY_SEPARATOR.$document->getDir();
+ switch(get_class($object)) {
+ case $dms->getClassname('documentcontent'):
+ $target = $dir.'t'.$object->getVersion();
+ break;
+ default:
+ return false;
+ }
+ return $target;
+ } /* }}} */
+
+ /**
+ * Check if converter for a given mimetype is set
+ *
+ * @param string $mimetype from mimetype
+ *
+ * @return boolean true if converter exists, otherwise false
+ */
+ function hasConverter($from, $to='') { /* {{{ */
+ return parent::hasConverter($from, 'text/plain');
+ } /* }}} */
+
+ /**
+ * Create a text preview for a given file
+ *
+ * This method creates a preview in text format for a regular file
+ * in the file system and stores the result in the directory $dir relative
+ * to the configured preview directory. The filename of the resulting preview
+ * image is either $target.text (if set) or md5($infile).text.
+ * The $mimetype is used to select the propper conversion programm.
+ * An already existing text preview is replaced.
+ *
+ * @param string $infile name of input file including full path
+ * @param string $dir directory relative to $this->previewDir
+ * @param string $mimetype MimeType of input file
+ * @param string $target optional name of preview image (without extension)
+ * @return boolean true on success, false on failure
+ */
+ public function createRawPreview($infile, $dir, $mimetype, $target='') { /* {{{ */
+ if(!self::hasConverter($mimetype))
+ return true;
+
+ if(!$this->previewDir)
+ return false;
+ if(!is_dir($this->previewDir.DIRECTORY_SEPARATOR.$dir)) {
+ if (!SeedDMS_Core_File::makeDir($this->previewDir.DIRECTORY_SEPARATOR.$dir)) {
+ return false;
+ }
+ }
+ if(!file_exists($infile))
+ return false;
+ if(!$target)
+ $target = $this->previewDir.$dir.md5($infile);
+ $this->lastpreviewfile = $target.'.txt';
+ if($target != '' && (!file_exists($target.'.txt') || filectime($target.'.txt') < filectime($infile))) {
+ if($this->conversionmgr) {
+ if(!$this->conversionmgr->convert($infile, $mimetype, 'text/plain', $target.'.txt')) {
+ $this->lastpreviewfile = '';
+ return false;
+ }
+ $new = true;
+ } else {
+ $cmd = '';
+ $mimeparts = explode('/', $mimetype, 2);
+ if(isset($this->converters[$mimetype])) {
+ $cmd = str_replace(array('%f', '%o', '%m'), array($infile, $target.'.txt', $mimetype), $this->converters[$mimetype]);
+ } elseif(isset($this->converters[$mimeparts[0].'/*'])) {
+ $cmd = str_replace(array('%f', '%o', '%m'), array($infile, $target.'.txt', $mimetype), $this->converters[$mimeparts[0].'/*']);
+ } elseif(isset($this->converters['*'])) {
+ $cmd = str_replace(array('%f', '%o', '%m'), array($infile, $target.'.txt', $mimetype), $this->converters['*']);
+ }
+
+ if($cmd) {
+ try {
+ self::execWithTimeout($cmd, $this->timeout);
+ $new = true;
+ } catch(Exception $e) {
+ $this->lastpreviewfile = '';
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+ $new = false;
+ return true;
+
+ } /* }}} */
+
+ /**
+ * Create preview image
+ *
+ * This function creates a preview image for the given document
+ * content or document file. It internally uses
+ * {@link SeedDMS_Preview::createRawPreview()}. The filename of the
+ * preview image is created by {@link SeedDMS_Preview_Previewer::getFileName()}
+ *
+ * @param object $object instance of SeedDMS_Core_DocumentContent
+ * or SeedDMS_Core_DocumentFile
+ * @return boolean true on success, false on failure
+ */
+ public function createPreview($object) { /* {{{ */
+ if(!$object)
+ return false;
+
+ $document = $object->getDocument();
+ $file = $document->_dms->contentDir.$object->getPath();
+ $target = $this->getFileName($object);
+ return $this->createRawPreview($file, $document->getDir(), $object->getMimeType(), $target);
+ } /* }}} */
+
+ /**
+ * Check if a preview image already exists.
+ *
+ * This function is a companion to {@link SeedDMS_Preview_Previewer::createRawPreview()}.
+ *
+ * @param string $infile name of input file including full path
+ * @param string $dir directory relative to $this->previewDir
+ * @return boolean true if preview exists, otherwise false
+ */
+ public function hasRawPreview($infile, $dir, $target='') { /* {{{ */
+ if(!$this->previewDir)
+ return false;
+ if(!$target)
+ $target = $this->previewDir.$dir.md5($infile);
+ if($target !== false && file_exists($target.'.txt') && filectime($target.'.txt') >= filectime($infile)) {
+ return true;
+ }
+ return false;
+ } /* }}} */
+
+ /**
+ * Check if a preview txt already exists.
+ *
+ * This function is a companion to {@link SeedDMS_Preview_Previewer::createPreview()}.
+ *
+ * @param object $object instance of SeedDMS_Core_DocumentContent
+ * or SeedDMS_Core_DocumentFile
+ * @return boolean true if preview exists, otherwise false
+ */
+ public function hasPreview($object) { /* {{{ */
+ if(!$object)
+ return false;
+
+ if(!$this->previewDir)
+ return false;
+ $target = $this->getFileName($object);
+ if($target !== false && file_exists($target.'.txt') && filectime($target.'.txt') >= $object->getDate()) {
+ return true;
+ }
+ return false;
+ } /* }}} */
+
+ /**
+ * Return a preview image.
+ *
+ * This function returns the content of a preview image if it exists..
+ *
+ * @param string $infile name of input file including full path
+ * @param string $dir directory relative to $this->previewDir
+ * @return boolean/string image content if preview exists, otherwise false
+ */
+ public function getRawPreview($infile, $dir, $target='') { /* {{{ */
+ if(!$this->previewDir)
+ return false;
+
+ if(!$target)
+ $target = $this->previewDir.$dir.md5($infile);
+ if($target && file_exists($target.'.txt')) {
+ $this->sendFile($target.'.txt');
+ }
+ } /* }}} */
+
+ /**
+ * Return a preview image.
+ *
+ * This function returns the content of a preview image if it exists..
+ *
+ * @param object $object instance of SeedDMS_Core_DocumentContent
+ * or SeedDMS_Core_DocumentFile
+ * @return boolean/string image content if preview exists, otherwise false
+ */
+ public function getPreview($object) { /* {{{ */
+ if(!$this->previewDir)
+ return false;
+
+ $target = $this->getFileName($object);
+ if($target && file_exists($target.'.txt')) {
+ $this->sendFile($target.'.txt');
+ }
+ } /* }}} */
+
+ /**
+ * Return file size preview image.
+ *
+ * @param object $object instance of SeedDMS_Core_DocumentContent
+ * or SeedDMS_Core_DocumentFile
+ * @return boolean/integer size of preview image or false if image
+ * does not exist
+ */
+ public function getFilesize($object) { /* {{{ */
+ $target = $this->getFileName($object);
+ if($target && file_exists($target.'.txt')) {
+ return(filesize($target.'.txt'));
+ } else {
+ return false;
+ }
+
+ } /* }}} */
+
+ /**
+ * Delete preview image.
+ *
+ * @param object $object instance of SeedDMS_Core_DocumentContent
+ * or SeedDMS_Core_DocumentFile
+ * @return boolean true if deletion succeded or false if file does not exist
+ */
+ public function deletePreview($object) { /* {{{ */
+ if(!$this->previewDir)
+ return false;
+
+ $target = $this->getFileName($object);
+ if($target && file_exists($target.'.txt')) {
+ return(unlink($target.'.txt'));
+ } else {
+ return false;
+ }
+ } /* }}} */
+
+ static function recurseRmdir($dir) {
+ $files = array_diff(scandir($dir), array('.','..'));
+ foreach ($files as $file) {
+ (is_dir("$dir/$file")) ? SeedDMS_Preview_Previewer::recurseRmdir("$dir/$file") : unlink("$dir/$file");
+ }
+ return rmdir($dir);
+ }
+
+ /**
+ * Delete all preview text belonging to a document
+ *
+ * This function removes the preview text of all versions and
+ * files of a document including the directory. It actually just
+ * removes the directory for the document in the cache.
+ *
+ * @param object $document instance of SeedDMS_Core_Document
+ * @return boolean true if deletion succeded or false if file does not exist
+ */
+ public function deleteDocumentPreviews($document) { /* {{{ */
+ if(!$this->previewDir)
+ return false;
+
+ $dir = $this->previewDir.DIRECTORY_SEPARATOR.$document->getDir();
+ if(file_exists($dir) && is_dir($dir)) {
+ return SeedDMS_Preview_Previewer::recurseRmdir($dir);
+ } else {
+ return false;
+ }
+
+ } /* }}} */
+}
+?>
From 627baa5cc8995c61afbbac248847721169f1d245 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 9 Jan 2023 16:15:18 +0100
Subject: [PATCH 223/247] add logos to list of extensions
---
views/bootstrap/class.Info.php | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/views/bootstrap/class.Info.php b/views/bootstrap/class.Info.php
index e7623c98a..78350783a 100644
--- a/views/bootstrap/class.Info.php
+++ b/views/bootstrap/class.Info.php
@@ -35,6 +35,7 @@ class SeedDMS_View_Info extends SeedDMS_Theme_Style {
$dms = $this->params['dms'];
$user = $this->params['user'];
$settings = $this->params['settings'];
+ $httproot = $settings->_httpRoot;
$version = $this->params['version'];
$availversions = $this->params['availversions'];
$extmgr = $this->params['extmgr'];
@@ -67,16 +68,21 @@ class SeedDMS_View_Info extends SeedDMS_Theme_Style {
echo "\n";
echo "
\n \n
\n";
$dbversion = $dms->getDBVersion();
- echo "".getMLText('seeddms_version')." ".$version->version()." \n";
+ echo "".getMLText('seeddms_version')." ".$version->version()." \n";
if($user->isAdmin()) {
- echo "".getMLText('database_schema_version')." ".$dbversion['major'].".".$dbversion['minor'].".".$dbversion['subminor']." \n";
+ echo "".getMLText('database_schema_version')." ".$dbversion['major'].".".$dbversion['minor'].".".$dbversion['subminor']." \n";
foreach($seedextensions as $extname=>$extconf) {
echo "";
if(!$settings->extensionIsDisabled($extname))
echo " ";
else
echo " ";
- echo " ".$extname." ".$extconf['title']." ".$extconf['version']." ";
+ echo "";
+ echo "";
+ if($extconf['icon'])
+ echo " ";
+ echo " ";
+ echo "".$extname." ".$extconf['title']." ".$extconf['version']." ";
echo " \n";
}
}
From 8c87816070b7dc699d170c4847736d0b56f4f58d Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 9 Jan 2023 16:15:36 +0100
Subject: [PATCH 224/247] check if $record_type is set
---
views/bootstrap/class.Search.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php
index 92e5d5e5b..43e8992f1 100644
--- a/views/bootstrap/class.Search.php
+++ b/views/bootstrap/class.Search.php
@@ -834,8 +834,8 @@ function typeahead() { /* {{{ */
}
if(!isset($facets['record_type'])) {
$options = array();
- $options[] = array('document', getMLText('document'), in_array('document', $record_type));
- $options[] = array('folder', getMLText('folder'), in_array('folder', $record_type));
+ $options[] = array('document', getMLText('document'), $record_type && in_array('document', $record_type));
+ $options[] = array('folder', getMLText('folder'), $record_type && in_array('folder', $record_type));
$this->formField(
getMLText("record_type"),
array(
From 330a147533c45cc20959f88f230a3b0816358ec6 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Mon, 9 Jan 2023 17:45:20 +0100
Subject: [PATCH 225/247] update release date and notes
---
SeedDMS_Lucene/package.xml | 3 ++-
SeedDMS_Preview/package.xml | 2 +-
SeedDMS_SQLiteFTS/package.xml | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/SeedDMS_Lucene/package.xml b/SeedDMS_Lucene/package.xml
index 6b901160b..3ccc53ec9 100644
--- a/SeedDMS_Lucene/package.xml
+++ b/SeedDMS_Lucene/package.xml
@@ -11,7 +11,7 @@
uwe@steinmann.cx
yes
- 2023-01-03
+ 2023-01-09
08:55:43
1.1.18
@@ -24,6 +24,7 @@
GPL License
- IndexedDocument() accepts a callable for conversion to text
+- SeedDMS_Lucene_Search::open and create return itself but Zend_Search_Lucene
diff --git a/SeedDMS_Preview/package.xml b/SeedDMS_Preview/package.xml
index 4e385c123..cddd83d25 100644
--- a/SeedDMS_Preview/package.xml
+++ b/SeedDMS_Preview/package.xml
@@ -11,7 +11,7 @@
uwe@steinmann.cx
yes
- 2023-01-02
+ 2023-01-09
09:49:39
1.5.0
diff --git a/SeedDMS_SQLiteFTS/package.xml b/SeedDMS_SQLiteFTS/package.xml
index 047d9cae1..3813a6252 100644
--- a/SeedDMS_SQLiteFTS/package.xml
+++ b/SeedDMS_SQLiteFTS/package.xml
@@ -11,7 +11,7 @@
uwe@steinmann.cx
yes
- 2023-01-03
+ 2023-01-09
08:57:44
1.0.18
From 1d217251c193832868fb567cd1d2785ab6d9327b Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 10 Jan 2023 08:10:33 +0100
Subject: [PATCH 226/247] add method
SeedDMS_Core_KeywordCategory::countKeywordLists()
---
SeedDMS_Core/Core/inc.ClassKeywords.php | 158 +++++++++++++-----------
1 file changed, 86 insertions(+), 72 deletions(-)
diff --git a/SeedDMS_Core/Core/inc.ClassKeywords.php b/SeedDMS_Core/Core/inc.ClassKeywords.php
index aa11c9dc3..16afc994f 100644
--- a/SeedDMS_Core/Core/inc.ClassKeywords.php
+++ b/SeedDMS_Core/Core/inc.ClassKeywords.php
@@ -8,7 +8,7 @@
* @version @version@
* @author Uwe Steinmann
* @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe,
- * 2010 Uwe Steinmann
+ * 2010-2023 Uwe Steinmann
* @version Release: @package_version@
*/
@@ -19,7 +19,7 @@
* @package SeedDMS_Core
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann
* @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe,
- * 2010 Uwe Steinmann
+ * 2010-2023 Uwe Steinmann
* @version Release: @package_version@
*/
class SeedDMS_Core_KeywordCategory {
@@ -47,53 +47,53 @@ class SeedDMS_Core_KeywordCategory {
*/
protected $_dms;
- /**
- * SeedDMS_Core_KeywordCategory constructor.
- * @param $id
- * @param $ownerID
- * @param $name
- */
- function __construct($id, $ownerID, $name) {
+ /**
+ * SeedDMS_Core_KeywordCategory constructor.
+ * @param $id
+ * @param $ownerID
+ * @param $name
+ */
+ function __construct($id, $ownerID, $name) { /* {{{ */
$this->_id = $id;
$this->_name = $name;
$this->_ownerID = $ownerID;
$this->_dms = null;
- }
+ } /* }}} */
- /**
- * @param SeedDMS_Core_DMS $dms
- */
- function setDMS($dms) {
+ /**
+ * @param SeedDMS_Core_DMS $dms
+ */
+ function setDMS($dms) { /* {{{ */
$this->_dms = $dms;
- }
+ } /* }}} */
- /**
- * @return int
- */
+ /**
+ * @return int
+ */
function getID() { return $this->_id; }
- /**
- * @return string
- */
+ /**
+ * @return string
+ */
function getName() { return $this->_name; }
- /**
- * @return bool|SeedDMS_Core_User
- */
- function getOwner() {
+ /**
+ * @return bool|SeedDMS_Core_User
+ */
+ function getOwner() { /* {{{ */
if (!isset($this->_owner))
$this->_owner = $this->_dms->getUser($this->_ownerID);
return $this->_owner;
- }
+ } /* }}} */
- /**
- * @param $newName
- * @return bool
- */
- function setName($newName) {
- $newName = trim($newName);
- if(!$newName)
- return false;
+ /**
+ * @param $newName
+ * @return bool
+ */
+ function setName($newName) { /* {{{ */
+ $newName = trim($newName);
+ if(!$newName)
+ return false;
$db = $this->_dms->getDB();
@@ -103,75 +103,89 @@ class SeedDMS_Core_KeywordCategory {
$this->_name = $newName;
return true;
- }
+ } /* }}} */
- /**
- * @param SeedDMS_Core_User $user
- * @return bool
- */
- function setOwner($user) {
- if(!$user || !$user->isType('user'))
- return false;
+ /**
+ * @param SeedDMS_Core_User $user
+ * @return bool
+ */
+ function setOwner($user) { /* {{{ */
+ if(!$user || !$user->isType('user'))
+ return false;
$db = $this->_dms->getDB();
- $queryStr = "UPDATE `tblKeywordCategories` SET `owner` = " . $user->getID() . " WHERE `id` = " . $this->_id;
+ $queryStr = "UPDATE `tblKeywordCategories` SET `owner` = " . $user->getID() . " WHERE `id` = " . $this->_id;
if (!$db->getResult($queryStr))
return false;
$this->_ownerID = $user->getID();
$this->_owner = $user;
return true;
- }
+ } /* }}} */
- /**
- * @return array
- */
- function getKeywordLists() {
+ /**
+ * @return array keywords in this list
+ */
+ function getKeywordLists() { /* {{{ */
$db = $this->_dms->getDB();
$queryStr = "SELECT * FROM `tblKeywords` WHERE `category` = " . $this->_id . " order by `keywords`";
return $db->getResultArray($queryStr);
}
- /**
- * @param $listID
- * @param $keywords
- * @return bool
- */
- function editKeywordList($listID, $keywords) {
+ /**
+ * @return integer number of keywords in this list
+ */
+ function countKeywordLists() { /* {{{ */
+ $db = $this->_dms->getDB();
+
+ $queryStr = "SELECT COUNT(*) as `c` FROM `tblKeywords` where `category`=".$this->_id;
+ $resArr = $db->getResultArray($queryStr);
+ if (is_bool($resArr) && !$resArr)
+ return false;
+
+ return $resArr[0]['c'];
+ } /* }}} */
+
+ /**
+ * @param $listID
+ * @param $keywords
+ * @return bool
+ */
+ function editKeywordList($listID, $keywords) { /* {{{ */
$db = $this->_dms->getDB();
$queryStr = "UPDATE `tblKeywords` SET `keywords` = ".$db->qstr($keywords)." WHERE `id` = $listID";
return $db->getResult($queryStr);
- }
+ } /* }}} */
- /**
- * @param $keywords
- * @return bool
- */
- function addKeywordList($keywords) {
+ /**
+ * @param $keywords
+ * @return bool
+ */
+ function addKeywordList($keywords) { /* {{{ */
$db = $this->_dms->getDB();
$queryStr = "INSERT INTO `tblKeywords` (`category`, `keywords`) VALUES (" . $this->_id . ", ".$db->qstr($keywords).")";
return $db->getResult($queryStr);
- }
+ } /* }}} */
- /**
- * @param $listID
- * @return bool
- */
- function removeKeywordList($listID) {
+ /**
+ * @param $listID
+ * @return bool
+ */
+ function removeKeywordList($listID) { /* {{{ */
$db = $this->_dms->getDB();
$queryStr = "DELETE FROM `tblKeywords` WHERE `id` = $listID";
return $db->getResult($queryStr);
- }
+ } /* }}} */
- /**
- * @return bool
- */
- function remove() {
+ /**
+ * @return bool
+ */
+ function remove() { /* {{{ */
$db = $this->_dms->getDB();
$db->startTransaction();
@@ -189,5 +203,5 @@ class SeedDMS_Core_KeywordCategory {
$db->commitTransaction();
return true;
- }
+ } /* }}} */
}
From da4aafff8697dd2fad4739f2dade4e14639b5fb6 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 10 Jan 2023 08:10:51 +0100
Subject: [PATCH 227/247] add more notes for 5.1.29
---
SeedDMS_Core/package.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml
index 6cfa5d734..046973024 100644
--- a/SeedDMS_Core/package.xml
+++ b/SeedDMS_Core/package.xml
@@ -26,8 +26,8 @@
- SeedDMS_Core_Folder::addDocument() does rollback transaction propperly when setting document categories fail
- add $skiproot and $sep parameter to SeedDMS_Core_Folder::getFolderPathPlain()
-- turn off auto commit for mysql
- add class name for 'documentfile'
+- add method SeedDMS_Core_KeywordCategory::countKeywordLists()
From 913baaa7ce649c4caf3a2a2c75f0eaa4cb22b627 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 10 Jan 2023 08:11:24 +0100
Subject: [PATCH 228/247] show number of documents per category in select menu
---
views/bootstrap/class.Categories.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/views/bootstrap/class.Categories.php b/views/bootstrap/class.Categories.php
index 639e73125..35f775cca 100644
--- a/views/bootstrap/class.Categories.php
+++ b/views/bootstrap/class.Categories.php
@@ -155,7 +155,7 @@ $(document).ready( function() {
$options[] = array("-1", getMLText("choose_category"));
$options[] = array("0", getMLText("new_document_category"));
foreach ($categories as $category) {
- $options[] = array($category->getID(), htmlspecialchars($category->getName()), $selcat && $category->getID()==$selcat->getID());
+ $options[] = array($category->getID(), htmlspecialchars($category->getName()), $selcat && $category->getID()==$selcat->getID(), array(array('data-subtitle', $category->countDocumentsByCategory().' '.getMLText('documents'))));
}
$this->formField(
null, //getMLText("selection"),
From cc144f6c0f6a3d5a6748ead1c1c6bd46043cff4b Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 10 Jan 2023 08:11:52 +0100
Subject: [PATCH 229/247] show number of keywords per category in select menu
---
views/bootstrap/class.DefaultKeywords.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/views/bootstrap/class.DefaultKeywords.php b/views/bootstrap/class.DefaultKeywords.php
index f21846d08..1fdfd3313 100644
--- a/views/bootstrap/class.DefaultKeywords.php
+++ b/views/bootstrap/class.DefaultKeywords.php
@@ -221,7 +221,7 @@ $(document).ready( function() {
foreach ($categories as $category) {
$owner = $category->getOwner();
if ($user->isAdmin() || ($owner->getID() == $user->getID()))
- $options[] = array($category->getID(), htmlspecialchars($category->getName()), $selcategory && $category->getID()==$selcategory->getID());
+ $options[] = array($category->getID(), htmlspecialchars($category->getName()), $selcategory && $category->getID()==$selcategory->getID(), array(array('data-subtitle', $category->countKeywordLists().' '.getMLText('keywords'))));
}
$this->formField(
null, //getMLText("selection"),
From acd96034d84cc83c49cd3755076437a0569a9fdd Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 10 Jan 2023 08:12:06 +0100
Subject: [PATCH 230/247] add changes of 5.1.29
---
CHANGELOG | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CHANGELOG b/CHANGELOG
index 2d6d1645d..8c795065d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,6 +7,9 @@
- introduce authentication service
- new hook in restapi to add middleware
- previews for png, txt, pdf in different directories
+- various improvements of fulltext service
+- show number of documents per category in category manager
+- show number of keywords per category in keyword manager
--------------------------------------------------------------------------------
Changes in version 5.1.28
From 244a5da6d8dcaaf4a897cd9a80c352107798e13b Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 10 Jan 2023 15:42:50 +0100
Subject: [PATCH 231/247] get logger
---
controllers/class.Cron.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/controllers/class.Cron.php b/controllers/class.Cron.php
index 0ea71e76b..135a227dc 100644
--- a/controllers/class.Cron.php
+++ b/controllers/class.Cron.php
@@ -26,6 +26,7 @@ class SeedDMS_Controller_Cron extends SeedDMS_Controller_Common {
$dms = $this->params['dms'];
$user = $this->params['user'];
$settings = $this->params['settings'];
+ $logger = $this->params['logger'];
$mode = $this->params['mode'];
$db = $dms->getDb();
From 41b2ae91e1cda34c9a6f79445b1a56f54adcefda Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 10 Jan 2023 15:43:06 +0100
Subject: [PATCH 232/247] use authenticator
---
inc/inc.BasicAuthentication.php | 42 +--------------------------------
1 file changed, 1 insertion(+), 41 deletions(-)
diff --git a/inc/inc.BasicAuthentication.php b/inc/inc.BasicAuthentication.php
index 37f4cf8c4..8d9a69bdb 100644
--- a/inc/inc.BasicAuthentication.php
+++ b/inc/inc.BasicAuthentication.php
@@ -18,53 +18,13 @@ require_once("inc.ClassEmailNotify.php");
require_once("inc.ClassSession.php");
require_once("inc.ClassAccessOperation.php");
-function __authenticate($username, $password) { /* {{{ */
- global $dms, $settings;
-
- $user = false;
-
- /* Authenticate against LDAP server {{{ */
- if (!$user && isset($settings->_ldapHost) && strlen($settings->_ldapHost)>0) {
- require_once("../inc/inc.ClassLdapAuthentication.php");
- $authobj = new SeedDMS_LdapAuthentication($dms, $settings);
- $user = $authobj->authenticate($username, $password);
- } /* }}} */
-
- /* Authenticate against SeedDMS database {{{ */
- else {
- require_once("../inc/inc.ClassDbAuthentication.php");
- $authobj = new SeedDMS_DbAuthentication($dms, $settings);
- $user = $authobj->authenticate($username, $password);
- } /* }}} */
-
- if (!$user) {
- return false;
- }
-
- if (($user->getID() == $settings->_guestID) && (!$settings->_enableGuestLogin)) {
- return false;
- }
-
- // Check if account is disabled
- if($user->isDisabled()) {
- return false;
- }
-
- // control admin IP address if required
- if ($user->isAdmin() && ($_SERVER['REMOTE_ADDR'] != $settings->_adminIP ) && ( $settings->_adminIP != "") ){
- return false;
- }
-
- return $user;
-} /* }}} */
-
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="'.$settings->_siteName.'"');
header('HTTP/1.0 401 Unauthorized');
echo getMLText('cancel_basic_authentication');
exit;
} else {
- if(!($user = __authenticate($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']))) {
+ if(!($user = $authenticator->authenticate($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']))) {
header('WWW-Authenticate: Basic realm="'.$settings->_siteName.'"');
header('HTTP/1.0 401 Unauthorized');
echo getMLText('cancel_basic_authentication');
From aa733c75313b3334538fc26abd8ec443ff60eef9 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 10 Jan 2023 15:43:37 +0100
Subject: [PATCH 233/247] pass logger to controller, fix including php files
---
op/op.Cron.php | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/op/op.Cron.php b/op/op.Cron.php
index ac05baacc..3ecd68d2e 100644
--- a/op/op.Cron.php
+++ b/op/op.Cron.php
@@ -19,16 +19,16 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-include("../inc/inc.Settings.php");
-include("../inc/inc.LogInit.php");
-include("../inc/inc.Language.php");
-include("../inc/inc.Utils.php");
-include("../inc/inc.Init.php");
-include("../inc/inc.Extension.php");
-include("../inc/inc.DBInit.php");
-include("../inc/inc.ClassController.php");
-include("../inc/inc.Scheduler.php");
-include("../inc/inc.BasicAuthentication.php");
+require_once("../inc/inc.Settings.php");
+require_once("../inc/inc.Utils.php");
+require_once("../inc/inc.LogInit.php");
+require_once("../inc/inc.Language.php");
+require_once("../inc/inc.Init.php");
+require_once("../inc/inc.Extension.php");
+require_once("../inc/inc.DBInit.php");
+require_once("../inc/inc.ClassController.php");
+require_once("../inc/inc.Scheduler.php");
+require_once("../inc/inc.BasicAuthentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$controller = Controller::factory($tmp[1], array('dms'=>$dms, 'user'=>$user));
@@ -44,6 +44,7 @@ if(!empty($_GET['mode']) && in_array($_GET['mode'], array('list', 'run', 'dryrun
$mode = $_GET['mode'];
$controller->setParam('settings', $settings);
+$controller->setParam('logger', $logger);
$controller->setParam('mode', $mode);
if(!$controller->run()) {
echo getMLText("error_occured");
From 6d6bbca94b6e1607717971f9d5fcb1862c99d5a0 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 10 Jan 2023 15:44:09 +0100
Subject: [PATCH 234/247] set placeholder of task frequency
---
views/bootstrap/class.SchedulerTaskMgr.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/views/bootstrap/class.SchedulerTaskMgr.php b/views/bootstrap/class.SchedulerTaskMgr.php
index 12577128f..64ec3706b 100644
--- a/views/bootstrap/class.SchedulerTaskMgr.php
+++ b/views/bootstrap/class.SchedulerTaskMgr.php
@@ -351,6 +351,7 @@ $(document).ready( function() {
'name'=>'frequency',
'value'=>$task->getFrequency(),
'required'=>true,
+ 'placeholder'=>getMLText('task_frequency_placeholder'),
)
);
$this->formField(
From 328cbd9eb92e3f00cbfe4f282f1b81d0f16efcb0 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 10 Jan 2023 15:44:30 +0100
Subject: [PATCH 235/247] fix indexing documents
---
inc/inc.Tasks.php | 103 +++++++++++++++++++++++++++++++++-------------
1 file changed, 75 insertions(+), 28 deletions(-)
diff --git a/inc/inc.Tasks.php b/inc/inc.Tasks.php
index f198808c3..50418cbc6 100644
--- a/inc/inc.Tasks.php
+++ b/inc/inc.Tasks.php
@@ -125,17 +125,33 @@ class SeedDMS_Task_Indexer_Process_Folder { /* {{{ */
protected $fulltextservice;
- public function __construct($scheduler, $fulltextservice, $forceupdate) { /* {{{ */
+ protected $logger;
+
+ protected $dacount;
+
+ protected $facount;
+
+ protected $ducount;
+
+ protected $fucount;
+
+ public function __construct($scheduler, $fulltextservice, $forceupdate, $logger) { /* {{{ */
$this->scheduler = $scheduler;
$this->fulltextservice = $fulltextservice;
+ $this->logger = $logger;
$this->forceupdate = $forceupdate;
$this->numdocs = $this->fulltextservice->Indexer()->count();
+ $this->dacount = 0;
+ $this->facount = 0;
+ $this->ducount = 0;
+ $this->fucount = 0;
} /* }}} */
public function process($folder, $depth=0) { /* {{{ */
$lucenesearch = $this->fulltextservice->Search();
$documents = $folder->getDocuments();
- echo str_repeat(' ', $depth+1).$folder->getId().":".$folder->getFolderPathPlain()." ";
+ $logger = $this->logger;
+// echo str_repeat(' ', $depth+1).$folder->getId().":".$folder->getFolderPathPlain()." ";
if(($this->numdocs == 0) || !($hit = $lucenesearch->getFolder($folder->getId()))) {
try {
$idoc = $this->fulltextservice->IndexedDocument($folder, true);
@@ -149,12 +165,16 @@ class SeedDMS_Task_Indexer_Process_Folder { /* {{{ */
}
}
$this->fulltextservice->Indexer()->addDocument($idoc);
- echo "(".getMLText('index_folder_added').")".PHP_EOL;
+// echo "(".getMLText('index_folder_added').")".PHP_EOL;
+ $logger->log('Task \'indexingdocs\': folder '.$folder->getId().' added', PEAR_LOG_INFO);
+ $this->facount++;
} else {
- echo "(".$error.")".PHP_EOL;
+// echo "(".$error.")".PHP_EOL;
+ $logger->log('Task \'indexingdocs\': adding folder '.$folder->getId().' failed', PEAR_LOG_ERR);
}
} catch(Exception $e) {
- echo "(Timeout)".PHP_EOL;
+// echo "(Timeout)".PHP_EOL;
+ $logger->log('Task \'indexingdocs\': adding folder '.$folder->getId().' failed', PEAR_LOG_ERR);
}
} else {
/* Check if the attribute indexed is set or has a value older
@@ -168,7 +188,7 @@ class SeedDMS_Task_Indexer_Process_Folder { /* {{{ */
$indexed = 0;
}
if($indexed >= $folder->getDate() && !$this->forceupdate) {
- echo "(".getMLText('index_folder_unchanged').")".PHP_EOL;
+// echo "(".getMLText('index_folder_unchanged').")".PHP_EOL;
} else {
$this->fulltextservice->Indexer()->delete($hit->id);
try {
@@ -183,18 +203,22 @@ class SeedDMS_Task_Indexer_Process_Folder { /* {{{ */
}
}
$this->fulltextservice->Indexer()->addDocument($idoc);
- echo "(".getMLText('index_folder_updated').")".PHP_EOL;
+// echo "(".getMLText('index_folder_updated').")".PHP_EOL;
+ $logger->log('Task \'indexingdocs\': folder '.$folder->getId().' updated', PEAR_LOG_INFO);
+ $this->fucount++;
} else {
- echo "(".$error.")".PHP_EOL;
+// echo "(".$error.")".PHP_EOL;
+ $logger->log('Task \'indexingdocs\': updating folder '.$folder->getId().' failed', PEAR_LOG_ERR);
}
} catch(Exception $e) {
- echo "(Timeout)".PHP_EOL;
+// echo "(Timeout)".PHP_EOL;
+ $logger->log('Task \'indexingdocs\': updating folder '.$folder->getId().' failed. '.$e->getMessage(), PEAR_LOG_ERR);
}
}
}
if($documents) {
foreach($documents as $document) {
- echo str_repeat(' ', $depth+2).$document->getId().":".$document->getName()." ";
+// echo str_repeat(' ', $depth+2).$document->getId().":".$document->getName()." ";
/* If the document wasn't indexed before then just add it */
if(($this->numdocs == 0) || !($hit = $lucenesearch->getDocument($document->getId()))) {
try {
@@ -206,10 +230,16 @@ class SeedDMS_Task_Indexer_Process_Folder { /* {{{ */
}
}
}
- $this->fulltextservice->Indexer()->addDocument($idoc);
- echo "(".getMLText('index_document_added').")".PHP_EOL;
+ if($this->fulltextservice->Indexer()->addDocument($idoc)) {
+// echo "(".getMLText('index_document_added').")".PHP_EOL;
+ $logger->log('Task \'indexingdocs\': document '.$document->getId().' added', PEAR_LOG_INFO);
+ } else {
+ $logger->log('Task \'indexingdocs\': adding document '.$document->getId().' failed', PEAR_LOG_ERR);
+ }
+ $this->dacount++;
} catch(Exception $e) {
- echo "(Timeout)".PHP_EOL;
+// echo "(Timeout)".PHP_EOL;
+ $logger->log('Task \'indexingdocs\': adding document '.$document->getId().' failed. '.$e->getMessage(), PEAR_LOG_ERR);
}
} else {
/* Check if the attribute indexed is set or has a value older
@@ -223,29 +253,44 @@ class SeedDMS_Task_Indexer_Process_Folder { /* {{{ */
$indexed = 0;
}
$content = $document->getLatestContent();
- if($indexed >= $content->getDate() && !$this->forceupdate) {
- echo "(".getMLText('index_document_unchanged').")".PHP_EOL;
- } else {
- $this->fulltextservice->Indexer()->delete($hit->id);
- try {
- $idoc = $this->fulltextservice->IndexedDocument($document, true);
- if(isset($GLOBALS['SEEDDMS_HOOKS']['indexDocument'])) {
- foreach($GLOBALS['SEEDDMS_HOOKS']['indexDocument'] as $hookObj) {
- if (method_exists($hookObj, 'preIndexDocument')) {
- $hookObj->preIndexDocument(null, $document, $idoc);
+ if($content) {
+ if($indexed >= $content->getDate() && !$this->forceupdate) {
+// echo "(".getMLText('index_document_unchanged').")".PHP_EOL;
+ } else {
+ $this->fulltextservice->Indexer()->delete($hit->id);
+ try {
+ $idoc = $this->fulltextservice->IndexedDocument($document, true);
+ if(isset($GLOBALS['SEEDDMS_HOOKS']['indexDocument'])) {
+ foreach($GLOBALS['SEEDDMS_HOOKS']['indexDocument'] as $hookObj) {
+ if (method_exists($hookObj, 'preIndexDocument')) {
+ $hookObj->preIndexDocument(null, $document, $idoc);
+ }
}
}
+ if($this->fulltextservice->Indexer()->addDocument($idoc)) {
+// echo "(".getMLText('index_document_updated').")".PHP_EOL;
+ $logger->log('Task \'indexingdocs\': document '.$document->getId().' updated', PEAR_LOG_INFO);
+ } else {
+ $logger->log('Task \'indexingdocs\': updating document '.$document->getId().' failed', PEAR_LOG_ERR);
+ }
+ $this->ducount++;
+ } catch(Exception $e) {
+// echo "(Timeout)".PHP_EOL;
+ $logger->log('Task \'indexingdocs\': updating document '.$document->getId().' failed', PEAR_LOG_ERR);
}
- $this->fulltextservice->Indexer()->addDocument($idoc);
- echo "(".getMLText('index_document_updated').")".PHP_EOL;
- } catch(Exception $e) {
- echo "(Timeout)".PHP_EOL;
}
+ } else {
+// echo "(Missing content)".PHP_EOL;
+ $logger->log('Task \'indexingdocs\': document '.$document->getId().' misses content', PEAR_LOG_ERR);
}
}
}
}
} /* }}} */
+
+ public function statistics() {
+ return array('folder'=>array('add'=>$this->facount, 'update'=>$this->fucount), 'document'=>array('add'=>$this->dacount, 'update'=>$this->ducount));
+ }
} /* }}} */
/**
@@ -287,9 +332,11 @@ class SeedDMS_IndexingDocumentsTask extends SeedDMS_SchedulerTaskBase { /* {{{ *
}
}
- $folderprocess = new SeedDMS_Task_Indexer_Process_Folder($this, $fulltextservice, $recreate);
+ $folderprocess = new SeedDMS_Task_Indexer_Process_Folder($this, $fulltextservice, $recreate, $logger);
call_user_func(array($folderprocess, 'process'), $folder, -1);
$tree = new SeedDMS_FolderTree($folder, array($folderprocess, 'process'));
+ $stat = $folderprocess->statistics();
+ $logger->log('Task \'indexingdocs\': '.$stat['folder']['add'].' folders added, '.$stat['folder']['update'].' folders updated, '.$stat['document']['add'].' documents added, '.$stat['document']['update'].' documents updated', PEAR_LOG_INFO);
} else {
$logger->log('Task \'indexingdocs\': fulltext search is turned off', PEAR_LOG_WARNING);
}
From 28f16a5da53cc1934bb218fcb93c9007060cc976 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 10 Jan 2023 16:27:17 +0100
Subject: [PATCH 236/247] check field 'indexed', count errors
---
utils/indexer.php | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/utils/indexer.php b/utils/indexer.php
index 868ebd0c9..d04fcf1f1 100644
--- a/utils/indexer.php
+++ b/utils/indexer.php
@@ -89,15 +89,16 @@ function tree($dms, $fulltextservice, $folder, $indent='', $numdocs) { /* {{{ */
echo $prefix.$themes->green(" (Folder added)").PHP_EOL;
$stats['folder']['add']++;
} catch(Exception $e) {
+ $stats['folder']['error']++;
echo $prefix.$themes->error(" (Timeout)").PHP_EOL;
}
} else {
try {
- $created = (int) $hit->getDocument()->getFieldValue('created');
+ $indexed = (int) $hit->getDocument()->getFieldValue('indexed');
} catch (Exception $e) {
- $created = 0;
+ $indexed = 0;
}
- if($created >= $folder->getDate()) {
+ if($indexed >= $folder->getDate()) {
if($config['verbosity'] >= 3)
echo $prefix.$themes->italic(" (Folder unchanged)").PHP_EOL;
$stats['folder']['unchanged']++;
@@ -116,6 +117,7 @@ function tree($dms, $fulltextservice, $folder, $indent='', $numdocs) { /* {{{ */
echo $prefix.$themes->green(" (Folder updated)").PHP_EOL;
$stats['folder']['update']++;
} catch(Exception $e) {
+ $stats['folder']['error']++;
echo $prefix.$themes->error(" (Timeout)").PHP_EOL;
}
}
@@ -143,16 +145,17 @@ function tree($dms, $fulltextservice, $folder, $indent='', $numdocs) { /* {{{ */
echo $prefix.$themes->green(" (Document added)").PHP_EOL;
$stats['document']['add']++;
} catch(Exception $e) {
+ $stats['document']['error']++;
echo $prefix.$themes->error(" (Timeout)").PHP_EOL;
}
} else {
try {
- $created = (int) $hit->getDocument()->getFieldValue('created');
+ $indexed = (int) $hit->getDocument()->getFieldValue('indexed');
} catch (Exception $e) {
- $created = 0;
+ $indexed = 0;
}
$content = $document->getLatestContent();
- if($created >= $content->getDate()) {
+ if($indexed >= $content->getDate()) {
if($config['verbosity'] >= 3)
echo $prefix.$themes->italic(" (Document unchanged)").PHP_EOL;
$stats['document']['unchanged']++;
@@ -171,6 +174,7 @@ function tree($dms, $fulltextservice, $folder, $indent='', $numdocs) { /* {{{ */
echo $prefix.$themes->green(" (Document updated)").PHP_EOL;
$stats['document']['update']++;
} catch(Exception $e) {
+ $stats['document']['error']++;
echo $prefix.$themes->error(" (Timeout)").PHP_EOL;
}
}
@@ -189,9 +193,11 @@ if(!$index) {
$stats['folder']['add'] = 0;
$stats['folder']['unchanged'] = 0;
$stats['folder']['update'] = 0;
+$stats['folder']['error'] = 0;
$stats['document']['add'] = 0;
$stats['document']['unchanged'] = 0;
$stats['document']['update'] = 0;
+$stats['document']['error'] = 0;
$stats['time']['total'] = time();
$numdocs = $fulltextservice->Indexer()->count();
$folder = $dms->getFolder($settings->_rootFolderID);
@@ -210,7 +216,9 @@ echo $themes->black("Documents").PHP_EOL;
echo $themes->black(" added: ".$stats['document']['add']).PHP_EOL;
echo $themes->black(" updated: ".$stats['document']['update']).PHP_EOL;
echo $themes->black(" unchanged: ".$stats['document']['unchanged']).PHP_EOL;
+echo $themes->black(" error: ".$stats['document']['error']).PHP_EOL;
echo $themes->black("Folders").PHP_EOL;
echo $themes->black(" added: ".$stats['folder']['add']).PHP_EOL;
echo $themes->black(" updated: ".$stats['folder']['update']).PHP_EOL;
echo $themes->black(" unchanged: ".$stats['folder']['unchanged']).PHP_EOL;
+echo $themes->black(" error: ".$stats['folder']['error']).PHP_EOL;
From 7531afca4b08d3d8c77b017e002bea28b8da72bd Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 10 Jan 2023 18:33:23 +0100
Subject: [PATCH 237/247] do not set user in view
---
out/out.OpensearchDesc.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/out/out.OpensearchDesc.php b/out/out.OpensearchDesc.php
index 246f80ea7..1055d87dd 100644
--- a/out/out.OpensearchDesc.php
+++ b/out/out.OpensearchDesc.php
@@ -32,7 +32,7 @@ require_once("inc/inc.ClassAccessOperation.php");
//require_once("inc/inc.Authentication.php");
$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'=null));
if($view) {
$view($_GET);
exit;
From fa683ba65f2435d743a0e3b73191936349037fc9 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 10 Jan 2023 20:39:42 +0100
Subject: [PATCH 238/247] set separator between categories to '#'
---
SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php | 2 +-
SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php b/SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php
index 6ab17c461..1bb3a32f0 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php
@@ -169,7 +169,7 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
foreach($categories as $cat) {
$names[] = $cat->getName();
}
- $this->addField(SeedDMS_SQLiteFTS_Field::Text('category', implode(' ', $names)));
+ $this->addField(SeedDMS_SQLiteFTS_Field::Text('category', implode('#', $names)));
}
if($keywords = $document->getKeywords()) {
$this->addField(SeedDMS_SQLiteFTS_Field::Text('keywords', $keywords));
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
index ed86ce32e..addb700ea 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
@@ -238,7 +238,7 @@ class SeedDMS_SQLiteFTS_Indexer {
foreach($res as $row) {
if($row[$facetname] && $row['c']) {
if($facetname == 'category') {
- $tmp = explode(' ', $row[$facetname]);
+ $tmp = explode('#', $row[$facetname]);
if(count($tmp) > 1) {
foreach($tmp as $t) {
if(!isset($facets[$facetname][$t]))
From 824742b5bb2fa7ffe440082ff81de7896fa2bb94 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Tue, 10 Jan 2023 20:39:42 +0100
Subject: [PATCH 239/247] set separator between categories to '#'
---
SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php | 2 +-
SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php b/SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php
index 6ab17c461..1bb3a32f0 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/IndexedDocument.php
@@ -169,7 +169,7 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
foreach($categories as $cat) {
$names[] = $cat->getName();
}
- $this->addField(SeedDMS_SQLiteFTS_Field::Text('category', implode(' ', $names)));
+ $this->addField(SeedDMS_SQLiteFTS_Field::Text('category', implode('#', $names)));
}
if($keywords = $document->getKeywords()) {
$this->addField(SeedDMS_SQLiteFTS_Field::Text('keywords', $keywords));
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
index ed86ce32e..addb700ea 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
@@ -238,7 +238,7 @@ class SeedDMS_SQLiteFTS_Indexer {
foreach($res as $row) {
if($row[$facetname] && $row['c']) {
if($facetname == 'category') {
- $tmp = explode(' ', $row[$facetname]);
+ $tmp = explode('#', $row[$facetname]);
if(count($tmp) > 1) {
foreach($tmp as $t) {
if(!isset($facets[$facetname][$t]))
From f2381dca729f72cfb54efbd2503533208ff161b2 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 11 Jan 2023 11:57:58 +0100
Subject: [PATCH 240/247] owner wasn't handled propperly
---
SeedDMS_Lucene/Lucene/Search.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/SeedDMS_Lucene/Lucene/Search.php b/SeedDMS_Lucene/Lucene/Search.php
index 6f53ee9ea..38827a02b 100644
--- a/SeedDMS_Lucene/Lucene/Search.php
+++ b/SeedDMS_Lucene/Lucene/Search.php
@@ -77,10 +77,10 @@ class SeedDMS_Lucene_Search {
$querystr = substr($term, -1) != '*' ? $term.'*' : $term;
}
if(!empty($fields['owner'])) {
- if(is_string($owner)) {
+ if(is_string($fields['owner'])) {
if($querystr)
$querystr .= ' && ';
- $querystr .= 'owner:'.$owner;
+ $querystr .= 'owner:'.$fields['owner'];
} elseif(is_array($fields['owner'])) {
if($querystr)
$querystr .= ' && ';
From 69a70242b06f527bf7126acd19ba37dcbc021ebc Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 11 Jan 2023 11:58:15 +0100
Subject: [PATCH 241/247] move record type further up in form
---
views/bootstrap/class.Search.php | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php
index 43e8992f1..9f919b609 100644
--- a/views/bootstrap/class.Search.php
+++ b/views/bootstrap/class.Search.php
@@ -785,6 +785,22 @@ function typeahead() { /* {{{ */
)
);
}
+ if(!isset($facets['record_type'])) {
+ $options = array();
+ $options[] = array('document', getMLText('document'), $record_type && in_array('document', $record_type));
+ $options[] = array('folder', getMLText('folder'), $record_type && in_array('folder', $record_type));
+ $this->formField(
+ getMLText("record_type"),
+ array(
+ 'element'=>'select',
+ 'class'=>'chzn-select',
+ 'name'=>'record_type[]',
+ 'multiple'=>true,
+ 'attributes'=>array(array('data-placeholder', getMLText('select_record_type'))),
+ 'options'=>$options
+ )
+ );
+ }
if(!isset($facets['category'])) {
$tmpcatids = array();
foreach($categories as $tmpcat)
@@ -832,22 +848,6 @@ function typeahead() { /* {{{ */
)
);
}
- if(!isset($facets['record_type'])) {
- $options = array();
- $options[] = array('document', getMLText('document'), $record_type && in_array('document', $record_type));
- $options[] = array('folder', getMLText('folder'), $record_type && in_array('folder', $record_type));
- $this->formField(
- getMLText("record_type"),
- array(
- 'element'=>'select',
- 'class'=>'chzn-select',
- 'name'=>'record_type[]',
- 'multiple'=>true,
- 'attributes'=>array(array('data-placeholder', getMLText('select_record_type'))),
- 'options'=>$options
- )
- );
- }
if($facets) {
foreach($facets as $facetname=>$values) {
From e42af89bcf98ed387760b1b93c0033a4fbe3afdf Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 11 Jan 2023 13:26:12 +0100
Subject: [PATCH 242/247] fix indenting
---
SeedDMS_SQLiteFTS/SQLiteFTS/Document.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Document.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Document.php
index ea63d733e..7b299a9a0 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/Document.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Document.php
@@ -111,7 +111,7 @@ class SeedDMS_SQLiteFTS_Document {
* @return string
*/
public function getFieldValue($fieldName) {
- return $this->getField($fieldName)->value;
+ return $this->getField($fieldName)->value;
}
}
?>
From b1d6cc13579f1df6a6fdb2166a4bd6d4856fbb35 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Wed, 11 Jan 2023 13:26:52 +0100
Subject: [PATCH 243/247] return 'status' as facet, get path as array of folder
ids
---
SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
index addb700ea..559b93bc4 100644
--- a/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
+++ b/SeedDMS_SQLiteFTS/SQLiteFTS/Indexer.php
@@ -219,7 +219,7 @@ class SeedDMS_SQLiteFTS_Indexer {
return false;
/* First count some records for facets */
- foreach(array('owner', 'mimetype', 'category') as $facetname) {
+ foreach(array('owner', 'mimetype', 'category', 'status') as $facetname) {
$sql = "SELECT `".$facetname."`, count(*) AS `c` FROM `docs`";
if($query) {
$sql .= " WHERE docs MATCH ".$this->_conn->quote($query);
@@ -252,6 +252,8 @@ class SeedDMS_SQLiteFTS_Indexer {
else
$facets[$facetname][$row[$facetname]] += $row['c'];
}
+ } elseif($facetname == 'status') {
+ $facets[$facetname][($row[$facetname]-10).''] = $row['c'];
} else
$facets[$facetname][$row[$facetname]] = $row['c'];
}
@@ -379,7 +381,7 @@ class SeedDMS_SQLiteFTS_Indexer {
$doc->addField(SeedDMS_SQLiteFTS_Field::Keyword('indexed', $rec['indexed']));
$doc->addField(SeedDMS_SQLiteFTS_Field::Text('users', $rec['users']));
$doc->addField(SeedDMS_SQLiteFTS_Field::Keyword('status', $rec['status']));
- $doc->addField(SeedDMS_SQLiteFTS_Field::Keyword('path', $rec['path']));
+ $doc->addField(SeedDMS_SQLiteFTS_Field::Keyword('path', explode('x', substr($rec['path'], 1, -1))));
if($content)
$doc->addField(SeedDMS_SQLiteFTS_Field::UnStored('content', $rec['content']));
}
From 795b0e08d34f1ae85b4b6c77a161a32b3b39370f Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 12 Jan 2023 06:46:00 +0100
Subject: [PATCH 244/247] add rule to provide auth info if php is run in fpm
mode
---
op/.htaccess | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/op/.htaccess b/op/.htaccess
index 85718b048..deb356312 100644
--- a/op/.htaccess
+++ b/op/.htaccess
@@ -1,3 +1,4 @@
-RewriteEngine on
-RewriteCond %{REQUEST_URI} (.*)viewonline/([0-9]+)/([0-9]+)/(.+)$
-RewriteRule (.*)viewonline/([0-9]+)/([0-9]+)/(.+)$ $1op.ViewOnline.php?request=$2:$3 [PT]
+RewriteEngine on
+RewriteCond %{REQUEST_URI} (.*)viewonline/([0-9]+)/([0-9]+)/(.+)$
+RewriteRule (.*)viewonline/([0-9]+)/([0-9]+)/(.+)$ $1op.ViewOnline.php?request=$2:$3 [PT]
+RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]
From cf8209414971b1ff5852baa8f8144cd35a2231d8 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Thu, 12 Jan 2023 06:46:00 +0100
Subject: [PATCH 245/247] add rule to provide auth info if php is run in fpm
mode
---
op/.htaccess | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/op/.htaccess b/op/.htaccess
index 85718b048..deb356312 100644
--- a/op/.htaccess
+++ b/op/.htaccess
@@ -1,3 +1,4 @@
-RewriteEngine on
-RewriteCond %{REQUEST_URI} (.*)viewonline/([0-9]+)/([0-9]+)/(.+)$
-RewriteRule (.*)viewonline/([0-9]+)/([0-9]+)/(.+)$ $1op.ViewOnline.php?request=$2:$3 [PT]
+RewriteEngine on
+RewriteCond %{REQUEST_URI} (.*)viewonline/([0-9]+)/([0-9]+)/(.+)$
+RewriteRule (.*)viewonline/([0-9]+)/([0-9]+)/(.+)$ $1op.ViewOnline.php?request=$2:$3 [PT]
+RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]
From c77938cd11e74cbbf9f33ddb9f2a53e7e2e65a90 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 13 Jan 2023 13:51:44 +0100
Subject: [PATCH 246/247] add extra content in document list row after last
column
---
views/bootstrap/class.Bootstrap.php | 5 +++++
views/bootstrap4/class.Bootstrap4.php | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php
index 035e390e0..7d52d926e 100644
--- a/views/bootstrap/class.Bootstrap.php
+++ b/views/bootstrap/class.Bootstrap.php
@@ -3172,6 +3172,11 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$content .= "";
$content .= $this->documentListRowAction($document, $previewer, $skipcont, $version, $extracontent);
$content .= " ";
+ if(!empty($extracontent['columns_last'])) {
+ foreach($extracontent['columns_last'] as $col)
+ $content .= ''.$col.' ';
+ }
+
if(!$skipcont)
$content .= $this->documentListRowEnd($document);
}
diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php
index 1bf5b646d..2c7a509f6 100644
--- a/views/bootstrap4/class.Bootstrap4.php
+++ b/views/bootstrap4/class.Bootstrap4.php
@@ -3250,6 +3250,11 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$content .= "";
$content .= $this->documentListRowAction($document, $previewer, $skipcont, $version, $extracontent);
$content .= " ";
+ if(!empty($extracontent['columns_last'])) {
+ foreach($extracontent['columns_last'] as $col)
+ $content .= ''.$col.' ';
+ }
+
if(!$skipcont)
$content .= $this->documentListRowEnd($document);
}
From cafc50ca4b5a1179ba08960f766584f36d0cb875 Mon Sep 17 00:00:00 2001
From: Uwe Steinmann
Date: Fri, 13 Jan 2023 21:21:41 +0100
Subject: [PATCH 247/247] pass logger to hooks
---
inc/inc.DBInit.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/inc/inc.DBInit.php b/inc/inc.DBInit.php
index 7c1eff742..9949c5e9f 100644
--- a/inc/inc.DBInit.php
+++ b/inc/inc.DBInit.php
@@ -21,7 +21,7 @@
if(isset($GLOBALS['SEEDDMS_HOOKS']['initDB'])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['initDB'] as $hookObj) {
if (method_exists($hookObj, 'pretInitDB')) {
- $hookObj->preInitDB(array('settings'=>$settings));
+ $hookObj->preInitDB(array('settings'=>$settings, 'logger'=>$logger));
}
}
}
@@ -32,7 +32,7 @@ $db->connect() or die ("Could not connect to db-server \"" . $settings->_dbHostn
if(isset($GLOBALS['SEEDDMS_HOOKS']['initDB'])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['initDB'] as $hookObj) {
if (method_exists($hookObj, 'postInitDB')) {
- $hookObj->postInitDB(array('db'=>$db, 'settings'=>$settings));
+ $hookObj->postInitDB(array('db'=>$db, 'settings'=>$settings, 'logger'=>$logger));
}
}
}
@@ -40,7 +40,7 @@ if(isset($GLOBALS['SEEDDMS_HOOKS']['initDB'])) {
if(isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) {
if (method_exists($hookObj, 'pretInitDMS')) {
- $hookObj->preInitDMS(array('db'=>$db, 'settings'=>$settings));
+ $hookObj->preInitDMS(array('db'=>$db, 'settings'=>$settings, 'logger'=>$logger));
}
}
}
@@ -61,7 +61,7 @@ $dms->setMaxDirID($settings->_maxDirID);
if(isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) {
if (method_exists($hookObj, 'postInitDMS')) {
- $hookObj->postInitDMS(array('dms'=>$dms, 'settings'=>$settings));
+ $hookObj->postInitDMS(array('dms'=>$dms, 'settings'=>$settings, 'logger'=>$logger));
}
}
}