From 2d7e511bb816f9c332101da8d8796e88736c0e1a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Apr 2015 19:50:55 +0200 Subject: [PATCH 0001/2006] add table tblDocumentCheckOuts --- install/create_tables-innodb.sql | 17 +++++++++++++++++ install/create_tables-sqlite3.sql | 15 +++++++++++++++ install/update-5.0.0/update-sqlite3.sql | 9 +++++++++ install/update-5.0.0/update.sql | 11 +++++++++++ 4 files changed, 52 insertions(+) diff --git a/install/create_tables-innodb.sql b/install/create_tables-innodb.sql index ab22a47b3..c6cbd0cf4 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -330,6 +330,23 @@ CREATE TABLE `tblDocumentLocks` ( -- -------------------------------------------------------- +-- +-- Table structure for table `tblDocumentCheckOuts` +-- + +CREATE TABLE `tblDocumentCheckOuts` ( + `document` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + `date` datetime NOT NULL default '0000-00-00 00:00:00', + `filename` varchar(255) NOT NULL default '', + PRIMARY KEY (`document`), + CONSTRAINT `tblDocumentCheckOuts_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, + CONSTRAINT `tblDocumentCheckOuts_user` FOREIGN KEY (`userID`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- -------------------------------------------------------- + -- -- Table structure for table `tblDocumentReviewers` -- diff --git a/install/create_tables-sqlite3.sql b/install/create_tables-sqlite3.sql index 1f60be6fa..82c6c2682 100644 --- a/install/create_tables-sqlite3.sql +++ b/install/create_tables-sqlite3.sql @@ -286,6 +286,21 @@ CREATE TABLE `tblDocumentLocks` ( -- -------------------------------------------------------- +-- +-- Table structure for table `tblDocumentCheckOuts` +-- + +CREATE TABLE `tblDocumentCheckOuts` ( + `document` INTEGER REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, + `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) + `version` INTEGER unsigned NOT NULL default '0', + `date` TEXT NOT NULL default '0000-00-00 00:00:00', + `filename` varchar(255) NOT NULL default '', + UNIQUE (`document`) +) ; + +-- -------------------------------------------------------- + -- -- Table structure for table `tblDocumentReviewLog` -- diff --git a/install/update-5.0.0/update-sqlite3.sql b/install/update-5.0.0/update-sqlite3.sql index ffa9e0d4a..30b913496 100644 --- a/install/update-5.0.0/update-sqlite3.sql +++ b/install/update-5.0.0/update-sqlite3.sql @@ -2,6 +2,15 @@ BEGIN; ALTER TABLE tblUsers ADD COLUMN `homefolder` INTEGER DEFAULT 0; +CREATE TABLE `tblDocumentCheckOuts` ( + `document` INTEGER REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, + `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) + `version` INTEGER unsigned NOT NULL default '0', + `date` TEXT NOT NULL default '0000-00-00 00:00:00', + `filename` varchar(255) NOT NULL default '', + UNIQUE (`document`) +) ; + UPDATE tblVersion set major=5, minor=0, subminor=0; COMMIT; diff --git a/install/update-5.0.0/update.sql b/install/update-5.0.0/update.sql index a9347320e..b6fd612c6 100644 --- a/install/update-5.0.0/update.sql +++ b/install/update-5.0.0/update.sql @@ -2,6 +2,17 @@ START TRANSACTION; ALTER TABLE tblUsers ADD COLUMN `homefolder` INTEGER DEFAULT 0; +CREATE TABLE `tblDocumentCheckOuts` ( + `document` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL default '0', + `userID` int(11) NOT NULL default '0', + `date` datetime NOT NULL default '0000-00-00 00:00:00', + `filename` varchar(255) NOT NULL default '', + PRIMARY KEY (`document`), + CONSTRAINT `tblDocumentCheckOuts_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, + CONSTRAINT `tblDocumentCheckOuts_user` FOREIGN KEY (`userID`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + UPDATE tblVersion set major=5, minor=0, subminor=0; COMMIT; From 7bc0b8947f9753f65e3a8b62854fd0c64ea9e9e5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Apr 2015 20:05:34 +0200 Subject: [PATCH 0002/2006] add sql statements to setOwner() for moving locks and checkouts still commented out, but the idea is, that the user of a lock and checkout of a document should also be changed if the document owner changes --- SeedDMS_Core/Core/inc.ClassDocument.php | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index db6f696e4..441d3c870 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -397,9 +397,31 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ function setOwner($newOwner) { /* {{{ */ $db = $this->_dms->getDB(); + $oldOwner = self::getOwner(); + + $db->startTransaction(); $queryStr = "UPDATE tblDocuments set owner = " . $newOwner->getID() . " WHERE id = " . $this->_id; - if (!$db->getResult($queryStr)) + if (!$db->getResult($queryStr)) { + $db->rollbackTransaction(); return false; + } + + /* FIXME: Update also all locks and checkouts done by the previous owner */ + /* + $queryStr = "UPDATE tblDocumentLocks set userID = " . $newOwner->getID() . " WHERE document = " . $this->_id . " AND userID = " . $oldOwner->getID(); + if (!$db->getResult($queryStr)) { + $db->rollbackTransaction(); + return false; + } + + $queryStr = "UPDATE tblDocumentCheckOuts set userID = " . $newOwner->getID() . " WHERE document = " . $this->_id . " AND userID = " . $oldOwner->getID(); + if (!$db->getResult($queryStr)) { + $db->rollbackTransaction(); + return false; + } + */ + + $db->commitTransaction(); $this->_ownerID = $newOwner->getID(); $this->_owner = $newOwner; From 3dae5ec57afa8e06f6436e4360a4f51647c3a42c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Apr 2015 20:08:06 +0200 Subject: [PATCH 0003/2006] add all methods to handle document checkout and checkin --- SeedDMS_Core/Core/inc.ClassDocument.php | 208 ++++++++++++++++++++++++ 1 file changed, 208 insertions(+) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 441d3c870..5ea52bdbd 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -645,6 +645,209 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return $this->_lockingUser; } /* }}} */ + /** + * Check if document is checked out + * + * @return boolean true if checked out otherwise false + */ + function isCheckedOut() { /* {{{ */ + $db = $this->_dms->getDB(); + + $queryStr = "SELECT * FROM tblDocumentCheckOuts WHERE document = " . (int) $this->_id; + $resArr = $db->getResultArray($queryStr); + if ((is_bool($resArr) && $resArr==false) || (count($resArr)==0)) { + // Could not find a check out for the selected document. + return false; + } else { + // A check out has been identified for this document. + return true; + } + } /* }}} */ + + /** + * Get checkout info for document + * + * @return boolean true if locked otherwise false + */ + function getCheckOutInfo() { /* {{{ */ + $db = $this->_dms->getDB(); + + $queryStr = "SELECT * FROM tblDocumentCheckOuts WHERE document = " . (int) $this->_id; + $resArr = $db->getResultArray($queryStr); + if ((is_bool($resArr) && $resArr==false) || (count($resArr)==0)) { + // Could not find a check out for the selected document. + return false; + } else { + // A check out has been identified for this document. + return $resArr[0]; + } + } /* }}} */ + + + /** + * Check out document + * + * Creates a check out record for the document and copies the latest + * version of the document into the given checkout dir. + * + * @param object $user object of user doing the checkout + * @param string $checkoutdir directory where the file will be placed + * @return object object of class SeedDMS_Core_DocumentCheckOut + */ + function checkOut($user, $checkoutdir) { /* {{{ */ + $db = $this->_dms->getDB(); + + if(self::isCheckedOut()) + return false; + + /* Check if checkout dir is writable */ + if(!file_exists($checkoutdir)) { + return false; + } + + $db->startTransaction(); + + $lc = self::getLatestContent(); + + $filename = $checkoutdir."/".$lc->getOriginalFileName(); + $queryStr = "INSERT INTO tblDocumentCheckOuts (document, version, userID, date, filename) VALUES (".$this->_id.", ".$lc->getVersion().", ".$user->getID().", CURRENT_TIMESTAMP, ".$db->qstr($filename).")"; + if (!$db->getResult($queryStr)) + return false; + + /* Try to copy the file */ + $err = SeedDMS_Core_File::copyFile($this->_dms->contentDir . $this->getDir() . $lc->getFileName(), $filename); + if (!$err) { + $db->rollbackTransaction(); + return false; + } + + $db->commitTransaction(); + return true; + } /* }}} */ + + /** + * Check in document + * + * Τhis function is similar to SeedDMS_Core_Document::addContent() + * but reads the content from the file was previously checked out. + * Internal this method calls + * SeedDMS_Core_Document::addContent() but takes over the original + * filename, filetype and mimetype from the checked out version. + * No matter in which state the current checked out file is, the + * document will be checked back in afterwards. + * + * @param string $comment + * @param object $user + * @param array $reviewers + * @param array $approvers + * @param integer $version + * @param array $attributes + * @param object $workflow + * @return boolean|object false in case of error, true if no error occurs but + * the document remains unchanged (because the checked out file has not + * changed or it has disappeared and couldnt't be checked in), or + * an instance of class SeedDMS_Core_AddContentResultSet if the document + * was updated. + */ + function checkIn($comment, $user, $reviewers=array(), $approvers=array(), $version=0, $attributes=array(), $workflow=null) { /* {{{ */ + $db = $this->_dms->getDB(); + + $info = self::getCheckOutInfo(); + $lc = self::getLatestContent(); + + /* If file doesn't exist anymore, then just remove the record from the db */ + if(!file_exists($info['filename'])) { + $queryStr = "DELETE FROM tblDocumentCheckOuts WHERE document = ".$this->_id; + $db->getResult($queryStr); + return true; + } + + /* Check if version of checked out file is equal to current version */ + if($lc->getVersion() != $info['version']) { + return true; + } + + if($user->getID() != $info['userID']) { + return true; + } + + $content = true; + /* Do not create a new version if the file was unchanged */ + $checksum = SeedDMS_Core_File::checksum($info['filename']); + if($checksum != $lc->getChecksum()) { + $content = $this->addContent($comment, $user, $info['filename'], $lc->getOriginalFileName(), $lc->getFileType(), $lc->getMimeType(), $reviewers, $approvers, $version, $attributes, $workflow); + if($content && !$this->_dms->forceRename) + SeedDMS_Core_File::removeFile($info['filename']); + } + + $queryStr = "DELETE FROM tblDocumentCheckOuts WHERE document = ".$this->_id; + $db->getResult($queryStr); + + return $content; + + } /* }}} */ + + /** + * Cancel check out of document + * + * This function will cancel a check out in progress by removing + * the check out record from the database and removing the file + * from the check out folder. + * + * @return boolean true if cancelation was successful + */ + function cancelCheckOut() { /* {{{ */ + $db = $this->_dms->getDB(); + + $info = self::getCheckOutInfo(); + if($info) { + SeedDMS_Core_File::removeFile($info['filename']); + + $queryStr = "DELETE FROM tblDocumentCheckOuts WHERE document = ".$this->_id; + $db->getResult($queryStr); + } + + return true; + + } /* }}} */ + + /** + * Return the check out status of the document + * + * This method returns the checkout status of a previosly checked out + * document. + * + * @return int 1=The checked out file doesn't exists anymore, + * 2=The checked out version doesn't exists anymore + * 3=The checked out file has not been modified yet + * 4=new check out record in database found + * 0=The checked out file is modified and check in will create a new version + */ + function checkOutStatus() { /* {{{ */ + $info = self::getCheckOutInfo(); + if(!$info) + return 4; + + $lc = self::getLatestContent(); + + /* If file doesn't exist anymore, then just remove the record from the db */ + if(!file_exists($info['filename'])) { + return 1; + } + + /* Check if version of checked out file is equal to current version */ + if($lc->getVersion() != $info['version']) { + return 2; + } + + $checksum = SeedDMS_Core_File::checksum($info['filename']); + if($checksum == $lc->getChecksum()) { + return 3; + } + + return 0; + } /* }}} */ + function getSequence() { return $this->_sequence; } function setSequence($seq) { /* {{{ */ @@ -1845,6 +2048,11 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $db->rollbackTransaction(); return false; } + $queryStr = "DELETE FROM tblDocumentCheckOuts WHERE document = " . $this->_id; + if (!$db->getResult($queryStr)) { + $db->rollbackTransaction(); + return false; + } $queryStr = "DELETE FROM tblDocumentFiles WHERE document = " . $this->_id; if (!$db->getResult($queryStr)) { $db->rollbackTransaction(); From a796c85e0194089ce333576c35cc3aa857ac3ae3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Apr 2015 20:09:20 +0200 Subject: [PATCH 0004/2006] add validation of attributes --- op/op.UpdateDocument.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/op/op.UpdateDocument.php b/op/op.UpdateDocument.php index d8e6b47c4..9e0bb2c22 100644 --- a/op/op.UpdateDocument.php +++ b/op/op.UpdateDocument.php @@ -196,6 +196,28 @@ if ($_FILES['userfile']['error'] == 0) { foreach($attributes as $attrdefid=>$attribute) { $attrdef = $dms->getAttributeDefinition($attrdefid); if($attribute) { + if(!$attrdef->validate($attribute)) { + switch($attrdef->getValidationError()) { + case 5: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_malformed_email", array("attrname"=>$attrdef->getName(), "value"=>$attribute))); + break; + case 4: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_malformed_url", array("attrname"=>$attrdef->getName(), "value"=>$attribute))); + break; + case 3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_no_regex_match", array("attrname"=>$attrdef->getName(), "value"=>$attribute, "regex"=>$attrdef->getRegex()))); + break; + case 2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_max_values", array("attrname"=>$attrdef->getName()))); + break; + case 1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_min_values", array("attrname"=>$attrdef->getName()))); + break; + default: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); + } + } + /* if($attrdef->getRegex()) { if(!preg_match($attrdef->getRegex(), $attribute)) { UI::exitError(getMLText("document_title", array("documentname" => $folder->getName())),getMLText("attr_no_regex_match")); @@ -209,6 +231,7 @@ if ($_FILES['userfile']['error'] == 0) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_max_values", array("attrname"=>$attrdef->getName()))); } } + */ } } } else { From dc08f8df1bffd5bbcabaa11d50cafae1e6a42b59 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Apr 2015 20:10:36 +0200 Subject: [PATCH 0005/2006] add configuration of checkout dir --- inc/inc.ClassSettings.php | 4 ++++ views/bootstrap/class.Settings.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index d348864ae..5c3698d5b 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -83,6 +83,8 @@ class Settings { /* {{{ */ var $_luceneDir = null; // Where the drop folders are located var $_dropFolderDir = null; + // Where the checked out files are located + var $_checkOutDir = null; // Where the stop word file is located var $_stopWordsFile = null; // enable/disable lucene fulltext search @@ -368,6 +370,7 @@ class Settings { /* {{{ */ $this->_stagingDir = strval($tab["stagingDir"]); $this->_luceneDir = strval($tab["luceneDir"]); $this->_dropFolderDir = strval($tab["dropFolderDir"]); + $this->_checkOutDir = strval($tab["checkOutDir"]); $this->_logFileEnable = Settings::boolVal($tab["logFileEnable"]); $this->_logFileRotation = strval($tab["logFileRotation"]); $this->_enableLargeFileUpload = Settings::boolVal($tab["enableLargeFileUpload"]); @@ -650,6 +653,7 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "stagingDir", $this->_stagingDir); $this->setXMLAttributValue($node, "luceneDir", $this->_luceneDir); $this->setXMLAttributValue($node, "dropFolderDir", $this->_dropFolderDir); + $this->setXMLAttributValue($node, "checkOutDir", $this->_checkOutDir); $this->setXMLAttributValue($node, "logFileEnable", $this->_logFileEnable); $this->setXMLAttributValue($node, "logFileRotation", $this->_logFileRotation); $this->setXMLAttributValue($node, "enableLargeFileUpload", $this->_enableLargeFileUpload); diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 2cebabed5..843900812 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -290,6 +290,10 @@ if(!is_writeable($settings->_configFilePath)) { : + "> + : + + "> : _logFileEnable) echo "checked" ?> /> From bcb34f1e5147b7e4ee33a54cd6b8930faaf2f05c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Apr 2015 20:11:09 +0200 Subject: [PATCH 0006/2006] set parameter checkoutdir in view --- inc/inc.ClassUI.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/inc.ClassUI.php b/inc/inc.ClassUI.php index 2b125b616..23443aff8 100644 --- a/inc/inc.ClassUI.php +++ b/inc/inc.ClassUI.php @@ -98,6 +98,7 @@ class UI extends UI_Default { $view->setParam('enableclipboard', $settings->_enableClipboard); $view->setParam('workflowmode', $settings->_workflowMode); $view->setParam('partitionsize', $settings->_partitionSize); + $view->setParam('checkoutdir', $settings->_checkOutDir); $view->setParam('showmissingtranslations', $settings->_showMissingTranslations); return $view; } From 696b5f09962f52ffbf65679f2cefbe64d4dc0552 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Apr 2015 20:11:51 +0200 Subject: [PATCH 0007/2006] add checkout item to document menu --- views/bootstrap/class.Bootstrap.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 03c2db371..32ce9b0d6 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -447,6 +447,13 @@ $(document).ready(function () { if (!$document->isLocked()) { echo "
  • ".getMLText("update_document")."
  • "; echo "
  • ".getMLText("lock_document")."
  • "; + if($document->isCheckedOut()) + echo "
  • ".getMLText("checkin_document")."
  • "; + else { + if($this->params['checkoutdir']) { + echo "
  • ".getMLText("checkout_document")."
  • "; + } + } echo "
  • ".getMLText("edit_document_props")."
  • "; echo "
  • ".getMLText("move_document")."
  • "; } @@ -455,6 +462,13 @@ $(document).ready(function () { if (($lockingUser->getID() == $this->params['user']->getID()) || ($document->getAccessMode($this->params['user']) == M_ALL)) { echo "
  • ".getMLText("update_document")."
  • "; echo "
  • ".getMLText("unlock_document")."
  • "; + if($document->isCheckedOut()) + echo "
  • ".getMLText("checkin_document")."
  • "; + else { + if($this->params['checkoutdir']) { + echo "
  • ".getMLText("checkout_document")."
  • "; + } + } echo "
  • ".getMLText("edit_document_props")."
  • "; echo "
  • ".getMLText("move_document")."
  • "; } From e00f440717e56eff1fbdc50158d5f8a11c8e4faa Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Apr 2015 20:12:29 +0200 Subject: [PATCH 0008/2006] set checkout dir --- op/op.Settings.php | 1 + 1 file changed, 1 insertion(+) diff --git a/op/op.Settings.php b/op/op.Settings.php index 809a2d9ab..3d512eabd 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -95,6 +95,7 @@ if ($action == "saveSettings") $settings->_luceneDir = $_POST["luceneDir"]; $settings->_extraPath = $_POST["extraPath"]; $settings->_dropFolderDir = $_POST["dropFolderDir"]; + $settings->_checkOutDir = $_POST["checkOutDir"]; $settings->_logFileEnable = getBoolValue("logFileEnable"); $settings->_logFileRotation = $_POST["logFileRotation"]; $settings->_enableLargeFileUpload = getBoolValue("enableLargeFileUpload"); From 90cbbe7d3ca7915024f702dab3a869001cd51bbb Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Apr 2015 20:13:00 +0200 Subject: [PATCH 0009/2006] some new phrases --- languages/ar_EG/lang.inc | 15 +++++++++++++-- languages/bg_BG/lang.inc | 11 +++++++++++ languages/ca_ES/lang.inc | 15 +++++++++++++-- languages/cs_CZ/lang.inc | 15 +++++++++++++-- languages/de_DE/lang.inc | 15 +++++++++++++-- languages/en_GB/lang.inc | 15 +++++++++++++-- languages/es_ES/lang.inc | 15 +++++++++++++-- languages/fr_FR/lang.inc | 15 +++++++++++++-- languages/hu_HU/lang.inc | 15 +++++++++++++-- languages/it_IT/lang.inc | 15 +++++++++++++-- languages/nl_NL/lang.inc | 15 +++++++++++++-- languages/pl_PL/lang.inc | 15 +++++++++++++-- languages/pt_BR/lang.inc | 15 +++++++++++++-- languages/ro_RO/lang.inc | 15 +++++++++++++-- languages/ru_RU/lang.inc | 15 +++++++++++++-- languages/sk_SK/lang.inc | 15 +++++++++++++-- languages/sv_SE/lang.inc | 15 +++++++++++++-- languages/tr_TR/lang.inc | 15 +++++++++++++-- languages/zh_CN/lang.inc | 15 +++++++++++++-- languages/zh_TW/lang.inc | 15 +++++++++++++-- 20 files changed, 258 insertions(+), 38 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index 3a4c19b77..8a6f26a92 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/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 (1243) +// Translators: Admin (1244) $text = array( 'accept' => 'وافق', @@ -93,7 +93,7 @@ URL: [url]', 'approval_status' => 'حالة الموافقة', 'approval_submit_email' => '', 'approval_submit_email_body' => '', -'approval_submit_email_subject' => 'تم ارسال الموافقة', +'approval_submit_email_subject' => '[sitename]: [name] - تم ارسال الموافقة', 'approval_summary' => 'ملخص الموافقة', 'approval_update_failed' => 'خطأ في تحديث حالة الموافقة. فشل التحديث.', 'approvers' => 'الموافقون', @@ -185,6 +185,12 @@ URL: [url]', 'chart_docsperuser_title' => '', 'chart_selection' => '', 'chart_sizeperuser_title' => '', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => 'من فضلك اختر تعريف السمة', 'choose_category' => 'من فضلك اختر', 'choose_group' => 'اختر المجموعة', @@ -247,6 +253,7 @@ URL: [url]', 'documents_to_approve' => 'مستندات في انتظار الموافقة', 'documents_to_review' => 'مستندات في انتظار المراجعة', 'documents_user_requiring_attention' => 'مستندات ملكك تستلزم انتباهك', +'document_already_checkedout' => '', 'document_already_locked' => 'هذا المستند محمي ضد التعديل', 'document_comment_changed_email' => 'تم تعديل التعليق', 'document_comment_changed_email_body' => 'تم تعديل التعليق @@ -278,6 +285,7 @@ Parent folder: [folder_path] المستخدم: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: [name] - تم تحريك المستند', +'document_not_checkedout' => '', 'document_renamed_email' => 'تم اعادة تسمية المستند', 'document_renamed_email_body' => 'تم اعادة تسمية المستند المستند: [name] @@ -813,6 +821,8 @@ URL: [url]', 'settings_calendarDefaultView' => 'العرض الافتراضي للتقويم', 'settings_calendarDefaultView_desc' => 'العرض الافتراضي للتقويم', 'settings_cannot_disable' => '', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => 'مجلد المحتوى', 'settings_contentDir_desc' => '', 'settings_contentOffsetDir' => '', @@ -1054,6 +1064,7 @@ URL: [url]', 'splash_add_user' => '', 'splash_cleared_clipboard' => '', 'splash_document_added' => '', +'splash_document_checkedout' => '', 'splash_document_edited' => '', 'splash_document_locked' => 'تم قفل المستند', 'splash_document_unlocked' => 'تم الغاء قفل المستند', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index 20b7e65ed..9a08615d9 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -170,6 +170,12 @@ $text = array( 'chart_docsperuser_title' => '', 'chart_selection' => '', 'chart_sizeperuser_title' => '', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => 'Изберете attribute definition', 'choose_category' => 'Изберете', 'choose_group' => 'Изберете група', @@ -232,6 +238,7 @@ $text = array( 'documents_to_approve' => 'Документи, чакащи Вашето утвърждаване', 'documents_to_review' => 'Документы, чакащи Вашата рецензия', 'documents_user_requiring_attention' => 'Ваши документи, изискващи внимание', +'document_already_checkedout' => '', 'document_already_locked' => 'Документът е вече блокиран', 'document_comment_changed_email' => '', 'document_comment_changed_email_body' => '', @@ -249,6 +256,7 @@ $text = array( 'document_moved_email' => 'Документът е преместен', 'document_moved_email_body' => '', 'document_moved_email_subject' => '', +'document_not_checkedout' => '', 'document_renamed_email' => 'Документът е преименуван', 'document_renamed_email_body' => '', 'document_renamed_email_subject' => '', @@ -678,6 +686,8 @@ $text = array( 'settings_calendarDefaultView' => 'Вид на календара по-подразбиране', 'settings_calendarDefaultView_desc' => 'Вид на календара по-подразбиране', 'settings_cannot_disable' => 'Невозможно е да се изтрие ENABLE_INSTALL_TOOL', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => 'Папка със данните', 'settings_contentDir_desc' => 'Къде да съхранява качените файлове (най-добре изберете папка, недостъпна за уеб-сървъра)', 'settings_contentOffsetDir' => 'Content Offset Directory', @@ -919,6 +929,7 @@ $text = array( 'splash_add_user' => '', 'splash_cleared_clipboard' => '', 'splash_document_added' => '', +'splash_document_checkedout' => '', 'splash_document_edited' => '', 'splash_document_locked' => '', 'splash_document_unlocked' => '', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index 1407298c4..e59e42745 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/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 (654) +// Translators: Admin (655) $text = array( 'accept' => 'Acceptar', @@ -89,7 +89,7 @@ URL: [url]', 'approval_status' => 'Estat d\'aprovació', 'approval_submit_email' => '', 'approval_submit_email_body' => '', -'approval_submit_email_subject' => 'Aprovació enviada', +'approval_submit_email_subject' => '[sitename]: [name] - Aprovació enviada', 'approval_summary' => 'Resum d\'aprovació', 'approval_update_failed' => 'Error actualitzant l\'estat d\'aprovació. Actualització fallada.', 'approvers' => 'Aprovadors', @@ -175,6 +175,12 @@ URL: [url]', 'chart_docsperuser_title' => '', 'chart_selection' => '', 'chart_sizeperuser_title' => '', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => '', 'choose_category' => '--Elegir categoria--', 'choose_group' => '--Seleccionar grup--', @@ -237,6 +243,7 @@ URL: [url]', 'documents_to_approve' => 'Documents en espera d\'aprovació d\'usuaris', 'documents_to_review' => 'Documents en espera de revisió d\'usuaris', 'documents_user_requiring_attention' => 'Documents de la seva propietat que requereixen atenció', +'document_already_checkedout' => '', 'document_already_locked' => 'Aquest document ja està bloquejat', 'document_comment_changed_email' => '', 'document_comment_changed_email_body' => '', @@ -254,6 +261,7 @@ URL: [url]', 'document_moved_email' => 'Document reubicat', 'document_moved_email_body' => '', 'document_moved_email_subject' => '', +'document_not_checkedout' => '', 'document_renamed_email' => 'Document reanomenat', 'document_renamed_email_body' => '', 'document_renamed_email_subject' => '', @@ -683,6 +691,8 @@ URL: [url]', 'settings_calendarDefaultView' => '', 'settings_calendarDefaultView_desc' => '', 'settings_cannot_disable' => '', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => '', 'settings_contentDir_desc' => '', 'settings_contentOffsetDir' => '', @@ -924,6 +934,7 @@ URL: [url]', 'splash_add_user' => '', 'splash_cleared_clipboard' => '', 'splash_document_added' => '', +'splash_document_checkedout' => '', 'splash_document_edited' => '', 'splash_document_locked' => '', 'splash_document_unlocked' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index b6c9b9423..1e9c6e603 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/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 (679), kreml (455) +// Translators: Admin (680), kreml (455) $text = array( 'accept' => 'Přijmout', @@ -100,7 +100,7 @@ Stav: [status] Komentář: [comment] Uživatel: [username] URL: [url]', -'approval_submit_email_subject' => 'Předložit ke schválení', +'approval_submit_email_subject' => '[sitename]: [name] - Předložit ke schválení', 'approval_summary' => 'Souhrn schválení', 'approval_update_failed' => 'Chyba při aktualizaci stavu schválení. Aktualizace selhala.', 'approvers' => 'Schvalovatelé', @@ -192,6 +192,12 @@ URL: [url]', 'chart_docsperuser_title' => 'Dokumenty dle uživatele', 'chart_selection' => 'Vyberte graf', 'chart_sizeperuser_title' => 'Diskový prostor dle uživatele', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => 'Zvolte definici atributů', 'choose_category' => '--Vyberte prosím--', 'choose_group' => '--Vyberte skupinu--', @@ -254,6 +260,7 @@ URL: [url]', 'documents_to_approve' => 'Dokumenty čekající na schválení uživatele', 'documents_to_review' => 'Dokumenty čekající na kontrolu uživatele', 'documents_user_requiring_attention' => 'Dokumenty, které uživatel vlastní a vyžadují pozornost', +'document_already_checkedout' => '', 'document_already_locked' => 'Tento dokument je už zamčený', 'document_comment_changed_email' => 'Změna komentáře', 'document_comment_changed_email_body' => 'Změna komentáře @@ -285,6 +292,7 @@ Nová složka: [new_folder_path] Uživatel: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: [name] - Dokument přesunut', +'document_not_checkedout' => '', 'document_renamed_email' => 'Dokument přejmenován', 'document_renamed_email_body' => 'Dokument přejmenován Dokument: [name] @@ -822,6 +830,8 @@ URL: [url]', 'settings_calendarDefaultView' => 'Výchozí zobrazení kalendáře', 'settings_calendarDefaultView_desc' => 'Výchozí zobrazení kalendáře', 'settings_cannot_disable' => 'Soubor ENABLE_INSTALL_TOOL nejde vymazat', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => 'Obsah adresáře', 'settings_contentDir_desc' => 'Místo, kde jsou nahrané soubory uloženy (nejlepší zvolit adresář, který není přístupný přes váš web-server)', 'settings_contentOffsetDir' => '', @@ -1063,6 +1073,7 @@ URL: [url]', 'splash_add_user' => 'Přidán nový uživatel', 'splash_cleared_clipboard' => 'Schránka vymazána', 'splash_document_added' => 'Dokument přidán', +'splash_document_checkedout' => '', 'splash_document_edited' => 'Dokument uložen', 'splash_document_locked' => 'Dokument zamčen', 'splash_document_unlocked' => 'Dokument odemčen', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index ae9f6dd37..a6c199735 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 (1971), dgrutsch (18) +// Translators: Admin (1983), dgrutsch (18) $text = array( 'accept' => 'Übernehmen', @@ -105,7 +105,7 @@ Status: [status] Kommentar: [comment] Benutzer: [username] URL: [url]', -'approval_submit_email_subject' => 'Freigabe erteilen', +'approval_submit_email_subject' => '[sitename]: [name] - Freigabe erteilen', 'approval_summary' => 'Übersicht Freigaben', 'approval_update_failed' => 'Störung bei der Aktualisierung des Berechtigungsstatus. Aktualisierung gescheitert', 'approvers' => 'Freigebender', @@ -197,6 +197,12 @@ URL: [url]', 'chart_docsperuser_title' => 'Dokumente pro Benutzer', 'chart_selection' => 'Diagrammauswahl', 'chart_sizeperuser_title' => 'Speicherplatz pro Benutzer', +'checkedout_file_has_different_version' => 'Die ausgecheckte Version ist nicht identisch mit der aktuellen Version. Das Einchecken wird das Dokument nicht aktualisieren.', +'checkedout_file_has_disappeared' => 'Die Datei des ausgecheckten Dokuments ist nicht mehr vorhanden. Das Einchecken wird keine neue Version erzeugen.', +'checkedout_file_is_unchanged' => 'Die Datei des ausgecheckten Dokuments ist noch unverändert. Das Einchecken wird keine neue Version anlegen.', +'checkin_document' => 'Einchecken', +'checkout_document' => 'Auschecken', +'checkout_is_disabled' => 'Auschecken von Dokumenten ist in der Konfiguration ausgeschaltet.', 'choose_attrdef' => '--Attributdefinition wählen--', 'choose_category' => '--Kategorie wählen--', 'choose_group' => '--Gruppe wählen--', @@ -259,6 +265,7 @@ URL: [url]', 'documents_to_approve' => 'Freigabe erforderlich', 'documents_to_review' => 'Prüfung erforderlich', 'documents_user_requiring_attention' => 'Diese Dokumente sollte ich mal nachsehen', +'document_already_checkedout' => 'Dieses Dokument ist bereits ausgecheckt', 'document_already_locked' => 'Dieses Dokument ist bereits gesperrt', 'document_comment_changed_email' => 'Kommentar geändert', 'document_comment_changed_email_body' => 'Kommentar geändert @@ -290,6 +297,7 @@ Neuer Ordner: [new_folder_path] Benutzer: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: [name] - Dokument verschoben', +'document_not_checkedout' => 'Dokument ist nicht ausgecheckt.', 'document_renamed_email' => 'Dokument umbenannt', 'document_renamed_email_body' => 'Dokument umbenannt Dokument: [name] @@ -842,6 +850,8 @@ URL: [url]', 'settings_calendarDefaultView' => 'Kalender Standardansicht', 'settings_calendarDefaultView_desc' => 'Voreingestellte Ansicht des Kalenders', 'settings_cannot_disable' => 'Datei ENABLE_INSTALL_TOOL konnte nicht gelöscht werden.', +'settings_checkOutDir' => 'Verzeichnis für ausgecheckte Dokumente', +'settings_checkOutDir_desc' => 'Dies ist das Verzeichnis, in das Dokumenteninhalte bei einem Check out kopiert werden. Wenn dieses Verzeichnis für die Benutzer erreichbar ist, können die Dateien editiert und dann wieder eingecheckt werden.', 'settings_contentDir' => 'Content-Verzeichnis', 'settings_contentDir_desc' => 'Verzeichnis, in dem die Dokumente gespeichert werden. Sie sollten ein Verzeichnis wählen, das nicht durch den Web-Server erreichbar ist.', 'settings_contentOffsetDir' => 'Content Offset Directory', @@ -1083,6 +1093,7 @@ URL: [url]', 'splash_add_user' => 'Neuen Benutzer hinzugefügt', 'splash_cleared_clipboard' => 'Zwischenablage geleert', 'splash_document_added' => 'Dokument hinzugefügt', +'splash_document_checkedout' => 'Dokument ausgecheckt', 'splash_document_edited' => 'Dokument gespeichert', 'splash_document_locked' => 'Dokument gesperrt', 'splash_document_unlocked' => 'Dokumentensperre aufgehoben', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index 2d08b1cdb..226220d95 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 (1097), dgrutsch (3), netixw (14) +// Translators: Admin (1109), dgrutsch (3), netixw (14) $text = array( 'accept' => 'Accept', @@ -105,7 +105,7 @@ Status: [status] Comment: [comment] User: [username] URL: [url]', -'approval_submit_email_subject' => 'Submitted approval', +'approval_submit_email_subject' => '[sitename]: [name] - Submitted approval', 'approval_summary' => 'Approval Summary', 'approval_update_failed' => 'Error updating approval status. Update failed.', 'approvers' => 'Approvers', @@ -197,6 +197,12 @@ URL: [url]', 'chart_docsperuser_title' => 'Documents per user', 'chart_selection' => 'Select chart', 'chart_sizeperuser_title' => 'Diskspace per user', +'checkedout_file_has_different_version' => 'The checked out version is not identical to the current version. Check in will not update the document.', +'checkedout_file_has_disappeared' => 'The file of the checked out document has disappeared. Check in will not create a new version.', +'checkedout_file_is_unchanged' => 'The file of the checked out document is still unchanged. Check in will not create a new version.', +'checkin_document' => 'Check In', +'checkout_document' => 'Check out', +'checkout_is_disabled' => 'Check out of documents is disabled in the configuration.', 'choose_attrdef' => 'Please choose attribute definition', 'choose_category' => 'Please choose', 'choose_group' => 'Choose group', @@ -259,6 +265,7 @@ URL: [url]', 'documents_to_approve' => 'Documents awaiting your approval', 'documents_to_review' => 'Documents awaiting your review', 'documents_user_requiring_attention' => 'Documents owned by you that require attention', +'document_already_checkedout' => 'This document is already checked out', 'document_already_locked' => 'This document is aleady locked', 'document_comment_changed_email' => 'Comment changed', 'document_comment_changed_email_body' => 'Comment changed @@ -290,6 +297,7 @@ New folder: [new_folder_path] User: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: [name] - Document moved', +'document_not_checkedout' => 'Document is not checked out.', 'document_renamed_email' => 'Document renamed', 'document_renamed_email_body' => 'Document name changed Document: [name] @@ -849,6 +857,8 @@ URL: [url]', 'settings_calendarDefaultView' => 'Calendar Default View', 'settings_calendarDefaultView_desc' => 'Calendar default view', 'settings_cannot_disable' => 'File ENABLE_INSTALL_TOOL could not deleted', +'settings_checkOutDir' => 'Directory for checked out documents', +'settings_checkOutDir_desc' => 'This is the directory where the latest content of a document is copied if the document is checked out. If you make this directory accessible for users, they can edit the file and check it back in when finished.', 'settings_contentDir' => 'Content directory', 'settings_contentDir_desc' => 'Where the uploaded files are stored (best to choose a directory that is not accessible through your web-server)', 'settings_contentOffsetDir' => 'Content Offset Directory', @@ -1090,6 +1100,7 @@ URL: [url]', 'splash_add_user' => 'New user added', 'splash_cleared_clipboard' => 'Clipboard cleared', 'splash_document_added' => 'Document added', +'splash_document_checkedout' => 'Document checked out', 'splash_document_edited' => 'Document saved', 'splash_document_locked' => 'Document locked', 'splash_document_unlocked' => 'Document unlocked', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index 450dc14c4..262221432 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/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 (935), angel (123), francisco (2), jaimem (14) +// Translators: Admin (936), angel (123), francisco (2), jaimem (14) $text = array( 'accept' => 'Aceptar', @@ -100,7 +100,7 @@ Estado: [status] Comentarios: [comment] Usuario: [username] URL: [url]', -'approval_submit_email_subject' => 'Aprobación enviada', +'approval_submit_email_subject' => '[sitename]: [name] - Aprobación enviada', 'approval_summary' => 'Resumen de aprobación', 'approval_update_failed' => 'Error actualizando el estado de aprobación. Actualización fallida.', 'approvers' => 'Aprobadores', @@ -192,6 +192,12 @@ URL: [url]', 'chart_docsperuser_title' => 'Documentos por usuario', 'chart_selection' => 'Seleccione un gráfico', 'chart_sizeperuser_title' => 'Espacio de almacenamiento por usuario', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => 'Por favor, seleccione definición de atributo', 'choose_category' => 'Seleccione categoría', 'choose_group' => 'Seleccione grupo', @@ -254,6 +260,7 @@ URL: [url]', 'documents_to_approve' => 'Documentos en espera de aprobación de usuarios', 'documents_to_review' => 'Documentos en espera de revisión de usuarios', 'documents_user_requiring_attention' => 'Documentos de su propiedad que requieren atención', +'document_already_checkedout' => '', 'document_already_locked' => 'Este documento ya está bloqueado', 'document_comment_changed_email' => 'Comentario modificado', 'document_comment_changed_email_body' => 'Comentario modificado @@ -285,6 +292,7 @@ Nueva carpeta: [new_folder_path] Usuario: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: [name] - Documento movido', +'document_not_checkedout' => '', 'document_renamed_email' => 'Documento renombrado', 'document_renamed_email_body' => 'Documento renombrado Documento: [name] @@ -828,6 +836,8 @@ URL: [url]', 'settings_calendarDefaultView' => 'Vista por defecto de calendario', 'settings_calendarDefaultView_desc' => 'Vista por defecto descripción de calendario', 'settings_cannot_disable' => 'No es posible eliminar el archivo ENABLE_INSTALL_TOOL', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => 'Carpeta de contenidos', 'settings_contentDir_desc' => 'Donde se almacenan los archivos subidos (es preferible seleccionar una carpeta que no sea accesible a través del servidor web)', 'settings_contentOffsetDir' => 'Carpeta de contenidos de desplazamiento', @@ -1069,6 +1079,7 @@ URL: [url]', 'splash_add_user' => 'Nuevo usuario agregado', 'splash_cleared_clipboard' => 'Portapapeles limpiado', 'splash_document_added' => '', +'splash_document_checkedout' => '', 'splash_document_edited' => 'Documento guardado', 'splash_document_locked' => 'Documento bloqueado', 'splash_document_unlocked' => 'Documento desbloqueado', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 9373f146c..c9814dceb 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/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 (963), jeromerobert (50), lonnnew (9) +// Translators: Admin (964), jeromerobert (50), lonnnew (9) $text = array( 'accept' => 'Accepter', @@ -100,7 +100,7 @@ Statut : [status] Commentaire : [comment] Utilisateur : [username] URL : [url]', -'approval_submit_email_subject' => 'Approbation soumise', +'approval_submit_email_subject' => '[sitename]: [name] - Approbation soumise', 'approval_summary' => 'Sommaire d\'approbation', 'approval_update_failed' => 'Erreur de la mise à jour du statut d\'approbation. Echec de la mise à jour.', 'approvers' => 'Approbateurs', @@ -192,6 +192,12 @@ URL: [url]', 'chart_docsperuser_title' => 'Documents par utilisateur', 'chart_selection' => 'Sélectionnez un graphique', 'chart_sizeperuser_title' => 'Volume par utilisateur', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => 'Choisissez une définition d\'attribut', 'choose_category' => 'SVP choisir', 'choose_group' => 'Choisir un groupe', @@ -254,6 +260,7 @@ URL: [url]', 'documents_to_approve' => 'Documents en attente d\'approbation', 'documents_to_review' => 'Documents en attente de correction', 'documents_user_requiring_attention' => 'Documents à surveiller', +'document_already_checkedout' => '', 'document_already_locked' => 'Ce document est déjà verrouillé', 'document_comment_changed_email' => 'Commentaire modifié', 'document_comment_changed_email_body' => 'Commentaire modifié @@ -285,6 +292,7 @@ Nouveau dossier: [new_folder_path] Utilisateur: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: [name] - Document déplacé', +'document_not_checkedout' => '', 'document_renamed_email' => 'Document renommé', 'document_renamed_email_body' => 'Document renommé Document: [name] @@ -804,6 +812,8 @@ URL: [url]', 'settings_calendarDefaultView' => 'Vue par défaut de l\'agenda', 'settings_calendarDefaultView_desc' => 'Vue par défaut de l\'agenda', 'settings_cannot_disable' => 'Le fichier ENABLE_INSTALL_TOOL ne peut pas être supprimé', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => 'Contenu du répertoire', 'settings_contentDir_desc' => 'Endroit ou les fichiers téléchargés sont stockés (il est préférable de choisir un répertoire qui n\'est pas accessible par votre serveur web)', 'settings_contentOffsetDir' => 'Content Offset Directory', @@ -1045,6 +1055,7 @@ URL: [url]', 'splash_add_user' => 'Nouvel utilisateur ajouté', 'splash_cleared_clipboard' => 'Presse-papier vidé', 'splash_document_added' => 'Document ajouté', +'splash_document_checkedout' => '', 'splash_document_edited' => 'Document sauvegardé', 'splash_document_locked' => 'Document vérouillé', 'splash_document_unlocked' => 'Document déverrouillé', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index dca750eea..f5a47e5c8 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 (547), ribaz (1019) +// Translators: Admin (548), ribaz (1019) $text = array( 'accept' => 'Elfogad', @@ -100,7 +100,7 @@ Szülő mappa: [folder_path] Megjegyzés: [comment] Felhasználó: [username] URL: [url]', -'approval_submit_email_subject' => 'Beküldött jóváhagyás', +'approval_submit_email_subject' => '[sitename]: [name] - Beküldött jóváhagyás', 'approval_summary' => 'Jóváhagyási összesítő', 'approval_update_failed' => 'Hiba történt a jóváhagyási állapot frissítése során. Frissítés sikertelen.', 'approvers' => 'Jóváhagyók', @@ -192,6 +192,12 @@ URL: [url]', 'chart_docsperuser_title' => 'Dokumentumok felhasználónként', 'chart_selection' => 'Diagram választása', 'chart_sizeperuser_title' => 'Lemezterület felhasználónként', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => 'Kérem válasszon jellemző meghatározást', 'choose_category' => 'Kérjük válasszon', 'choose_group' => 'Válasszon csoportot', @@ -254,6 +260,7 @@ URL: [url]', 'documents_to_approve' => 'Jóváhagyására váró dokumentumok', 'documents_to_review' => 'Felülvizsgálatára váró dokumentumok', 'documents_user_requiring_attention' => 'Az Ön tulajdonában álló dokumentumok, amelyekre figyelmet kell fordítani', +'document_already_checkedout' => '', 'document_already_locked' => 'Ez a dokumentum már zárolt', 'document_comment_changed_email' => 'Megjegyzés módosult', 'document_comment_changed_email_body' => 'Megjegyzés módosult @@ -285,6 +292,7 @@ Régi mappa: [old_folder_path] Felhasználó: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: [name] - Dokumentum átmozgatva', +'document_not_checkedout' => '', 'document_renamed_email' => 'Dokumentum átnevezve', 'document_renamed_email_body' => 'Dokumentum átnevezve Dokumentum: [name] @@ -827,6 +835,8 @@ URL: [url]', 'settings_calendarDefaultView' => 'Naptár alapértelmezett nézet', 'settings_calendarDefaultView_desc' => 'Naptár alapértelmezett nézet', 'settings_cannot_disable' => 'ENABLE_INSTALL_TOOL állomány nem került törlésre', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => 'Tartalom könyvtár', 'settings_contentDir_desc' => 'Feltöltött állományok tárolási helye (olyan könyvtárat érdemes választani, amelyhez nem lehet a webszerveren keresztül hozzáférni)', 'settings_contentOffsetDir' => 'Tartalom eltérési könyvtár', @@ -1068,6 +1078,7 @@ URL: [url]', 'splash_add_user' => 'Új felhasználó hozzáadva', 'splash_cleared_clipboard' => 'Vágólap törölve', 'splash_document_added' => '', +'splash_document_checkedout' => '', 'splash_document_edited' => 'Dokumentum elmentve', 'splash_document_locked' => 'Dokumentum zárolva', 'splash_document_unlocked' => 'Dokumentum zárolás feloldva', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index cdda37458..15aca9237 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 (1360), s.pnt (26) +// Translators: Admin (1361), s.pnt (26) $text = array( 'accept' => 'Accetta', @@ -105,7 +105,7 @@ Stato: [status] Commenti: [comment] Utente: [username] URL: [url]', -'approval_submit_email_subject' => 'Approvazione sottoposta', +'approval_submit_email_subject' => '[sitename]: [name] - Approvazione sottoposta', 'approval_summary' => 'Dettaglio approvazioni', 'approval_update_failed' => 'Errore nel modificare lo stato di approvazione. Aggiornamento fallito.', 'approvers' => 'Approvatori', @@ -197,6 +197,12 @@ URL: [url]', 'chart_docsperuser_title' => 'Documenti per utente', 'chart_selection' => 'Seleziona grafico', 'chart_sizeperuser_title' => 'Spazio su disco per utente', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => 'Seleziona l\'Attributo', 'choose_category' => 'Seleziona', 'choose_group' => 'Seleziona il gruppo', @@ -259,6 +265,7 @@ URL: [url]', 'documents_to_approve' => 'Documenti in attesa della tua approvazione', 'documents_to_review' => 'Documenti in attesa della tua revisione', 'documents_user_requiring_attention' => 'Tuoi documenti in attesa di revisione o approvazione', +'document_already_checkedout' => '', 'document_already_locked' => 'Questo documento è già bloccato', 'document_comment_changed_email' => 'Commento modificato', 'document_comment_changed_email_body' => 'Commento modificato @@ -290,6 +297,7 @@ Nuova cartella: [new_folder_path] Utente: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: [name] - Documento spostato', +'document_not_checkedout' => '', 'document_renamed_email' => 'Documento rinominato', 'document_renamed_email_body' => 'Documento rinominato Documento: [name] @@ -850,6 +858,8 @@ URL: [url]', 'settings_calendarDefaultView' => 'Vista di default del calendario', 'settings_calendarDefaultView_desc' => 'Vista di default del calendario', 'settings_cannot_disable' => 'Il file ENABLE_INSTALL_TOOL non può essere cancellato', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => 'Cartella contenitore', 'settings_contentDir_desc' => 'Cartella in cui vengono conservati i files caricati, si consiglia di scegliere una cartella sul web-server che non sia direttamente accessibile.', 'settings_contentOffsetDir' => 'Cartella Offset', @@ -1091,6 +1101,7 @@ URL: [url]', 'splash_add_user' => 'Utente aggiunto', 'splash_cleared_clipboard' => 'Appunti cancellati', 'splash_document_added' => 'Documento aggiunto', +'splash_document_checkedout' => '', 'splash_document_edited' => 'Documento modificato', 'splash_document_locked' => 'Documento bloccato', 'splash_document_unlocked' => 'Documento sbloccato', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 111412847..43c738fce 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/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 (693), pepijn (45), reinoutdijkstra@hotmail.com (270) +// Translators: Admin (694), pepijn (45), reinoutdijkstra@hotmail.com (270) $text = array( 'accept' => 'Accept', @@ -93,7 +93,7 @@ URL: [url]', 'approval_status' => 'Goedkeuring Status', 'approval_submit_email' => '', 'approval_submit_email_body' => '', -'approval_submit_email_subject' => 'Uitgevoerde [Goedkeuring]', +'approval_submit_email_subject' => '[sitename]: [name] - Uitgevoerde [Goedkeuring]', 'approval_summary' => 'Goedkeuring Samenvatting', 'approval_update_failed' => 'Fout bij bijwerken Goedkeuring status. Bijwerken mislukt.', 'approvers' => 'Autoriseerders', @@ -185,6 +185,12 @@ URL: [url]', 'chart_docsperuser_title' => 'Documenten per gebruiker', 'chart_selection' => 'Kies grafiek', 'chart_sizeperuser_title' => 'Schijfruimte per gebruiker', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => 'Selecteer een kenmerk definitie', 'choose_category' => 'Selecteer a.u.b.', 'choose_group' => 'Selecteer Groep', @@ -247,6 +253,7 @@ URL: [url]', 'documents_to_approve' => 'Documenten die wachten op uw goedkeuring', 'documents_to_review' => 'Documenten die wachten op uw controle', 'documents_user_requiring_attention' => 'Eigen documenten die (nog) aandacht behoeven', +'document_already_checkedout' => '', 'document_already_locked' => 'Dit document is al geblokkeerd', 'document_comment_changed_email' => 'Commentaar gewijzigd', 'document_comment_changed_email_body' => 'Commentaar gewijzigd @@ -278,6 +285,7 @@ Nieuwe map: [new_folder_path] Gebruiker: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: [name] - Document verplaatst', +'document_not_checkedout' => '', 'document_renamed_email' => 'Document hernoemd', 'document_renamed_email_body' => 'Document hernoemd Document: [name] @@ -819,6 +827,8 @@ URL: [url]', 'settings_calendarDefaultView' => 'Kalender Standaard overzicht', 'settings_calendarDefaultView_desc' => 'Kalender standaard overzicht', 'settings_cannot_disable' => 'Bestand ENABLE_INSTALL_TOOL kon niet verwijderd worden', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => 'Inhoud map', 'settings_contentDir_desc' => 'Waar de verzonden bestande opgeslagen worden (Kan het beste een map zijn die niet benaderbaar is voor de webserver.)', 'settings_contentOffsetDir' => 'Inhouds Basis Map', @@ -1060,6 +1070,7 @@ URL: [url]', 'splash_add_user' => 'Nieuwe gebruiker toegevoegd', 'splash_cleared_clipboard' => 'Klembord leeg gemaakt', 'splash_document_added' => '', +'splash_document_checkedout' => '', 'splash_document_edited' => 'Document opgeslagen', 'splash_document_locked' => 'Document vergrendeld', 'splash_document_unlocked' => 'Document ontgrendeld', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 85500c9cb..86e7641a9 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/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 (706), netixw (84), romi (93), uGn (112) +// Translators: Admin (707), netixw (84), romi (93), uGn (112) $text = array( 'accept' => 'Akceptuj', @@ -93,7 +93,7 @@ URL: [url]', 'approval_status' => 'Status akceptacji', 'approval_submit_email' => '', 'approval_submit_email_body' => '', -'approval_submit_email_subject' => 'Prośba o akceptację', +'approval_submit_email_subject' => '[sitename]: [name] - Prośba o akceptację', 'approval_summary' => 'Podsumowanie akceptacji', 'approval_update_failed' => 'Błąd aktualizacji statusu akceptacji. Aktualizacja nie powiodła się.', 'approvers' => 'Osoby akceptujące', @@ -185,6 +185,12 @@ URL: [url]', 'chart_docsperuser_title' => 'Dokumenty na użytkownika', 'chart_selection' => 'Wybierz wykres', 'chart_sizeperuser_title' => 'Zajętość dysku na użytkownika', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => 'Proszę wybrać definicję atrybutu', 'choose_category' => 'Proszę wybrać', 'choose_group' => 'Wybierz grupę', @@ -247,6 +253,7 @@ URL: [url]', 'documents_to_approve' => 'Dokumenty oczekujące na Twoje zatwierdzenie', 'documents_to_review' => 'Dokumenty oczekujące na Twoją recenzję', 'documents_user_requiring_attention' => 'Dokumenty należące do Ciebie, które wymagają uwagi', +'document_already_checkedout' => '', 'document_already_locked' => 'Ten dokument jest już zablokowany', 'document_comment_changed_email' => 'Zmiana komentarza', 'document_comment_changed_email_body' => 'Zmodyfikowano komentarz @@ -278,6 +285,7 @@ Nowy folder: [new_folder_path] Użytkownik: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: [name] - Przeniesienie dokumentu', +'document_not_checkedout' => '', 'document_renamed_email' => 'Nazwa dokumenty zmieniona', 'document_renamed_email_body' => 'Nazwa dokumentu uległa zmianie Dokument: [name] @@ -807,6 +815,8 @@ URL: [url]', 'settings_calendarDefaultView' => 'Domyślny widok kalendarza', 'settings_calendarDefaultView_desc' => 'Domyślny widok kalendarza', 'settings_cannot_disable' => 'Plik ENABLE_INSTALL_TOOL nie może zostać usunięty', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => 'Katalog treści', 'settings_contentDir_desc' => 'Miejsce, gdzie będą przechowywane wczytane pliki (najlepien wybrać katalog, który nie jest dostępny dla serwera http)', 'settings_contentOffsetDir' => 'Offset katalogu treści', @@ -1048,6 +1058,7 @@ URL: [url]', 'splash_add_user' => 'Dodano nowego użytkownika', 'splash_cleared_clipboard' => 'Wyczyszczono schowek', 'splash_document_added' => '', +'splash_document_checkedout' => '', 'splash_document_edited' => 'Dokument został zapisany', 'splash_document_locked' => 'Dokument zablokowany', 'splash_document_unlocked' => 'Odblokowano dokument', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 7628364b6..9ba71a1b1 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (877), flaviove (627), lfcristofoli (352) +// Translators: Admin (878), flaviove (627), lfcristofoli (352) $text = array( 'accept' => 'Aceitar', @@ -100,7 +100,7 @@ Estado: [status] Comentário: [comment] Usuário: [username] URL: [url]', -'approval_submit_email_subject' => 'Aprovação submetida', +'approval_submit_email_subject' => '[sitename]: [name] - Aprovação submetida', 'approval_summary' => 'Approval Summary', 'approval_update_failed' => 'Error updating approval status. Update failed.', 'approvers' => 'Approvers', @@ -192,6 +192,12 @@ URL: [url]', 'chart_docsperuser_title' => 'Documentos por usuário', 'chart_selection' => 'Selecione gráfico', 'chart_sizeperuser_title' => 'Espaço em disco por usuário', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => 'Por favor escolha a definição de atributo', 'choose_category' => '--Por favor escolha--', 'choose_group' => '--Escolher grupo--', @@ -254,6 +260,7 @@ URL: [url]', 'documents_to_approve' => 'Documents Awaiting User\'s Approval', 'documents_to_review' => 'Documents Awaiting User\'s Review', 'documents_user_requiring_attention' => 'Documents Owned by User That Require Attention', +'document_already_checkedout' => '', 'document_already_locked' => 'Este documento já está travado', 'document_comment_changed_email' => 'Comentário modificado', 'document_comment_changed_email_body' => 'Comentário modificado @@ -285,6 +292,7 @@ Nova pasta: [new_folder_path] Usuário: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: [name] - Documento movido', +'document_not_checkedout' => '', 'document_renamed_email' => 'Documento renomeado', 'document_renamed_email_body' => 'Documento renomeado Documento: [name] @@ -825,6 +833,8 @@ URL: [url]', 'settings_calendarDefaultView' => 'Visualização Calendário Padrão', 'settings_calendarDefaultView_desc' => 'Visualização calendário padrão', 'settings_cannot_disable' => 'Arquivo ENABLE_INSTALL_TOOL não pode ser eliminado', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => 'Diretório de conteúdo', 'settings_contentDir_desc' => 'Onde arquivos enviados são armazenados (melhor escolher um diretório que não é acessível através de seu web-server)', 'settings_contentOffsetDir' => 'Pasta de Compensação de Conteúdo', @@ -1066,6 +1076,7 @@ URL: [url]', 'splash_add_user' => 'Novo usuário adicionado', 'splash_cleared_clipboard' => 'Área de transferência limpada', 'splash_document_added' => 'Documento inserido', +'splash_document_checkedout' => '', 'splash_document_edited' => 'Documento salvo', 'splash_document_locked' => 'Documento bloqueado', 'splash_document_unlocked' => 'Documento desbloqueado', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index bb3a63e0f..eca9a0fe8 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/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 (1002), balan (6) +// Translators: Admin (1003), balan (6) $text = array( 'accept' => 'Accept', @@ -100,7 +100,7 @@ Status: [status] Comentariu: [comment] Utilizator: [username] URL: [url]', -'approval_submit_email_subject' => 'Aprobare trimisă', +'approval_submit_email_subject' => '[sitename]: [name] - Aprobare trimisă', 'approval_summary' => 'Sumar aprobare', 'approval_update_failed' => 'Eroare actualizare status aprobare. Actualizarea nu a reușit.', 'approvers' => 'Aprobatori', @@ -192,6 +192,12 @@ URL: [url]', 'chart_docsperuser_title' => 'Documente per utilizator', 'chart_selection' => 'Selectați grafic', 'chart_sizeperuser_title' => 'Spațiu pe disc per utilizator', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => 'Vă rugăm să alegeți definiția atributului', 'choose_category' => 'Vă rugăm să alegeți', 'choose_group' => 'Alege grup', @@ -254,6 +260,7 @@ URL: [url]', 'documents_to_approve' => 'Documente care așteaptă aprobarea dumneavoastră', 'documents_to_review' => 'Documente care așteaptă revizuirea dumneavoastră', 'documents_user_requiring_attention' => 'Documente deținute de tine care necesită atenție', +'document_already_checkedout' => '', 'document_already_locked' => 'Acest document este deja blocat', 'document_comment_changed_email' => 'Comentariu schimbat', 'document_comment_changed_email_body' => 'Comentariu schimbat @@ -285,6 +292,7 @@ Folder nou: [new_folder_path] Utilizator: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: [name] - Document mutat', +'document_not_checkedout' => '', 'document_renamed_email' => 'Document redenumit', 'document_renamed_email_body' => 'Nume document schimbat Document: [name] @@ -828,6 +836,8 @@ URL: [url]', 'settings_calendarDefaultView' => 'Vizualizare implicită Calendar', 'settings_calendarDefaultView_desc' => 'Vizualizare implicită Calendar', 'settings_cannot_disable' => 'Fișierul ENABLE_INSTALL_TOOL nu a putut fi șters', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => 'Director conținut', 'settings_contentDir_desc' => 'Unde sunt stocate fișierele încărcate (este recomandat sa alegeti un director care nu este accesibil prin intermediul web-server-ului dumneavoastră)', 'settings_contentOffsetDir' => 'Conținut Director Offset', @@ -1069,6 +1079,7 @@ URL: [url]', 'splash_add_user' => 'Utilizator nou adăugat', 'splash_cleared_clipboard' => 'Clipboard golit', 'splash_document_added' => 'Document adăugat', +'splash_document_checkedout' => '', 'splash_document_edited' => 'Document salvat', 'splash_document_locked' => 'Document blocat', 'splash_document_unlocked' => 'Document deblocat', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index fedabbdf6..328d01b5f 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/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 (1249) +// Translators: Admin (1250) $text = array( 'accept' => 'Принять', @@ -93,7 +93,7 @@ URL: [url]', 'approval_status' => 'Статус утверждения', 'approval_submit_email' => '', 'approval_submit_email_body' => '', -'approval_submit_email_subject' => 'Утверждено', +'approval_submit_email_subject' => '[sitename]: [name] - Утверждено', 'approval_summary' => 'Сводка по утверждению', 'approval_update_failed' => 'Произошла ошибка при изменении статуса утверждения', 'approvers' => 'Утверждающие', @@ -185,6 +185,12 @@ URL: [url]', 'chart_docsperuser_title' => 'Документы на пользователя', 'chart_selection' => '', 'chart_sizeperuser_title' => '', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => 'Выберите атрибут', 'choose_category' => 'Выберите категорию', 'choose_group' => 'Выберите группу', @@ -247,6 +253,7 @@ URL: [url]', 'documents_to_approve' => 'Документы, ожидающие вашего утверждения', 'documents_to_review' => 'Документы, ожидающие вашей рецензии', 'documents_user_requiring_attention' => 'Ваши документы, требующие внимания', +'document_already_checkedout' => '', 'document_already_locked' => 'Документ уже заблокирован', 'document_comment_changed_email' => 'Изменён комментарий', 'document_comment_changed_email_body' => 'Изменён комментарий @@ -278,6 +285,7 @@ URL: [url]', Пользователь: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: перемещён документ «[name]»', +'document_not_checkedout' => '', 'document_renamed_email' => 'Документ переименован', 'document_renamed_email_body' => 'Переименован документ Документ: [name] @@ -818,6 +826,8 @@ URL: [url]', 'settings_calendarDefaultView' => 'Вид календаря по умолчанию', 'settings_calendarDefaultView_desc' => 'Вид календаря по умолчанию.', 'settings_cannot_disable' => 'Невозможно удалить ENABLE_INSTALL_TOOL', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => 'Каталог содержимого', 'settings_contentDir_desc' => 'Куда сохраняются загруженные файлы (лучше выбрать каталог недоступный веб-серверу).', 'settings_contentOffsetDir' => 'Базовый начальный каталог', @@ -1059,6 +1069,7 @@ URL: [url]', 'splash_add_user' => 'Добавлен новый пользователь', 'splash_cleared_clipboard' => 'Буфер обмена очищен', 'splash_document_added' => '', +'splash_document_checkedout' => '', 'splash_document_edited' => 'Документ сохранён', 'splash_document_locked' => 'Документ заблокирован', 'splash_document_unlocked' => 'Документ разблокирован', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 708ddc74f..155b1e7d1 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/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 (457) +// Translators: Admin (458) $text = array( 'accept' => 'Prijať', @@ -84,7 +84,7 @@ $text = array( 'approval_status' => 'Stav schválenia', 'approval_submit_email' => '', 'approval_submit_email_body' => '', -'approval_submit_email_subject' => 'Poslane schvalenie', +'approval_submit_email_subject' => '[sitename]: [name] - Poslane schvalenie', 'approval_summary' => 'Zhrnutie schválenia', 'approval_update_failed' => 'Chyba pri aktualizácii stavu schválenia. Aktualizácia zlyhala.', 'approvers' => 'Schvaľovatelia', @@ -170,6 +170,12 @@ $text = array( 'chart_docsperuser_title' => '', 'chart_selection' => '', 'chart_sizeperuser_title' => '', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => '', 'choose_category' => '--Vyberte prosím--', 'choose_group' => '--Vyberte skupinu--', @@ -232,6 +238,7 @@ $text = array( 'documents_to_approve' => 'Dokumenty čakajúce na schválenie používateľa', 'documents_to_review' => 'Dokumenty čakajúce na kontrolu používateľa', 'documents_user_requiring_attention' => 'Dokumenty, ktoré používateľ vlastní a vyžadujú pozornosť', +'document_already_checkedout' => '', 'document_already_locked' => 'Tento dokument je už zamknutý', 'document_comment_changed_email' => '', 'document_comment_changed_email_body' => '', @@ -249,6 +256,7 @@ $text = array( 'document_moved_email' => 'Dokument presunuty', 'document_moved_email_body' => '', 'document_moved_email_subject' => '', +'document_not_checkedout' => '', 'document_renamed_email' => 'Dokument premenovany', 'document_renamed_email_body' => '', 'document_renamed_email_subject' => '', @@ -678,6 +686,8 @@ $text = array( 'settings_calendarDefaultView' => '', 'settings_calendarDefaultView_desc' => '', 'settings_cannot_disable' => '', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => '', 'settings_contentDir_desc' => '', 'settings_contentOffsetDir' => '', @@ -919,6 +929,7 @@ $text = array( 'splash_add_user' => '', 'splash_cleared_clipboard' => '', 'splash_document_added' => '', +'splash_document_checkedout' => '', 'splash_document_edited' => '', 'splash_document_locked' => 'Dokument uzamknutý', 'splash_document_unlocked' => 'Dokument odomknutý', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 543d4600d..1f0bbc19a 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/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 (1085), tmichelfelder (106) +// Translators: Admin (1086), tmichelfelder (106) $text = array( 'accept' => 'Godkänn', @@ -93,7 +93,7 @@ URL: [url]', 'approval_status' => 'Status för godkännande', 'approval_submit_email' => '', 'approval_submit_email_body' => '', -'approval_submit_email_subject' => 'Skicka godkännande', +'approval_submit_email_subject' => '[sitename]: [name] - Skicka godkännande', 'approval_summary' => 'Sammanfattning av godkännande', 'approval_update_failed' => 'Fel vid uppdatering av godkännande-status. Status uppdaterades inte.', 'approvers' => 'Godkänna', @@ -185,6 +185,12 @@ URL: [url]', 'chart_docsperuser_title' => 'Dokumenter per användare', 'chart_selection' => 'Välj diagram', 'chart_sizeperuser_title' => 'Diskutrymme per användare', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => 'Välj attributdefinition', 'choose_category' => 'Välj', 'choose_group' => 'Välj grupp', @@ -247,6 +253,7 @@ URL: [url]', 'documents_to_approve' => 'Dokument som du behöver godkänna', 'documents_to_review' => 'Dokument som du behöver granska', 'documents_user_requiring_attention' => 'Dokument som du behöver granska/godkänna', +'document_already_checkedout' => '', 'document_already_locked' => 'Detta dokument är redan låst', 'document_comment_changed_email' => 'Kommentar ändrat', 'document_comment_changed_email_body' => 'Kommentar ändrat @@ -278,6 +285,7 @@ Ny katalog: [new_folder_path] Användare: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: [name] - Dokument har flyttats', +'document_not_checkedout' => '', 'document_renamed_email' => 'Dokument har bytt namn', 'document_renamed_email_body' => 'Dokument har bytt namn Dokument: [name] @@ -813,6 +821,8 @@ URL: [url]', 'settings_calendarDefaultView' => 'Standardvy kalender', 'settings_calendarDefaultView_desc' => 'Standardvy kalender', 'settings_cannot_disable' => 'Filen ENABLE_INSTALL_TOOL kunde inte tas bort', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => 'Mapp för innehållet', 'settings_contentDir_desc' => 'Mappen där alla uppladdade filer kommer att sparas. (Det bästa är att välja en mapp som inte är tillgänglig från webbservern)', 'settings_contentOffsetDir' => 'Innehåll offset-mapp', @@ -1054,6 +1064,7 @@ URL: [url]', 'splash_add_user' => 'Ny användare tillagt', 'splash_cleared_clipboard' => 'Urklipp rensat', 'splash_document_added' => '', +'splash_document_checkedout' => '', 'splash_document_edited' => 'Dokument sparad', 'splash_document_locked' => 'Dokument låst', 'splash_document_unlocked' => 'Dokument upplåst', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index a1dbacb35..c31bfaa56 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/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 (1002), aydin (83) +// Translators: Admin (1003), aydin (83) $text = array( 'accept' => 'Kabul', @@ -99,7 +99,7 @@ Durum: [status] Açıklama: [comment] Kullanıcı: [username] URL: [url]', -'approval_submit_email_subject' => 'Onay isteği gönder', +'approval_submit_email_subject' => '[sitename]: [name] - Onay isteği gönder', 'approval_summary' => 'Onay Özeti', 'approval_update_failed' => 'Onay durumu güncellenirken hata oluştu. Güncelleme başarısız.', 'approvers' => 'Onaylayan', @@ -191,6 +191,12 @@ URL: [url]', 'chart_docsperuser_title' => 'Kullanıcıya göre dokümanlar', 'chart_selection' => 'Grafik seç', 'chart_sizeperuser_title' => 'Kullanıcıya göre disk kullanımı', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => 'Lütfen nitelik tanımını seçiniz', 'choose_category' => 'Lütfen seçiniz', 'choose_group' => 'Grup seçiniz', @@ -253,6 +259,7 @@ URL: [url]', 'documents_to_approve' => 'Onayınızı bekleyen dokümanlar', 'documents_to_review' => 'Kontrol etmenizi bekleyen dokümanlar', 'documents_user_requiring_attention' => 'Dikkatinizi gerektiren size ait dokümanlar', +'document_already_checkedout' => '', 'document_already_locked' => 'Bu doküman zaten kilitli', 'document_comment_changed_email' => 'Açıklama değişti', 'document_comment_changed_email_body' => 'Açıklama değişti @@ -284,6 +291,7 @@ Klasörün yeni yeri: [new_folder_path] Kullanıcı: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: [name] - Doküman taşındı', +'document_not_checkedout' => '', 'document_renamed_email' => 'Dokümanın adı değiştirildi', 'document_renamed_email_body' => 'Dokümanın adı değiştirildi Doküman: [name] @@ -829,6 +837,8 @@ URL: [url]', 'settings_calendarDefaultView' => 'Varsayılan Takvim Görünümü', 'settings_calendarDefaultView_desc' => 'Varsayılan takvim görünümü', 'settings_cannot_disable' => 'ENABLE_INSTALL_TOOL dosyası silinemedi', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => 'İçerik dizini', 'settings_contentDir_desc' => 'Yüklenecek dosyaların depolanacağı yer (web üzerinden erişilemeyen bir yer tercih etmeniz önerilir.)', 'settings_contentOffsetDir' => 'İçerik Ofset Klasörü', @@ -1070,6 +1080,7 @@ URL: [url]', 'splash_add_user' => 'Yeni kullanıcı eklendi', 'splash_cleared_clipboard' => 'Pano temizlendi', 'splash_document_added' => 'Doküman eklendi', +'splash_document_checkedout' => '', 'splash_document_edited' => 'Doküman kaydedildi', 'splash_document_locked' => 'Doküman kilitlendi', 'splash_document_unlocked' => 'Doküman kiliti açıldı', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index 8993ad6dd..03cc477e2 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/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 (551), fengjohn (5) +// Translators: Admin (552), fengjohn (5) $text = array( 'accept' => '接受', @@ -88,7 +88,7 @@ URL: [url]', 'approval_status' => '审核状态', 'approval_submit_email' => '', 'approval_submit_email_body' => '', -'approval_submit_email_subject' => '提交审核', +'approval_submit_email_subject' => '[sitename]: [name] - 提交审核', 'approval_summary' => '审核汇总', 'approval_update_failed' => '错误:更新审核状态.更新失败.', 'approvers' => '审核人', @@ -174,6 +174,12 @@ URL: [url]', 'chart_docsperuser_title' => '', 'chart_selection' => '', 'chart_sizeperuser_title' => '', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => '请选择属性', 'choose_category' => '请选择', 'choose_group' => '选择组别', @@ -238,6 +244,7 @@ URL: [url]', 'documents_to_approve' => '待您审核的文档', 'documents_to_review' => '待您校对的文档', 'documents_user_requiring_attention' => '需您关注的文档', +'document_already_checkedout' => '', 'document_already_locked' => '该文档已被锁定', 'document_comment_changed_email' => '', 'document_comment_changed_email_body' => '', @@ -255,6 +262,7 @@ URL: [url]', 'document_moved_email' => '文档已被移动', 'document_moved_email_body' => '', 'document_moved_email_subject' => '', +'document_not_checkedout' => '', 'document_renamed_email' => '文档已被重命名', 'document_renamed_email_body' => '', 'document_renamed_email_subject' => '', @@ -684,6 +692,8 @@ URL: [url]', 'settings_calendarDefaultView' => '', 'settings_calendarDefaultView_desc' => '', 'settings_cannot_disable' => '', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => '', 'settings_contentDir_desc' => '', 'settings_contentOffsetDir' => '内容偏移目录', @@ -925,6 +935,7 @@ URL: [url]', 'splash_add_user' => '', 'splash_cleared_clipboard' => '', 'splash_document_added' => '', +'splash_document_checkedout' => '', 'splash_document_edited' => '', 'splash_document_locked' => '文档已被锁定', 'splash_document_unlocked' => '已解锁的文档', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 03512c2d1..808d71cc7 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/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 (2335) +// Translators: Admin (2336) $text = array( 'accept' => '接受', @@ -88,7 +88,7 @@ URL: [url]', 'approval_status' => '審核狀態', 'approval_submit_email' => '', 'approval_submit_email_body' => '', -'approval_submit_email_subject' => '提交審核', +'approval_submit_email_subject' => '[sitename]: [name] - 提交審核', 'approval_summary' => '審核匯總', 'approval_update_failed' => '錯誤:更新審核狀態.更新失敗.', 'approvers' => '審核人', @@ -174,6 +174,12 @@ URL: [url]', 'chart_docsperuser_title' => '', 'chart_selection' => '', 'chart_sizeperuser_title' => '', +'checkedout_file_has_different_version' => '', +'checkedout_file_has_disappeared' => '', +'checkedout_file_is_unchanged' => '', +'checkin_document' => '', +'checkout_document' => '', +'checkout_is_disabled' => '', 'choose_attrdef' => '請選擇屬性', 'choose_category' => '請選擇', 'choose_group' => '選擇組別', @@ -236,6 +242,7 @@ URL: [url]', 'documents_to_approve' => '待您審核的文檔', 'documents_to_review' => '待您校對的文檔', 'documents_user_requiring_attention' => '需您關注的文檔', +'document_already_checkedout' => '', 'document_already_locked' => '該文檔已被鎖定', 'document_comment_changed_email' => '', 'document_comment_changed_email_body' => '', @@ -253,6 +260,7 @@ URL: [url]', 'document_moved_email' => '文檔已被移動', 'document_moved_email_body' => '', 'document_moved_email_subject' => '', +'document_not_checkedout' => '', 'document_renamed_email' => '文檔已被重命名', 'document_renamed_email_body' => '', 'document_renamed_email_subject' => '', @@ -682,6 +690,8 @@ URL: [url]', 'settings_calendarDefaultView' => '', 'settings_calendarDefaultView_desc' => '', 'settings_cannot_disable' => '', +'settings_checkOutDir' => '', +'settings_checkOutDir_desc' => '', 'settings_contentDir' => '', 'settings_contentDir_desc' => '', 'settings_contentOffsetDir' => '內容偏移目錄', @@ -923,6 +933,7 @@ URL: [url]', 'splash_add_user' => '', 'splash_cleared_clipboard' => '', 'splash_document_added' => '', +'splash_document_checkedout' => '', 'splash_document_edited' => '', 'splash_document_locked' => '文檔已被鎖定', 'splash_document_unlocked' => '已解鎖的文檔', From 4e5bf5912f8fedd494520d08cf46971e32025d15 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Apr 2015 13:40:10 +0200 Subject: [PATCH 0010/2006] set proper msg when approver was deleted or already assigned --- op/op.SetReviewersApprovers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/op/op.SetReviewersApprovers.php b/op/op.SetReviewersApprovers.php index 94cf11a7f..c905ab87c 100644 --- a/op/op.SetReviewersApprovers.php +++ b/op/op.SetReviewersApprovers.php @@ -462,7 +462,7 @@ foreach ($pGrpApp as $p) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); break; case -3: - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("reviewer_already_assigned")); + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("approver_already_assigned")); break; case -4: // email error @@ -519,7 +519,7 @@ if (count($approvalIndex["g"]) > 0) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); break; case -3: - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("reviewer_already_removed")); + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("approver_already_removed")); break; case -4: // email error From 0e1571c6c83e1cec71062b65aa71f42843a80a73 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Apr 2015 13:41:35 +0200 Subject: [PATCH 0011/2006] check if version modification is allowed --- out/out.SetReviewersApprovers.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/out/out.SetReviewersApprovers.php b/out/out.SetReviewersApprovers.php index d0e3b9dac..598be7a16 100644 --- a/out/out.SetReviewersApprovers.php +++ b/out/out.SetReviewersApprovers.php @@ -50,9 +50,14 @@ if (!is_object($content)) { UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); } -// control for document state +if(!$this->settings->_enableVersionModification) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("no_version_modification")); +} + +// control for document state. Must correspond to check in +// SeedDMS_AccessOperation::maySetReviewersApprovers() $overallStatus = $content->getStatus(); -if ($overallStatus["status"]==S_REJECTED || $overallStatus["status"]==S_OBSOLETE ) { +if ($overallStatus["status"]!=S_DRAFT_REV && $overallStatus["status"]!=S_DRAFT_APP) { UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("cannot_assign_invalid_state")); } From 03bfa5f972a0fb8dccc09a40748ca641f50d2bfe Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Apr 2015 13:42:38 +0200 Subject: [PATCH 0012/2006] get read access list for document not folder --- views/bootstrap/class.SetReviewersApprovers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.SetReviewersApprovers.php b/views/bootstrap/class.SetReviewersApprovers.php index b76375241..3661829f8 100644 --- a/views/bootstrap/class.SetReviewersApprovers.php +++ b/views/bootstrap/class.SetReviewersApprovers.php @@ -51,7 +51,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Bootstrap_Style { $this->contentHeading(getMLText("change_assignments")); // Retrieve a list of all users and groups that have review / approve privileges. - $docAccess = $folder->getReadAccessList($enableadminrevapp, $enableownerrevapp); + $docAccess = $document->getReadAccessList($enableadminrevapp, $enableownerrevapp); // Retrieve list of currently assigned reviewers and approvers, along with // their latest status. From 8824aa46240346f5724c20f3bbd3de966da46351 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Apr 2015 13:43:40 +0200 Subject: [PATCH 0013/2006] add administration of recipients of documents --- SeedDMS_Core/Core/inc.ClassDocument.php | 328 ++++++++++++++++++++++++ SeedDMS_Core/Core/inc.ClassUser.php | 85 +++++- 2 files changed, 412 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 5ea52bdbd..e943944fa 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -2805,6 +2805,55 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return $this->_approvalStatus; } /* }}} */ + /** + * Get the current receipt status of the document content + * The receipt status is a list of receipts + * + * @return array list of receipts + */ + function getReceiptStatus() { /* {{{ */ + $db = $this->_document->_dms->getDB(); + + if (!is_numeric($limit)) return false; + + // Retrieve the current status of each assigned reviewer for the content + // represented by this object. + // FIXME: caching was turned off to make list of review log in ViewDocument + // possible + if (1 || !isset($this->_receiptStatus)) { + /* First get a list of all receipts for this document content */ + $queryStr= + "SELECT receiptID FROM tblDocumentRecipients WHERE `version`='".$this->_version + ."' AND `documentID` = '". $this->_document->getID() ."' "; + $recs = $db->getResultArray($queryStr); + if (is_bool($recs) && !$recs) + return false; + $this->_reviewStatus = array(); + if($recs) { + foreach($recs as $rec) { + $queryStr= + "SELECT `tblDocumentRecipients`.*, `tblDocumentReceiptLog`.`receiptLogID`, ". + "`tblDocumentReceiptLog`.`date`, ". + "`tblDocumentReceiptLog`.`userID`, `tblUsers`.`fullName`, `tblGroups`.`name` AS `groupName` ". + "FROM `tblDocumentReviewers` ". + "LEFT JOIN `tblDocumentReceiptLog` USING (`reviewID`) ". + "LEFT JOIN `tblUsers` on `tblUsers`.`id` = `tblDocumentRecipients`.`required`". + "LEFT JOIN `tblGroups` on `tblGroups`.`id` = `tblDocumentRecipients`.`required`". + "WHERE `tblDocumentRecipients`.`reviewID` = '". $rec['reviewID'] ."' ". + "ORDER BY `tblDocumentReceiptLog`.`receiptLogID` DESC"; + + $res = $db->getResultArray($queryStr); + if (is_bool($res) && !$res) { + unset($this->_receiptStatus); + return false; + } + $this->_receiptStatus = array_merge($this->_receiptStatus, $res); + } + } + } + return $this->_receiptStatus; + } /* }}} */ + function addIndReviewer($user, $requestUser, $listadmin=false) { /* {{{ */ $db = $this->_document->_dms->getDB(); @@ -3253,6 +3302,222 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return 0; } /* }}} */ + function addIndRecipient($user, $requestUser, $listadmin=false) { /* {{{ */ + $db = $this->_document->_dms->getDB(); + + $userID = $user->getID(); + + // Get the list of users and groups with read access to this document. + if($this->_document->getAccessMode($user) < M_READ) { + return -2; + } + + // Check to see if the user has already been added to the receipt list. + $receiptStatus = $user->getReviewStatus($this->_document->getID(), $this->_version); + if (is_bool($receiptStatus) && !$receiptStatus) { + return -1; + } + $indstatus = false; + if (count($receiptStatus["indstatus"]) > 0) { + $indstatus = array_pop($receiptStatus["indstatus"]); + if($indstatus["status"]!=-2) { + // User is already on the list of recipients; return an error. + return -3; + } + } + + // Add the user into the recipients database. + if (!$indstatus || ($indstatus && $indstatus["status"]!=-2)) { + $queryStr = "INSERT INTO `tblDocumentRecipients` (`documentID`, `version`, `type`, `required`) ". + "VALUES ('". $this->_document->getID() ."', '". $this->_version ."', '0', '". $userID ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + $receiptID = $db->getInsertID(); + } + else { + $receiptID = isset($indstatus["receiptID"]) ? $ $indstatus["receiptID"] : NULL; + } + + $queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $receiptID ."', '0', '', CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + + // Add recipient to event notification table. + //$this->_document->addNotify($userID, true); + + return 0; + } /* }}} */ + + function addGrpRecipient($group, $requestUser) { /* {{{ */ + $db = $this->_document->_dms->getDB(); + + $groupID = $group->getID(); + + // Get the list of users and groups with read access to this document. + if (!isset($this->_readAccessList)) { + // TODO: error checking. + $this->_readAccessList = $this->_document->getReadAccessList(); + } + $approved = false; + foreach ($this->_readAccessList["groups"] as $appGroup) { + if ($groupID == $appGroup->getID()) { + $approved = true; + break; + } + } + if (!$approved) { + return -2; + } + + // Check to see if the group has already been added to the review list. + $receiptStatus = $group->getReceiptStatus($this->_document->getID(), $this->_version); + if (is_bool($receiptStatus) && !$receiptStatus) { + return -1; + } + if (count($receiptStatus) > 0 && $receiptStatus[0]["status"]!=-2) { + // Group is already on the list of recipients; return an error. + return -3; + } + + // Add the group into the recipients database. + if (!isset($receiptStatus[0]["status"]) || (isset($receiptStatus[0]["status"]) && $receiptStatus[0]["status"]!=-2)) { + $queryStr = "INSERT INTO `tblDocumentRecipients` (`documentID`, `version`, `type`, `required`) ". + "VALUES ('". $this->_document->getID() ."', '". $this->_version ."', '1', '". $groupID ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + $receiptID = $db->getInsertID(); + } + else { + $receiptID = isset($receiptStatus[0]["receiptID"])?$receiptStatus[0]["receiptID"]:NULL; + } + + $queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $receiptID ."', '0', '', CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + + // Add reviewer to event notification table. + //$this->_document->addNotify($groupID, false); + + return 0; + } /* }}} */ + + /** + * Add a receipt to the document content + * + * This method will add an entry to the table tblDocumentReceiptLog. + * It will first check if the user is ment to receipt the document version. + * It not the return value is -3. + * Next it will check if the users has been removed from the list of + * recipients. In that case -4 will be returned. + * If the given receipt has been set by the user before, it cannot + * be set again and 0 will be returned. Іf the review could be succesfully + * added, the review log id will be returned. + * + * @see SeedDMS_Core_DocumentContent::setApprovalByInd() + * @param object $user user doing the receipt + * @param object $requestUser user asking for the receipt, this is mostly + * @param integer $status the status of the receipt, possible values are + * 0=unprocessed (maybe used to reset a status) + * 1=received, + * -2=user is deleted (use {link + * SeedDMS_Core_DocumentContent::delIndRecipient} instead) + * the user currently logged in. + * @return integer new receipt log id + */ + function setReceiptByInd($user, $requestUser, $status, $comment) { /* {{{ */ + $db = $this->_document->_dms->getDB(); + + // Check to see if the user can be removed from the review list. + $receiptStatus = $user->getReceiptStatus($this->_document->getID(), $this->_version); + if (is_bool($receiptStatus) && !$receiptStatus) { + return -1; + } + if (count($receiptStatus["indstatus"])==0) { + // User is not assigned to receipt this document. No action required. + // Return an error. + return -3; + } + $indstatus = array_pop($receiptStatus["indstatus"]); + if ($indstatus["status"]==-2) { + // User has been deleted from recipients + return -4; + } + // Check if the status is really different from the current status + if ($indstatus["status"] == $status) + return 0; + + $queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`, + `comment`, `date`, `userID`) ". + "VALUES ('". $indstatus["receiptID"] ."', '". + (int) $status ."', ".$db->qstr($comment).", CURRENT_TIMESTAMP, '". + $requestUser->getID() ."')"; + $res=$db->getResult($queryStr); + if (is_bool($res) && !$res) + return -1; + else { + $receiptLogID = $db->getInsertID(); + return $receiptLogID; + } + } /* }}} */ + + /** + * Add a receipt to the document content + * + * This method is similar to + * {@see SeedDMS_Core_DocumentContent::setReceiptByInd()} but adds a receipt + * for a group instead of a user. + * + * @param object $group group doing the receipt + * @param object $requestUser user asking for the receipt, this is mostly + * the user currently logged in. + * @return integer new receipt log id + */ + function setReceiptByGrp($group, $requestUser, $status, $comment) { /* {{{ */ + $db = $this->_document->_dms->getDB(); + + // Check to see if the user can be removed from the recipient list. + $receiptStatus = $group->getReceiptStatus($this->_document->getID(), $this->_version); + if (is_bool($receiptStatus) && !$receiptStatus) { + return -1; + } + if (count($receiptStatus)==0) { + // User is not assigned to receipt this document. No action required. + // Return an error. + return -3; + } + if ($receiptStatus[0]["status"]==-2) { + // Group has been deleted from recipients + return -4; + } + + // Check if the status is really different from the current status + if ($receiptStatus[0]["status"] == $status) + return 0; + + $queryStr = "INSERT INTO `tblDocumentReceiptLog` (`recipientsID`, `status`, + `comment`, `date`, `userID`) ". + "VALUES ('". $receiptStatus[0]["recipientsID"] ."', '". + (int) $status ."', ".$db->qstr($comment).", CURRENT_TIMESTAMP, '". + $requestUser->getID() ."')"; + $res=$db->getResult($queryStr); + if (is_bool($res) && !$res) + return -1; + else { + $receiptLogID = $db->getInsertID(); + return $receiptLogID; + } + } /* }}} */ + function delIndReviewer($user, $requestUser) { /* {{{ */ $db = $this->_document->_dms->getDB(); @@ -3379,6 +3644,69 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return 0; } /* }}} */ + function delIndRecipient($user, $requestUser) { /* {{{ */ + $db = $this->_document->_dms->getDB(); + + $userID = $user->getID(); + + // Check to see if the user can be removed from the recipient list. + $receiptStatus = $user->getReceiptStatus($this->_document->getID(), $this->_version); + if (is_bool($receiptStatus) && !$receiptStatus) { + return -1; + } + if (count($receiptStatus["indstatus"])==0) { + // User is not assigned to receipt this document. No action required. + // Return an error. + return -3; + } + $indstatus = array_pop($receiptStatus["indstatus"]); + if ($indstatus["status"]!=0) { + // User has already submitted a receipt or has already been deleted; + // return an error. + return -3; + } + + $queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $indstatus["receiptID"] ."', '-2', '', CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + + return 0; + } /* }}} */ + + function delGrpRecipient($group, $requestUser) { /* {{{ */ + $db = $this->_document->_dms->getDB(); + + $groupID = $group->getID(); + + // Check to see if the user can be removed from the recipient list. + $receiptStatus = $group->getReceiptStatus($this->_document->getID(), $this->_version); + if (is_bool($receiptStatus) && !$receiptStatus) { + return -1; + } + if (count($receiptStatus)==0) { + // User is not assigned to receipt this document. No action required. + // Return an error. + return -3; + } + if ($receiptStatus[0]["status"]!=0) { + // User has already submitted a receipt or has already been deleted; + // return an error. + return -3; + } + + $queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $receiptStatus[0]["receiptID"] ."', '-2', '', CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + + return 0; + } /* }}} */ + /** * Set state of workflow assigned to the document content * diff --git a/SeedDMS_Core/Core/inc.ClassUser.php b/SeedDMS_Core/Core/inc.ClassUser.php index 4db133639..f3e32e07d 100644 --- a/SeedDMS_Core/Core/inc.ClassUser.php +++ b/SeedDMS_Core/Core/inc.ClassUser.php @@ -885,7 +885,7 @@ class SeedDMS_Core_User { * Get a list of reviews * This function returns a list of all reviews seperated by individual * and group reviews. If the document id - * is passed, then only this document will be checked for approvals. The + * is passed, then only this document will be checked for reviews. The * same is true for the version of a document which limits the list * further. * @@ -1088,6 +1088,89 @@ class SeedDMS_Core_User { return $status; } /* }}} */ + /** + * Get a list of receipts + * This function returns a list of all receipts seperated by individual + * and group receipts. If the document id + * is passed, then only this document will be checked for receipts. The + * same is true for the version of a document which limits the list + * further. + * + * For a detaile description of the result array see + * {link SeedDMS_Core_User::getApprovalStatus} which does the same for + * approvals. + * + * @param int $documentID optional document id for which to retrieve the + * receipt + * @param int $version optional version of the document + * @return array list of all receipts + */ + function getReceiptStatus($documentID=null, $version=null) { /* {{{ */ + $db = $this->_dms->getDB(); + +/* + if (!$db->createTemporaryTable("ttreviewid")) { + return false; + } +*/ + $status = array("indstatus"=>array(), "grpstatus"=>array()); + + // See if the user is assigned as an individual recipient. + $queryStr = "SELECT `tblDocumentRecipients`.*, `tblDocumentReceiptLog`.`status`, ". + "`tblDocumentReceiptLog`.`comment`, `tblDocumentReceiptLog`.`date`, ". + "`tblDocumentReceiptLog`.`userID` ". + "FROM `tblDocumentRecipients` ". + "LEFT JOIN `tblDocumentReceiptLog` USING (`recipientID`) ". + "WHERE `tblDocumentRecipients`.`type`='0' ". + ($documentID==null ? "" : "AND `tblDocumentRecipients`.`documentID` = '". (int) $documentID ."' "). + ($version==null ? "" : "AND `tblDocumentRecipients`.`version` = '". (int) $version ."' "). + "AND `tblDocumentRecipients`.`required`='". $this->_id ."' ". + "ORDER BY `tblDocumentReceiptLog`.`reviewLogID` DESC"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr === false) + return false; + if (count($resArr)>0) { + foreach ($resArr as $res) { + if(isset($status["indstatus"][$res['documentID']])) { + if($status["indstatus"][$res['documentID']]['date'] < $res['date']) { + $status["indstatus"][$res['documentID']] = $res; + } + } else { + $status["indstatus"][$res['documentID']] = $res; + } + } + } + + // See if the user is the member of a group that has been assigned to + // receipt the document version. + $queryStr = "SELECT `tblDocumentRecipients`.*, `tblDocumentReceiptLog`.`status`, ". + "`tblDocumentReceiptLog`.`comment`, `tblDocumentReceiptLog`.`date`, ". + "`tblDocumentReceiptLog`.`userID` ". + "FROM `tblDocumentRecipients` ". + "LEFT JOIN `tblDocumentReceiptLog` USING (`reviewID`) ". + "LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`groupID` = `tblDocumentRecipients`.`required` ". + "WHERE `tblDocumentRecipients`.`type`='1' ". + ($documentID==null ? "" : "AND `tblDocumentRecipients`.`documentID` = '". (int) $documentID ."' "). + ($version==null ? "" : "AND `tblDocumentRecipients`.`version` = '". (int) $version ."' "). + "AND `tblGroupMembers`.`userID`='". $this->_id ."' ". + "ORDER BY `tblDocumentReceiptLog`.`reviewLogID` DESC"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr === false) + return false; + if (count($resArr)>0) { + foreach ($resArr as $res) { + if(isset($status["grpstatus"][$res['documentID']])) { + if($status["grpstatus"][$res['documentID']]['date'] < $res['date']) { + $status["grpstatus"][$res['documentID']] = $res; + } + } else { + $status["grpstatus"][$res['documentID']] = $res; + } + } + } + return $status; + } /* }}} */ + /** * Get a list of documents with a workflow * From ff9b3486c555a09dec222309fee5ada2e74d4cdb Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Apr 2015 13:44:13 +0200 Subject: [PATCH 0014/2006] add maySetRecipients() --- inc/inc.ClassAccessOperation.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index c2064796c..643aaf13f 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -105,6 +105,26 @@ class SeedDMS_AccessOperation { return false; } /* }}} */ + /** + * Check if recipients may be edited + * + * This check can only be done for documents. Setting the document + * recipients is only allowed if version modification is turned on + * in the settings. The + * admin may even set reviewers/approvers if is disallowed in the + * settings. + */ + function maySetRecipients() { /* {{{ */ + if(get_class($this->obj) == 'SeedDMS_Core_Document') { + $latestContent = $this->obj->getLatestContent(); + $status = $latestContent->getStatus(); + if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin())) { + return true; + } + } + return false; + } /* }}} */ + /** * Check if workflow may be edited * From 387f67dad4bfa073ce90673946f00ab5f90eaaa1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Apr 2015 13:44:45 +0200 Subject: [PATCH 0015/2006] enable/disable Acknowledge and Revision workflow --- inc/inc.ClassSettings.php | 8 ++++++++ op/op.Settings.php | 2 ++ views/bootstrap/class.Settings.php | 8 ++++++++ 3 files changed, 18 insertions(+) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 5c3698d5b..47dc69165 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -136,6 +136,10 @@ class Settings { /* {{{ */ var $_versioningFileName = "versioning_info.txt"; // the mode of workflow var $_workflowMode = "traditional"; + // enable/disable acknowledge workflow + var $_enableAcknowledgeWorkflow = true; + // enable/disable revision workflow + var $_enableRevisionWorkflow = true; // enable/disable log system var $_logFileEnable = true; // the log file rotation @@ -491,6 +495,8 @@ class Settings { /* {{{ */ $this->_presetExpirationDate = strval($tab["presetExpirationDate"]); $this->_versioningFileName = strval($tab["versioningFileName"]); $this->_workflowMode = strval($tab["workflowMode"]); + $this->_enableAcknowledgeWorkflow = strval($tab["enableAcknowledgeWorkflow"]); + $this->_enableRevisionWorkflow = strval($tab["enableRevisionWorkflow"]); $this->_enableVersionDeletion = Settings::boolval($tab["enableVersionDeletion"]); $this->_enableVersionModification = Settings::boolval($tab["enableVersionModification"]); $this->_enableDuplicateDocNames = Settings::boolval($tab["enableDuplicateDocNames"]); @@ -763,6 +769,8 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "versioningFileName", $this->_versioningFileName); $this->setXMLAttributValue($node, "presetExpirationDate", $this->_presetExpirationDate); $this->setXMLAttributValue($node, "workflowMode", $this->_workflowMode); + $this->setXMLAttributValue($node, "enableAcknowledgeWorkflow", $this->_enableAcknowledgeWorkflow); + $this->setXMLAttributValue($node, "enableRevisionWorkflow", $this->_enableRevisionWorkflow); $this->setXMLAttributValue($node, "enableVersionDeletion", $this->_enableVersionDeletion); $this->setXMLAttributValue($node, "enableVersionModification", $this->_enableVersionModification); $this->setXMLAttributValue($node, "enableDuplicateDocNames", $this->_enableDuplicateDocNames); diff --git a/op/op.Settings.php b/op/op.Settings.php index 3d512eabd..b3c544db6 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -147,6 +147,8 @@ if ($action == "saveSettings") $settings->_versioningFileName = $_POST["versioningFileName"]; $settings->_presetExpirationDate = $_POST["presetExpirationDate"]; $settings->_workflowMode = $_POST["workflowMode"]; + $settings->_enableAcknowledgeWorkflow = $_POST["enableAcknowledgeWorkflow"]; + $settings->_enableRevisionWorkflow = $_POST["enableRevisionWorkflow"]; $settings->_enableAdminRevApp = getBoolValue("enableAdminRevApp"); $settings->_enableOwnerRevApp = getBoolValue("enableOwnerRevApp"); $settings->_enableSelfRevApp = getBoolValue("enableSelfRevApp"); diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 843900812..914e57d38 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -488,6 +488,14 @@ if(!is_writeable($settings->_configFilePath)) { + "> + : + _enableAcknowledgeWorkflow) echo "checked" ?> /> + + "> + : + _enableRevisionWorkflow) echo "checked" ?> /> + "> : From 274c020148c28964938b491b4881fdec8b71622c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Apr 2015 13:46:26 +0200 Subject: [PATCH 0016/2006] add table for acknowledge workflow --- install/create_tables-innodb.sql | 34 +++++++++++++++++++++++++++++++ install/create_tables-sqlite3.sql | 30 +++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/install/create_tables-innodb.sql b/install/create_tables-innodb.sql index c6cbd0cf4..078b44eb9 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -382,6 +382,40 @@ CREATE TABLE `tblDocumentReviewLog` ( -- -------------------------------------------------------- +-- +-- Table structure for table `tblDocumentRecipients` +-- + +CREATE TABLE `tblDocumentRecipients` ( + `receiptID` int(11) NOT NULL auto_increment, + `documentID` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL default '0', + `type` tinyint(4) NOT NULL default '0', + `required` int(11) NOT NULL default '0', + PRIMARY KEY (`receiptID`), + UNIQUE KEY `documentID` (`documentID`,`version`,`type`,`required`), + CONSTRAINT `tblDocumentRecipients_document` FOREIGN KEY (`documentID`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentReceiptLog` +-- + +CREATE TABLE `tblDocumentReceiptLog` ( + `receiptLogID` int(11) NOT NULL auto_increment, + `receiptID` int(11) NOT NULL default '0', + `status` tinyint(4) NOT NULL default '0', + `comment` text NOT NULL, + `date` datetime NOT NULL default '0000-00-00 00:00:00', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`receiptLogID`), + CONSTRAINT `tblDocumentReceiptLog_recipient` FOREIGN KEY (`receiptID`) REFERENCES `tblDocumentRecipients` (`receiptID`) ON DELETE CASCADE, + CONSTRAINT `tblDocumentReceiptLog_user` FOREIGN KEY (`userID`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- -------------------------------------------------------- -- -- Table structure for table `tblDocumentStatus` -- diff --git a/install/create_tables-sqlite3.sql b/install/create_tables-sqlite3.sql index 82c6c2682..0d562d5b6 100644 --- a/install/create_tables-sqlite3.sql +++ b/install/create_tables-sqlite3.sql @@ -331,6 +331,36 @@ CREATE TABLE `tblDocumentReviewers` ( -- -------------------------------------------------------- +-- +-- Table structure for table `tblDocumentReceiptLog` +-- + +CREATE TABLE `tblDocumentReceiptLog` ( + `receiptLogID` INTEGER PRIMARY KEY AUTOINCREMENT, + `receiptID` INTEGER NOT NULL default 0 REFERENCES `tblDocumentRecipients` (`receiptID`) ON DELETE CASCADE, + `status` INTEGER NOT NULL default 0, + `comment` TEXT NOT NULL, + `date` TEXT NOT NULL default '0000-00-00 00:00:00', + `userID` INTEGER NOT NULL default 0 REFERENCES `tblUsers` (`id`) ON DELETE CASCADE +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentRecipients` +-- + +CREATE TABLE `tblDocumentRecipients` ( + `receiptID` INTEGER PRIMARY KEY AUTOINCREMENT, + `documentID` INTEGER NOT NULL default '0' REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, + `version` INTEGER unsigned NOT NULL default '0', + `type` INTEGER NOT NULL default '0', + `required` INTEGER NOT NULL default '0', + UNIQUE (`documentID`,`version`,`type`,`required`) +) ; + +-- -------------------------------------------------------- + -- -- Table structure for table `tblDocumentStatus` -- From 4bd0e3efe0466ce30ddf0a9a34f0615b2f78411a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Apr 2015 13:46:59 +0200 Subject: [PATCH 0017/2006] show link to out/out.SetRecipients.php if allowed --- views/bootstrap/class.ViewDocument.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 3312fa035..0b755cbf4 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -427,6 +427,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if($accessop->mayOverwriteStatus()) { print "
  • ".getMLText("change_status")."
  • "; } + if($accessop->maySetRecipients()) { + print "
  • ".getMLText("change_recipients")."
  • "; + } if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { // Allow changing reviewers/approvals only if not reviewed if($accessop->maySetReviewersApprovers()) { From a3b6ed8fb347d0e0088051da72e1958cc398ee33 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Apr 2015 18:32:11 +0200 Subject: [PATCH 0018/2006] add method getReceiptStatus --- SeedDMS_Core/Core/inc.ClassGroup.php | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/SeedDMS_Core/Core/inc.ClassGroup.php b/SeedDMS_Core/Core/inc.ClassGroup.php index 31019cb49..5fb5f30c2 100644 --- a/SeedDMS_Core/Core/inc.ClassGroup.php +++ b/SeedDMS_Core/Core/inc.ClassGroup.php @@ -377,5 +377,38 @@ class SeedDMS_Core_Group { return $status; } /* }}} */ + + function getReceiptStatus($documentID=null, $version=null) { /* {{{ */ + $db = $this->_dms->getDB(); + + $status = array(); + + // See if the group is assigned as a recipient. + $queryStr = "SELECT `tblDocumentRecipients`.*, `tblDocumentReceiptLog`.`status`, ". + "`tblDocumentReceiptLog`.`comment`, `tblDocumentReceiptLog`.`date`, ". + "`tblDocumentReceiptLog`.`userID` ". + "FROM `tblDocumentRecipients` ". + "LEFT JOIN `tblDocumentReceiptLog` USING (`receiptID`) ". + "WHERE `tblDocumentRecipients`.`type`='1' ". + ($documentID==null ? "" : "AND `tblDocumentRecipients`.`documentID` = '". (int) $documentID ."' "). + ($version==null ? "" : "AND `tblDocumentRecipients`.`version` = '". (int) $version ."' "). + "AND `tblDocumentRecipients`.`required`='". $this->_id ."' "; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + if (count($resArr)>0) { + foreach ($resArr as $res) { + if(isset($status["status"][$res['documentID']])) { + if($status["status"][$res['documentID']]['date'] < $res['date']) { + $status["status"][$res['documentID']] = $res; + } + } else { + $status["status"][$res['documentID']] = $res; + } + } + } + return $status; + } /* }}} */ + } ?> From ca9715c3bc16a17b94d1f7f83d554eb1c6b8f611 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Apr 2015 18:32:56 +0200 Subject: [PATCH 0019/2006] various error fixes in sql statements for ReceiptLog --- SeedDMS_Core/Core/inc.ClassUser.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassUser.php b/SeedDMS_Core/Core/inc.ClassUser.php index f3e32e07d..30c79e0c4 100644 --- a/SeedDMS_Core/Core/inc.ClassUser.php +++ b/SeedDMS_Core/Core/inc.ClassUser.php @@ -1120,12 +1120,12 @@ class SeedDMS_Core_User { "`tblDocumentReceiptLog`.`comment`, `tblDocumentReceiptLog`.`date`, ". "`tblDocumentReceiptLog`.`userID` ". "FROM `tblDocumentRecipients` ". - "LEFT JOIN `tblDocumentReceiptLog` USING (`recipientID`) ". + "LEFT JOIN `tblDocumentReceiptLog` USING (`receiptID`) ". "WHERE `tblDocumentRecipients`.`type`='0' ". ($documentID==null ? "" : "AND `tblDocumentRecipients`.`documentID` = '". (int) $documentID ."' "). ($version==null ? "" : "AND `tblDocumentRecipients`.`version` = '". (int) $version ."' "). "AND `tblDocumentRecipients`.`required`='". $this->_id ."' ". - "ORDER BY `tblDocumentReceiptLog`.`reviewLogID` DESC"; + "ORDER BY `tblDocumentReceiptLog`.`receiptLogID` DESC"; $resArr = $db->getResultArray($queryStr); if (is_bool($resArr) && $resArr === false) return false; @@ -1147,13 +1147,13 @@ class SeedDMS_Core_User { "`tblDocumentReceiptLog`.`comment`, `tblDocumentReceiptLog`.`date`, ". "`tblDocumentReceiptLog`.`userID` ". "FROM `tblDocumentRecipients` ". - "LEFT JOIN `tblDocumentReceiptLog` USING (`reviewID`) ". + "LEFT JOIN `tblDocumentReceiptLog` USING (`receiptID`) ". "LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`groupID` = `tblDocumentRecipients`.`required` ". "WHERE `tblDocumentRecipients`.`type`='1' ". ($documentID==null ? "" : "AND `tblDocumentRecipients`.`documentID` = '". (int) $documentID ."' "). ($version==null ? "" : "AND `tblDocumentRecipients`.`version` = '". (int) $version ."' "). "AND `tblGroupMembers`.`userID`='". $this->_id ."' ". - "ORDER BY `tblDocumentReceiptLog`.`reviewLogID` DESC"; + "ORDER BY `tblDocumentReceiptLog`.`receiptLogID` DESC"; $resArr = $db->getResultArray($queryStr); if (is_bool($resArr) && $resArr === false) return false; From 68be1ad42e825fc4f5121dc7925bab86d9ccb1e1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Apr 2015 18:33:42 +0200 Subject: [PATCH 0020/2006] fix lots of error for managing receiveLog --- SeedDMS_Core/Core/inc.ClassDocument.php | 48 +++++++++++++------------ 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index e943944fa..ffb71ce03 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -2811,7 +2811,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ * * @return array list of receipts */ - function getReceiptStatus() { /* {{{ */ + function getReceiptStatus($limit=1) { /* {{{ */ $db = $this->_document->_dms->getDB(); if (!is_numeric($limit)) return false; @@ -2828,19 +2828,21 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ $recs = $db->getResultArray($queryStr); if (is_bool($recs) && !$recs) return false; - $this->_reviewStatus = array(); + $this->_receiptStatus = array(); if($recs) { foreach($recs as $rec) { $queryStr= "SELECT `tblDocumentRecipients`.*, `tblDocumentReceiptLog`.`receiptLogID`, ". + "`tblDocumentReceiptLog`.`status`, ". + "`tblDocumentReceiptLog`.`comment`, ". "`tblDocumentReceiptLog`.`date`, ". "`tblDocumentReceiptLog`.`userID`, `tblUsers`.`fullName`, `tblGroups`.`name` AS `groupName` ". - "FROM `tblDocumentReviewers` ". - "LEFT JOIN `tblDocumentReceiptLog` USING (`reviewID`) ". - "LEFT JOIN `tblUsers` on `tblUsers`.`id` = `tblDocumentRecipients`.`required`". - "LEFT JOIN `tblGroups` on `tblGroups`.`id` = `tblDocumentRecipients`.`required`". - "WHERE `tblDocumentRecipients`.`reviewID` = '". $rec['reviewID'] ."' ". - "ORDER BY `tblDocumentReceiptLog`.`receiptLogID` DESC"; + "FROM `tblDocumentRecipients` ". + "LEFT JOIN `tblDocumentReceiptLog` USING (`receiptID`) ". + "LEFT JOIN `tblUsers` on `tblUsers`.`id` = `tblDocumentRecipients`.`required` ". + "LEFT JOIN `tblGroups` on `tblGroups`.`id` = `tblDocumentRecipients`.`required` ". + "WHERE `tblDocumentRecipients`.`receiptID` = '". $rec['receiptID'] ."' ". + "ORDER BY `tblDocumentReceiptLog`.`receiptLogID` DESC LIMIT ".(int) $limit; $res = $db->getResultArray($queryStr); if (is_bool($res) && !$res) { @@ -2904,7 +2906,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ $reviewID = $db->getInsertID(); } else { - $reviewID = isset($indstatus["reviewID"]) ? $ $indstatus["reviewID"] : NULL; + $reviewID = isset($indstatus["reviewID"]) ? $indstatus["reviewID"] : NULL; } $queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ". @@ -3313,7 +3315,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ } // Check to see if the user has already been added to the receipt list. - $receiptStatus = $user->getReviewStatus($this->_document->getID(), $this->_version); + $receiptStatus = $user->getReceiptStatus($this->_document->getID(), $this->_version); if (is_bool($receiptStatus) && !$receiptStatus) { return -1; } @@ -3337,7 +3339,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ $receiptID = $db->getInsertID(); } else { - $receiptID = isset($indstatus["receiptID"]) ? $ $indstatus["receiptID"] : NULL; + $receiptID = isset($indstatus["receiptID"]) ? $indstatus["receiptID"] : NULL; } $queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`, `comment`, `date`, `userID`) ". @@ -3379,13 +3381,17 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (is_bool($receiptStatus) && !$receiptStatus) { return -1; } - if (count($receiptStatus) > 0 && $receiptStatus[0]["status"]!=-2) { - // Group is already on the list of recipients; return an error. - return -3; + $status = false; + if (count($receiptStatus["status"]) > 0) { + $status = array_pop($receiptStatus["status"]); + if($status["status"]!=-2) { + // User is already on the list of recipients; return an error. + return -3; + } } // Add the group into the recipients database. - if (!isset($receiptStatus[0]["status"]) || (isset($receiptStatus[0]["status"]) && $receiptStatus[0]["status"]!=-2)) { + if (!$status || ($status && $status["status"]!=-2)) { $queryStr = "INSERT INTO `tblDocumentRecipients` (`documentID`, `version`, `type`, `required`) ". "VALUES ('". $this->_document->getID() ."', '". $this->_version ."', '1', '". $groupID ."')"; $res = $db->getResult($queryStr); @@ -3395,7 +3401,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ $receiptID = $db->getInsertID(); } else { - $receiptID = isset($receiptStatus[0]["receiptID"])?$receiptStatus[0]["receiptID"]:NULL; + $receiptID = isset($status["receiptID"]) ? $status["receiptID"] : NULL; } $queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`, `comment`, `date`, `userID`) ". @@ -3405,9 +3411,6 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return -1; } - // Add reviewer to event notification table. - //$this->_document->addNotify($groupID, false); - return 0; } /* }}} */ @@ -3686,19 +3689,20 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (is_bool($receiptStatus) && !$receiptStatus) { return -1; } - if (count($receiptStatus)==0) { + if (count($receiptStatus["status"])==0) { // User is not assigned to receipt this document. No action required. // Return an error. return -3; } - if ($receiptStatus[0]["status"]!=0) { + $status = array_pop($receiptStatus["status"]); + if ($tatus["status"]!=0) { // User has already submitted a receipt or has already been deleted; // return an error. return -3; } $queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`, `comment`, `date`, `userID`) ". - "VALUES ('". $receiptStatus[0]["receiptID"] ."', '-2', '', CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; + "VALUES ('". $status["receiptID"] ."', '-2', '', CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; $res = $db->getResult($queryStr); if (is_bool($res) && !$res) { return -1; From a590fec96733e50be8205b8a1fe5bd30441155ff Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 10:31:36 +0200 Subject: [PATCH 0021/2006] add revision workflow --- SeedDMS_Core/Core/inc.ClassDocument.php | 339 +++++++++++++++++++++++- SeedDMS_Core/Core/inc.ClassGroup.php | 54 ++++ SeedDMS_Core/Core/inc.ClassUser.php | 144 +++++++--- 3 files changed, 491 insertions(+), 46 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index ffb71ce03..bab3e8197 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -30,7 +30,7 @@ define("S_DRAFT_APP", 1); /* * Document is released. A document is in release state either when * it needs no review or approval after uploaded or has been reviewed - * and/or approved.. + * and/or approved. */ define("S_RELEASED", 2); @@ -40,6 +40,12 @@ define("S_RELEASED", 2); */ define("S_IN_WORKFLOW", 3); +/* + * Document is in a revision workflow. A revision workflow is started + * some time after the document has been released. + */ +define("S_IN_REVISION", 4); + /* * Document was rejected. A document is in rejected state when * the review failed or approval was not given. @@ -2856,6 +2862,57 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return $this->_receiptStatus; } /* }}} */ + /** + * Get the current revision status of the document content + * The revision status is a list of revisions + * + * @return array list of revisions + */ + function getRevisionStatus($limit=1) { /* {{{ */ + $db = $this->_document->_dms->getDB(); + + if (!is_numeric($limit)) return false; + + // Retrieve the current status of each assigned reviewer for the content + // represented by this object. + // FIXME: caching was turned off to make list of review log in ViewDocument + // possible + if (1 || !isset($this->_revisionStatus)) { + /* First get a list of all revisions for this document content */ + $queryStr= + "SELECT revisionID FROM tblDocumentRevisers WHERE `version`='".$this->_version + ."' AND `documentID` = '". $this->_document->getID() ."' "; + $recs = $db->getResultArray($queryStr); + if (is_bool($recs) && !$recs) + return false; + $this->_revisionStatus = array(); + if($recs) { + foreach($recs as $rec) { + $queryStr= + "SELECT `tblDocumentRevisers`.*, `tblDocumentRevisionLog`.`revisionLogID`, ". + "`tblDocumentRevisionLog`.`status`, ". + "`tblDocumentRevisionLog`.`comment`, ". + "`tblDocumentRevisionLog`.`date`, ". + "`tblDocumentRevisionLog`.`userID`, `tblUsers`.`fullName`, `tblGroups`.`name` AS `groupName` ". + "FROM `tblDocumentRevisers` ". + "LEFT JOIN `tblDocumentRevisionLog` USING (`revisionID`) ". + "LEFT JOIN `tblUsers` on `tblUsers`.`id` = `tblDocumentRevisers`.`required` ". + "LEFT JOIN `tblGroups` on `tblGroups`.`id` = `tblDocumentRevisers`.`required` ". + "WHERE `tblDocumentRevisers`.`revisionID` = '". $rec['revisionID'] ."' ". + "ORDER BY `tblDocumentRevisionLog`.`revisionLogID` DESC LIMIT ".(int) $limit; + + $res = $db->getResultArray($queryStr); + if (is_bool($res) && !$res) { + unset($this->_revisionStatus); + return false; + } + $this->_revisionStatus = array_merge($this->_revisionStatus, $res); + } + } + } + return $this->_revisionStatus; + } /* }}} */ + function addIndReviewer($user, $requestUser, $listadmin=false) { /* {{{ */ $db = $this->_document->_dms->getDB(); @@ -3414,6 +3471,113 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return 0; } /* }}} */ + function addIndReviser($user, $requestUser, $listadmin=false) { /* {{{ */ + $db = $this->_document->_dms->getDB(); + + $userID = $user->getID(); + + // Get the list of users and groups with read access to this document. + if($this->_document->getAccessMode($user) < M_READ) { + return -2; + } + + // Check to see if the user has already been added to the reviser list. + $revisionStatus = $user->getRevisionStatus($this->_document->getID(), $this->_version); + if (is_bool($revisionStatus) && !$revisionStatus) { + return -1; + } + $indstatus = false; + if (count($revisionStatus["indstatus"]) > 0) { + $indstatus = array_pop($revisionStatus["indstatus"]); + if($indstatus["status"]!=-2) { + // User is already on the list of recipients; return an error. + return -3; + } + } + + // Add the user into the revisers database. + if (!$indstatus || ($indstatus && $indstatus["status"]!=-2)) { + $queryStr = "INSERT INTO `tblDocumentRevisers` (`documentID`, `version`, `type`, `required`) ". + "VALUES ('". $this->_document->getID() ."', '". $this->_version ."', '0', '". $userID ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + $revisionID = $db->getInsertID(); + } + else { + $revisionID = isset($indstatus["revisionID"]) ? $indstatus["revisionID"] : NULL; + } + + $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $revisionID ."', '0', '', CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + + return 0; + } /* }}} */ + + function addGrpReviser($group, $requestUser) { /* {{{ */ + $db = $this->_document->_dms->getDB(); + + $groupID = $group->getID(); + + // Get the list of users and groups with read access to this document. + if (!isset($this->_readAccessList)) { + // TODO: error checking. + $this->_readAccessList = $this->_document->getReadAccessList(); + } + $approved = false; + foreach ($this->_readAccessList["groups"] as $appGroup) { + if ($groupID == $appGroup->getID()) { + $approved = true; + break; + } + } + if (!$approved) { + return -2; + } + + // Check to see if the group has already been added to the review list. + $revisionStatus = $group->getRevisionStatus($this->_document->getID(), $this->_version); + if (is_bool($revisionStatus) && !$revisionStatus) { + return -1; + } + $status = false; + if (count($revisionStatus["status"]) > 0) { + $status = array_pop($revisionStatus["status"]); + if($status["status"]!=-2) { + // User is already on the list of recipients; return an error. + return -3; + } + } + + // Add the group into the recipients database. + if (!$status || ($status && $status["status"]!=-2)) { + $queryStr = "INSERT INTO `tblDocumentRevisers` (`documentID`, `version`, `type`, `required`) ". + "VALUES ('". $this->_document->getID() ."', '". $this->_version ."', '1', '". $groupID ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + $revisionID = $db->getInsertID(); + } + else { + $revisionID = isset($status["revisionID"]) ? $status["revisionID"] : NULL; + } + + $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $revisionID ."', '0', '', CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + + return 0; + } /* }}} */ + /** * Add a receipt to the document content * @@ -3521,6 +3685,113 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ } } /* }}} */ + /** + * Add a revision to the document content + * + * This method will add an entry to the table tblDocumentRevisionLog. + * It will first check if the user is ment to revision the document version. + * It not the return value is -3. + * Next it will check if the users has been removed from the list of + * recipients. In that case -4 will be returned. + * If the given revision has been set by the user before, it cannot + * be set again and 0 will be returned. Іf the review could be succesfully + * added, the review log id will be returned. + * + * @see SeedDMS_Core_DocumentContent::setApprovalByInd() + * @param object $user user doing the revision + * @param object $requestUser user asking for the revision, this is mostly + * @param integer $status the status of the revision, possible values are + * 0=unprocessed (maybe used to reset a status) + * 1=received, + * -2=user is deleted (use {link + * SeedDMS_Core_DocumentContent::delIndRecipient} instead) + * the user currently logged in. + * @return integer new revision log id + */ + function setRevisionByInd($user, $requestUser, $status, $comment) { /* {{{ */ + $db = $this->_document->_dms->getDB(); + + // Check to see if the user can be removed from the review list. + $revisionStatus = $user->getRevisionStatus($this->_document->getID(), $this->_version); + if (is_bool($revisionStatus) && !$revisionStatus) { + return -1; + } + if (count($revisionStatus["indstatus"])==0) { + // User is not assigned to revision this document. No action required. + // Return an error. + return -3; + } + $indstatus = array_pop($revisionStatus["indstatus"]); + if ($indstatus["status"]==-2) { + // User has been deleted from recipients + return -4; + } + // Check if the status is really different from the current status + if ($indstatus["status"] == $status) + return 0; + + $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, + `comment`, `date`, `userID`) ". + "VALUES ('". $indstatus["revisionID"] ."', '". + (int) $status ."', ".$db->qstr($comment).", CURRENT_TIMESTAMP, '". + $requestUser->getID() ."')"; + $res=$db->getResult($queryStr); + if (is_bool($res) && !$res) + return -1; + else { + $revisionLogID = $db->getInsertID(); + return $revisionLogID; + } + } /* }}} */ + + /** + * Add a revision to the document content + * + * This method is similar to + * {@see SeedDMS_Core_DocumentContent::setRevisionByInd()} but adds a revision + * for a group instead of a user. + * + * @param object $group group doing the revision + * @param object $requestUser user asking for the revision, this is mostly + * the user currently logged in. + * @return integer new revision log id + */ + function setRevisionByGrp($group, $requestUser, $status, $comment) { /* {{{ */ + $db = $this->_document->_dms->getDB(); + + // Check to see if the user can be removed from the recipient list. + $revisionStatus = $group->getRevisionStatus($this->_document->getID(), $this->_version); + if (is_bool($revisionStatus) && !$revisionStatus) { + return -1; + } + if (count($revisionStatus)==0) { + // User is not assigned to revision this document. No action required. + // Return an error. + return -3; + } + if ($revisionStatus[0]["status"]==-2) { + // Group has been deleted from recipients + return -4; + } + + // Check if the status is really different from the current status + if ($revisionStatus[0]["status"] == $status) + return 0; + + $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`recipientsID`, `status`, + `comment`, `date`, `userID`) ". + "VALUES ('". $revisionStatus[0]["recipientsID"] ."', '". + (int) $status ."', ".$db->qstr($comment).", CURRENT_TIMESTAMP, '". + $requestUser->getID() ."')"; + $res=$db->getResult($queryStr); + if (is_bool($res) && !$res) + return -1; + else { + $revisionLogID = $db->getInsertID(); + return $revisionLogID; + } + } /* }}} */ + function delIndReviewer($user, $requestUser) { /* {{{ */ $db = $this->_document->_dms->getDB(); @@ -3653,7 +3924,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ $userID = $user->getID(); // Check to see if the user can be removed from the recipient list. - $receiptStatus = $user->getReceiptStatus($this->_document->getID(), $this->_version); + $revisionStatus = $user->getReceiptStatus($this->_document->getID(), $this->_version); if (is_bool($receiptStatus) && !$receiptStatus) { return -1; } @@ -3711,6 +3982,70 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return 0; } /* }}} */ + function delIndReviser($user, $requestUser) { /* {{{ */ + $db = $this->_document->_dms->getDB(); + + $userID = $user->getID(); + + // Check to see if the user can be removed from the reviser list. + $revisionStatus = $user->getRevisionStatus($this->_document->getID(), $this->_version); + if (is_bool($revisionStatus) && !$revisionStatus) { + return -1; + } + if (count($revisionStatus["indstatus"])==0) { + // User is not assigned to revision this document. No action required. + // Return an error. + return -3; + } + $indstatus = array_pop($revisionStatus["indstatus"]); + if ($indstatus["status"]!=0) { + // User has already submitted a revision or has already been deleted; + // return an error. + return -3; + } + + $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $indstatus["revisionID"] ."', '-2', '', CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + + return 0; + } /* }}} */ + + function delGrpReviser($group, $requestUser) { /* {{{ */ + $db = $this->_document->_dms->getDB(); + + $groupID = $group->getID(); + + // Check to see if the user can be removed from the reviser list. + $revisionStatus = $group->getRevisionStatus($this->_document->getID(), $this->_version); + if (is_bool($revisionStatus) && !$revisionStatus) { + return -1; + } + if (count($revisionStatus["status"])==0) { + // User is not assigned to revision this document. No action required. + // Return an error. + return -3; + } + $status = array_pop($revisionStatus["status"]); + if ($tatus["status"]!=0) { + // User has already submitted a revision or has already been deleted; + // return an error. + return -3; + } + + $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $status["revisionID"] ."', '-2', '', CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } + + return 0; + } /* }}} */ + /** * Set state of workflow assigned to the document content * diff --git a/SeedDMS_Core/Core/inc.ClassGroup.php b/SeedDMS_Core/Core/inc.ClassGroup.php index 5fb5f30c2..c389cebd4 100644 --- a/SeedDMS_Core/Core/inc.ClassGroup.php +++ b/SeedDMS_Core/Core/inc.ClassGroup.php @@ -310,6 +310,28 @@ class SeedDMS_Core_Group { } } + $receiptStatus = $this->getReceiptStatus(); + foreach ($receiptStatus as $r) { + $queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $r["receiptID"] ."', '-2', 'Recipients group removed from process', CURRENT_TIMESTAMP, '". $user->getID() ."')"; + $res=$db->getResult($queryStr); + if(!$res) { + $db->rollbackTransaction(); + return false; + } + } + + $revisionStatus = $this->getRevisionStatus(); + foreach ($revisionStatus as $r) { + $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $r["revisionID"] ."', '-2', 'Revisers group removed from process', CURRENT_TIMESTAMP, '". $user->getID() ."')"; + $res=$db->getResult($queryStr); + if(!$res) { + $db->rollbackTransaction(); + return false; + } + } + $db->commitTransaction(); return true; @@ -410,5 +432,37 @@ class SeedDMS_Core_Group { return $status; } /* }}} */ + function getRevisionStatus($documentID=null, $version=null) { /* {{{ */ + $db = $this->_dms->getDB(); + + $status = array(); + + // See if the group is assigned as a reviser. + $queryStr = "SELECT `tblDocumentRevisers`.*, `tblDocumentRevisionLog`.`status`, ". + "`tblDocumentRevisionLog`.`comment`, `tblDocumentRevisionLog`.`date`, ". + "`tblDocumentRevisionLog`.`userID` ". + "FROM `tblDocumentRevisers` ". + "LEFT JOIN `tblDocumentRevisionLog` USING (`revisionID`) ". + "WHERE `tblDocumentRevisers`.`type`='1' ". + ($documentID==null ? "" : "AND `tblDocumentRevisers`.`documentID` = '". (int) $documentID ."' "). + ($version==null ? "" : "AND `tblDocumentRevisers`.`version` = '". (int) $version ."' "). + "AND `tblDocumentRevisers`.`required`='". $this->_id ."' "; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + if (count($resArr)>0) { + foreach ($resArr as $res) { + if(isset($status["status"][$res['documentID']])) { + if($status["status"][$res['documentID']]['date'] < $res['date']) { + $status["status"][$res['documentID']] = $res; + } + } else { + $status["status"][$res['documentID']] = $res; + } + } + } + return $status; + } /* }}} */ + } ?> diff --git a/SeedDMS_Core/Core/inc.ClassUser.php b/SeedDMS_Core/Core/inc.ClassUser.php index 30c79e0c4..f45372494 100644 --- a/SeedDMS_Core/Core/inc.ClassUser.php +++ b/SeedDMS_Core/Core/inc.ClassUser.php @@ -686,6 +686,28 @@ class SeedDMS_Core_User { } } + $receiptStatus = $this->getReceiptStatus(); + foreach ($receiptStatus["indstatus"] as $ri) { + $queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $ri["receiptID"] ."', '-2', 'Recipient removed from process', CURRENT_TIMESTAMP, '". $user->getID() ."')"; + $res=$db->getResult($queryStr); + if(!$res) { + $db->rollbackTransaction(); + return false; + } + } + + $revisionStatus = $this->getRevisionStatus(); + foreach ($revisionStatus["indstatus"] as $ri) { + $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $ri["revisionID"] ."', '-2', 'Reviser removed from process', CURRENT_TIMESTAMP, '". $user->getID() ."')"; + $res=$db->getResult($queryStr); + if(!$res) { + $db->rollbackTransaction(); + return false; + } + } + $db->commitTransaction(); return true; } /* }}} */ @@ -901,11 +923,6 @@ class SeedDMS_Core_User { function getReviewStatus($documentID=null, $version=null) { /* {{{ */ $db = $this->_dms->getDB(); -/* - if (!$db->createTemporaryTable("ttreviewid")) { - return false; - } -*/ $status = array("indstatus"=>array(), "grpstatus"=>array()); // See if the user is assigned as an individual reviewer. @@ -995,27 +1012,7 @@ class SeedDMS_Core_User { function getApprovalStatus($documentID=null, $version=null) { /* {{{ */ $db = $this->_dms->getDB(); -/* - if (!$db->createTemporaryTable("ttapproveid")) { - return false; - } -*/ $status = array("indstatus"=>array(), "grpstatus"=>array()); - - // See if the user is assigned as an individual approver. - /* - $queryStr = "SELECT `tblDocumentApprovers`.*, `tblDocumentApproveLog`.`status`, ". - "`tblDocumentApproveLog`.`comment`, `tblDocumentApproveLog`.`date`, ". - "`tblDocumentApproveLog`.`userID` ". - "FROM `tblDocumentApprovers` ". - "LEFT JOIN `tblDocumentApproveLog` USING (`approveID`) ". - "LEFT JOIN `ttapproveid` on `ttapproveid`.`maxLogID` = `tblDocumentApproveLog`.`approveLogID` ". - "WHERE `ttapproveid`.`maxLogID`=`tblDocumentApproveLog`.`approveLogID` ". - ($documentID==null ? "" : "AND `tblDocumentApprovers`.`documentID` = '". $documentID ."' "). - ($version==null ? "" : "AND `tblDocumentApprovers`.`version` = '". $version ."' "). - "AND `tblDocumentApprovers`.`type`='0' ". - "AND `tblDocumentApprovers`.`required`='". $this->_id ."' "; -*/ $queryStr = "SELECT `tblDocumentApprovers`.*, `tblDocumentApproveLog`.`status`, ". "`tblDocumentApproveLog`.`comment`, `tblDocumentApproveLog`.`date`, ". @@ -1045,20 +1042,6 @@ class SeedDMS_Core_User { // See if the user is the member of a group that has been assigned to // approve the document version. - /* - $queryStr = "SELECT `tblDocumentApprovers`.*, `tblDocumentApproveLog`.`status`, ". - "`tblDocumentApproveLog`.`comment`, `tblDocumentApproveLog`.`date`, ". - "`tblDocumentApproveLog`.`userID` ". - "FROM `tblDocumentApprovers` ". - "LEFT JOIN `tblDocumentApproveLog` USING (`approveID`) ". - "LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`groupID` = `tblDocumentApprovers`.`required` ". - "LEFT JOIN `ttapproveid` on `ttapproveid`.`maxLogID` = `tblDocumentApproveLog`.`approveLogID` ". - "WHERE `ttapproveid`.`maxLogID`=`tblDocumentApproveLog`.`approveLogID` ". - ($documentID==null ? "" : "AND `tblDocumentApprovers`.`documentID` = '". $documentID ."' "). - ($version==null ? "" : "AND `tblDocumentApprovers`.`version` = '". $version ."' "). - "AND `tblDocumentApprovers`.`type`='1' ". - "AND `tblGroupMembers`.`userID`='". $this->_id ."'"; - */ $queryStr = "SELECT `tblDocumentApprovers`.*, `tblDocumentApproveLog`.`status`, ". "`tblDocumentApproveLog`.`comment`, `tblDocumentApproveLog`.`date`, ". @@ -1108,11 +1091,6 @@ class SeedDMS_Core_User { function getReceiptStatus($documentID=null, $version=null) { /* {{{ */ $db = $this->_dms->getDB(); -/* - if (!$db->createTemporaryTable("ttreviewid")) { - return false; - } -*/ $status = array("indstatus"=>array(), "grpstatus"=>array()); // See if the user is assigned as an individual recipient. @@ -1171,6 +1149,84 @@ class SeedDMS_Core_User { return $status; } /* }}} */ + /** + * Get a list of revisions + * This function returns a list of all revisions seperated by individual + * and group revisions. If the document id + * is passed, then only this document will be checked for revisions. The + * same is true for the version of a document which limits the list + * further. + * + * For a detaile description of the result array see + * {link SeedDMS_Core_User::getApprovalStatus} which does the same for + * approvals. + * + * @param int $documentID optional document id for which to retrieve the + * revisions + * @param int $version optional version of the document + * @return array list of all revisions + */ + function getRevisionStatus($documentID=null, $version=null) { /* {{{ */ + $db = $this->_dms->getDB(); + + $status = array("indstatus"=>array(), "grpstatus"=>array()); + + // See if the user is assigned as an individual reviser. + $queryStr = "SELECT `tblDocumentRevisers`.*, `tblDocumentRevisionLog`.`status`, ". + "`tblDocumentRevisionLog`.`comment`, `tblDocumentRevisionLog`.`date`, ". + "`tblDocumentRevisionLog`.`userID` ". + "FROM `tblDocumentRevisers` ". + "LEFT JOIN `tblDocumentRevisionLog` USING (`revisionID`) ". + "WHERE `tblDocumentRevisers`.`type`='0' ". + ($documentID==null ? "" : "AND `tblDocumentRevisers`.`documentID` = '". (int) $documentID ."' "). + ($version==null ? "" : "AND `tblDocumentRevisers`.`version` = '". (int) $version ."' "). + "AND `tblDocumentRevisers`.`required`='". $this->_id ."' ". + "ORDER BY `tblDocumentRevisionLog`.`revisionLogID` DESC"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr === false) + return false; + if (count($resArr)>0) { + foreach ($resArr as $res) { + if(isset($status["indstatus"][$res['documentID']])) { + if($status["indstatus"][$res['documentID']]['date'] < $res['date']) { + $status["indstatus"][$res['documentID']] = $res; + } + } else { + $status["indstatus"][$res['documentID']] = $res; + } + } + } + + // See if the user is the member of a group that has been assigned to + // revision the document version. + $queryStr = "SELECT `tblDocumentRevisers`.*, `tblDocumentRevisionLog`.`status`, ". + "`tblDocumentRevisionLog`.`comment`, `tblDocumentRevisionLog`.`date`, ". + "`tblDocumentRevisionLog`.`userID` ". + "FROM `tblDocumentRevisers` ". + "LEFT JOIN `tblDocumentRevisionLog` USING (`revisionID`) ". + "LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`groupID` = `tblDocumentRevisers`.`required` ". + "WHERE `tblDocumentRevisers`.`type`='1' ". + ($documentID==null ? "" : "AND `tblDocumentRevisers`.`documentID` = '". (int) $documentID ."' "). + ($version==null ? "" : "AND `tblDocumentRevisers`.`version` = '". (int) $version ."' "). + "AND `tblGroupMembers`.`userID`='". $this->_id ."' ". + "ORDER BY `tblDocumentRevisionLog`.`revisionLogID` DESC"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr === false) + return false; + if (count($resArr)>0) { + foreach ($resArr as $res) { + if(isset($status["grpstatus"][$res['documentID']])) { + if($status["grpstatus"][$res['documentID']]['date'] < $res['date']) { + $status["grpstatus"][$res['documentID']] = $res; + } + } else { + $status["grpstatus"][$res['documentID']] = $res; + } + } + } + return $status; + } /* }}} */ + /** * Get a list of documents with a workflow * From ebdfc45b69c80fc72944ba8ea7f76f42a352a5b7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 10:31:56 +0200 Subject: [PATCH 0022/2006] add tables for revision workflow --- install/create_tables-innodb.sql | 36 +++++++++++++++++++++++++++++++ install/create_tables-sqlite3.sql | 30 ++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/install/create_tables-innodb.sql b/install/create_tables-innodb.sql index 078b44eb9..9202b712a 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -415,6 +415,42 @@ CREATE TABLE `tblDocumentReceiptLog` ( CONSTRAINT `tblDocumentReceiptLog_user` FOREIGN KEY (`userID`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentRevisers` +-- + +CREATE TABLE `tblDocumentRevisers` ( + `revisionID` int(11) NOT NULL auto_increment, + `documentID` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL default '0', + `type` tinyint(4) NOT NULL default '0', + `required` int(11) NOT NULL default '0', + `startdate` datetime default NULL, + PRIMARY KEY (`revisionID`), + UNIQUE KEY `documentID` (`documentID`,`version`,`type`,`required`), + CONSTRAINT `tblDocumentRevisers_document` FOREIGN KEY (`documentID`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentRevisionLog` +-- + +CREATE TABLE `tblDocumentRevisionLog` ( + `revisionLogID` int(11) NOT NULL auto_increment, + `revisionID` int(11) NOT NULL default '0', + `status` tinyint(4) NOT NULL default '0', + `comment` text NOT NULL, + `date` datetime NOT NULL default '0000-00-00 00:00:00', + `userID` int(11) NOT NULL default '0', + PRIMARY KEY (`revisionLogID`), + CONSTRAINT `tblDocumentRevisionLog_revision` FOREIGN KEY (`revisionID`) REFERENCES `tblDocumentRevisers` (`revisionID`) ON DELETE CASCADE, + CONSTRAINT `tblDocumentRevisionLog_user` FOREIGN KEY (`userID`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- -------------------------------------------------------- -- -- Table structure for table `tblDocumentStatus` diff --git a/install/create_tables-sqlite3.sql b/install/create_tables-sqlite3.sql index 0d562d5b6..3d5b700fc 100644 --- a/install/create_tables-sqlite3.sql +++ b/install/create_tables-sqlite3.sql @@ -361,6 +361,36 @@ CREATE TABLE `tblDocumentRecipients` ( -- -------------------------------------------------------- +-- +-- Table structure for table `tblDocumentRevisionLog` +-- + +CREATE TABLE `tblDocumentRevisionLog` ( + `revisionLogID` INTEGER PRIMARY KEY AUTOINCREMENT, + `revisionID` INTEGER NOT NULL default 0 REFERENCES `tblDocumentRevisers` (`revisionID`) ON DELETE CASCADE, + `status` INTEGER NOT NULL default 0, + `comment` TEXT NOT NULL, + `date` TEXT NOT NULL default '0000-00-00 00:00:00', + `userID` INTEGER NOT NULL default 0 REFERENCES `tblUsers` (`id`) ON DELETE CASCADE +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentRevisers` +-- + +CREATE TABLE `tblDocumentRevisers` ( + `revisionID` INTEGER PRIMARY KEY AUTOINCREMENT, + `documentID` INTEGER NOT NULL default '0' REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, + `version` INTEGER unsigned NOT NULL default '0', + `type` INTEGER NOT NULL default '0', + `required` INTEGER NOT NULL default '0', + UNIQUE (`documentID`,`version`,`type`,`required`) +) ; + +-- -------------------------------------------------------- + -- -- Table structure for table `tblDocumentStatus` -- From 040839714d9ba9acbd26574b310a539aad177985 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 10:32:25 +0200 Subject: [PATCH 0023/2006] init datepicker for #revisionstartdate --- styles/bootstrap/application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index 8557f28b7..7c595de3d 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -15,7 +15,7 @@ $(document).ready( function() { $('body').on('touchstart.dropdown', '.dropdown-menu', function (e) { e.stopPropagation(); }); - $('#expirationdate, #fromdate, #todate, #createstartdate, #createenddate, #expirationstartdate, #expirationenddate') + $('#expirationdate, #fromdate, #todate, #createstartdate, #createenddate, #expirationstartdate, #expirationenddate, #revisionstartdate') .datepicker() .on('changeDate', function(ev){ $(ev.currentTarget).datepicker('hide'); From 0addaf56d357ae5519380cabeb691ccdc148ed16 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 10:33:49 +0200 Subject: [PATCH 0024/2006] add missing files for revision workflow and document reception --- op/op.SetRecipients.php | 308 ++++++++++++++++++++++++ op/op.SetRevisers.php | 308 ++++++++++++++++++++++++ out/out.SetRecipients.php | 71 ++++++ out/out.SetRevisers.php | 71 ++++++ views/bootstrap/class.SetRecipients.php | 132 ++++++++++ views/bootstrap/class.SetRevisers.php | 138 +++++++++++ 6 files changed, 1028 insertions(+) create mode 100644 op/op.SetRecipients.php create mode 100644 op/op.SetRevisers.php create mode 100644 out/out.SetRecipients.php create mode 100644 out/out.SetRevisers.php create mode 100644 views/bootstrap/class.SetRecipients.php create mode 100644 views/bootstrap/class.SetRevisers.php diff --git a/op/op.SetRecipients.php b/op/op.SetRecipients.php new file mode 100644 index 000000000..6bd7c4e61 --- /dev/null +++ b/op/op.SetRecipients.php @@ -0,0 +1,308 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_POST["documentid"]; +$document = $dms->getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_ALL) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!isset($_POST["version"]) || !is_numeric($_POST["version"]) || intval($_POST["version"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +$version = $_POST["version"]; +$content = $document->getContentByVersion($version); + +if (!is_object($content)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +$folder = $document->getFolder(); + +// Retrieve a list of all users and groups that have read rights. +// Afterwards, reorganize them in two arrays with its key being the +// userid or groupid +$docAccess = $document->getReadAccessList(); +$accessIndex = array("i"=>array(), "g"=>array()); +foreach ($docAccess["users"] as $i=>$da) { + $accessIndex["i"][$da->getID()] = $da; +} +foreach ($docAccess["groups"] as $i=>$da) { + $accessIndex["g"][$da->getID()] = $da; +} + +// Retrieve list of currently assigned recipients, along with +// their latest status. +$receiptStatus = $content->getReceiptStatus(); +// Index the receipt results for easy cross-reference with the Approvers List. +$receiptIndex = array("i"=>array(), "g"=>array()); +foreach ($receiptStatus as $i=>$rs) { + if ($rs["status"]!=-2) { + if ($rs["type"]==0) { + $receiptIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + else if ($rs["type"]==1) { + $receiptIndex["g"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + } +} + +// Get the list of proposed recipients, stripping out any duplicates. +$pIndRev = (isset($_POST["indRecipients"]) ? array_values(array_unique($_POST["indRecipients"])) : array()); +$pGrpRev = (isset($_POST["grpRecipients"]) ? array_values(array_unique($_POST["grpRecipients"])) : array()); +foreach ($pIndRev as $p) { + if (is_numeric($p)) { + if (isset($accessIndex["i"][$p])) { + // Proposed recipient is on the list of possible recipients. + if (!isset($receiptIndex["i"][$p])) { + // Proposed recipient is not a current recipient, so add as a new + // recipient. + $res = $content->addIndRecipient($accessIndex["i"][$p], $user); + $unm = $accessIndex["i"][$p]->getFullName(); + $uml = $accessIndex["i"][$p]->getEmail(); + + switch ($res) { + case 0: + // Send an email notification to the new recipient. + if($settings->_enableNotificationAppRev) { + if ($notifier) { + $subject = "receipt_request_email_subject"; + $message = "receipt_request_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['version'] = $content->_version; + $params['comment'] = $content->getComment(); + $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['sitename'] = $settings->_siteName; + $params['http_root'] = $settings->_httpRoot; + + $notifier->toIndividual($user, $accessIndex["i"][$p], $subject, $message, $params); + } + } + break; + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("recipient_already_assigned")); + break; + case -4: + // email error + break; + } + } + else { + // Proposed recipient is already in the list of recipients. + // Remove recipient from the index of possible recipients. If there are + // any recipients left over in the list of possible recipients, they + // will be removed from the receipt process for this document revision. + unset($receiptIndex["i"][$p]); + } + } + } +} +if (count($receiptIndex["i"]) > 0) { + foreach ($receiptIndex["i"] as $rx=>$rv) { + if ($rv["status"] == 0) { + // User is to be removed from the recipients list. + if (!isset($accessIndex["i"][$rx])) { + // User does not have any receipt privileges for this document + // revision or does not exist. + $queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $receiptStatus[$rv["idx"]]["receiptID"] ."', '-2', '".getMLText("removed_recipient")."', NOW(), '". $user->getID() ."')"; + $res = $db->getResult($queryStr); + } + else { + $res = $content->delIndRecipient($accessIndex["i"][$rx], $user); + $unm = $accessIndex["i"][$rx]->getFullName(); + $uml = $accessIndex["i"][$rx]->getEmail(); + switch ($res) { + case 0: + // Send an email notification to the recipients. + if($settings->_enableNotificationAppRev) { + if ($notifier) { + $subject = "receipt_deletion_email_subject"; + $message = "receipt_deletion_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['version'] = $content->_version; + $params['comment'] = $content->getComment(); + $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['sitename'] = $settings->_siteName; + $params['http_root'] = $settings->_httpRoot; + + $notifier->toIndividual($user, $accessIndex["i"][$rx], $subject, $message, $params); + } + } + break; + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("recipient_already_removed")); + break; + case -4: + // email error + break; + } + } + } + } +} +foreach ($pGrpRev as $p) { + if (is_numeric($p)) { + if (isset($accessIndex["g"][$p])) { + // Proposed recipient is on the list of possible recipients. + if (!isset($receiptIndex["g"][$p])) { + // Proposed recipient is not a current recipient, so add as a new + // recipient. + $res = $content->addGrpRecipient($accessIndex["g"][$p], $user); + $gnm = $accessIndex["g"][$p]->getName(); + switch ($res) { + case 0: + // Send an email notification to the new recipient. + if($settings->_enableNotificationAppRev) { + if ($notifier) { + $subject = "receipt_request_email_subject"; + $message = "receipt_request_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['version'] = $content->_version; + $params['comment'] = $content->getComment(); + $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['sitename'] = $settings->_siteName; + $params['http_root'] = $settings->_httpRoot; + + $notifier->toGroup($user, $accessIndex["g"][$p], $subject, $message, $params); + } + } + break; + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("recipient_already_assigned")); + break; + case -4: + // email error + break; + } + } + else { + // Remove recipient from the index of possible recipients. + unset($receiptIndex["g"][$p]); + } + } + } +} +if (count($receiptIndex["g"]) > 0) { + foreach ($receiptIndex["g"] as $rx=>$rv) { + if ($rv["status"] == 0) { + // Group is to be removed from the recipientist. + if (!isset($accessIndex["g"][$rx])) { + // Group does not have any receipt privileges for this document + // revision or does not exist. + $queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $receiptStatus[$rv["idx"]]["receiptID"] ."', '-2', '".getMLText("removed_recipient")."', NOW(), '". $user->getID() ."')"; + $res = $db->getResult($queryStr); + } + else { + $res = $content->delGrpRecipient($accessIndex["g"][$rx], $user); + $gnm = $accessIndex["g"][$rx]->getName(); + switch ($res) { + case 0: + // Send an email notification to the recipients group. + if($settings->_enableNotificationAppRev) { + if ($notifier) { + $subject = "receipt_deletion_email_subject"; + $message = "receipt_deletion_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['version'] = $content->_version; + $params['comment'] = $content->getComment(); + $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['sitename'] = $settings->_siteName; + $params['http_root'] = $settings->_httpRoot; + + $notifier->toGroup($user, $accessIndex["g"][$rx], $subject, $message, $params); + } + } + break; + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("recipient_already_removed")); + break; + case -4: + // email error + break; + } + } + } + } +} + +add_log_line("?documentid=".$documentid); +header("Location:../out/out.DocumentVersionDetail.php?documentid=".$documentid."&version=".$version); + +?> diff --git a/op/op.SetRevisers.php b/op/op.SetRevisers.php new file mode 100644 index 000000000..28fdac5ef --- /dev/null +++ b/op/op.SetRevisers.php @@ -0,0 +1,308 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_POST["documentid"]; +$document = $dms->getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_ALL) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!isset($_POST["version"]) || !is_numeric($_POST["version"]) || intval($_POST["version"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +$version = $_POST["version"]; +$content = $document->getContentByVersion($version); + +if (!is_object($content)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +$folder = $document->getFolder(); + +// Retrieve a list of all users and groups that have read rights. +// Afterwards, reorganize them in two arrays with its key being the +// userid or groupid +$docAccess = $document->getReadAccessList(); +$accessIndex = array("i"=>array(), "g"=>array()); +foreach ($docAccess["users"] as $i=>$da) { + $accessIndex["i"][$da->getID()] = $da; +} +foreach ($docAccess["groups"] as $i=>$da) { + $accessIndex["g"][$da->getID()] = $da; +} + +// Retrieve list of currently assigned recipients, along with +// their latest status. +$revisionStatus = $content->getRevisionStatus(); +// Index the revision results for easy cross-reference with the Approvers List. +$revisionIndex = array("i"=>array(), "g"=>array()); +foreach ($revisionStatus as $i=>$rs) { + if ($rs["status"]!=-2) { + if ($rs["type"]==0) { + $revisionIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + else if ($rs["type"]==1) { + $revisionIndex["g"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + } +} + +// Get the list of proposed recipients, stripping out any duplicates. +$pIndRev = (isset($_POST["indRevisers"]) ? array_values(array_unique($_POST["indRevisers"])) : array()); +$pGrpRev = (isset($_POST["grpRevisers"]) ? array_values(array_unique($_POST["grpRevisers"])) : array()); +foreach ($pIndRev as $p) { + if (is_numeric($p)) { + if (isset($accessIndex["i"][$p])) { + // Proposed recipient is on the list of possible recipients. + if (!isset($revisionIndex["i"][$p])) { + // Proposed recipient is not a current recipient, so add as a new + // recipient. + $res = $content->addIndReviser($accessIndex["i"][$p], $user); + $unm = $accessIndex["i"][$p]->getFullName(); + $uml = $accessIndex["i"][$p]->getEmail(); + + switch ($res) { + case 0: + // Send an email notification to the new recipient. + if($settings->_enableNotificationAppRev) { + if ($notifier) { + $subject = "revision_request_email_subject"; + $message = "revision_request_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['version'] = $content->_version; + $params['comment'] = $content->getComment(); + $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['sitename'] = $settings->_siteName; + $params['http_root'] = $settings->_httpRoot; + + $notifier->toIndividual($user, $accessIndex["i"][$p], $subject, $message, $params); + } + } + break; + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("recipient_already_assigned")); + break; + case -4: + // email error + break; + } + } + else { + // Proposed recipient is already in the list of recipients. + // Remove recipient from the index of possible recipients. If there are + // any recipients left over in the list of possible recipients, they + // will be removed from the revision process for this document revision. + unset($revisionIndex["i"][$p]); + } + } + } +} +if (count($revisionIndex["i"]) > 0) { + foreach ($revisionIndex["i"] as $rx=>$rv) { + if ($rv["status"] == 0) { + // User is to be removed from the recipients list. + if (!isset($accessIndex["i"][$rx])) { + // User does not have any revision privileges for this document + // revision or does not exist. + $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $revisionStatus[$rv["idx"]]["revisionID"] ."', '-2', '".getMLText("removed_recipient")."', NOW(), '". $user->getID() ."')"; + $res = $db->getResult($queryStr); + } + else { + $res = $content->delIndReviser($accessIndex["i"][$rx], $user); + $unm = $accessIndex["i"][$rx]->getFullName(); + $uml = $accessIndex["i"][$rx]->getEmail(); + switch ($res) { + case 0: + // Send an email notification to the recipients. + if($settings->_enableNotificationAppRev) { + if ($notifier) { + $subject = "revision_deletion_email_subject"; + $message = "revision_deletion_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['version'] = $content->_version; + $params['comment'] = $content->getComment(); + $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['sitename'] = $settings->_siteName; + $params['http_root'] = $settings->_httpRoot; + + $notifier->toIndividual($user, $accessIndex["i"][$rx], $subject, $message, $params); + } + } + break; + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("recipient_already_removed")); + break; + case -4: + // email error + break; + } + } + } + } +} +foreach ($pGrpRev as $p) { + if (is_numeric($p)) { + if (isset($accessIndex["g"][$p])) { + // Proposed recipient is on the list of possible recipients. + if (!isset($revisionIndex["g"][$p])) { + // Proposed recipient is not a current recipient, so add as a new + // recipient. + $res = $content->addGrpReviser($accessIndex["g"][$p], $user); + $gnm = $accessIndex["g"][$p]->getName(); + switch ($res) { + case 0: + // Send an email notification to the new recipient. + if($settings->_enableNotificationAppRev) { + if ($notifier) { + $subject = "revision_request_email_subject"; + $message = "revision_request_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['version'] = $content->_version; + $params['comment'] = $content->getComment(); + $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['sitename'] = $settings->_siteName; + $params['http_root'] = $settings->_httpRoot; + + $notifier->toGroup($user, $accessIndex["g"][$p], $subject, $message, $params); + } + } + break; + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("recipient_already_assigned")); + break; + case -4: + // email error + break; + } + } + else { + // Remove recipient from the index of possible recipients. + unset($revisionIndex["g"][$p]); + } + } + } +} +if (count($revisionIndex["g"]) > 0) { + foreach ($revisionIndex["g"] as $rx=>$rv) { + if ($rv["status"] == 0) { + // Group is to be removed from the recipientist. + if (!isset($accessIndex["g"][$rx])) { + // Group does not have any revision privileges for this document + // revision or does not exist. + $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $revisionStatus[$rv["idx"]]["revisionID"] ."', '-2', '".getMLText("removed_recipient")."', NOW(), '". $user->getID() ."')"; + $res = $db->getResult($queryStr); + } + else { + $res = $content->delGrpReviser($accessIndex["g"][$rx], $user); + $gnm = $accessIndex["g"][$rx]->getName(); + switch ($res) { + case 0: + // Send an email notification to the recipients group. + if($settings->_enableNotificationAppRev) { + if ($notifier) { + $subject = "revision_deletion_email_subject"; + $message = "revision_deletion_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['version'] = $content->_version; + $params['comment'] = $content->getComment(); + $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['sitename'] = $settings->_siteName; + $params['http_root'] = $settings->_httpRoot; + + $notifier->toGroup($user, $accessIndex["g"][$rx], $subject, $message, $params); + } + } + break; + case -1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("internal_error")); + break; + case -2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); + break; + case -3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("recipient_already_removed")); + break; + case -4: + // email error + break; + } + } + } + } +} + +add_log_line("?documentid=".$documentid); +header("Location:../out/out.DocumentVersionDetail.php?documentid=".$documentid."&version=".$version); + +?> diff --git a/out/out.SetRecipients.php b/out/out.SetRecipients.php new file mode 100644 index 000000000..92610de23 --- /dev/null +++ b/out/out.SetRecipients.php @@ -0,0 +1,71 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} +$document = $dms->getDocument($_GET["documentid"]); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_ALL) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); +} + +if (!isset($_GET["version"]) || !is_numeric($_GET["version"]) || intval($_GET["version"]<1)) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); +} + +$content = $document->getContentByVersion($_GET["version"]); +if (!is_object($content)) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); +} + +if(!$settings->_enableVersionModification) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("no_version_modification")); +} + +$folder = $document->getFolder(); + +/* Create object for checking access to certain operations */ +$accessop = new SeedDMS_AccessOperation($document, $user, $settings); + +$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); +$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$content, 'enableadminrevapp'=>$settings->_enableAdminRevApp, 'enableownerrevapp'=>$settings->_enableOwnerRevApp, 'enableselfrevapp'=>$settings->_enableSelfRevApp)); +if($view) { + $view->setParam('accessobject', $accessop); + $view->show(); + exit; +} + +?> diff --git a/out/out.SetRevisers.php b/out/out.SetRevisers.php new file mode 100644 index 000000000..977f10998 --- /dev/null +++ b/out/out.SetRevisers.php @@ -0,0 +1,71 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} +$document = $dms->getDocument($_GET["documentid"]); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_ALL) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); +} + +if (!isset($_GET["version"]) || !is_numeric($_GET["version"]) || intval($_GET["version"]<1)) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); +} + +$content = $document->getContentByVersion($_GET["version"]); +if (!is_object($content)) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); +} + +if(!$settings->_enableVersionModification) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("no_version_modification")); +} + +$folder = $document->getFolder(); + +/* Create object for checking access to certain operations */ +$accessop = new SeedDMS_AccessOperation($document, $user, $settings); + +$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); +$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$content)); +if($view) { + $view->setParam('accessobject', $accessop); + $view->show(); + exit; +} + +?> diff --git a/views/bootstrap/class.SetRecipients.php b/views/bootstrap/class.SetRecipients.php new file mode 100644 index 000000000..b6ceb6843 --- /dev/null +++ b/views/bootstrap/class.SetRecipients.php @@ -0,0 +1,132 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2015 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for SetRecipients view + * + * @category DMS + * @package SeedDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2015 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_View_SetRecipients extends SeedDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $content = $this->params['version']; + + $overallStatus = $content->getStatus(); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); + $this->contentHeading(getMLText("change_assignments")); + + // Retrieve a list of all users and groups that have receipt privileges. + $docAccess = $document->getReadAccessList(); + + // Retrieve list of currently assigned recipients, along with + // their latest status. + $receiptStatus = $content->getReceiptStatus(); + + // Index the receipt results for easy cross-reference with the recipient list. + $receiptIndex = array("i"=>array(), "g"=>array()); + foreach ($receiptStatus as $i=>$rs) { + if ($rs["type"]==0) { + $receiptIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } elseif ($rs["type"]==1) { + $receiptIndex["g"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + } +?> + +contentContainerStart(); ?> + +
    + +contentSubHeading(getMLText("update_recipients"));?> + +
    :
    + + +
    :
    + + +

    + + +"> +

    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.SetRevisers.php b/views/bootstrap/class.SetRevisers.php new file mode 100644 index 000000000..54e53b978 --- /dev/null +++ b/views/bootstrap/class.SetRevisers.php @@ -0,0 +1,138 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2015 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for SetRevisers view + * + * @category DMS + * @package SeedDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2015 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_View_SetRevisers extends SeedDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $content = $this->params['version']; + + $overallStatus = $content->getStatus(); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); + $this->contentHeading(getMLText("change_assignments")); + + // Retrieve a list of all users and groups that have revision privileges. + $docAccess = $document->getReadAccessList(); + + // Retrieve list of currently assigned revisers, along with + // their latest status. + $revisionStatus = $content->getRevisionStatus(); + $startdate = '2015-05-23'; + + // Index the revision results for easy cross-reference with the reviser list. + $revisionIndex = array("i"=>array(), "g"=>array()); + foreach ($revisionStatus as $i=>$rs) { + if ($rs["type"]==0) { + $revisionIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } elseif ($rs["type"]==1) { + $revisionIndex["g"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); + } + } +?> + +contentContainerStart(); ?> + +
    + +contentSubHeading(getMLText("update_revisers"));?> + + + + + + +
    :
    + + +
    :
    + + +

    + + +"> +

    +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> From df75ae5c8ca5db4eaf79ad5361ffc02db28d7cfd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 11:41:39 +0200 Subject: [PATCH 0025/2006] add method maySetReviser --- inc/inc.ClassAccessOperation.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index 643aaf13f..9c3ed17fd 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -111,7 +111,7 @@ class SeedDMS_AccessOperation { * This check can only be done for documents. Setting the document * recipients is only allowed if version modification is turned on * in the settings. The - * admin may even set reviewers/approvers if is disallowed in the + * admin may even set recipients if is disallowed in the * settings. */ function maySetRecipients() { /* {{{ */ @@ -125,6 +125,26 @@ class SeedDMS_AccessOperation { return false; } /* }}} */ + /** + * Check if revisers may be edited + * + * This check can only be done for documents. Setting the document + * revisers is only allowed if version modification is turned on + * in the settings. The + * admin may even set revisers if is disallowed in the + * settings. + */ + function maySetRevisers() { /* {{{ */ + if(get_class($this->obj) == 'SeedDMS_Core_Document') { + $latestContent = $this->obj->getLatestContent(); + $status = $latestContent->getStatus(); + if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]==S_RELEASED || $status["status"]==S_EXPIRED)) { + return true; + } + } + return false; + } /* }}} */ + /** * Check if workflow may be edited * From 2d3277a7eaa6f2eeecc1c41f957de12f4ce64ece Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 11:42:20 +0200 Subject: [PATCH 0026/2006] add link to out/out.SetRevisers.php --- views/bootstrap/class.ViewDocument.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 0b755cbf4..97310764a 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -430,6 +430,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if($accessop->maySetRecipients()) { print "
  • ".getMLText("change_recipients")."
  • "; } + if($accessop->maySetRevisers()) { + print "
  • ".getMLText("change_revisers")."
  • "; + } if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { // Allow changing reviewers/approvals only if not reviewed if($accessop->maySetReviewersApprovers()) { From 69e56a5087a5cf7d8288223dcd8537824481daa0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 13:38:02 +0200 Subject: [PATCH 0027/2006] various small updates --- languages/ar_EG/lang.inc | 8 ++++++++ languages/bg_BG/lang.inc | 8 ++++++++ languages/ca_ES/lang.inc | 8 ++++++++ languages/cs_CZ/lang.inc | 8 ++++++++ languages/de_DE/lang.inc | 14 +++++++++++--- languages/en_GB/lang.inc | 18 +++++++++++++----- languages/es_ES/lang.inc | 8 ++++++++ languages/fr_FR/lang.inc | 8 ++++++++ languages/hu_HU/lang.inc | 8 ++++++++ languages/it_IT/lang.inc | 8 ++++++++ languages/nl_NL/lang.inc | 8 ++++++++ languages/pl_PL/lang.inc | 8 ++++++++ languages/pt_BR/lang.inc | 8 ++++++++ languages/ro_RO/lang.inc | 8 ++++++++ languages/ru_RU/lang.inc | 8 ++++++++ languages/sk_SK/lang.inc | 8 ++++++++ languages/sv_SE/lang.inc | 8 ++++++++ languages/tr_TR/lang.inc | 8 ++++++++ languages/zh_CN/lang.inc | 8 ++++++++ languages/zh_TW/lang.inc | 8 ++++++++ 20 files changed, 168 insertions(+), 8 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index 8a6f26a92..f048c2368 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -97,6 +97,8 @@ URL: [url]', 'approval_summary' => 'ملخص الموافقة', 'approval_update_failed' => 'خطأ في تحديث حالة الموافقة. فشل التحديث.', 'approvers' => 'الموافقون', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => 'ابريل', 'archive_creation' => 'انشاء ارشيف', 'archive_creation_warning' => 'من خلال العملية التالية يمكنك انشاء ارشيف يحتوي على كل ملفات النظام. بعد انشاء الارشيف سيتم حفظه في ملف البيانات على السيرفر.
    تحذير: الارشيف الذي تم انشاؤه ليكون مقروء بواسطة المستخدم لن يكون نافعا كملف نسخ احتياطي للسيرفر', @@ -175,6 +177,8 @@ URL: [url]', 'change_assignments' => 'تغيير التخصيصات', 'change_password' => 'تغيير كلمة السر', 'change_password_message' => 'تم تغيير كلمة السر.', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => 'تغيير الحالة', 'charts' => 'ﺝﺩﺍﻮﻟ', 'chart_docsaccumulated_title' => '', @@ -681,7 +685,9 @@ URL: [url]', المستخدم: [username] URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - تم ازالة المرفقات', +'removed_recipient' => '', 'removed_reviewer' => 'تم ازالته من قائمة المراجعة', +'removed_reviser' => '', 'removed_workflow_email_body' => 'تم ازالة مسار العمل من اصدار المستند مستند: [name] اصدار: [version] @@ -731,6 +737,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - تم تقديم المراجعة', 'review_summary' => 'ملخص المراجعة', 'review_update_failed' => 'خطأ في تحديث حالة المراجعة. التحديث فشل.', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => 'اعادة بدء مسار العمل', 'rewind_workflow_email_body' => 'اعادة بدء مسار العمل المستند: [name] diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index 9a08615d9..3db36c588 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -88,6 +88,8 @@ $text = array( 'approval_summary' => 'Инфо за утвърждаване', 'approval_update_failed' => 'Стана грешка при промяната на статуса на утвърждаването', 'approvers' => 'Утвърждаващи', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => 'Април', 'archive_creation' => 'Създаване архив', 'archive_creation_warning' => 'Тази операция ще създаде архив, съдържащ всички папки. След създаването архивът ще бъде съхранен в папката с данни на сървъра.
    ВНИМАНИЕ: Архивът създаден като понятен за човек, ще бъде непригоден за бекъп!', @@ -160,6 +162,8 @@ $text = array( 'change_assignments' => 'Промени предназначението', 'change_password' => 'Промени паролата', 'change_password_message' => 'Паролата променена', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => 'Промени статусът', 'charts' => '', 'chart_docsaccumulated_title' => '', @@ -579,7 +583,9 @@ $text = array( 'removed_file_email' => 'Изтрий приложение', 'removed_file_email_body' => '', 'removed_file_email_subject' => '', +'removed_recipient' => '', 'removed_reviewer' => 'изтрит от списъка с рецензиращи', +'removed_reviser' => '', 'removed_workflow_email_body' => '', 'removed_workflow_email_subject' => '', 'remove_marked_files' => '', @@ -609,6 +615,8 @@ $text = array( 'review_submit_email_subject' => '', 'review_summary' => 'Сводка по рецензиите', 'review_update_failed' => 'грешка при обновяване статуса на рецензията', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => 'Превърти процес', 'rewind_workflow_email_body' => '', 'rewind_workflow_email_subject' => '', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index e59e42745..c0d37ebde 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -93,6 +93,8 @@ URL: [url]', 'approval_summary' => 'Resum d\'aprovació', 'approval_update_failed' => 'Error actualitzant l\'estat d\'aprovació. Actualització fallada.', 'approvers' => 'Aprovadors', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => 'Abril', 'archive_creation' => 'Creació d\'arxiu', 'archive_creation_warning' => 'Amb aquesta operació pot crear un arxiu que contingui els fitxers de les carpetes del DMS complet. Després de crear-lo, l\'arxiu es guardarà a la carpeta de dades del servidor.
    ATENCIÓ: un fitxer creat com llegible per humans no es podrà usar com a còpia de seguretat del servidor.', @@ -165,6 +167,8 @@ URL: [url]', 'change_assignments' => 'Canviar assignacions', 'change_password' => '', 'change_password_message' => '', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => 'Canviar estat', 'charts' => '', 'chart_docsaccumulated_title' => '', @@ -584,7 +588,9 @@ URL: [url]', 'removed_file_email' => 'Adjunts eliminats', 'removed_file_email_body' => '', 'removed_file_email_subject' => '', +'removed_recipient' => '', 'removed_reviewer' => 'Ha estat eliminat de la llista de revisors', +'removed_reviser' => '', 'removed_workflow_email_body' => '', 'removed_workflow_email_subject' => '', 'remove_marked_files' => '', @@ -614,6 +620,8 @@ URL: [url]', 'review_submit_email_subject' => '', 'review_summary' => 'Resum de revisió', 'review_update_failed' => 'Error actualitzant l\'estat de la revisió. L\'actualizació ha fallat.', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => '', 'rewind_workflow_email_body' => '', 'rewind_workflow_email_subject' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index 1e9c6e603..4728bcf8b 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -104,6 +104,8 @@ URL: [url]', 'approval_summary' => 'Souhrn schválení', 'approval_update_failed' => 'Chyba při aktualizaci stavu schválení. Aktualizace selhala.', 'approvers' => 'Schvalovatelé', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => 'Duben', 'archive_creation' => 'Archivování', 'archive_creation_warning' => 'Pomocí této operace můžete vytvořit archiv obsahující soubory z celé složky DMS. Po jeho vytvoøení bude archiv ulžen v datové složce serveru. POZOR: archiv bude vytvořen jako běžně čitelný, nelze jej použít jako záložní server.', @@ -182,6 +184,8 @@ URL: [url]', 'change_assignments' => 'Změnit přiřazení', 'change_password' => 'Změnit heslo', 'change_password_message' => 'Vaše heslo bylo změněno.', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => 'Změna stavu', 'charts' => 'Grafy', 'chart_docsaccumulated_title' => 'Počet dokumentů', @@ -692,7 +696,9 @@ Dokument: [document] Uživatel: [username] URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Odstraněná příloha', +'removed_recipient' => '', 'removed_reviewer' => 'byl odstraněn ze seznamu kontrolorů.', +'removed_reviser' => '', 'removed_workflow_email_body' => 'Odstraněn pracovní postup z verze dokumentu: [name] Verze: [version] Praconí postup: [workflow] @@ -740,6 +746,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Odesláno přezkoumání', 'review_summary' => 'Souhrn kontroly', 'review_update_failed' => 'Chyba při aktualizaci stavu kontroly. Aktualizace selhala.', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => 'Nové spuštění pracovního postupu', 'rewind_workflow_email_body' => 'Pracovní postup byl spuštěn znovu Dokument: [name] diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index a6c199735..507e049ee 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 (1983), dgrutsch (18) +// Translators: Admin (1991), dgrutsch (18) $text = array( 'accept' => 'Übernehmen', @@ -109,6 +109,8 @@ URL: [url]', 'approval_summary' => 'Übersicht Freigaben', 'approval_update_failed' => 'Störung bei der Aktualisierung des Berechtigungsstatus. Aktualisierung gescheitert', 'approvers' => 'Freigebender', +'approver_already_assigned' => 'Freigeber bereits zugewiesen', +'approver_already_removed' => 'Freigeber wurde bereits aus dem Freigabevorgang entfernt oder hat die Freigabe bereits abgeschlossen', 'april' => 'April', 'archive_creation' => 'Archiv erzeugen', 'archive_creation_warning' => 'Mit dieser Operation können Sie ein Archiv mit allen Dokumenten des DMS erzeugen. Nach der Erstellung wird das Archiv im Datenordner Ihres Servers gespeichert.
    Warnung: ein menschenlesbares Archiv ist als Server-Backup unbrauchbar.', @@ -187,6 +189,8 @@ URL: [url]', 'change_assignments' => 'Zuweisungen ändern', 'change_password' => 'Passwort ändern', 'change_password_message' => 'Ihr Passwort wurde geändert.', +'change_recipients' => 'Empfänger ändern', +'change_revisers' => 'Wiedervorlage ändern', 'change_status' => 'Status ändern', 'charts' => 'Diagramme', 'chart_docsaccumulated_title' => 'Anzahl Dokumente', @@ -198,8 +202,8 @@ URL: [url]', 'chart_selection' => 'Diagrammauswahl', 'chart_sizeperuser_title' => 'Speicherplatz pro Benutzer', 'checkedout_file_has_different_version' => 'Die ausgecheckte Version ist nicht identisch mit der aktuellen Version. Das Einchecken wird das Dokument nicht aktualisieren.', -'checkedout_file_has_disappeared' => 'Die Datei des ausgecheckten Dokuments ist nicht mehr vorhanden. Das Einchecken wird keine neue Version erzeugen.', -'checkedout_file_is_unchanged' => 'Die Datei des ausgecheckten Dokuments ist noch unverändert. Das Einchecken wird keine neue Version anlegen.', +'checkedout_file_has_disappeared' => 'Die Datei des ausgecheckten Dokuments ist nicht mehr vorhanden. Das Einchecken wird keine neue Version erzeugen, setzt aber den Checkout-Status zurück..', +'checkedout_file_is_unchanged' => 'Die Datei des ausgecheckten Dokuments ist noch unverändert. Das Einchecken wird keine neue Version anlegen, setzt aber den Checkout-Status zurück.', 'checkin_document' => 'Einchecken', 'checkout_document' => 'Auschecken', 'checkout_is_disabled' => 'Auschecken von Dokumenten ist in der Konfiguration ausgeschaltet.', @@ -700,7 +704,9 @@ Dokument: [document] Benutzer: [username] URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Anhang gelöscht', +'removed_recipient' => 'ist von der Empfängerliste entfernt worden', 'removed_reviewer' => 'ist von der Prüfer-Liste entfernt worden.', +'removed_reviser' => 'ist von der Liste der Wiederholungsprüfer entfernt worden.', 'removed_workflow_email_body' => 'Workflow von Dokumentenversion entfernt Dokument: [name] Version: [version] @@ -760,6 +766,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Prüfung ausgeführt', 'review_summary' => 'Übersicht Prüfungen', 'review_update_failed' => 'Störung bei Aktualisierung des Prüfstatus. Aktualisierung gescheitert.', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => 'Zurück zum Anfangszustand', 'rewind_workflow_email_body' => 'Workflow wurde zurückgestellt Dokument: [name] diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index 226220d95..263344b9a 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 (1109), dgrutsch (3), netixw (14) +// Translators: Admin (1123), dgrutsch (3), netixw (14) $text = array( 'accept' => 'Accept', @@ -109,6 +109,8 @@ URL: [url]', 'approval_summary' => 'Approval Summary', 'approval_update_failed' => 'Error updating approval status. Update failed.', 'approvers' => 'Approvers', +'approver_already_assigned' => 'User is already assigned as an approver.', +'approver_already_removed' => 'Approver has already been removed from appproval process or has already submitted an approval.', 'april' => 'April', 'archive_creation' => 'Archive creation', 'archive_creation_warning' => 'With this operation you can create archive containing the files of entire DMS folders. After the creation the archive will be saved in the data folder of your server.
    WARNING: an archive created as human readable will be unusable as server backup.', @@ -187,6 +189,8 @@ URL: [url]', 'change_assignments' => 'Change Assignments', 'change_password' => 'Change password', 'change_password_message' => 'Your password has been changed.', +'change_recipients' => 'Change recipients', +'change_revisers' => 'Change resubmission', 'change_status' => 'Change Status', 'charts' => 'Charts', 'chart_docsaccumulated_title' => 'Number of documents', @@ -198,8 +202,8 @@ URL: [url]', 'chart_selection' => 'Select chart', 'chart_sizeperuser_title' => 'Diskspace per user', 'checkedout_file_has_different_version' => 'The checked out version is not identical to the current version. Check in will not update the document.', -'checkedout_file_has_disappeared' => 'The file of the checked out document has disappeared. Check in will not create a new version.', -'checkedout_file_is_unchanged' => 'The file of the checked out document is still unchanged. Check in will not create a new version.', +'checkedout_file_has_disappeared' => 'The file of the checked out document has disappeared. Check in will not create a new version, but clears the checkout status..', +'checkedout_file_is_unchanged' => 'The file of the checked out document is still unchanged. Check in will not create a new version but clears the checkout status.', 'checkin_document' => 'Check In', 'checkout_document' => 'Check out', 'checkout_is_disabled' => 'Check out of documents is disabled in the configuration.', @@ -700,7 +704,9 @@ Document: [document] User: [username] URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Removed attachment', +'removed_recipient' => 'has been removed from the list of recipients.', 'removed_reviewer' => 'has been removed from the list of reviewers.', +'removed_reviser' => 'has been removed from the list of resubmitter.', 'removed_workflow_email_body' => 'Removed workflow from document version Document: [name] Version: [version] @@ -734,8 +740,8 @@ URL: [url]', 'return_from_subworkflow_email_subject' => '[sitename]: [name] - Return from subworkflow', 'reverse_links' => 'Documents, which have a link to the current document', 'reviewers' => 'Reviewers', -'reviewer_already_assigned' => 'is already assigned as a reviewer', -'reviewer_already_removed' => 'has already been removed from review process or has already submitted a review', +'reviewer_already_assigned' => 'User is already assigned as a reviewer', +'reviewer_already_removed' => 'Reviewer has already been removed from review process or has already submitted a review', 'review_deletion_email' => 'Review request deleted', 'review_deletion_email_body' => 'Review request deleted Dokument: [name] @@ -767,6 +773,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Submitted review', 'review_summary' => 'Review Summary', 'review_update_failed' => 'Error updating review status. Update failed.', +'reviser_already_assigned' => 'User is already assigned as an resubmitter.', +'reviser_already_removed' => 'Resubmitter has already been removed from revision process or has already revised the document.', 'rewind_workflow' => 'Rewind workflow', 'rewind_workflow_email_body' => 'Workflow was rewinded Document: [name] diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index 262221432..690599645 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -104,6 +104,8 @@ URL: [url]', 'approval_summary' => 'Resumen de aprobación', 'approval_update_failed' => 'Error actualizando el estado de aprobación. Actualización fallida.', 'approvers' => 'Aprobadores', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => 'Abril', 'archive_creation' => 'Creación de archivo', 'archive_creation_warning' => 'Con esta operación usted puede crear un archivo que contenga los ficheros de las carpetas del DMS completo. Después de crearlo el archivo se guardará en la carpeta de datos de su servidor.
    CUIDADO: un fichero creado como legible por humanos no podrá usarse como copia de seguridad del servidor.', @@ -182,6 +184,8 @@ URL: [url]', 'change_assignments' => 'cambiar asignaciones', 'change_password' => 'cambiar contraseña', 'change_password_message' => 'Su contraseña se ha modificado.', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => 'cambiar estado', 'charts' => 'Gráficos', 'chart_docsaccumulated_title' => 'Cantidad de documentos', @@ -696,7 +700,9 @@ Documento: [document] Usuario: [username] URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Eliminar adjunto', +'removed_recipient' => '', 'removed_reviewer' => 'Ha sido eliminado de la lista de revisores.', +'removed_reviser' => '', 'removed_workflow_email_body' => 'Eliminar flujo de trabajo de la versión del documento Documento: [name] Versión: [version] @@ -746,6 +752,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Revisión enviada', 'review_summary' => 'Resumen de revisión', 'review_update_failed' => 'Error actualizando el estado de la revisión. La actualización ha fallado.', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => 'Retroceso del flujo de trabajo', 'rewind_workflow_email_body' => 'Flujo de trabajo fue retrocedido Documento: [name] diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index c9814dceb..6d7c26ebf 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -104,6 +104,8 @@ URL : [url]', 'approval_summary' => 'Sommaire d\'approbation', 'approval_update_failed' => 'Erreur de la mise à jour du statut d\'approbation. Echec de la mise à jour.', 'approvers' => 'Approbateurs', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => 'Avril', 'archive_creation' => 'Création d\'archive', 'archive_creation_warning' => 'Avec cette fonction, vous pouvez créer une archive contenant les fichiers de tous les dossiers DMS. Après la création, l\'archive sera sauvegardée dans le dossier de données de votre serveur.
    AVERTISSEMENT: Une archive créée ainsi sera inutilisable en tant que sauvegarde du serveur.', @@ -182,6 +184,8 @@ URL: [url]', 'change_assignments' => 'Changer d\'affectations', 'change_password' => 'Changer de mot de passe', 'change_password_message' => 'Votre mot de passe a été changé.', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => 'Modifier le statut', 'charts' => 'Graphiques', 'chart_docsaccumulated_title' => 'Nombre de documents', @@ -693,7 +697,9 @@ Document: [document] Utilisateur: [username] URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Attachement supprimé', +'removed_recipient' => '', 'removed_reviewer' => 'a été retiré de la liste des correcteurs.', +'removed_reviser' => '', 'removed_workflow_email_body' => 'Workflow du document supprimé: [name] Version: [version] Workflow: [workflow] @@ -735,6 +741,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Correction soumise', 'review_summary' => 'Sommaire de correction', 'review_update_failed' => 'Erreur lors de la mise à jour de la correction. Echec de la mise à jour.', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => 'Remonter le workflow', 'rewind_workflow_email_body' => '', 'rewind_workflow_email_subject' => '[sitename]: [name] - Le workflow a été réinitialisé', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index f5a47e5c8..f88695659 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -104,6 +104,8 @@ URL: [url]', 'approval_summary' => 'Jóváhagyási összesítő', 'approval_update_failed' => 'Hiba történt a jóváhagyási állapot frissítése során. Frissítés sikertelen.', 'approvers' => 'Jóváhagyók', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => 'Április', 'archive_creation' => 'Archívum létrehozása', 'archive_creation_warning' => 'Ezzel a művelettel archívumot hozhat létre, amely tartalmazza az összes DMS mappában található állományokat. A létrehozás követően az archívum a kiszolgáló adat mappájába lesz mentve.
    FIGYELEM: az archívum értelmezhető formában kerül tárolásra és nem használható kiszolgáló mentésként.', @@ -182,6 +184,8 @@ URL: [url]', 'change_assignments' => 'Hozzárendelések módosítása', 'change_password' => 'Jelszó módosítása', 'change_password_message' => 'Jelszava módosításra került.', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => 'Állapot módosítása', 'charts' => 'Diagramok', 'chart_docsaccumulated_title' => 'Dokumentumok száma', @@ -696,7 +700,9 @@ Dokumentum: [document] Felhasználó: [username] URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Eltávolított melléklet', +'removed_recipient' => '', 'removed_reviewer' => 'eltávolításra került a felülvizsgálók listájáról.', +'removed_reviser' => '', 'removed_workflow_email_body' => 'Dokumentum változatból eltávolított munkafolyamat Dokumentum: [name] Verzió: [version] @@ -746,6 +752,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Beküldött felülvizsgálat', 'review_summary' => 'Felülvizsgálat összefoglaló', 'review_update_failed' => 'Hiba a felülvizsgálat állapot frissítése során. Frissítés sikertelen.', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => 'Munkafolyamat visszajátszás', 'rewind_workflow_email_body' => 'Munkafolyamat visszajátszva Dokumentum: [name] diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index 15aca9237..ce3e008a4 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -109,6 +109,8 @@ URL: [url]', 'approval_summary' => 'Dettaglio approvazioni', 'approval_update_failed' => 'Errore nel modificare lo stato di approvazione. Aggiornamento fallito.', 'approvers' => 'Approvatori', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => 'Aprile', 'archive_creation' => 'Creazione archivi', 'archive_creation_warning' => 'Con questa operazione è possibile creare archivi contenenti i file di intere cartelle del DMS. Dopo la creazione l\'archivio viene salvato nella cartella dati del server.
    Attenzione: un archivio creato per uso esterno non è utilizzabile come backup del server.', @@ -187,6 +189,8 @@ URL: [url]', 'change_assignments' => 'Modifica le Assegnazioni', 'change_password' => 'Cambia la password', 'change_password_message' => 'La password è stata cambiata', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => 'Modifica lo Stato', 'charts' => 'Grafici', 'chart_docsaccumulated_title' => 'Numero di documenti', @@ -701,7 +705,9 @@ Documento: [document] Utente: [username] URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Allegato rimosso', +'removed_recipient' => '', 'removed_reviewer' => 'é stato rimosso dalla lista dei revisori.', +'removed_reviser' => '', 'removed_workflow_email_body' => 'Flusso di lavoro rimosso dalla versione del documento Documento: [name] Versione: [version] @@ -768,6 +774,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Sottoposta revisione', 'review_summary' => 'Dettaglio revisioni', 'review_update_failed' => 'Errore nella variazione dello stato di revisione. Aggiornamento fallito.', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => 'Inverti il flusso di lavoro', 'rewind_workflow_email_body' => 'Il flusso di lavoro è stato invertito Document: [name] diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 43c738fce..fc453a2b0 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -97,6 +97,8 @@ URL: [url]', 'approval_summary' => 'Goedkeuring Samenvatting', 'approval_update_failed' => 'Fout bij bijwerken Goedkeuring status. Bijwerken mislukt.', 'approvers' => 'Autoriseerders', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => 'april', 'archive_creation' => 'Archief aanmaken', 'archive_creation_warning' => 'Met deze handeling maakt U een Archief aan van alle bestanden in het DMS. Na het aanmaken van het Archief, wordt deze opgeslagen in de data-map van uw server.
    Waarschuwing: een leesbaar Archief kan niet worden gebruikt voor server back-up doeleinde.', @@ -175,6 +177,8 @@ URL: [url]', 'change_assignments' => 'Wijzig taken/toewijzingen', 'change_password' => 'Wijzig wachtwoord', 'change_password_message' => 'Wachtwoord is gewijzigd.', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => 'Wijzig Status', 'charts' => 'Grafieken', 'chart_docsaccumulated_title' => 'Aantal documenten', @@ -689,7 +693,9 @@ Document: [document] Gebruiker: [username] URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Bijlage verwijderd', +'removed_recipient' => '', 'removed_reviewer' => 'is verwijderd uit de lijst van [Controleurs].', +'removed_reviser' => '', 'removed_workflow_email_body' => 'Workflow verwijderd van document versiedocument: [name] Versie: [version] Workflow: [workflow] @@ -737,6 +743,8 @@ URL: [url', 'review_submit_email_subject' => '[sitename]: [name] - Beoordeling toegevoegd', 'review_summary' => '[Controle] Samenvatting', 'review_update_failed' => 'Foutmelding: fout bij bijwerken [Controle] Status. Bijwerken mislukt.', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => 'Terugzetten workflow', 'rewind_workflow_email_body' => 'Workflow is teruggezet Document: [name] diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 86e7641a9..56ae936c1 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -97,6 +97,8 @@ URL: [url]', 'approval_summary' => 'Podsumowanie akceptacji', 'approval_update_failed' => 'Błąd aktualizacji statusu akceptacji. Aktualizacja nie powiodła się.', 'approvers' => 'Osoby akceptujące', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => 'Kwiecień', 'archive_creation' => 'Tworzenie archiwum', 'archive_creation_warning' => 'Ta operacja utworzy archiwum zawierające pliki z całego repozytorium. Po utworzeniu archiwum będzie zapisane w folderze na serwerze.
    UWAGA: archiwum utworzone jako czytelne dla ludzi będzie bezużyteczne jako kopia serwera.', @@ -175,6 +177,8 @@ URL: [url]', 'change_assignments' => 'Zmiana przypisania', 'change_password' => 'Zmiana hasła', 'change_password_message' => 'Twoje hasło zostało zmienione.', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => 'Zmień status', 'charts' => 'Wykresy', 'chart_docsaccumulated_title' => 'Liczba dokumentów', @@ -689,7 +693,9 @@ Dokument: [document] Użytkownik: [username] URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Usunięty załącznik', +'removed_recipient' => '', 'removed_reviewer' => 'został usunięty z listy recenzentów.', +'removed_reviser' => '', 'removed_workflow_email_body' => 'Usunięcie procesu z wersji dokumentu Dokument: [name] Wersja: [version] @@ -725,6 +731,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Napisano recenzję', 'review_summary' => 'Podsumowanie opiniowania', 'review_update_failed' => 'Błąd podczas aktualizowania statusu recenzji. Aktualizacja nie powiodła się.', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => 'Przewiń proces', 'rewind_workflow_email_body' => 'Przewinięcie procesu Dokument: [name] diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 9ba71a1b1..545828da6 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -104,6 +104,8 @@ URL: [url]', 'approval_summary' => 'Approval Summary', 'approval_update_failed' => 'Error updating approval status. Update failed.', 'approvers' => 'Approvers', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => 'April', 'archive_creation' => 'Archive creation', 'archive_creation_warning' => 'With this operation you can create achive containing the files of entire DMS folders. After the creation the archive will be saved in the data folder of your server.
    WARNING: an archive created as human readable will be unusable as server backup.', @@ -182,6 +184,8 @@ URL: [url]', 'change_assignments' => 'Change Assignments', 'change_password' => 'Modificar senha', 'change_password_message' => 'Sua senha foi modificada.', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => 'Mudar status', 'charts' => 'Gráficos', 'chart_docsaccumulated_title' => 'Número de documentos', @@ -694,7 +698,9 @@ Documento: [document] Usuário: [username] URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Anexo removido', +'removed_recipient' => '', 'removed_reviewer' => 'has been removed from the list of reviewers.', +'removed_reviser' => '', 'removed_workflow_email_body' => 'Removido do fluxo de trabalho de documentos version Document: [name] Versão: [version] @@ -743,6 +749,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Revisão submetida', 'review_summary' => 'Review Summary', 'review_update_failed' => 'Error updating review status. Update failed.', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => 'Fluxo de trabalho revisto', 'rewind_workflow_email_body' => 'Fluxo de processo foi revisto Documento: [name] diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index eca9a0fe8..1479fec89 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -104,6 +104,8 @@ URL: [url]', 'approval_summary' => 'Sumar aprobare', 'approval_update_failed' => 'Eroare actualizare status aprobare. Actualizarea nu a reușit.', 'approvers' => 'Aprobatori', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => 'Aprilie', 'archive_creation' => 'Creare arhiva', 'archive_creation_warning' => 'Cu această operațiune puteți crea o arhiva care sa conțina fișierele din toate folderele DMS. După creare, arhiva va fi salvata în folderul de date din serverul dumneavoastră.
    AVERTISMENT:. O arhivă creată ca lizibilă pentru om nu va putea fi utilizata ca server de backup.', @@ -182,6 +184,8 @@ URL: [url]', 'change_assignments' => 'Schimbă alocările', 'change_password' => 'Schimbă parola', 'change_password_message' => 'Parola dumneavoastra a fost schimbată.', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => 'Schimbă status', 'charts' => 'Grafice', 'chart_docsaccumulated_title' => 'Numărul de documente', @@ -696,7 +700,9 @@ Document: [document] Utilizator: [username] URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Atașament eliminat', +'removed_recipient' => '', 'removed_reviewer' => 'a fost eliminat din lista de revizuitori.', +'removed_reviser' => '', 'removed_workflow_email_body' => 'Workflow eliminat din versiunea documentului Document: [name] Versiune: [version] @@ -746,6 +752,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Revizuire trimisă', 'review_summary' => 'Sumar revizuire', 'review_update_failed' => 'Eroare actualizarea status revizuire. Actualizarea a eșuat.', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => 'Derulare workflow', 'rewind_workflow_email_body' => 'Workflow derulat Document: [name] diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index 328d01b5f..01e7f18a2 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -97,6 +97,8 @@ URL: [url]', 'approval_summary' => 'Сводка по утверждению', 'approval_update_failed' => 'Произошла ошибка при изменении статуса утверждения', 'approvers' => 'Утверждающие', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => 'Апрель', 'archive_creation' => 'Создать архив', 'archive_creation_warning' => 'Эта операция создаст архив, содержащий все каталоги. После создания архив будет сохранен в каталоге данных сервера.
    Внимание: архив созданный как понятный человеку, будет непригоден в качестве резервной копии для восстановления!', @@ -175,6 +177,8 @@ URL: [url]', 'change_assignments' => 'Изменить назначения', 'change_password' => 'Изменить пароль', 'change_password_message' => 'Пароль изменён', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => 'Изменить статус', 'charts' => 'Диаграммы', 'chart_docsaccumulated_title' => 'Количество документов', @@ -686,7 +690,9 @@ URL: [url]', Пользователь: [username] URL: [url]', 'removed_file_email_subject' => '[sitename]: удалено приложение к «[document]»', +'removed_recipient' => '', 'removed_reviewer' => 'удалён из списка рецензирующих', +'removed_reviser' => '', 'removed_workflow_email_body' => 'Удалён процесс из версии документа Документ: [name] Версия: [version] @@ -736,6 +742,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: отправлена рецензия на «[name]»', 'review_summary' => 'Сводка по рецензии', 'review_update_failed' => 'Ошибка обновления статуса рецензии', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => 'Начать процесс с начала', 'rewind_workflow_email_body' => 'Процесс был начат с начала Документ: [name] diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 155b1e7d1..f0598df3a 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -88,6 +88,8 @@ $text = array( 'approval_summary' => 'Zhrnutie schválenia', 'approval_update_failed' => 'Chyba pri aktualizácii stavu schválenia. Aktualizácia zlyhala.', 'approvers' => 'Schvaľovatelia', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => 'Apríl', 'archive_creation' => 'Vytvorenie archívu', 'archive_creation_warning' => 'Touto akciou môžete vytvoriť archív obsahujúci celú DMS zložku. Po vytvorení bude každý súbor uložený do dátovej zložky súborov na vašom serveri.
    UPOZORNENIE: uživateľsky prístupný archív nie je možné použiť ako zálohu servera.', @@ -160,6 +162,8 @@ $text = array( 'change_assignments' => 'Zmeniť úlohy', 'change_password' => '', 'change_password_message' => '', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => 'Zmeniť stav', 'charts' => '', 'chart_docsaccumulated_title' => '', @@ -579,7 +583,9 @@ $text = array( 'removed_file_email' => 'Odstranena priloha', 'removed_file_email_body' => '', 'removed_file_email_subject' => '', +'removed_recipient' => '', 'removed_reviewer' => 'bol odstránený zo zoznamu kontrolórov.', +'removed_reviser' => '', 'removed_workflow_email_body' => '', 'removed_workflow_email_subject' => '', 'remove_marked_files' => '', @@ -609,6 +615,8 @@ $text = array( 'review_submit_email_subject' => '', 'review_summary' => 'Zhrnutie kontroly', 'review_update_failed' => 'Chyba pri aktualizácii stavu kontroly. Aktualizácia zlyhala.', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => '', 'rewind_workflow_email_body' => '', 'rewind_workflow_email_subject' => '', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 1f0bbc19a..a0bfc3d1b 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -97,6 +97,8 @@ URL: [url]', 'approval_summary' => 'Sammanfattning av godkännande', 'approval_update_failed' => 'Fel vid uppdatering av godkännande-status. Status uppdaterades inte.', 'approvers' => 'Godkänna', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => 'april', 'archive_creation' => 'Skapa arkiv', 'archive_creation_warning' => 'Med denna funktion kan du skapa ett arkiv som innehåller filer från hela DMS-kataloger. När arkivet har skapats, kommer det att sparas i data-mappen på din server.
    OBS! Skapas ett arkiv som är läsbart för användare, kan det inte användas för att återställa systemet.', @@ -175,6 +177,8 @@ URL: [url]', 'change_assignments' => 'Ändra uppdrag', 'change_password' => 'Ändra lösenord', 'change_password_message' => 'Ditt lösenord har ändrats.', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => 'Ändra status', 'charts' => 'Diagram', 'chart_docsaccumulated_title' => 'Antal dokument', @@ -681,7 +685,9 @@ Dokument: [document] Användare: [username] URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Borttagen bilaga', +'removed_recipient' => '', 'removed_reviewer' => 'har tagits bort från listan med personer som ska granska dokumentet.', +'removed_reviser' => '', 'removed_workflow_email_body' => 'Arbetsflöde borttagen från dokument version Dokument: [name] Version: [version] @@ -731,6 +737,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Skickat granskning', 'review_summary' => 'Sammanfattning av granskningen', 'review_update_failed' => 'Fel vid uppdatering av granskningsstatus. Kunde inte uppdatera.', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => 'Återställ arbetsflödet', 'rewind_workflow_email_body' => 'Återställ arbetsflödet Dokument: [name] diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index c31bfaa56..256db5800 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -103,6 +103,8 @@ URL: [url]', 'approval_summary' => 'Onay Özeti', 'approval_update_failed' => 'Onay durumu güncellenirken hata oluştu. Güncelleme başarısız.', 'approvers' => 'Onaylayan', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => 'Nisan', 'archive_creation' => 'Arşiv oluşturma', 'archive_creation_warning' => 'Bu işlemle tüm DYS içeriğindeki dosyaların arşivini oluşturabilirsiniz. Arşiv oluşturulduktan sonra sunucudaki data klasörüne kaydedilecektir.
    DİKKAT: Okunabilir olarak oluşturulan arşiv, sunucu yedeği olarak kullanılamaz.', @@ -181,6 +183,8 @@ URL: [url]', 'change_assignments' => 'Atamaları Değiştir', 'change_password' => 'Parola degiştir', 'change_password_message' => 'Parolanız değişti.', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => 'Değişme Durumu', 'charts' => 'Grafikler', 'chart_docsaccumulated_title' => 'Doküman sayısı', @@ -697,7 +701,9 @@ Doküman: [document] Kullanıcı: [username] URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Ek silindi', +'removed_recipient' => '', 'removed_reviewer' => 'kontrol edenler listesinden çıkarıldı', +'removed_reviser' => '', 'removed_workflow_email_body' => 'Doküman versiyonundan iş akışı silindi Doküman: [name] Versiyon: [version] @@ -747,6 +753,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Kontrol gönderildi', 'review_summary' => 'Kontrol Özeti', 'review_update_failed' => 'Kontrol güncelleme durumu hatalı. Güncelleme başarısız.', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => 'İş akışını geri al', 'rewind_workflow_email_body' => 'İş akışı geri alındı Doküman: [name] diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index 03cc477e2..ab445b1c6 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -92,6 +92,8 @@ URL: [url]', 'approval_summary' => '审核汇总', 'approval_update_failed' => '错误:更新审核状态.更新失败.', 'approvers' => '审核人', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => '四 月', 'archive_creation' => '创建存档', 'archive_creation_warning' => '通过此操作您可以创建一个包含这个DMS(文档管理系统)的数据文件夹。之后,所有文档都将保存到您服务器的数据文件夹中.
    警告:如果所创建文档名为非数字的,那么将在服务器备份中不可用', @@ -164,6 +166,8 @@ URL: [url]', 'change_assignments' => '分配变更', 'change_password' => '', 'change_password_message' => '', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => '变更状态', 'charts' => '图表', 'chart_docsaccumulated_title' => '', @@ -585,7 +589,9 @@ URL: [url]', 'removed_file_email' => '删除附件', 'removed_file_email_body' => '', 'removed_file_email_subject' => '', +'removed_recipient' => '', 'removed_reviewer' => '已经从校对人名单中删除', +'removed_reviser' => '', 'removed_workflow_email_body' => '', 'removed_workflow_email_subject' => '', 'remove_marked_files' => '', @@ -615,6 +621,8 @@ URL: [url]', 'review_submit_email_subject' => '', 'review_summary' => '校对汇总', 'review_update_failed' => '错误 更新校对状态.更新失败', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => '', 'rewind_workflow_email_body' => '', 'rewind_workflow_email_subject' => '', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 808d71cc7..ae1d1cf6f 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -92,6 +92,8 @@ URL: [url]', 'approval_summary' => '審核匯總', 'approval_update_failed' => '錯誤:更新審核狀態.更新失敗.', 'approvers' => '審核人', +'approver_already_assigned' => '', +'approver_already_removed' => '', 'april' => '四 月', 'archive_creation' => '創建存檔', 'archive_creation_warning' => '通過此操作您可以創建一個包含這個DMS(文檔管理系統)的資料檔案夾。之後,所有文檔都將保存到您伺服器的資料檔案夾中.
    警告:如果所創建文檔名為非數字的,那麼將在伺服器備份中不可用', @@ -164,6 +166,8 @@ URL: [url]', 'change_assignments' => '分配變更', 'change_password' => '變更密碼', 'change_password_message' => '變更密碼提示', +'change_recipients' => '', +'change_revisers' => '', 'change_status' => '變更狀態', 'charts' => '圖表', 'chart_docsaccumulated_title' => '', @@ -583,7 +587,9 @@ URL: [url]', 'removed_file_email' => '刪除附件', 'removed_file_email_body' => '', 'removed_file_email_subject' => '', +'removed_recipient' => '', 'removed_reviewer' => '已經從校對人名單中刪除', +'removed_reviser' => '', 'removed_workflow_email_body' => '', 'removed_workflow_email_subject' => '', 'remove_marked_files' => '', @@ -613,6 +619,8 @@ URL: [url]', 'review_submit_email_subject' => '', 'review_summary' => '校對匯總', 'review_update_failed' => '錯誤 更新校對狀態.更新失敗', +'reviser_already_assigned' => '', +'reviser_already_removed' => '', 'rewind_workflow' => '', 'rewind_workflow_email_body' => '', 'rewind_workflow_email_subject' => '', From 4a413cf72bf30640a205281d64e734fdf20d16d4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 13:41:44 +0200 Subject: [PATCH 0028/2006] add some more missing phrases --- languages/ar_EG/lang.inc | 2 ++ languages/bg_BG/lang.inc | 2 ++ languages/ca_ES/lang.inc | 2 ++ languages/cs_CZ/lang.inc | 4 +++- languages/de_DE/lang.inc | 4 +++- languages/en_GB/lang.inc | 4 +++- languages/es_ES/lang.inc | 2 ++ languages/fr_FR/lang.inc | 2 ++ languages/hu_HU/lang.inc | 2 ++ languages/it_IT/lang.inc | 2 ++ languages/nl_NL/lang.inc | 2 ++ languages/pl_PL/lang.inc | 2 ++ languages/pt_BR/lang.inc | 2 ++ languages/ro_RO/lang.inc | 2 ++ languages/ru_RU/lang.inc | 2 ++ languages/sk_SK/lang.inc | 2 ++ languages/sv_SE/lang.inc | 2 ++ languages/tr_TR/lang.inc | 2 ++ languages/zh_CN/lang.inc | 2 ++ languages/zh_TW/lang.inc | 2 ++ 20 files changed, 43 insertions(+), 3 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index f048c2368..3d3c8f04f 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -1169,7 +1169,9 @@ URL: [url]', 'update_fulltext_index' => 'تحديث فهرس النص الكامل', 'update_info' => 'تحديث المعلومات', 'update_locked_msg' => 'هذا المستند محمي من التعديل.', +'update_recipients' => '', 'update_reviewers' => 'تحيث قائمة المراجعين', +'update_reviser' => '', 'uploaded_by' => 'تم الرفع بواسطة', 'uploading_failed' => 'عملية رفع واحد من ملفاتك فشلت . من فضلك قم بالتأكد من اقصى ملف يمكن تحميله', 'uploading_maxsize' => 'الملف المرفوع يتخطى حجم الملف القياسي المسموح', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index 3db36c588..8ffe466aa 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -1025,7 +1025,9 @@ $text = array( 'update_fulltext_index' => 'Обнови пълнотекстовия индекс', 'update_info' => 'Обнови информацията', 'update_locked_msg' => 'Този документ е блокиран', +'update_recipients' => '', 'update_reviewers' => 'Обнови списъка с рецензиращи', +'update_reviser' => '', 'uploaded_by' => 'Качен от', 'uploading_failed' => 'Качването не стана. Свържете се с админа', 'uploading_maxsize' => '', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index c0d37ebde..a60dfe775 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -1030,7 +1030,9 @@ URL: [url]', 'update_fulltext_index' => 'Update fulltext index', 'update_info' => 'Actualitzar informació', 'update_locked_msg' => 'Aquest document està bloquejat.', +'update_recipients' => '', 'update_reviewers' => 'Actualitzar llista de revisors', +'update_reviser' => '', 'uploaded_by' => 'Enviat per', 'uploading_failed' => 'Enviament (Upload) fallat. Si us plau, contacteu amb l\'administrador.', 'uploading_maxsize' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index 4728bcf8b..dffe8ab68 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/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 (680), kreml (455) +// Translators: Admin (681), kreml (455) $text = array( 'accept' => 'Přijmout', @@ -1178,7 +1178,9 @@ URL: [url]', 'update_fulltext_index' => 'Aktualizovat fulltext index', 'update_info' => 'Aktualizovat informace', 'update_locked_msg' => 'Tento dokument je zamčený.', +'update_recipients' => 'Update list of recipients', 'update_reviewers' => 'Aktualizovat seznam kontrolorů', +'update_reviser' => '', 'uploaded_by' => 'Nahrál', 'uploading_failed' => 'Nahrání selhalo. Prosím, kontaktujte správce.', 'uploading_maxsize' => 'Nahrávaný soubor je větší než maximální velikost pro upload.', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index 507e049ee..5dc93c997 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 (1991), dgrutsch (18) +// Translators: Admin (1993), dgrutsch (18) $text = array( 'accept' => 'Übernehmen', @@ -1198,7 +1198,9 @@ URL: [url]', 'update_fulltext_index' => 'Aktualisiere Volltextindex', 'update_info' => 'Informationen zur Aktualisierung', 'update_locked_msg' => 'Dieses Dokument wurde gesperrt

    Die Sperrung wurde von [username] eingerichtet.
    ', +'update_recipients' => 'Liste der Empfänger aktualisieren', 'update_reviewers' => 'Liste der Prüfer aktualisieren', +'update_reviser' => 'Liste der Wiederholungsprüfer ändern', 'uploaded_by' => 'Hochgeladen durch', 'uploading_failed' => 'Das Hochladen einer Datei ist fehlgeschlagen. Bitte überprüfen Sie die maximale Dateigröße für Uploads.', 'uploading_maxsize' => 'Die Datei überschreitet die maximale Dateigröße für Uploads.', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index 263344b9a..41cd832f7 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 (1123), dgrutsch (3), netixw (14) +// Translators: Admin (1124), dgrutsch (3), netixw (14) $text = array( 'accept' => 'Accept', @@ -1205,7 +1205,9 @@ URL: [url]', 'update_fulltext_index' => 'Update fulltext index', 'update_info' => 'Update Information', 'update_locked_msg' => 'This document is locked.', +'update_recipients' => '', 'update_reviewers' => 'Update List of Reviewers', +'update_reviser' => 'Update list of resubmitters', 'uploaded_by' => 'Uploaded by', 'uploading_failed' => 'Uploading one of your files failed. Please check your maximum upload file size.', 'uploading_maxsize' => 'The uploaded file exceeds the maximum upload file size.', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index 690599645..9ed02af6d 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -1184,7 +1184,9 @@ URL: [url]', 'update_fulltext_index' => 'Actualizar índice de texto completo', 'update_info' => 'Actualizar información', 'update_locked_msg' => 'Este documento está bloqueado.', +'update_recipients' => '', 'update_reviewers' => 'Actualizar lista de revisores', +'update_reviser' => '', 'uploaded_by' => 'Enviado por', 'uploading_failed' => 'Envío (Upload) fallido. Por favor contacte con el Administrador.', 'uploading_maxsize' => 'El archivo subido supera el tamaño máximo de upload', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 6d7c26ebf..5b55d235a 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -1151,7 +1151,9 @@ URL: [url]', 'update_fulltext_index' => 'Mettre à jour l\'index de recherche plein texte', 'update_info' => 'Informations de mise à jour', 'update_locked_msg' => 'Ce document est verrouillé.', +'update_recipients' => '', 'update_reviewers' => 'Mise à jour de la liste de correcteurs', +'update_reviser' => '', 'uploaded_by' => 'Déposé par', 'uploading_failed' => 'Dépose du document échoué. SVP Contactez le responsable.', 'uploading_maxsize' => 'La taille du fichier téléchargé excède la taille maximale accepté', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index f88695659..f71d4a445 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -1183,7 +1183,9 @@ URL: [url]', 'update_fulltext_index' => 'Teljes szöveg index frissítése', 'update_info' => 'Információ frissítése', 'update_locked_msg' => 'Ez a dokumentum zárolt.', +'update_recipients' => '', 'update_reviewers' => 'Felülvizsgálók listájának frissítése', +'update_reviser' => '', 'uploaded_by' => 'Feltöltötte', 'uploading_failed' => 'Állományai egyikének feltöltése sikertelen. Kérjük ellenőrizze a legnagyobb feltölthető állomány méretet.', 'uploading_maxsize' => 'A feltöltött fájl nagyobb, mint a megengedezz maximális méret', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index ce3e008a4..628f8734d 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -1206,7 +1206,9 @@ URL: [url]', 'update_fulltext_index' => 'Aggiorna indice fulltext', 'update_info' => 'Aggiorna informazioni', 'update_locked_msg' => 'Questo documento è bloccato.', +'update_recipients' => '', 'update_reviewers' => 'Aggiorna lista revisori', +'update_reviser' => '', 'uploaded_by' => 'Caricato da', 'uploading_failed' => 'Upload fallito. Controllare la dimensione massima caricabile consentita.', 'uploading_maxsize' => 'Il file caricato supera la dimensione massima consentita.', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index fc453a2b0..9341240cf 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -1175,7 +1175,9 @@ URL: [url]', 'update_fulltext_index' => 'Bijwerken volledige tekst index', 'update_info' => 'Bijwerken informatie', 'update_locked_msg' => 'Dit document is geblokkeerd.', +'update_recipients' => '', 'update_reviewers' => 'Bijwerken lijst van [Controleurs]', +'update_reviser' => '', 'uploaded_by' => 'Ge-upload door', 'uploading_failed' => 'Upload mislukt. Neem contact op met de [Beheerder].', 'uploading_maxsize' => 'Het geuploade bestand overschrijdt de maximum grootte.', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 56ae936c1..20b56220a 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -1163,7 +1163,9 @@ URL: [url]', 'update_fulltext_index' => 'Aktualizuj indeks pełnotekstowy', 'update_info' => 'Aktualizuj informacje', 'update_locked_msg' => 'Ten dokument jest zablokowany.', +'update_recipients' => '', 'update_reviewers' => 'Aktualizuj listę recenzentów', +'update_reviser' => '', 'uploaded_by' => 'Przesłane przez', 'uploading_failed' => 'Przesyłanie nie powiodło się. Skontaktuj się z administratorem.', 'uploading_maxsize' => 'Rozmiar pliku większy niż dopuszczalny', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 545828da6..206a57dfb 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -1181,7 +1181,9 @@ URL: [url]', 'update_fulltext_index' => 'Índice de atualização de texto completo', 'update_info' => 'Update Information', 'update_locked_msg' => 'Este documento está travado.', +'update_recipients' => '', 'update_reviewers' => 'Update List of Reviewers', +'update_reviser' => '', 'uploaded_by' => 'Inserido por', 'uploading_failed' => 'Inserção falhou. Por favor contacte o administrador', 'uploading_maxsize' => 'O arquivo excede o tamanho máximo permitido para upload.', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index 1479fec89..4f9607987 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -1184,7 +1184,9 @@ URL: [url]', 'update_fulltext_index' => 'Actualizare index pe tot textul (fulltext index)', 'update_info' => 'Informații actualizare', 'update_locked_msg' => 'Acest document este blocat.', +'update_recipients' => '', 'update_reviewers' => 'Actualizare Listă de revizuitori', +'update_reviser' => '', 'uploaded_by' => 'Adaugate de', 'uploading_failed' => 'Încărcarea unuia dintre fișierele a eșuat. Vă rugăm să verificați dimensiunea maximă de încărcare fișiere.', 'uploading_maxsize' => 'Fișierul încărcat depășește dimensiunea maximă de încărcare fișiere.', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index 01e7f18a2..73250705c 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -1174,7 +1174,9 @@ URL: [url]', 'update_fulltext_index' => 'Обновить полнотекстовый индекс', 'update_info' => 'Обновить информацию', 'update_locked_msg' => 'Этот документ заблокирован', +'update_recipients' => '', 'update_reviewers' => 'Обновить список рецензирующих', +'update_reviser' => '', 'uploaded_by' => 'Загрузил(а)', 'uploading_failed' => 'Загрузка не удалась. Свяжитесь с администратором.', 'uploading_maxsize' => 'Размер загруженного файла превышает максимально возможный', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index f0598df3a..958a12be3 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -1025,7 +1025,9 @@ $text = array( 'update_fulltext_index' => '', 'update_info' => 'Aktualizovať informácie', 'update_locked_msg' => 'Tento dokument je zamknutý.', +'update_recipients' => '', 'update_reviewers' => 'Aktualizovať zoznam kontrolórov', +'update_reviser' => '', 'uploaded_by' => 'Nahral', 'uploading_failed' => 'Nahranie zlyhalo. Prosám, kontaktujte správcu.', 'uploading_maxsize' => 'Uploadovaný súbor prekročil maximálnu povolenú velkosť.', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index a0bfc3d1b..91e3ae41f 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -1169,7 +1169,9 @@ URL: [url]', 'update_fulltext_index' => 'Uppdatera fulltext-index', 'update_info' => 'Uppdatera information', 'update_locked_msg' => 'Dokumentet är låst.', +'update_recipients' => '', 'update_reviewers' => 'Uppdatera listan med personer som granskar', +'update_reviser' => '', 'uploaded_by' => 'Uppladdat av', 'uploading_failed' => 'Fel vid uppladdningen. Kontakta administratören.', 'uploading_maxsize' => 'Uppladdade filen översteg maxgränsen för storleken på filstorlek', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 256db5800..3c6997b7e 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -1185,7 +1185,9 @@ URL: [url]', 'update_fulltext_index' => 'Tam metin indeksini güncelle', 'update_info' => 'Bilgileri Güncelle', 'update_locked_msg' => 'Bu doküman kilitli.', +'update_recipients' => '', 'update_reviewers' => 'Kontrol edenlerin listesini güncelle', +'update_reviser' => '', 'uploaded_by' => 'Yükleyen', 'uploading_failed' => 'Dosyalardan biri yüklenirken başarısız oldu. Maksimum yükleme boyutunuzu kontrol ediniz.', 'uploading_maxsize' => 'Yüklenen dosya maksimum yükleme boyutundan fazla.', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index ab445b1c6..a72d39300 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -1031,7 +1031,9 @@ URL: [url]', 'update_fulltext_index' => '更新全文索引', 'update_info' => '更新信息', 'update_locked_msg' => '该文档被锁定', +'update_recipients' => '', 'update_reviewers' => '更新校对人名单', +'update_reviser' => '', 'uploaded_by' => '上传者', 'uploading_failed' => '文件太大无法上传!请处理后重新上传。', 'uploading_maxsize' => '最大上传限制', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index ae1d1cf6f..5e0a5857d 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -1029,7 +1029,9 @@ URL: [url]', 'update_fulltext_index' => '更新全文索引', 'update_info' => '更新資訊', 'update_locked_msg' => '該文檔被鎖定', +'update_recipients' => '', 'update_reviewers' => '更新校對人名單', +'update_reviser' => '', 'uploaded_by' => '上傳者', 'uploading_failed' => '文件太大無法上傳!請處理後重新上傳。', 'uploading_maxsize' => '最大上傳限制', From 9c645663861cb55c1924c3bda006fc9bea4eda75 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 13:46:12 +0200 Subject: [PATCH 0029/2006] even more phrases --- languages/ar_EG/lang.inc | 4 ++++ languages/bg_BG/lang.inc | 4 ++++ languages/ca_ES/lang.inc | 4 ++++ languages/cs_CZ/lang.inc | 4 ++++ languages/de_DE/lang.inc | 6 +++++- languages/en_GB/lang.inc | 6 +++++- languages/es_ES/lang.inc | 4 ++++ languages/fr_FR/lang.inc | 4 ++++ languages/hu_HU/lang.inc | 4 ++++ languages/it_IT/lang.inc | 4 ++++ languages/nl_NL/lang.inc | 4 ++++ languages/pl_PL/lang.inc | 4 ++++ languages/pt_BR/lang.inc | 4 ++++ languages/ro_RO/lang.inc | 4 ++++ languages/ru_RU/lang.inc | 4 ++++ languages/sk_SK/lang.inc | 4 ++++ languages/sv_SE/lang.inc | 4 ++++ languages/tr_TR/lang.inc | 4 ++++ languages/zh_CN/lang.inc | 4 ++++ languages/zh_TW/lang.inc | 4 ++++ 20 files changed, 82 insertions(+), 2 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index 3d3c8f04f..8ad876c12 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -800,10 +800,14 @@ URL: [url]', 'select_groups' => 'اضغط لاختيار مجموعة', 'select_grp_approvers' => 'اضغط لاختيار مجموعة الموافقون', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => 'اضغط لاختيار مجموعة المراجعون', +'select_grp_revisers' => '', 'select_ind_approvers' => 'اضغط لاختيار موافق فردي', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => 'اضغط لاختيار مراجع فردي', +'select_ind_revisers' => '', 'select_one' => 'اختر واحد', 'select_users' => 'اضغط لاختيار المستخدم', 'select_workflow' => 'اختر مسار العمل', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index 8ffe466aa..70ad79d56 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -665,10 +665,14 @@ $text = array( 'select_groups' => 'Кликни да избереш групи', 'select_grp_approvers' => 'Кликни да избереш група утвърждаващи', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => 'Кликни да избереш група рецензенти', +'select_grp_revisers' => '', 'select_ind_approvers' => 'Кликни да избереш утвърждаващ', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => 'Кликни да избереш рецензент', +'select_ind_revisers' => '', 'select_one' => 'Избери един', 'select_users' => 'Кликни да избереш потребители', 'select_workflow' => 'Избери процес', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index a60dfe775..803a146af 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -670,10 +670,14 @@ URL: [url]', 'select_groups' => '', 'select_grp_approvers' => '', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => '', +'select_grp_revisers' => '', 'select_ind_approvers' => '', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => '', +'select_ind_revisers' => '', 'select_one' => 'Seleccionar un', 'select_users' => '', 'select_workflow' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index dffe8ab68..2fcfe5bea 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -809,10 +809,14 @@ URL: [url]', 'select_groups' => 'Kliknutím vyberte skupiny', 'select_grp_approvers' => 'Kliknutím vyberte skupinu schvalovatele', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => 'Kliknutím vyberte skupinu posuzovatele', +'select_grp_revisers' => '', 'select_ind_approvers' => 'Kliknutím vyberte jednotlivého schvalovatele', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => 'Klepnutím vyberte jednotlivého posuzovatele', +'select_ind_revisers' => '', 'select_one' => 'Vyberte jeden', 'select_users' => 'Kliknutím vyberte uživatele', 'select_workflow' => 'Vyberte postup práce', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index 5dc93c997..55de1d55a 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 (1993), dgrutsch (18) +// Translators: Admin (1994), dgrutsch (18) $text = array( 'accept' => 'Übernehmen', @@ -829,10 +829,14 @@ URL: [url]', 'select_groups' => 'Klicken zur Auswahl einer Gruppe', 'select_grp_approvers' => 'Klicken zur Auswahl einer Freigabegruppe', 'select_grp_notification' => 'Klicken zur Auswahl einer Beobachtergruppe', +'select_grp_recipients' => '', 'select_grp_reviewers' => 'Klicken zur Auswahl einer Prüfgruppe', +'select_grp_revisers' => '', 'select_ind_approvers' => 'Klicken zur Auswahl eines Freigebers', 'select_ind_notification' => 'Klicken zur Auswahl eines Beobachters', +'select_ind_recipients' => 'Click to select individual recipients', 'select_ind_reviewers' => 'Klicken zur Auswahl eines Prüfers', +'select_ind_revisers' => '', 'select_one' => 'Bitte wählen', 'select_users' => 'Klicken zur Auswahl eines Benutzers', 'select_workflow' => 'Workflow auswählen', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index 41cd832f7..b1e91f583 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 (1124), dgrutsch (3), netixw (14) +// Translators: Admin (1127), dgrutsch (3), netixw (14) $text = array( 'accept' => 'Accept', @@ -836,10 +836,14 @@ URL: [url]', 'select_groups' => 'Click to select groups', 'select_grp_approvers' => 'Click to select group approver', 'select_grp_notification' => 'Click to select group notification', +'select_grp_recipients' => 'Click to select group of recipients', 'select_grp_reviewers' => 'Click to select group reviewer', +'select_grp_revisers' => 'Click to select group of resubmitters', 'select_ind_approvers' => 'Click to select individual approver', 'select_ind_notification' => 'Click to select individual notification', +'select_ind_recipients' => '', 'select_ind_reviewers' => 'Click to select individual reviewer', +'select_ind_revisers' => 'Click to select individual resubmitters', 'select_one' => 'Select one', 'select_users' => 'Click to select users', 'select_workflow' => 'Select workflow', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index 9ed02af6d..1ad2f47de 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -815,10 +815,14 @@ URL: [url]', 'select_groups' => 'Haga Click para seleccionar grupos', 'select_grp_approvers' => 'Haga Click para seleccionar grupo de aprobadores', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => 'Haga Click para seleccionar grupo de revisores', +'select_grp_revisers' => '', 'select_ind_approvers' => 'Haga Click para seleccionar aprobador individual', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => 'Haga Click para seleccionar revisor individual', +'select_ind_revisers' => '', 'select_one' => 'Seleccionar uno', 'select_users' => 'Haga Click para seleccionar usuarios', 'select_workflow' => 'Selecionar Flujo de Trabajo', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 5b55d235a..84d912bed 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -791,10 +791,14 @@ URL: [url]', 'select_groups' => 'Cliquer pour choisir un groupe', 'select_grp_approvers' => 'Cliquer pour choisir un groupe d\'approbateur', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => 'Cliquer pour choisir un groupe de correcteur', +'select_grp_revisers' => '', 'select_ind_approvers' => 'Cliquer pour choisir un approbateur individuel', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => 'Cliquer pour choisir un correcteur individuel', +'select_ind_revisers' => '', 'select_one' => 'Selectionner', 'select_users' => 'Cliquer pour choisir un utilisateur', 'select_workflow' => 'Choisir un workflow', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index f71d4a445..3e6c8b6da 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -814,10 +814,14 @@ URL: [url]', 'select_groups' => 'Kattintson a csoportok kijelöléséhez', 'select_grp_approvers' => 'Kattintson a csoport jóváhagyó kijelöléséhez', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => 'Kattintson a csoport felülvizsgáló kijelöléséhez', +'select_grp_revisers' => '', 'select_ind_approvers' => 'Kattintson az önálló jóváhagyó kijelöléséhez', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => 'Kattintson az önálló felülvizsgáló kijelöléséhez', +'select_ind_revisers' => '', 'select_one' => 'Vßlasszon egyet', 'select_users' => 'Kattintson a felhasználó kiválasztásához', 'select_workflow' => 'Munkafolyamat választás', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index 628f8734d..135ac6b6f 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -837,10 +837,14 @@ URL: [url]', 'select_groups' => 'Clicca per selezionare i gruppi', 'select_grp_approvers' => 'Seleziona gruppo approvatore', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => 'Seleziona gruppo revisore', +'select_grp_revisers' => '', 'select_ind_approvers' => 'Seleziona approvatore', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => 'Seleziona revisore', +'select_ind_revisers' => '', 'select_one' => 'Seleziona uno', 'select_users' => 'Clicca per selezionare gli utenti', 'select_workflow' => 'Seleziona il flusso di lavoro', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 9341240cf..b7733bf8c 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -806,10 +806,14 @@ URL: [url]', 'select_groups' => 'Klik om groep te selecteren', 'select_grp_approvers' => 'Klik om groep beoordelaar te selecteren', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => 'Klik om groep beoordelaar te selecteren', +'select_grp_revisers' => '', 'select_ind_approvers' => 'Klik om individuele beoordelaar te selecteren', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => 'Klik om individuele beoordelaar te selecteren', +'select_ind_revisers' => '', 'select_one' => 'Selecteer een', 'select_users' => 'Klik om gebruikers te selecteren', 'select_workflow' => 'Selecteer workflow', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 20b56220a..4e7e8cc1e 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -794,10 +794,14 @@ URL: [url]', 'select_groups' => 'Kliknij by wybrać grupy', 'select_grp_approvers' => 'Kliknij by wybrać grupę zatwierdzającą', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => 'Kliknij by wybrać grupę recenzentów', +'select_grp_revisers' => '', 'select_ind_approvers' => 'Kliknij by wybrać zatwierdzającego', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => 'Kliknij by wybrać recenzenta', +'select_ind_revisers' => '', 'select_one' => 'Wybierz', 'select_users' => 'Kliknij by wybrać użytkowników', 'select_workflow' => 'Wybierz proces', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 206a57dfb..7376cad3e 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -812,10 +812,14 @@ URL: [url]', 'select_groups' => 'Clique para selecionar os grupos', 'select_grp_approvers' => 'Clique para selecionar o grupo aprovador', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => 'Clique para selecionar o grupo revisor', +'select_grp_revisers' => '', 'select_ind_approvers' => 'Clique para selecionar aprovador indivídual', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => 'Clique para selecionar revisor individual', +'select_ind_revisers' => '', 'select_one' => 'Selecione um', 'select_users' => 'Clique para selecionar os usuários', 'select_workflow' => 'Selecione o fluxo de trabalho', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index 4f9607987..411582758 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -815,10 +815,14 @@ URL: [url]', 'select_groups' => 'Click pentru a selecta grupuri', 'select_grp_approvers' => 'Click pentru a selecta grupul de aprobatori', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => 'Click pentru a selecta grupul de revizuitori', +'select_grp_revisers' => '', 'select_ind_approvers' => 'Click pentru a selecta un aprobator individual', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => 'Click pentru a selecta un revizuitor individual', +'select_ind_revisers' => '', 'select_one' => 'Selectați unul', 'select_users' => 'Click pentru a selecta utilizatori', 'select_workflow' => 'Selectați workflow', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index 73250705c..1d1ad2104 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -805,10 +805,14 @@ URL: [url]', 'select_groups' => 'Выберите группы', 'select_grp_approvers' => 'Выберите утверждающую группу', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => 'Выберите рецензирующую группу', +'select_grp_revisers' => '', 'select_ind_approvers' => 'Выберите индивидуального утверждающего', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => 'Выберите индивидуального рецензента', +'select_ind_revisers' => '', 'select_one' => 'Выберите', 'select_users' => 'Выберите пользователей', 'select_workflow' => 'Выберите процесс', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 958a12be3..9a4449963 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -665,10 +665,14 @@ $text = array( 'select_groups' => '', 'select_grp_approvers' => '', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => '', +'select_grp_revisers' => '', 'select_ind_approvers' => '', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => '', +'select_ind_revisers' => '', 'select_one' => 'Vyberte jeden', 'select_users' => '', 'select_workflow' => '', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 91e3ae41f..4ff21500d 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -800,10 +800,14 @@ URL: [url]', 'select_groups' => 'Välj grupper', 'select_grp_approvers' => 'Välj en grupp som ska godkänna', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => 'Välj en grupp som ska granska', +'select_grp_revisers' => '', 'select_ind_approvers' => 'Välj en person som ska godkänna', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => 'Välj en person som ska granska', +'select_ind_revisers' => '', 'select_one' => 'Välj', 'select_users' => 'Välj användare', 'select_workflow' => 'Välj arbetsflöde', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 3c6997b7e..cca409e17 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -816,10 +816,14 @@ URL: [url]', 'select_groups' => 'Grup seçmek için tıklayın', 'select_grp_approvers' => 'Grup onaylayıcı seçmek için tıklayın', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => 'Grup kontrol edeni seçmek için tıklayın', +'select_grp_revisers' => '', 'select_ind_approvers' => 'Bireysel onaylanı seçmek için tıklayın', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => 'Biresysel kontrol edeni seçmek için tıklayın', +'select_ind_revisers' => '', 'select_one' => 'Birini seçiniz', 'select_users' => 'Kullanıcı seçmek için tıklayın', 'select_workflow' => 'İş akışı seç', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index a72d39300..c4a5357e8 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -671,10 +671,14 @@ URL: [url]', 'select_groups' => '点击选择组', 'select_grp_approvers' => '', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => '', +'select_grp_revisers' => '', 'select_ind_approvers' => '', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => '', +'select_ind_revisers' => '', 'select_one' => '选择一个', 'select_users' => '点击选择用户', 'select_workflow' => '', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 5e0a5857d..1781a955f 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -669,10 +669,14 @@ URL: [url]', 'select_groups' => '點擊選擇組', 'select_grp_approvers' => '', 'select_grp_notification' => '', +'select_grp_recipients' => '', 'select_grp_reviewers' => '', +'select_grp_revisers' => '', 'select_ind_approvers' => '', 'select_ind_notification' => '', +'select_ind_recipients' => '', 'select_ind_reviewers' => '', +'select_ind_revisers' => '', 'select_one' => '選擇一個', 'select_users' => '點擊選擇用戶', 'select_workflow' => '', From 1ab9fdb229aae85b317ed0f4d6b6f98212ccf76b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 14:57:07 +0200 Subject: [PATCH 0030/2006] add field startdate to talbe tblDocumentRevisers --- install/create_tables-sqlite3.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/install/create_tables-sqlite3.sql b/install/create_tables-sqlite3.sql index 3d5b700fc..099bad86f 100644 --- a/install/create_tables-sqlite3.sql +++ b/install/create_tables-sqlite3.sql @@ -386,6 +386,7 @@ CREATE TABLE `tblDocumentRevisers` ( `version` INTEGER unsigned NOT NULL default '0', `type` INTEGER NOT NULL default '0', `required` INTEGER NOT NULL default '0', + `startdate` TEXT default NULL, UNIQUE (`documentID`,`version`,`type`,`required`) ) ; From 5702708643d97e6d44cb5579b4f341de01a3b56b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 14:57:36 +0200 Subject: [PATCH 0031/2006] add link to out/out.ReceiptSummary.php in MyDocuments menu --- views/bootstrap/class.Bootstrap.php | 1 + 1 file changed, 1 insertion(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 32ce9b0d6..5f7e0b616 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -526,6 +526,7 @@ $(document).ready(function () { } else { echo "

  • ".getMLText("workflow_summary")."
  • \n"; } + echo "
  • ".getMLText("receipt_summary")."
  • \n"; echo "\n"; echo "\n"; return; From 12b0eadc66b2f8635140a57f1d3eeded0aabe47e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 17:19:53 +0200 Subject: [PATCH 0032/2006] use classnames in SeedDMS_Core_DMS when instanciating users --- SeedDMS_Core/Core/inc.ClassGroup.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassGroup.php b/SeedDMS_Core/Core/inc.ClassGroup.php index c389cebd4..693424e1f 100644 --- a/SeedDMS_Core/Core/inc.ClassGroup.php +++ b/SeedDMS_Core/Core/inc.ClassGroup.php @@ -151,8 +151,9 @@ class SeedDMS_Core_Group { $this->_users = array(); + $classname = $this->_dms->getClassname('user'); foreach ($resArr as $row) { - $user = new SeedDMS_Core_User($row["id"], $row["login"], $row["pwd"], $row["fullName"], $row["email"], $row["language"], $row["theme"], $row["comment"], $row["role"], $row['hidden']); + $user = new $classname($row["id"], $row["login"], $row["pwd"], $row["fullName"], $row["email"], $row["language"], $row["theme"], $row["comment"], $row["role"], $row['hidden']); array_push($this->_users, $user); } } @@ -171,8 +172,9 @@ class SeedDMS_Core_Group { $managers = array(); + $classname = $this->_dms->getClassname('user'); foreach ($resArr as $row) { - $user = new SeedDMS_Core_User($row["id"], $row["login"], $row["pwd"], $row["fullName"], $row["email"], $row["language"], $row["theme"], $row["comment"], $row["role"], $row['hidden']); + $user = new $classname($row["id"], $row["login"], $row["pwd"], $row["fullName"], $row["email"], $row["language"], $row["theme"], $row["comment"], $row["role"], $row['hidden']); array_push($managers, $user); } return $managers; From d7d4ab63901a32f82b40eb927cae9f071cd105cb Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 17:20:57 +0200 Subject: [PATCH 0033/2006] use classnames in SeedDMS_Core_DMS when instanciating, new method getDocumentCheckOuts() --- SeedDMS_Core/Core/inc.ClassUser.php | 39 +++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassUser.php b/SeedDMS_Core/Core/inc.ClassUser.php index f45372494..f5bb4ebd9 100644 --- a/SeedDMS_Core/Core/inc.ClassUser.php +++ b/SeedDMS_Core/Core/inc.ClassUser.php @@ -770,8 +770,9 @@ class SeedDMS_Core_User { return false; $this->_groups = array(); + $classname = $this->_dms->getClassname('group'); foreach ($resArr as $row) { - $group = new SeedDMS_Core_Group($row["id"], $row["name"], $row["comment"]); + $group = new $classname($row["id"], $row["name"], $row["comment"]); $group->setDMS($this->_dms); array_push($this->_groups, $group); } @@ -866,8 +867,9 @@ class SeedDMS_Core_User { return false; $documents = array(); + $classname = $this->_dms->getClassname('document'); foreach ($resArr as $row) { - $document = new SeedDMS_Core_Document($row["id"], $row["name"], $row["comment"], $row["date"], $row["expires"], $row["owner"], $row["folder"], $row["inheritAccess"], $row["defaultAccess"], $row["lockUser"], $row["keywords"], $row["sequence"]); + $document = new $classname($row["id"], $row["name"], $row["comment"], $row["date"], $row["expires"], $row["owner"], $row["folder"], $row["inheritAccess"], $row["defaultAccess"], $row["lockUser"], $row["keywords"], $row["sequence"]); $document->setDMS($this->_dms); $documents[] = $document; } @@ -876,8 +878,6 @@ class SeedDMS_Core_User { /** * Returns all documents locked by a given user - * FIXME: Not full implemented. Do not use, because it still requires the - * temporary tables! * * @param object $user * @return array list of documents @@ -895,8 +895,37 @@ class SeedDMS_Core_User { return false; $documents = array(); + $classname = $this->_dms->getClassname('document'); foreach ($resArr as $row) { - $document = new SeedDMS_Core_Document($row["id"], $row["name"], $row["comment"], $row["date"], $row["expires"], $row["owner"], $row["folder"], $row["inheritAccess"], $row["defaultAccess"], $row["lockUser"], $row["keywords"], $row["sequence"]); + $document = new $classname($row["id"], $row["name"], $row["comment"], $row["date"], $row["expires"], $row["owner"], $row["folder"], $row["inheritAccess"], $row["defaultAccess"], $row["lockUser"], $row["keywords"], $row["sequence"]); + $document->setDMS($this->_dms); + $documents[] = $document; + } + return $documents; + } /* }}} */ + + /** + * Returns all documents check out by a given user + * + * @param object $user + * @return array list of documents + */ + function getDocumentsCheckOut() { /* {{{ */ + $db = $this->_dms->getDB(); + + $queryStr = "SELECT `tblDocuments`.* ". + "FROM `tblDocumentCheckOuts` LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentCheckOuts`.`document` ". + "WHERE `tblDocumentCheckOuts`.`userID` = '".$this->_id."' ". + "ORDER BY `id` ASC"; + + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) + return false; + + $documents = array(); + $classname = $this->_dms->getClassname('document'); + foreach ($resArr as $row) { + $document = new $classname($row["id"], $row["name"], $row["comment"], $row["date"], $row["expires"], $row["owner"], $row["folder"], $row["inheritAccess"], $row["defaultAccess"], $row["lockUser"], $row["keywords"], $row["sequence"]); $document->setDMS($this->_dms); $documents[] = $document; } From 4f3c6ed0904985a223e893a2009b5a4c24b488ab Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 17:21:57 +0200 Subject: [PATCH 0034/2006] add checkbox for creating checkout dir if it doesn't exists --- inc/inc.ClassSettings.php | 4 ++++ op/op.Settings.php | 1 + views/bootstrap/class.Settings.php | 6 +++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 47dc69165..15cb6060d 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -85,6 +85,8 @@ class Settings { /* {{{ */ var $_dropFolderDir = null; // Where the checked out files are located var $_checkOutDir = null; + // Create checkout dir if it doesn't exists + var $_createCheckOutDir = false; // Where the stop word file is located var $_stopWordsFile = null; // enable/disable lucene fulltext search @@ -375,6 +377,7 @@ class Settings { /* {{{ */ $this->_luceneDir = strval($tab["luceneDir"]); $this->_dropFolderDir = strval($tab["dropFolderDir"]); $this->_checkOutDir = strval($tab["checkOutDir"]); + $this->_createCheckOutDir = Settings::boolVal($tab["createCheckOutDir"]); $this->_logFileEnable = Settings::boolVal($tab["logFileEnable"]); $this->_logFileRotation = strval($tab["logFileRotation"]); $this->_enableLargeFileUpload = Settings::boolVal($tab["enableLargeFileUpload"]); @@ -660,6 +663,7 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "luceneDir", $this->_luceneDir); $this->setXMLAttributValue($node, "dropFolderDir", $this->_dropFolderDir); $this->setXMLAttributValue($node, "checkOutDir", $this->_checkOutDir); + $this->setXMLAttributValue($node, "createCheckOutDir", $this->_createCheckOutDir); $this->setXMLAttributValue($node, "logFileEnable", $this->_logFileEnable); $this->setXMLAttributValue($node, "logFileRotation", $this->_logFileRotation); $this->setXMLAttributValue($node, "enableLargeFileUpload", $this->_enableLargeFileUpload); diff --git a/op/op.Settings.php b/op/op.Settings.php index b3c544db6..6c7d3724c 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -96,6 +96,7 @@ if ($action == "saveSettings") $settings->_extraPath = $_POST["extraPath"]; $settings->_dropFolderDir = $_POST["dropFolderDir"]; $settings->_checkOutDir = $_POST["checkOutDir"]; + $settings->_createCheckOutDir = getBoolValue("createCheckOutDir"); $settings->_logFileEnable = getBoolValue("logFileEnable"); $settings->_logFileRotation = $_POST["logFileRotation"]; $settings->_enableLargeFileUpload = getBoolValue("enableLargeFileUpload"); diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 914e57d38..64c3df226 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -55,7 +55,7 @@ class SeedDMS_View_Settings extends SeedDMS_Bootstrap_Style {
    - + _configFilePath)) { print "
    "; @@ -294,6 +294,10 @@ if(!is_writeable($settings->_configFilePath)) { : + "> + : + _createCheckOutDir) echo "checked" ?> /> + "> : _logFileEnable) echo "checked" ?> /> From 87b3c37cb0299dcfe7baa446afdc4d23fdb785cd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 17:22:30 +0200 Subject: [PATCH 0035/2006] use $_REQUEST instead of $_GET when getting currenttab --- out/out.Settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/out/out.Settings.php b/out/out.Settings.php index b4c8b2514..459ddf509 100644 --- a/out/out.Settings.php +++ b/out/out.Settings.php @@ -33,7 +33,7 @@ if(!trim($settings->_encryptionKey)) $settings->_encryptionKey = md5(uniqid()); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'settings'=>$settings, 'currenttab'=>(isset($_GET['currenttab']) ? $_GET['currenttab'] : ''))); +$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'settings'=>$settings, 'currenttab'=>(isset($_REQUEST['currenttab']) ? $_REQUEST['currenttab'] : ''))); if($view) { $view->show(); exit; From 08e768fc5220caa95114806470d7a97a2bb652a9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 17:23:54 +0200 Subject: [PATCH 0036/2006] =?UTF-8?q?add=20missing=20files=20for=20documen?= =?UTF-8?q?t=20check=20out/=D1=96n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- op/op.CheckInDocument.php | 299 ++++++++++++ op/op.CheckOutDocument.php | 66 +++ out/out.CheckInDocument.php | 73 +++ views/bootstrap/class.CheckInDocument.php | 544 ++++++++++++++++++++++ views/bootstrap/class.CheckOutSummary.php | 144 ++++++ 5 files changed, 1126 insertions(+) create mode 100644 op/op.CheckInDocument.php create mode 100644 op/op.CheckOutDocument.php create mode 100644 out/out.CheckInDocument.php create mode 100644 views/bootstrap/class.CheckInDocument.php create mode 100644 views/bootstrap/class.CheckOutSummary.php diff --git a/op/op.CheckInDocument.php b/op/op.CheckInDocument.php new file mode 100644 index 000000000..4ce8bb7b7 --- /dev/null +++ b/op/op.CheckInDocument.php @@ -0,0 +1,299 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_POST["documentid"]; +$document = $dms->getDocument($documentid); +$folder = $document->getFolder(); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); +} + +if($settings->_quota > 0) { + $remain = checkQuota($user); + if ($remain < 0) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("quota_exceeded", array('bytes'=>SeedDMS_Core_File::format_filesize(abs($remain))))); + } +} + +if ($document->isLocked()) { + $lockingUser = $document->getLockingUser(); + if (($lockingUser->getID() != $user->getID()) && ($document->getAccessMode($user) != M_ALL)) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("no_update_cause_locked")); + } + else $document->setLocked(false); +} + +if(isset($_POST["comment"])) + $comment = $_POST["comment"]; +else + $comment = ""; + + + // Get the list of reviewers and approvers for this document. + $reviewers = array(); + $approvers = array(); + $reviewers["i"] = array(); + $reviewers["g"] = array(); + $approvers["i"] = array(); + $approvers["g"] = array(); + $workflow = null; + + if($settings->_workflowMode == 'traditional' || $settings->_workflowMode == 'traditional_only_approval') { + if($settings->_workflowMode == 'traditional') { + // Retrieve the list of individual reviewers from the form. + $reviewers["i"] = array(); + if (isset($_POST["indReviewers"])) { + foreach ($_POST["indReviewers"] as $ind) { + $reviewers["i"][] = $ind; + } + } + // Retrieve the list of reviewer groups from the form. + $reviewers["g"] = array(); + if (isset($_POST["grpReviewers"])) { + foreach ($_POST["grpReviewers"] as $grp) { + $reviewers["g"][] = $grp; + } + } + } + + // Retrieve the list of individual approvers from the form. + $approvers["i"] = array(); + if (isset($_POST["indApprovers"])) { + foreach ($_POST["indApprovers"] as $ind) { + $approvers["i"][] = $ind; + } + } + // Retrieve the list of approver groups from the form. + $approvers["g"] = array(); + if (isset($_POST["grpApprovers"])) { + foreach ($_POST["grpApprovers"] as $grp) { + $approvers["g"][] = $grp; + } + } + + // add mandatory reviewers/approvers + $docAccess = $folder->getReadAccessList($settings->_enableAdminRevApp, $settings->_enableOwnerRevApp); + if($settings->_workflowMode == 'traditional') { + $res=$user->getMandatoryReviewers(); + foreach ($res as $r){ + + if ($r['reviewerUserID']!=0){ + foreach ($docAccess["users"] as $usr) + if ($usr->getID()==$r['reviewerUserID']){ + $reviewers["i"][] = $r['reviewerUserID']; + break; + } + } + else if ($r['reviewerGroupID']!=0){ + foreach ($docAccess["groups"] as $grp) + if ($grp->getID()==$r['reviewerGroupID']){ + $reviewers["g"][] = $r['reviewerGroupID']; + break; + } + } + } + } + $res=$user->getMandatoryApprovers(); + foreach ($res as $r){ + + if ($r['approverUserID']!=0){ + foreach ($docAccess["users"] as $usr) + if ($usr->getID()==$r['approverUserID']){ + $approvers["i"][] = $r['approverUserID']; + break; + } + } + else if ($r['approverGroupID']!=0){ + foreach ($docAccess["groups"] as $grp) + if ($grp->getID()==$r['approverGroupID']){ + $approvers["g"][] = $r['approverGroupID']; + break; + } + } + } + } elseif($settings->_workflowMode == 'advanced') { + if(!$workflow = $user->getMandatoryWorkflow()) { + if(isset($_POST["workflow"])) + $workflow = $dms->getWorkflow($_POST["workflow"]); + else + $workflow = null; + } + } + + if(isset($_POST["attributes"]) && $_POST["attributes"]) { + $attributes = $_POST["attributes"]; + foreach($attributes as $attrdefid=>$attribute) { + $attrdef = $dms->getAttributeDefinition($attrdefid); + if($attribute) { + if(!$attrdef->validate($attribute)) { + switch($attrdef->getValidationError()) { + case 5: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_malformed_email", array("attrname"=>$attrdef->getName(), "value"=>$attribute))); + break; + case 4: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_malformed_url", array("attrname"=>$attrdef->getName(), "value"=>$attribute))); + break; + case 3: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_no_regex_match", array("attrname"=>$attrdef->getName(), "value"=>$attribute, "regex"=>$attrdef->getRegex()))); + break; + case 2: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_max_values", array("attrname"=>$attrdef->getName()))); + break; + case 1: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_min_values", array("attrname"=>$attrdef->getName()))); + break; + default: + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); + } + } + /* + if($attrdef->getRegex()) { + if(!preg_match($attrdef->getRegex(), $attribute)) { + UI::exitError(getMLText("document_title", array("documentname" => $folder->getName())),getMLText("attr_no_regex_match")); + } + } + if(is_array($attribute)) { + if($attrdef->getMinValues() > count($attribute)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_min_values", array("attrname"=>$attrdef->getName()))); + } + if($attrdef->getMaxValues() && $attrdef->getMaxValues() < count($attribute)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_max_values", array("attrname"=>$attrdef->getName()))); + } + } + */ + } + } + } else { + $attributes = array(); + } + + $contentResult=$document->checkIn($comment, $user, $reviewers, $approvers, $version=0, $attributes, $workflow); + if (is_bool($contentResult) && !$contentResult) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); + } elseif (is_bool($contentResult) && $contentResult) { + } else { + // Send notification to subscribers. + if ($notifier){ + $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'] = $user->getFullName(); + $params['comment'] = $document->getComment(); + $params['version_comment'] = $contentResult->getContent()->getComment(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['sitename'] = $settings->_siteName; + $params['http_root'] = $settings->_httpRoot; + $notifier->toList($user, $notifyList["users"], $subject, $message, $params); + foreach ($notifyList["groups"] as $grp) { + $notifier->toGroup($user, $grp, $subject, $message, $params); + } + // if user is not owner send notification to owner + if ($user->getID() != $document->getOwner()->getID()) + $notifier->toIndividual($user, $document->getOwner(), $subject, $message, $params); + + if($workflow && $settings->_enableNotificationWorkflow) { + $subject = "request_workflow_action_email_subject"; + $message = "request_workflow_action_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['version'] = $contentResult->getContent()->getVersion(); + $params['workflow'] = $workflow->getName(); + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['current_state'] = $workflow->getInitState()->getName(); + $params['username'] = $user->getFullName(); + $params['sitename'] = $settings->_siteName; + $params['http_root'] = $settings->_httpRoot; + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + + foreach($workflow->getNextTransitions($workflow->getInitState()) as $ntransition) { + foreach($ntransition->getUsers() as $tuser) { + $notifier->toIndividual($user, $tuser->getUser(), $subject, $message, $params); + } + foreach($ntransition->getGroups() as $tuser) { + $notifier->toGroup($user, $tuser->getGroup(), $subject, $message, $params); + } + } + } + } + + $expires = false; + if (!isset($_POST['expires']) || $_POST["expires"] != "false") { + if($_POST["expdate"]) { + $tmp = explode('-', $_POST["expdate"]); + $expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]); + } else { + $expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]); + } + } + + if ($expires) { + if($document->setExpires($expires)) { + if($notifier) { + $notifyList = $document->getNotifyList(); + $folder = $document->getFolder(); + + // Send notification to subscribers. + $subject = "expiry_changed_email_subject"; + $message = "expiry_changed_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['sitename'] = $settings->_siteName; + $params['http_root'] = $settings->_httpRoot; + $notifier->toList($user, $notifyList["users"], $subject, $message, $params); + foreach ($notifyList["groups"] as $grp) { + $notifier->toGroup($user, $grp, $subject, $message, $params); + } + } + } else { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); + } + } + } + +add_log_line("?documentid=".$documentid); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + +?> + diff --git a/op/op.CheckOutDocument.php b/op/op.CheckOutDocument.php new file mode 100644 index 000000000..0004ed832 --- /dev/null +++ b/op/op.CheckOutDocument.php @@ -0,0 +1,66 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_GET["documentid"]; +$document = $dms->getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if(!$settings->_checkOutDir) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("checkout_is_disabled")); +} + +if ($document->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if ($document->isLocked()) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("document_already_locked")); +} + +if ($document->isCheckedOut()) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("document_already_checkedout")); +} + +if (!$document->checkOut($user, sprintf($settings->_checkOutDir.'/', preg_replace('/[^A-Za-z0-9_-]/', '', $user->getLogin())))) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); +} + +$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_document_checkedout'))); + +add_log_line(); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + +?> + diff --git a/out/out.CheckInDocument.php b/out/out.CheckInDocument.php new file mode 100644 index 000000000..418d7a1d7 --- /dev/null +++ b/out/out.CheckInDocument.php @@ -0,0 +1,73 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} +$document = $dms->getDocument($_GET["documentid"]); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_READWRITE) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); +} + +if($document->isLocked()) { + $lockingUser = $document->getLockingUser(); + if (($lockingUser->getID() != $user->getID()) && ($document->getAccessMode($user) != M_ALL)) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("lock_message", array("email" => $lockingUser->getEmail(), "username" => htmlspecialchars($lockingUser->getFullName())))); + } +} + +if(!$document->isCheckedOut()) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("document_not_checkedout")); +} + +if($settings->_quota > 0) { + $remain = checkQuota($user); + if ($remain < 0) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("quota_exceeded", array('bytes'=>SeedDMS_Core_File::format_filesize(abs($remain))))); + } +} + +$folder = $document->getFolder(); + +/* Create object for checking access to certain operations */ +$accessop = new SeedDMS_AccessOperation($document, $user, $settings); + +$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); +$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'strictformcheck'=>$settings->_strictFormCheck, 'enablelargefileupload'=>$settings->_enableLargeFileUpload, 'enableadminrevapp'=>$settings->_enableAdminRevApp, 'enableownerrevapp'=>$settings->_enableOwnerRevApp, 'enableselfrevapp'=>$settings->_enableSelfRevApp, 'dropfolderdir'=>$settings->_dropFolderDir, 'workflowmode'=>$settings->_workflowMode, 'presetexpiration'=>$settings->_presetExpirationDate)); +if($view) { + $view->setParam('accessobject', $accessop); + $view->show(); + exit; +} + +?> diff --git a/views/bootstrap/class.CheckInDocument.php b/views/bootstrap/class.CheckInDocument.php new file mode 100644 index 000000000..761bf0a3b --- /dev/null +++ b/views/bootstrap/class.CheckInDocument.php @@ -0,0 +1,544 @@ + + * @copyright Copyright (C) 2015 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for Document view + * + * @category DMS + * @package SeedDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2015 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_View_CheckInDocument extends SeedDMS_Bootstrap_Style { + + function __takeOverButton($name, $users) { /* {{{ */ +?> + "> + +params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $strictformcheck = $this->params['strictformcheck']; + $enablelargefileupload = $this->params['enablelargefileupload']; + $enableadminrevapp = $this->params['enableadminrevapp']; + $enableownerrevapp = $this->params['enableownerrevapp']; + $enableselfrevapp = $this->params['enableselfrevapp']; + $dropfolderdir = $this->params['dropfolderdir']; + $workflowmode = $this->params['workflowmode']; + $presetexpiration = $this->params['presetexpiration']; + $documentid = $document->getId(); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); + $this->contentHeading(getMLText("checkin_document")); +?> + + + +isLocked()) { + + $lockingUser = $document->getLockingUser(); + + print "
    "; + + printMLText("update_locked_msg", array("username" => htmlspecialchars($lockingUser->getFullName()), "email" => $lockingUser->getEmail())); + + if ($lockingUser->getID() == $user->getID()) + printMLText("unlock_cause_locking_user"); + else if ($document->getAccessMode($user) == M_ALL) + printMLText("unlock_cause_access_mode_all"); + else + { + printMLText("no_update_cause_locked"); + print "
    "; + $this->htmlEndPage(); + exit; + } + + print "
    "; + } + + if ($checkoutstatus = $document->checkOutStatus()) { + switch($checkoutstatus) { + case 1: + print "
    "; + printMLText("checkedout_file_has_disappeared"); + print "
    "; + break; + case 2: + print "
    "; + printMLText("checkedout_file_has_different_version"); + print "
    "; + break; + case 3: + print "
    "; + printMLText("checkedout_file_is_unchanged"); + print "
    "; + break; + } + } + + $latestContent = $document->getLatestContent(); + $reviewStatus = $latestContent->getReviewStatus(); + $approvalStatus = $latestContent->getApprovalStatus(); + if($workflowmode == 'advanced') { + if($status = $latestContent->getStatus()) { + if($status["status"] == S_IN_WORKFLOW) { + $this->warningMsg("The current version of this document is in a workflow. This will be interrupted and cannot be completed if you upload a new version."); + } + } + } + + $this->contentContainerStart(); +?> + + + + + + + + + + + + + + +getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_all)); + if($attrdefs) { + foreach($attrdefs as $attrdef) { +?> + + + + +getReadAccessList($enableadminrevapp, $enableownerrevapp); + if($workflowmode != 'traditional_only_approval') { +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    : + +
    : + + + +
    + +
    getName()); ?>:printAttributeEditField($attrdef, '') ?>
    + contentSubHeading(getMLText("assign_reviewers")); ?> +
    +
    :
    +
    + +__takeOverButton("IndReviewer", $tmp); + } + /* List all mandatory reviewers */ + if($res) { + $tmp = array(); + foreach ($res as $r) { + if($r['reviewerUserID'] > 0) { + $u = $dms->getUser($r['reviewerUserID']); + $tmp[] = htmlspecialchars($u->getFullName().' ('.$u->getLogin().')'); + } + } + if($tmp) { + echo '
    '.getMLText('mandatory_reviewers').': '; + echo implode(', ', $tmp); + echo "
    \n"; + } + } + /* Check for mandatory reviewer without access */ + foreach($res as $r) { + if($r['reviewerUserID']) { + $hasAccess = false; + foreach ($docAccess["users"] as $usr) { + if ($r['reviewerUserID']==$usr->getID()) + $hasAccess = true; + } + if(!$hasAccess) { + $noAccessUser = $dms->getUser($r['reviewerUserID']); + echo "
    ".getMLText("mandatory_reviewer_no_access", array('user'=>htmlspecialchars($noAccessUser->getFullName()." (".$noAccessUser->getLogin().")")))."
    "; + } + } + } +?> +
    +
    :
    +
    + + 0) { + $u = $dms->getGroup($r['reviewerGroupID']); + $tmp[] = htmlspecialchars($u->getName()); + } + } + if($tmp) { + echo '
    '.getMLText('mandatory_reviewergroups').': '; + echo implode(', ', $tmp); + echo "
    \n"; + } + } + + /* Check for mandatory reviewer group without access */ + foreach($res as $r) { + if ($r['reviewerGroupID']) { + $hasAccess = false; + foreach ($docAccess["groups"] as $grp) { + if ($r['reviewerGroupID']==$grp->getID()) + $hasAccess = true; + } + if(!$hasAccess) { + $noAccessGroup = $dms->getGroup($r['reviewerGroupID']); + echo "
    ".getMLText("mandatory_reviewergroup_no_access", array('group'=>htmlspecialchars($noAccessGroup->getName())))."
    "; + } + } + } +?> +
    + contentSubHeading(getMLText("assign_approvers")); ?> +
    +
    :
    +
    + +__takeOverButton("IndApprover", $tmp); + } + /* List all mandatory approvers */ + if($res) { + $tmp = array(); + foreach ($res as $r) { + if($r['approverUserID'] > 0) { + $u = $dms->getUser($r['approverUserID']); + $tmp[] = htmlspecialchars($u->getFullName().' ('.$u->getLogin().')'); + } + } + if($tmp) { + echo '
    '.getMLText('mandatory_approvers').': '; + echo implode(', ', $tmp); + echo "
    \n"; + } + } + + /* Check for mandatory approvers without access */ + foreach($res as $r) { + if($r['approverUserID']) { + $hasAccess = false; + foreach ($docAccess["users"] as $usr) { + if ($r['approverUserID']==$usr->getID()) + $hasAccess = true; + } + if(!$hasAccess) { + $noAccessUser = $dms->getUser($r['approverUserID']); + echo "
    ".getMLText("mandatory_approver_no_access", array('user'=>htmlspecialchars($noAccessUser->getFullName()." (".$noAccessUser->getLogin().")")))."
    "; + } + } + } +?> +
    +
    :
    +
    + +__takeOverButton("GrpApprover", $tmp); + } + /* List all mandatory groups of approvers */ + if($res) { + $tmp = array(); + foreach ($res as $r) { + if($r['approverGroupID'] > 0) { + $u = $dms->getGroup($r['approverGroupID']); + $tmp[] = htmlspecialchars($u->getName()); + } + } + if($tmp) { + echo '
    '.getMLText('mandatory_approvergroups').': '; + echo implode(', ', $tmp); + echo "
    \n"; + } + } + + /* Check for mandatory approver groups without access */ + foreach($res as $r) { + if ($r['approverGroupID']) { + $hasAccess = false; + foreach ($docAccess["groups"] as $grp) { + if ($r['approverGroupID']==$grp->getID()) + $hasAccess = true; + } + if(!$hasAccess) { + $noAccessGroup = $dms->getGroup($r['approverGroupID']); + echo "
    ".getMLText("mandatory_approvergroup_no_access", array('group'=>htmlspecialchars($noAccessGroup->getName())))."
    "; + } + } + } +?> +
    +
    :
    +
    +getMandatoryWorkflow(); + if($mandatoryworkflow) { +?> + getName(); ?> + + + + +
    + warningMsg(getMLText("add_doc_workflow_warning")); ?> +
    ">
    +
    + +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> diff --git a/views/bootstrap/class.CheckOutSummary.php b/views/bootstrap/class.CheckOutSummary.php new file mode 100644 index 000000000..372f8af4b --- /dev/null +++ b/views/bootstrap/class.CheckOutSummary.php @@ -0,0 +1,144 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for CheckOutSummary view + * + * @category DMS + * @package SeedDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_View_CheckOutSummary extends SeedDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + + $this->htmlStartPage(getMLText("my_documents")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("my_documents"), "my_documents"); + + $this->contentHeading(getMLText("checkout_summary")); + $this->contentContainerStart(); + + // Get document list for the current user. + $receiptStatus = $user->getReceiptStatus(); + + // reverse order + $receiptStatus["indstatus"]=array_reverse($receiptStatus["indstatus"],true); + $receiptStatus["grpstatus"]=array_reverse($receiptStatus["grpstatus"],true); + + $printheader=true; + $iRev = array(); + foreach ($receiptStatus["indstatus"] as $st) { + $document = $dms->getDocument($st['documentID']); + if($document) + $version = $document->getContentByVersion($st['version']); + $owner = $document->getOwner(); + $moduser = $dms->getUser($st['required']); + + if ($document && $version) { + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + if ($st["status"]!=-2) { + $iRev[] = $st["documentID"]; + } + } + if (!$printheader) { + echo "\n
    ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    ".htmlspecialchars($document->getName())."".htmlspecialchars($owner->getFullName())."".getOverallStatusText($st["status"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($moduser->getFullName()) ."".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."
    "; + } else { + printMLText("no_docs_to_receipt"); + } + + $this->contentContainerEnd(); + $this->contentHeading(getMLText("group_receipt_summary")); + $this->contentContainerStart(); + + $printheader=true; + foreach ($receiptStatus["grpstatus"] as $st) { + $document = $dms->getDocument($st['documentID']); + if($document) + $version = $document->getContentByVersion($st['version']); + $owner = $document->getOwner(); + $modgroup = $dms->getGroup($st['required']); + + if (!in_array($st["documentID"], $iRev) && $document && $version) { + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + } + if (!$printheader) { + echo "\n
    ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    ".htmlspecialchars($document->getName())."".htmlspecialchars($owner->getFullName())."".getOverallStatusText($st["status"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($modgroup->getName()) ."".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."
    "; + }else{ + printMLText("empty_notify_list"); + } + + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> From 61294336b506e5dabc358bba4ea3cf826fcf30f5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Apr 2015 17:24:58 +0200 Subject: [PATCH 0037/2006] add missing files for listing of documents need to be watch at --- out/out.ReceiptSummary.php | 41 +++++++ views/bootstrap/class.ReceiptSummary.php | 146 +++++++++++++++++++++++ 2 files changed, 187 insertions(+) create mode 100644 out/out.ReceiptSummary.php create mode 100644 views/bootstrap/class.ReceiptSummary.php diff --git a/out/out.ReceiptSummary.php b/out/out.ReceiptSummary.php new file mode 100644 index 000000000..0a7bd144f --- /dev/null +++ b/out/out.ReceiptSummary.php @@ -0,0 +1,41 @@ +isGuest()) { + UI::exitError(getMLText("my_documents"),getMLText("access_denied")); +} + +$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); +$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); +if($view) { + $view->show(); + exit; +} + +?> diff --git a/views/bootstrap/class.ReceiptSummary.php b/views/bootstrap/class.ReceiptSummary.php new file mode 100644 index 000000000..2576ff3ea --- /dev/null +++ b/views/bootstrap/class.ReceiptSummary.php @@ -0,0 +1,146 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for ReceiptSummary view + * + * @category DMS + * @package SeedDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_View_ReceiptSummary extends SeedDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + + $this->htmlStartPage(getMLText("my_documents")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("my_documents"), "my_documents"); + + $this->contentHeading(getMLText("receipt_summary")); + $this->contentContainerStart(); + + // TODO: verificare scadenza + + // Get document list for the current user. + $receiptStatus = $user->getReceiptStatus(); + + // reverse order + $receiptStatus["indstatus"]=array_reverse($receiptStatus["indstatus"],true); + $receiptStatus["grpstatus"]=array_reverse($receiptStatus["grpstatus"],true); + + $printheader=true; + $iRev = array(); + foreach ($receiptStatus["indstatus"] as $st) { + $document = $dms->getDocument($st['documentID']); + if($document) + $version = $document->getContentByVersion($st['version']); + $owner = $document->getOwner(); + $moduser = $dms->getUser($st['required']); + + if ($document && $version) { + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + if ($st["status"]!=-2) { + $iRev[] = $st["documentID"]; + } + } + if (!$printheader) { + echo "\n
    ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    ".htmlspecialchars($document->getName())."".htmlspecialchars($owner->getFullName())."".getOverallStatusText($st["status"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($moduser->getFullName()) ."".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."
    "; + } else { + printMLText("no_docs_to_receipt"); + } + + $this->contentContainerEnd(); + $this->contentHeading(getMLText("group_receipt_summary")); + $this->contentContainerStart(); + + $printheader=true; + foreach ($receiptStatus["grpstatus"] as $st) { + $document = $dms->getDocument($st['documentID']); + if($document) + $version = $document->getContentByVersion($st['version']); + $owner = $document->getOwner(); + $modgroup = $dms->getGroup($st['required']); + + if (!in_array($st["documentID"], $iRev) && $document && $version) { + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + + print "\n"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + } + if (!$printheader) { + echo "\n
    ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    ".htmlspecialchars($document->getName())."".htmlspecialchars($owner->getFullName())."".getOverallStatusText($st["status"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($modgroup->getName()) ."".(!$document->expires() ? "-":getReadableDate($document->getExpires()))."
    "; + }else{ + printMLText("empty_notify_list"); + } + + + $this->contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> From 107f96e921971e9487e08cda15d97e51e82a2133 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Apr 2015 11:24:42 +0200 Subject: [PATCH 0038/2006] add method getDocumentList() it returns a list of database records with all the information currently needed on the MyDocuments page. --- SeedDMS_Core/Core/inc.ClassDMS.php | 145 ++++++++++++++++++++++++++++- 1 file changed, 143 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 0dfb4925f..cbf7462d4 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -514,8 +514,6 @@ class SeedDMS_Core_DMS { /** * Returns all documents locked by a given user - * FIXME: Not full implemented. Do not use, because it still requires the - * temporary tables! * * @param object $user * @return array list of documents @@ -582,6 +580,149 @@ class SeedDMS_Core_DMS { return $version; } /* }}} */ + /** + * Returns all documents with a predefined search criteria + * + * The records return have the following elements + * + * From Table tblDocuments + * [id] => id of document + * [name] => name of document + * [comment] => comment of document + * [date] => timestamp of creation date of document + * [expires] => timestamp of expiration date of document + * [owner] => user id of owner + * [folder] => id of parent folder + * [folderList] => column separated list of folder ids, e.g. :1:41: + * [inheritAccess] => 1 if access is inherited + * [defaultAccess] => default access mode + * [locked] => always -1 (TODO: is this field still used?) + * [keywords] => keywords of document + * [sequence] => sequence of document + * + * From Table tblDocumentLocks + * [lockUser] => id of user locking the document + * + * From Table tblDocumentStatusLog + * [version] => latest version of document + * [statusID] => id of latest status log + * [documentID] => id of document + * [status] => current status of document + * [statusComment] => comment of current status + * [statusDate] => datetime when the status was entered, e.g. 2014-04-17 21:35:51 + * [userID] => id of user who has initiated the status change + * + * From Table tblUsers + * [ownerName] => name of owner of document + * [statusName] => name of user who has initiated the status change + * + * @param string $listtype type of document list, can be 'AppRevByMe', + * 'AppRevOwner', 'LockedByMe', 'MyDocs' + * @param object $param1 user + * @param string $param2 sort list if listtype='MyDocs' + * @return array list of documents + */ + function getDocumentList($listtype, $param1=null, $param2='') { /* {{{ */ + /* The following query will get all documents and lots of additional + * information. It requires the two temporary tables ttcontentid and + * ttstatid. + */ + if (!$this->db->createTemporaryTable("ttstatid") || !$this->db->createTemporaryTable("ttcontentid")) { + return false; + } + $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". + "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". + "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". + "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". + "FROM `tblDocumentContent` ". + "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". + "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". + "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". + "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". + "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". + "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". + "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". + "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". + "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` "; + + switch($listtype) { + case 'AppRevByMe': // Documents I have to review/approve + $user = $param1; + // Get document list for the current user. + $reviewStatus = $user->getReviewStatus(); + $approvalStatus = $user->getApprovalStatus(); + + // Create a comma separated list of all the documentIDs whose information is + // required. + $dList = array(); + foreach ($reviewStatus["indstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + foreach ($reviewStatus["grpstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + foreach ($approvalStatus["indstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + foreach ($approvalStatus["grpstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + $docCSV = ""; + foreach ($dList as $d) { + $docCSV .= (strlen($docCSV)==0 ? "" : ", ")."'".$d."'"; + } + + if (strlen($docCSV)>0) { + $queryStr .= "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.", ".S_EXPIRED.") ". + "AND `tblDocuments`.`id` IN (" . $docCSV . ") ". + "ORDER BY `statusDate` DESC"; + } else { + $queryStr = ''; + } + break; + case 'AppRevOwner': // Documents waiting for review/approval I'm owning + $user = $param1; + $queryStr .= "AND `tblDocuments`.`owner` = '".$user->getID()."' ". + "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.") ". + "ORDER BY `statusDate` DESC"; + break; + case 'LockedByMe': // Documents locked by me + $user = $param1; + $queryStr .= "AND `tblDocumentLocks`.`userID` = '".$user->getID()."' ". + "ORDER BY `statusDate` DESC"; + break; + case 'MyDocs': // Documents owned by me + $user = $param1; + $orderby = $param2; + $queryStr .= "AND `tblDocuments`.`owner` = '".$user->getID()."' "; + if ($orderby=='e') $queryStr .= "ORDER BY `expires`"; + else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`"; + else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; + else $queryStr .= "ORDER BY `name`"; + break; + } + + if($queryStr) { + $resArr = $this->db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) { + return false; + } + } else { + return array(); + } + + return $resArr; + } /* }}} */ + function makeTimeStamp($hour, $min, $sec, $year, $month, $day) { /* {{{ */ $thirtyone = array (1, 3, 5, 7, 8, 10, 12); $thirty = array (4, 6, 9, 11); From 1afd3102abdafdc780b81085d54927b7ae486fbc Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Apr 2015 11:26:00 +0200 Subject: [PATCH 0039/2006] fix parameter definition in comment --- SeedDMS_Core/Core/inc.ClassDocument.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index bab3e8197..13b77d967 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -673,7 +673,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ /** * Get checkout info for document * - * @return boolean true if locked otherwise false + * @return array/boolean record from table tblDocumentCheckOuts or false + * in case of an error. */ function getCheckOutInfo() { /* {{{ */ $db = $this->_dms->getDB(); From 505763e0be8f3fe7012e99c377f0efb453b55225 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Apr 2015 11:26:25 +0200 Subject: [PATCH 0040/2006] use new SeedDMS_Core_DMS::getDocumentList() method --- views/bootstrap/class.MyDocuments.php | 175 +++++--------------------- 1 file changed, 29 insertions(+), 146 deletions(-) diff --git a/views/bootstrap/class.MyDocuments.php b/views/bootstrap/class.MyDocuments.php index 3b05e95fa..fa1a810d0 100644 --- a/views/bootstrap/class.MyDocuments.php +++ b/views/bootstrap/class.MyDocuments.php @@ -58,75 +58,29 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { } if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { + // Get document list for the current user. $reviewStatus = $user->getReviewStatus(); $approvalStatus = $user->getApprovalStatus(); - - // Create a comma separated list of all the documentIDs whose information is - // required. - $dList = array(); - foreach ($reviewStatus["indstatus"] as $st) { - if (!in_array($st["documentID"], $dList)) { - $dList[] = $st["documentID"]; - } - } - foreach ($reviewStatus["grpstatus"] as $st) { - if (!in_array($st["documentID"], $dList)) { - $dList[] = $st["documentID"]; - } - } - foreach ($approvalStatus["indstatus"] as $st) { - if (!in_array($st["documentID"], $dList)) { - $dList[] = $st["documentID"]; - } - } - foreach ($approvalStatus["grpstatus"] as $st) { - if (!in_array($st["documentID"], $dList)) { - $dList[] = $st["documentID"]; - } - } - $docCSV = ""; - foreach ($dList as $d) { - $docCSV .= (strlen($docCSV)==0 ? "" : ", ")."'".$d."'"; - } - - if (strlen($docCSV)>0) { - // Get the document information. - $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". - "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". - "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". - "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". - "FROM `tblDocumentContent` ". - "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". - "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". - "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". - "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". - "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". - "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". - "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". - "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". - "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". - "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` ". - "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.", ".S_EXPIRED.") ". - "AND `tblDocuments`.`id` IN (" . $docCSV . ") ". - "ORDER BY `statusDate` DESC"; - $resArr = $db->getResultArray($queryStr); - if (is_bool($resArr) && !$resArr) { - $this->contentHeading(getMLText("warning")); - $this->contentContainer(getMLText("internal_error_exit")); - $this->htmlEndPage(); - exit; - } - - // Create an array to hold all of these results, and index the array by - // document id. This makes it easier to retrieve document ID information - // later on and saves us having to repeatedly poll the database every time - // new document information is required. + $resArr = $dms->getDocumentList('AppRevByMe', $user); + if (is_bool($resArr) && !$resArr) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer(getMLText("internal_error_exit")); + $this->htmlEndPage(); + exit; + } + if($resArr) { + /* Create an array to hold all of these results, and index the array + * by document id. This makes it easier to retrieve document ID + * information later on and saves us having to repeatedly poll the + * database every time + * new document information is required. + */ $docIdx = array(); foreach ($resArr as $res) { - // verify expiry + /* verify expiry */ if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ $res["status"]=S_EXPIRED; @@ -136,7 +90,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { $docIdx[$res["id"]][$res["version"]] = $res; } - // List the documents where a review has been requested. + // List the documents for which a review has been requested. if($workflowmode == 'traditional') { $this->contentHeading(getMLText("documents_to_review")); $this->contentContainerStart(); @@ -225,7 +179,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { $this->contentContainerEnd(); } - // List the documents where an approval has been requested. + // List the documents for which an approval has been requested. $this->contentHeading(getMLText("documents_to_approve")); $this->contentContainerStart(); $printheader=true; @@ -320,31 +274,13 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { $this->contentContainerEnd(); } - // Get list of documents owned by current user that are pending review or - // pending approval. - $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". - "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". - "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". - "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". - "FROM `tblDocumentContent` ". - "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". - "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". - "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". - "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". - "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". - "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". - "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". - "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". - "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". - "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` ". - "AND `tblDocuments`.`owner` = '".$user->getID()."' ". - "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.") ". - "ORDER BY `statusDate` DESC"; - - $resArr = $db->getResultArray($queryStr); + /* Get list of documents owned by current user that are + * pending review or pending approval. + */ + $resArr = $dms->getDocumentList('AppRevOwner', $user); if (is_bool($resArr) && !$resArr) { $this->contentHeading(getMLText("warning")); - $this->contentContainer("Internal error. Unable to complete request. Exiting."); + $this->contentContainer(getMLText("internal_error_exit")); $this->htmlEndPage(); exit; } @@ -398,29 +334,11 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { $this->contentContainerEnd(); } - // Get list of documents locked by current user - $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". - "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". - "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". - "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". - "FROM `tblDocumentContent` ". - "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". - "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". - "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". - "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". - "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". - "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". - "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". - "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". - "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". - "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` ". - "AND `tblDocumentLocks`.`userID` = '".$user->getID()."' ". - "ORDER BY `statusDate` DESC"; - - $resArr = $db->getResultArray($queryStr); + /* Get list of documents locked by current user */ + $resArr = $dms->getDocumentList('LockedByMe', $user); if (is_bool($resArr) && !$resArr) { $this->contentHeading(getMLText("warning")); - $this->contentContainer("Internal error. Unable to complete request. Exiting."); + $this->contentContainer(getMLText("internal_error_exit")); $this->htmlEndPage(); exit; } @@ -476,50 +394,15 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { } else { - // Get list of documents owned by current user - if (!$db->createTemporaryTable("ttstatid")) { - $this->contentHeading(getMLText("warning")); - $this->contentContainer(getMLText("internal_error_exit")); - $this->htmlEndPage(); - exit; - } - - if (!$db->createTemporaryTable("ttcontentid")) { - $this->contentHeading(getMLText("warning")); - $this->contentContainer(getMLText("internal_error_exit")); - $this->htmlEndPage(); - exit; - } - $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". - "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". - "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". - "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". - "FROM `tblDocumentContent` ". - "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". - "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". - "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". - "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". - "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". - "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". - "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". - "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". - "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". - "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` ". - "AND `tblDocuments`.`owner` = '".$user->getID()."' "; - - if ($orderby=='e') $queryStr .= "ORDER BY `expires`"; - else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`"; - else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; - else $queryStr .= "ORDER BY `name`"; - - $resArr = $db->getResultArray($queryStr); + /* Get list of documents owned by current user */ + $resArr = $dms->getDocumentList('MyDocs', $user, $orderby); if (is_bool($resArr) && !$resArr) { $this->contentHeading(getMLText("warning")); $this->contentContainer(getMLText("internal_error_exit")); $this->htmlEndPage(); exit; } - + $this->contentHeading(getMLText("all_documents")); $this->contentContainerStart(); From 8b065cf7aca044d9d7457117f401cd759e86b169 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Apr 2015 11:48:01 +0200 Subject: [PATCH 0041/2006] propperly clean checked out file in possible cases previously the checked out file was not remove from the checkout area if it was unchanged and checked in --- SeedDMS_Core/Core/inc.ClassDocument.php | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 13b77d967..cae9a69cb 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -783,15 +783,22 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $checksum = SeedDMS_Core_File::checksum($info['filename']); if($checksum != $lc->getChecksum()) { $content = $this->addContent($comment, $user, $info['filename'], $lc->getOriginalFileName(), $lc->getFileType(), $lc->getMimeType(), $reviewers, $approvers, $version, $attributes, $workflow); - if($content && !$this->_dms->forceRename) - SeedDMS_Core_File::removeFile($info['filename']); + if($content) { + if(!$this->_dms->forceRename) { + SeedDMS_Core_File::removeFile($info['filename']); + } + $queryStr = "DELETE FROM tblDocumentCheckOuts WHERE document = ".$this->_id; + $db->getResult($queryStr); + return $content; + } else { + return false; + } + } else { + SeedDMS_Core_File::removeFile($info['filename']); + $queryStr = "DELETE FROM tblDocumentCheckOuts WHERE document = ".$this->_id; + $db->getResult($queryStr); + return true; } - - $queryStr = "DELETE FROM tblDocumentCheckOuts WHERE document = ".$this->_id; - $db->getResult($queryStr); - - return $content; - } /* }}} */ /** From c0ba8a6711daf22e077cff9e210efef8f322c5f5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Apr 2015 11:49:05 +0200 Subject: [PATCH 0042/2006] create checkout dir if required and allowed in the settings --- op/op.CheckOutDocument.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/op/op.CheckOutDocument.php b/op/op.CheckOutDocument.php index 0004ed832..aa1f73e25 100644 --- a/op/op.CheckOutDocument.php +++ b/op/op.CheckOutDocument.php @@ -53,7 +53,15 @@ if ($document->isCheckedOut()) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("document_already_checkedout")); } -if (!$document->checkOut($user, sprintf($settings->_checkOutDir.'/', preg_replace('/[^A-Za-z0-9_-]/', '', $user->getLogin())))) { +$checkoutpath = sprintf($settings->_checkOutDir.'/', preg_replace('/[^A-Za-z0-9_-]/', '', $user->getLogin())); +if(!file_exists($checkoutpath) && $settings->_createCheckOutDir) { + SeedDMS_Core_File::makeDir($checkoutpath); +} +if(!file_exists($checkoutpath)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("checkoutpath_does_not_exist")); +} + +if (!$document->checkOut($user, $checkoutpath)) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); } From 4b6eeba319835b0255d0730a506ca105061e9c62 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Apr 2015 16:43:19 +0200 Subject: [PATCH 0043/2006] add list of documents checked out by me in getDocumentList() --- SeedDMS_Core/Core/inc.ClassDMS.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index cbf7462d4..bb56c8491 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -709,6 +709,26 @@ class SeedDMS_Core_DMS { else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; else $queryStr .= "ORDER BY `name`"; break; + case 'CheckedOutByMe': // Documents I have checked out + $user = $param1; + + $qs = 'SELECT document FROM tblDocumentCheckOuts WHERE userID='.$user->getID(); + $ra = $this->db->getResultArray($qs); + if (is_bool($ra) && !$ra) { + return false; + } + $docs = array(); + foreach($ra as $d) { + $docs[] = $d['document']; + } + + if ($docs) { + $queryStr .= "AND `tblDocuments`.`id` IN (" . implode(',', $docs) . ") ". + "ORDER BY `statusDate` DESC"; + } else { + $queryStr = ''; + } + break; } if($queryStr) { From 0bac3deabbcb14a4b5e05b7017902cbd8cc96407 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Apr 2015 16:44:16 +0200 Subject: [PATCH 0044/2006] show message and hide form if document cannot be checked in --- views/bootstrap/class.CheckInDocument.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.CheckInDocument.php b/views/bootstrap/class.CheckInDocument.php index 761bf0a3b..daba7eb15 100644 --- a/views/bootstrap/class.CheckInDocument.php +++ b/views/bootstrap/class.CheckInDocument.php @@ -144,6 +144,9 @@ function checkForm() break; } } + $checkoutinfo = $document->getCheckOutInfo(); + + if($checkoutstatus == 0) { $latestContent = $document->getLatestContent(); $reviewStatus = $latestContent->getReviewStatus(); @@ -531,13 +534,20 @@ function checkForm() ?> - "> + "> contentContainerEnd(); + } else { +?> +
    + + "> +htmlEndPage(); } /* }}} */ } From 5952d497114861eab35121001ec1f790736bdcbf Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Apr 2015 16:44:55 +0200 Subject: [PATCH 0045/2006] add list of documents check out by me --- views/bootstrap/class.MyDocuments.php | 61 ++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.MyDocuments.php b/views/bootstrap/class.MyDocuments.php index fa1a810d0..da1b19ed4 100644 --- a/views/bootstrap/class.MyDocuments.php +++ b/views/bootstrap/class.MyDocuments.php @@ -388,9 +388,66 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { } else printMLText("no_docs_locked"); - + $this->contentContainerEnd(); - + + /* Get list of documents checked out by current user */ + $resArr = $dms->getDocumentList('CheckedOutByMe', $user); + if (is_bool($resArr) && !$resArr) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer(getMLText("internal_error_exit")); + $this->htmlEndPage(); + exit; + } + + $this->contentHeading(getMLText("documents_checked_out_by_you")); + $this->contentContainerStart(); + if (count($resArr)>0) { + + print ""; + print "\n\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach ($resArr as $res) { + $document = $dms->getDocument($res["documentID"]); + + // verify expiry + if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ + if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ + $res["status"]=S_EXPIRED; + } + } + + print "\n"; + $latestContent = $document->getLatestContent(); + $previewer->createPreview($latestContent); + print ""; + print "\n"; + print ""; + print ""; + print ""; + print ""; + print "\n"; + } + print "
    ".getMLText("name")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    "; + if($previewer->hasPreview($latestContent)) { + print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } else { + print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } + print "" . htmlspecialchars($res["name"]) . "".getOverallStatusText($res["status"])."".$res["version"]."".$res["statusDate"]." ".htmlspecialchars($res["statusName"])."".(!$res["expires"] ? "-":getReadableDate($res["expires"]))."
    "; + + } + else printMLText("no_docs_checked_out"); + + $this->contentContainerEnd(); + } else { From 91f7d8dfc3b55dd806a376c58b9a013455d2075f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Apr 2015 16:45:19 +0200 Subject: [PATCH 0046/2006] show warning if document is checked out --- views/bootstrap/class.UpdateDocument.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index 479d64c84..1e1adbb93 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -145,6 +145,12 @@ function checkForm() $msg .= "

    ".sprintf(getMLText('link_alt_updatedocument'), "out.AddMultiDocument.php?folderid=".$folder->getID()."&showtree=".showtree())."

    "; } $this->warningMsg($msg); + + if ($document->isCheckedOut()) { + $msg = getMLText('document_is_checked_out'); + $this->warningMsg($msg); + } + $this->contentContainerStart(); ?> From 0b57325c042361c9b527ef3af33d1eea257cd0bb Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Apr 2015 17:12:08 +0200 Subject: [PATCH 0047/2006] fix take over of approvers/reviewers from previous version --- views/bootstrap/class.UpdateDocument.php | 90 ++++++++++++++---------- 1 file changed, 53 insertions(+), 37 deletions(-) diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index 1e1adbb93..7969eb664 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -242,14 +242,18 @@ function checkForm()
    :
    - + __takeOverButton("GrpReviewer", $tmp); + } /* List all mandatory groups of reviewers */ if($res) { $tmp = array(); @@ -381,14 +389,18 @@ function checkForm() Date: Sat, 25 Apr 2015 20:49:13 +0200 Subject: [PATCH 0048/2006] no need to create temp table ttstatid anymore --- views/bootstrap/class.MyDocuments.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/views/bootstrap/class.MyDocuments.php b/views/bootstrap/class.MyDocuments.php index da1b19ed4..ebe6fb90d 100644 --- a/views/bootstrap/class.MyDocuments.php +++ b/views/bootstrap/class.MyDocuments.php @@ -50,13 +50,6 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { if ($showInProcess){ - if (!$db->createTemporaryTable("ttstatid") || !$db->createTemporaryTable("ttcontentid")) { - $this->contentHeading(getMLText("warning")); - $this->contentContainer(getMLText("internal_error_exit")); - $this->htmlEndPage(); - exit; - } - if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { // Get document list for the current user. From 654d8ac75a665fee7d2a82ecfd66b95fc15fd6f5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 25 Apr 2015 20:49:47 +0200 Subject: [PATCH 0049/2006] add parameter $version to documentListRow() in order to show a specific version --- views/bootstrap/class.Bootstrap.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 5f7e0b616..d875e5c92 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1482,7 +1482,7 @@ $('#delete-folder-btn-".$folderid."').popover({ * @param object $previewer * @param boolean $skipcont set to true if embrasing tr shall be skipped */ - function documentListRow($document, $previewer, $skipcont=false) { /* {{{ */ + function documentListRow($document, $previewer, $skipcont=false, $version=0) { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $showtree = $this->params['showtree']; @@ -1500,7 +1500,12 @@ $('#delete-folder-btn-".$folderid."').popover({ if(!$skipcont) $content .= ""; - if($latestContent = $document->getLatestContent()) { + if($version) + $latestContent = $document->getContentByVersion($version); + else + $latestContent = $document->getLatestContent(); + + if($latestContent) { $previewer->createPreview($latestContent); $version = $latestContent->getVersion(); $status = $latestContent->getStatus(); From d04786884beddf6b8f6b650a54303205c3764fba Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Apr 2015 08:16:50 +0200 Subject: [PATCH 0050/2006] add tables for tranmittals --- install/create_tables-innodb.sql | 35 +++++++++++++++++++++++++++++++ install/create_tables-sqlite3.sql | 30 ++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) diff --git a/install/create_tables-innodb.sql b/install/create_tables-innodb.sql index 9202b712a..c88ae3310 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -779,6 +779,41 @@ CREATE TABLE tblWorkflowMandatoryWorkflow ( -- -------------------------------------------------------- +-- +-- Table structure for transmittal +-- + +CREATE TABLE `tblTransmittals` ( + `id` int(11) NOT NULL auto_increment, + `name` text NOT NULL, + `comment` text NOT NULL, + `userID` int(11) NOT NULL default '0', + `date` datetime, + `public` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`id`), + CONSTRAINT `tblTransmittals_user` FOREIGN KEY (`userID`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- -------------------------------------------------------- + +-- +-- Table structure for transmittal item +-- + +CREATE TABLE `tblTransmittalItems` ( + `id` int(11) NOT NULL auto_increment, + `transmittal` int(11) NOT NULL DEFAULT '0', + `document` int(11) default NULL, + `version` smallint(5) unsigned NOT NULL default '0', + `date` datetime, + PRIMARY KEY (`id`), + UNIQUE (document, version), + CONSTRAINT `tblTransmittalItems_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, + CONSTRAINT `tblTransmittalItem_transmittal` FOREIGN KEY (`transmittal`) REFERENCES `tblTransmittals` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- -------------------------------------------------------- + -- -- Table structure for version -- diff --git a/install/create_tables-sqlite3.sql b/install/create_tables-sqlite3.sql index 099bad86f..def876660 100644 --- a/install/create_tables-sqlite3.sql +++ b/install/create_tables-sqlite3.sql @@ -675,6 +675,36 @@ CREATE TABLE tblWorkflowMandatoryWorkflow ( -- -------------------------------------------------------- +-- +-- Table structure for transmittal +-- + +CREATE TABLE tblTransmittals ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `name` text NOT NULL, + `comment` text NOT NULL, + `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, + `date` TEXT NOT NULL default '0000-00-00 00:00:00', + `public` INTEGER NOT NULL default '0' +); + +-- -------------------------------------------------------- + +-- +-- Table structure for transmittal item +-- + +CREATE TABLE `tblTransmittalItems` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `transmittal` INTEGER NOT NULL DEFAULT '0' REFERENCES `tblTransmittals` (`id`) ON DELETE CASCADE, + `document` INTEGER default NULL REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, + `version` INTEGER unsigned NOT NULL default '0', + `date` TEXT NOT NULL default '0000-00-00 00:00:00', + UNIQUE (document, version) +); + +-- -------------------------------------------------------- + -- -- Table structure for version -- From 7338ddaadd7684909ad501d8426bff2a6fad9610 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Apr 2015 08:17:27 +0200 Subject: [PATCH 0051/2006] fix typo in comment --- 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 80068749c..33efafce2 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -28,7 +28,7 @@ class SeedDMS_Core_DatabaseAccess { public $_debug; /** - * @var string name of database driver (mysql or sqlite3) + * @var string name of database driver (mysql or sqlite) */ protected $_driver; From 01b55843d241447ac94a71256b73c0995527d1cf Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Apr 2015 08:24:26 +0200 Subject: [PATCH 0052/2006] add class for handling transmittals --- SeedDMS_Core/Core/inc.ClassDMS.php | 56 ++++ SeedDMS_Core/Core/inc.ClassTransmittal.php | 333 +++++++++++++++++++++ 2 files changed, 389 insertions(+) create mode 100644 SeedDMS_Core/Core/inc.ClassTransmittal.php diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index bb56c8491..b6bbb7d58 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -293,6 +293,8 @@ class SeedDMS_Core_DMS { $this->classnames['documentcontent'] = 'SeedDMS_Core_DocumentContent'; $this->classnames['user'] = 'SeedDMS_Core_User'; $this->classnames['group'] = 'SeedDMS_Core_Group'; + $this->classnames['transmittal'] = 'SeedDMS_Core_Transmittal'; + $this->classnames['transmittalitem'] = 'SeedDMS_Core_TransmittalItem'; $this->version = '@package_version@'; if($this->version[0] == '@') $this->version = '4.3.17'; @@ -1482,6 +1484,60 @@ class SeedDMS_Core_DMS { return $this->getGroup($this->db->getInsertID()); } /* }}} */ + /** + * Get a transmittal by its id + * + * @param integer $id id of transmittal + * @return object/boolean transmittal or false if no group was found + */ + function getTransmittal($id) { /* {{{ */ + $classname = $this->classnames['transmittal']; + return $classname::getInstance($id, $this, ''); + } /* }}} */ + + /** + * Get a transmittal by its name + * + * @param string $name name of transmittal + * @return object/boolean transmittal or false if no group was found + */ + function getTransmittalByName($name) { /* {{{ */ + $classname = $this->classnames['transmittal']; + return $classname::getInstance($name, $this, 'name'); + } /* }}} */ + + /** + * Return list of all transmittals + * + * @return array of instances of {@link SeedDMS_Core_Transmittal} or false + */ + function getAllTransmittals($user=null, $orderby = '') { /* {{{ */ + $classname = $this->classnames['transmittal']; + return $classname::getAllInstances($user, $orderby, $this); + } /* }}} */ + + /** + * Create a new transmittal + * + * @param string $name name of group + * @param string $comment comment of group + * @param object $user user this transmittal belongs to + * @return object/boolean instance of {@link SeedDMS_Core_Transmittal} or + * false in case of an error. + */ + function addTransmittal($name, $comment, $user) { /* {{{ */ + if (is_object($this->getTransmittalByName($name))) { + return false; + } + + $queryStr = "INSERT INTO tblTransmittals (name, comment, userID) VALUES (".$this->db->qstr($name).", ".$this->db->qstr($comment).", ".$user->getID().")"; + echo $queryStr; + if (!$this->db->getResult($queryStr)) + return false; + + return $this->getTransmittal($this->db->getInsertID()); + } /* }}} */ + function getKeywordCategory($id) { /* {{{ */ if (!is_numeric($id)) return false; diff --git a/SeedDMS_Core/Core/inc.ClassTransmittal.php b/SeedDMS_Core/Core/inc.ClassTransmittal.php new file mode 100644 index 000000000..aeba37d7a --- /dev/null +++ b/SeedDMS_Core/Core/inc.ClassTransmittal.php @@ -0,0 +1,333 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe, + * 2010 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Class to represent a transmittal in the document management system + * + * @category DMS + * @package SeedDMS_Core + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe, + * 2010 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_Core_Transmittal { + /** + * @var integer id of transmittal + * + * @access protected + */ + var $_id; + + /** + * @var string name of transmittal + * + * @access protected + */ + var $_name; + + /** + * @var string comment of transmittal + * + * @access protected + */ + var $_comment; + + /** + * @var boolean true if transmittal is public + * + * @access protected + */ + var $_isPublic; + + /** + * @var object user this transmittal belongs to + * + * @access protected + */ + var $_user; + + /** + * @var object date of creation + * + * @access protected + */ + var $_date; + + /** + * @var object items + * + * @access protected + */ + var $_items; + + /** + * @var object reference to the dms instance this user belongs to + * + * @access protected + */ + var $_dms; + + function SeedDMS_Core_Transmittal($id, $user, $name, $comment, $isPublic=0, $date='0000-00-00 00:00:00') { + $this->_id = $id; + $this->_name = $name; + $this->_comment = $comment; + $this->_user = $user; + $this->_isPublic = $isPublic; + $this->_date = $date; + $this->_items = array(); + $this->_dms = null; + } + + /** + * Get an instance of a transmittal object + * + * @param string|integer $id id or name of transmittal, depending + * on the 3rd parameter. + * @param object $dms instance of dms + * @param string $by search by [id|name]. If this + * parameter is left empty, the user will be search by its Id. + * @return object instance of class SeedDMS_Core_Transmittal + */ + public static function getInstance($id, $dms, $by='') { /* {{{ */ + $db = $dms->getDB(); + + switch($by) { + case 'name': + $queryStr = "SELECT * FROM `tblTransmittals` WHERE `name` = ".$db->qstr($id); + break; + default: + $queryStr = "SELECT * FROM `tblTransmittals` WHERE id = " . (int) $id; + } + + $resArr = $db->getResultArray($queryStr); + + if (is_bool($resArr) && $resArr == false) return false; + if (count($resArr) != 1) return false; + + $resArr = $resArr[0]; + + $uclassname = $dms->getClassname('user'); + $user = $uclassname::getInstance($resArr['userID'], $dms); + $transmittal = new self($resArr["id"], $user, $resArr["name"], $resArr["comment"], $resArr["public"], $resArr["date"]); + $transmittal->setDMS($dms); + return $transmittal; + } /* }}} */ + + /** + * Get all instances of a transmittal object + * + * @param string|integer $id id or name of transmittal, depending + * on the 3rd parameter. + * @param object $dms instance of dms + * @param string $by search by [id|name]. If this + * parameter is left empty, the user will be search by its Id. + * @return object instance of class SeedDMS_Core_Transmittal + */ + public static function getAllInstances($user, $orderby, $dms) { /* {{{ */ + $db = $dms->getDB(); + + $queryStr = "SELECT * FROM `tblTransmittals`"; + if($user) + $queryStr .= " WHERE userID = " . $user->getID(); + + $resArr = $db->getResultArray($queryStr); + + if (is_bool($resArr) && $resArr == false) return false; + + $uclassname = $dms->getClassname('user'); + $transmittals = array(); + foreach ($resArr as $res) { + $user = $uclassname::getInstance($res['userID'], $dms); + $transmittal = new self($res["id"], $user, $res["name"], $res["comment"], $res["public"], $res["date"]); + $transmittal->setDMS($dms); + $transmittals[] = $transmittal; + } + return $transmittals; + } /* }}} */ + + function setDMS($dms) { + $this->_dms = $dms; + } + + function getID() { return $this->_id; } + + function getName() { return $this->_name; } + + function setName($newName) { /* {{{ */ + $db = $this->_dms->getDB(); + + $queryStr = "UPDATE tblTransmittals SET name =".$db->qstr($newName)." WHERE id = " . $this->_id; + $res = $db->getResult($queryStr); + if (!$res) + return false; + + $this->_name = $newName; + return true; + } /* }}} */ + + function getComment() { return $this->_comment; } + + function setComment($newComment) { /* {{{ */ + $db = $this->_dms->getDB(); + + $queryStr = "UPDATE tblTransmittals SET comment =".$db->qstr($newComment)." WHERE id = " . $this->_id; + $res = $db->getResult($queryStr); + if (!$res) + return false; + + $this->_comment = $newComment; + return true; + } /* }}} */ + + function getItems() { /* {{{ */ + $db = $this->_dms->getDB(); + + if (!$this->_items) { + $queryStr = "SELECT `tblTransmittalItems`.* FROM `tblTransmittalItems` ". + "LEFT JOIN `tblDocuments` ON `tblTransmittalItems`.`document`=`tblDocuments`.`id` ". + "WHERE `tblTransmittalItems`.`transmittal` = '". $this->_id ."'"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + + $this->_users = array(); + + $classname = $this->_dms->getClassname('transmittalitem'); + foreach ($resArr as $row) { + $document = $this->_dms->getDocument($row['document']); + $content = $document->getContentByVersion($row['version']); + $item = new $classname($row["id"], $this, $content, $row["date"]); + array_push($this->_items, $item); + } + } + return $this->_items; + } /* }}} */ + + /** + * Add an item to the transmittal + * + * @param object $item instance of SeedDMS_Core_DocumentContent + * @return boolean true if item could be added, otherwise false + */ + function addContent($item) { /* {{{ */ + $db = $this->_dms->getDB(); + + if(get_class($item) != $this->_dms->getClassname('documentcontent')) + return false; + + $document = $item->getDocument(); + $queryStr = "INSERT INTO `tblTransmittalItems` (`transmittal`, `document`, `version`, `date`) ". + "VALUES ('". $this->_id ."', $document->getID(), $item->getVersion(), CURRENT_TIMESTAMP)"; + $res=$db->getResult($queryStr); + if(!$res) { + return false; + } + $itemID = $db->getInsertID(); + + return SeedDMS_Core_TransmittalItem::getInstance($itemID); + } /* }}} */ +} + +/** + * Class to represent a transmittal in the document management system + * + * @category DMS + * @package SeedDMS_Core + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe, + * 2010 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_Core_TransmittalItem { + /** + * @var integer id of transmittal item + * + * @access protected + */ + var $_id; + + /** + * @var object document content + * + * @access protected + */ + var $_content; + + /** + * @var object transmittal + * + * @access protected + */ + var $_transmittal; + + /** + * @var object date of creation + * + * @access protected + */ + var $_date; + + function SeedDMS_Core_TransmittalItem($id, $transmittal, $content, $date='0000-00-00 00:00:00') { + $this->_id = $id; + $this->_transmittal = $transmittal; + $this->_content = $content; + $this->_date = $date; + $this->_dms = null; + } + + public static function getInstance($id, $dms) { /* {{{ */ + $db = $dms->getDB(); + + $queryStr = "SELECT * FROM tblTransmittalItems WHERE id = " . (int) $id; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + if (count($resArr) != 1) + return false; + $resArr = $resArr[0]; + + $transmittal = SeedDMS_Core_Transmittal::getInstance($resArr['transmittal'], $dms); + $dclassname = $dms->getClassname('document'); + $document = $dclassname::getInstance($resArr['document'], $dms); + $content = $document->getVersion($resArr['version']); + + $item = new self($resArr["id"], $transmittal, $content, $resArr["date"]); + $item->setDMS($dms); + return $item; + } /* }}} */ + + function setDMS($dms) { + $this->_dms = $dms; + } + + function getID() { return $this->_id; } + + function getContent() { return $this->_content; } + + function getDate() { return $this->_date; } + + function remove() { /* {{{ */ + $db = $this->_dms->getDB(); + $transmittal = $this->_transmittal; + + $queryStr = "DELETE FROM tblTransmittalItems WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) { + return false; + } + + return true; + } /* }}} */ +} +?> From 962e0f8523613225bc75ab634d3a8135dfca164d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Apr 2015 08:24:59 +0200 Subject: [PATCH 0053/2006] include Core/inc.ClassTransmittal.php --- SeedDMS_Core/Core.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SeedDMS_Core/Core.php b/SeedDMS_Core/Core.php index 667a8554c..0f7b956ea 100644 --- a/SeedDMS_Core/Core.php +++ b/SeedDMS_Core/Core.php @@ -91,4 +91,9 @@ require_once('Core/inc.AccessUtils.php'); */ require_once('Core/inc.FileUtils.php'); +/** + * @uses SeedDMS_Transmittal + */ +require_once('Core/inc.ClassTransmittal.php'); + ?> From 877f937413bb151b4bb445008657c09522625047 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Apr 2015 08:26:51 +0200 Subject: [PATCH 0054/2006] return value of hook will be passed on even if not a string --- inc/inc.ClassViewCommon.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index dd46b6043..199bc8f94 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -81,17 +81,23 @@ class SeedDMS_View_Common { $tmpret = $hookObj->$hook($this); if(is_string($tmpret)) $ret .= $tmpret; + else + $ret = $tmpret; break; case 2: $tmpret = $hookObj->$hook($this, func_get_arg(1)); if(is_string($tmpret)) $ret .= $tmpret; + else + $ret = $tmpret; break; case 3: default: $tmpret = $hookObj->$hook($this, func_get_arg(1), func_get_arg(2)); if(is_string($tmpret)) $ret .= $tmpret; + else + $ret = $tmpret; } } } From 4e682ecbe20778ce10160cd20de58ec07ee9bee7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Apr 2015 08:27:19 +0200 Subject: [PATCH 0055/2006] add more hooks for showing/editing attributes --- views/bootstrap/class.AddDocument.php | 16 +++++++++++++ views/bootstrap/class.EditDocument.php | 8 +++++++ views/bootstrap/class.EditFolder.php | 9 ++++++++ views/bootstrap/class.UpdateDocument.php | 9 ++++++++ views/bootstrap/class.ViewDocument.php | 29 ++++++++++++++++++++---- views/bootstrap/class.ViewFolder.php | 13 +++++++++-- 6 files changed, 77 insertions(+), 7 deletions(-) diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 75154a09c..3cd74b1b7 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -149,12 +149,20 @@ $(document).ready(function() { $attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_document, SeedDMS_Core_AttributeDefinition::objtype_all)); if($attrdefs) { foreach($attrdefs as $attrdef) { + $arr = $this->callHook('editDocumentAttribute', null, $attrdef); + if(is_array($arr)) { + echo ""; + echo "".$arr[0].":"; + echo "".$arr[1].""; + echo ""; + } else { ?> getName()); ?> printAttributeEditField($attrdef, '') ?> getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_all)); if($attrdefs) { foreach($attrdefs as $attrdef) { + $arr = $this->callHook('editDocumentAttribute', null, $attrdef); + if(is_array($arr)) { + echo ""; + echo "".$arr[0].":"; + echo "".$arr[1].""; + echo ""; + } else { ?> getName()); ?> printAttributeEditField($attrdef, '', 'attributes_version') ?> callHook('editDocumentAttribute', $document, $attrdef); + if(is_array($arr)) { + echo ""; + echo "".$arr[0].":"; + echo "".$arr[1].""; + echo ""; + } else { ?> getName()); ?>: printAttributeEditField($attrdef, $document->getAttribute($attrdef)) ?> diff --git a/views/bootstrap/class.EditFolder.php b/views/bootstrap/class.EditFolder.php index 8d5d6a865..9a8d61f84 100644 --- a/views/bootstrap/class.EditFolder.php +++ b/views/bootstrap/class.EditFolder.php @@ -98,12 +98,21 @@ function checkForm() { if($attrdefs) { foreach($attrdefs as $attrdef) { + $arr = $this->callHook('folderEditAttribute', $folder, $attrdef); + if(is_array($arr)) { + echo $txt; + echo ""; + echo "".$arr[0].""; + echo "".$arr[1].""; + echo ""; + } else { ?> getName()); ?> printAttributeEditField($attrdef, $folder->getAttribute($attrdef)) ?> diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index 7969eb664..5b27a2fb5 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -202,12 +202,21 @@ function checkForm() $attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_all)); if($attrdefs) { foreach($attrdefs as $attrdef) { + $arr = $this->callHook('editDocumentContentAttribute', null, $attrdef); + if(is_array($arr)) { + echo $txt; + echo ""; + echo "".$arr[0].":"; + echo "".$arr[1].""; + echo ""; + } else { ?> getName()); ?>: printAttributeEditField($attrdef, '') ?> getAttributes(); if($attributes) { foreach($attributes as $attribute) { - $this->printAttribute($attribute); + $arr = $this->callHook('showDocumentAttribute', $document, $attribute); + if(is_array($arr)) { + echo $txt; + echo ""; + echo "".$arr[0].":"; + echo "".$arr[1].""; + echo ""; + } else { + $this->printAttribute($attribute); + } } } ?> @@ -393,8 +402,13 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { $attributes = $latestContent->getAttributes(); if($attributes) { foreach($attributes as $attribute) { - $attrdef = $attribute->getAttributeDefinition(); - print "
  • ".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars(implode(', ', $attribute->getValueAsArray()))."
  • \n"; + $arr = $this->callHook('showDocumentContentAttribute', $latestcontent, $attribute); + if(is_array($arr)) { + print "
  • ".$arr[0].": ".$arr[1]."
  • \n"; + } else { + $attrdef = $attribute->getAttributeDefinition(); + print "
  • ".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars(implode(', ', $attribute->getValueAsArray()))."
  • \n"; + } } } print "\n"; @@ -998,8 +1012,13 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { $attributes = $version->getAttributes(); if($attributes) { foreach($attributes as $attribute) { - $attrdef = $attribute->getAttributeDefinition(); - print "
  • ".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars(implode(', ', $attribute->getValueAsArray()))."
  • \n"; + $arr = $this->callHook('showDocumentContentAttribute', $version, $attribute); + if(is_array($arr)) { + print "
  • ".$arr[0].": ".$arr[1]."
  • \n"; + } else { + $attrdef = $attribute->getAttributeDefinition(); + print "
  • ".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars(implode(', ', $attribute->getValueAsArray()))."
  • \n"; + } } } print "\n"; diff --git a/views/bootstrap/class.ViewFolder.php b/views/bootstrap/class.ViewFolder.php index 263ac8c62..feed7f3bd 100644 --- a/views/bootstrap/class.ViewFolder.php +++ b/views/bootstrap/class.ViewFolder.php @@ -199,13 +199,22 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style { $attributes = $folder->getAttributes(); if($attributes) { foreach($attributes as $attribute) { - $attrdef = $attribute->getAttributeDefinition(); + $arr = $this->callHook('showFolderAttribute', $folder, $attribute); + if(is_array($arr)) { + echo $txt; + echo ""; + echo "".$arr[0].":"; + echo "".$arr[1].":"; + echo ""; + } else { + $attrdef = $attribute->getAttributeDefinition(); ?> getName()); ?>: getValueAsArray())); ?> - \n"; From 304e54f0094e289505c5bb51bc0dcec30117d8a3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Apr 2015 21:21:07 +0200 Subject: [PATCH 0056/2006] list only users in select box which are not hidden --- views/bootstrap/class.Search.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index b16d5e87e..49d41af5a 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -134,9 +134,9 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { isGuest()) + if ($userObj->isGuest() || ($userObj->isHidden() && $userObj->getID() != $user->getID() && !$user->isAdmin())) continue; - print "\n"; } ?> @@ -363,13 +363,13 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { : - isGuest()) + if ($userObj->isGuest() || ($userObj->isHidden() && $userObj->getID() != $user->getID() && !$user->isAdmin())) continue; - print "\n"; } ?> From c3d9efc6913f42df7291d99a4fb1395424359de5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Apr 2015 21:28:55 +0200 Subject: [PATCH 0057/2006] fix calculated used disk space in percent --- views/bootstrap/class.UserList.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.UserList.php b/views/bootstrap/class.UserList.php index 7406b2d21..91c3a8e2c 100644 --- a/views/bootstrap/class.UserList.php +++ b/views/bootstrap/class.UserList.php @@ -76,8 +76,11 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style { echo ""; echo SeedDMS_Core_File::format_filesize($currUser->getUsedDiskSpace()); if($quota) { - if($user->getQuota() > $currUser->getUsedDiskSpace()) { - $used = (int) ($currUser->getUsedDiskSpace()/$currUser->getQuota()*100.0+0.5); + $qt = $currUser->getQuota(); + if($qt == 0) + $qt = $quota; + if($qt > $currUser->getUsedDiskSpace()) { + $used = (int) ($currUser->getUsedDiskSpace()/$qt*100.0+0.5); $free = 100-$used; } else { $free = 0; From 2d5827a1b96856e96800c96d33d06cc1c4920c51 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Apr 2015 21:31:19 +0200 Subject: [PATCH 0058/2006] add notes for 4.3.17 Conflicts: CHANGELOG --- CHANGELOG | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index f833f9c67..d83f0fe06 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,10 @@ a document or a new version (previously mails were only send when a transition was triggered) - clean workflow log when deleting a document version. +- programms for indexing are actually used (Bug #137) +- fix take over of reviewers/approvers from previos version +- fix calculation of quota in user list +- do not show hidden users in select box of search form -------------------------------------------------------------------------------- Changes in version 4.3.16 From 2a1ce40a9cc78f123eaf3080dba65efe8dbc5971 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Apr 2015 12:18:01 +0200 Subject: [PATCH 0059/2006] add functions getReceiptStatusText() and printReceiptStatusText() --- inc/inc.Language.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/inc/inc.Language.php b/inc/inc.Language.php index d1f51ab14..e1c84374a 100644 --- a/inc/inc.Language.php +++ b/inc/inc.Language.php @@ -162,6 +162,35 @@ function getReviewStatusText($status, $date=0) { /* {{{ */ } } /* }}} */ +function printReceiptStatusText($status, $date=0) { /* {{{ */ + print getReceiptStatusText($status, $date); +} /* }}} */ + +function getReceiptStatusText($status, $date=0) { /* {{{ */ + if (is_null($status)) { + return getMLText("status_unknown"); + } + else { + switch ($status) { + case -2: + return getMLText("status_recipient_removed"); + break; + case -1: + return getMLText("status_recipient_rejected").($date !=0 ? " ".$date : ""); + break; + case 0: + return getMLText("status_not_receipted"); + break; + case 1: + return getMLText("status_receipted").($date !=0 ? " ".$date : ""); + break; + default: + return getMLText("status_unknown"); + break; + } + } +} /* }}} */ + function printApprovalStatusText($status, $date=0) { /* {{{ */ if (is_null($status)) { print getMLText("status_unknown"); From b4e8c39158bc19a643f4bd4b34e705566c080394 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Apr 2015 12:18:35 +0200 Subject: [PATCH 0060/2006] add tab for document reception --- views/bootstrap/class.ViewDocument.php | 82 ++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 8c03290a7..b356b735e 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -177,6 +177,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { $status = $latestContent->getStatus(); $reviewStatus = $latestContent->getReviewStatus(); $approvalStatus = $latestContent->getApprovalStatus(); + $receiptStatus = $latestContent->getReceiptStatus(); ?>
    @@ -326,6 +327,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { 0) { +?> +
  • +
  • @@ -956,6 +962,82 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { 0) { +?> +
    +contentContainerStart(); + print "\n"; + + print ""; + + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + + foreach ($receiptStatus as $r) { + $required = null; + $is_recipient = false; + switch ($r["type"]) { + case 0: // Reviewer is an individual. + $required = $dms->getUser($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } + else { + $reqName = htmlspecialchars($required->getFullName()." (".$required->getLogin().")"); + } + if($r["required"] == $user->getId() && ($user->getId() != $owner->getId() || $enableownerrevapp == 1)) + $is_recipient = true; + break; + case 1: // Reviewer is a group. + $required = $dms->getGroup($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } + else { + $reqName = "".htmlspecialchars($required->getName()).""; + if($required->isMember($user) && ($user->getId() != $owner->getId() || $enableownerrevapp == 1)) + $is_recipient = true; + } + break; + } + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n\n"; + } +?> +
    \n"; + $this->contentSubHeading(getMLText("recipients")); + print "
    ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
    ".$reqName."
    • ".$r["date"]."
    • "; + /* $updateUser is the user who has done the receipt */ + $updateUser = $dms->getUser($r["userID"]); + print "
    • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$r["userID"]."'")."
    ".htmlspecialchars($r["comment"])."".getReceiptStatusText($r["status"])."
    +contentContainerEnd(); +?> +
    +1) { ?> From 2ddd6aa468b730f1695523991a8e9ddd527794e6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 8 May 2015 08:25:05 +0200 Subject: [PATCH 0076/2006] various updates --- languages/ar_EG/lang.inc | 4 ++++ languages/bg_BG/lang.inc | 4 ++++ languages/ca_ES/lang.inc | 4 ++++ languages/cs_CZ/lang.inc | 8 +++++-- languages/de_DE/lang.inc | 8 +++++-- languages/en_GB/lang.inc | 6 ++++- languages/es_ES/lang.inc | 4 ++++ languages/fr_FR/lang.inc | 4 ++++ languages/hu_HU/lang.inc | 18 ++++++++------ languages/it_IT/lang.inc | 4 ++++ languages/nl_NL/lang.inc | 4 ++++ languages/pl_PL/lang.inc | 4 ++++ languages/pt_BR/lang.inc | 4 ++++ languages/ro_RO/lang.inc | 10 +++++--- languages/ru_RU/lang.inc | 4 ++++ languages/sk_SK/lang.inc | 4 ++++ languages/sv_SE/lang.inc | 4 ++++ languages/tr_TR/lang.inc | 4 ++++ languages/zh_CN/lang.inc | 52 +++++++++++++++++++++------------------- languages/zh_TW/lang.inc | 4 ++++ 20 files changed, 119 insertions(+), 39 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index 877236b8e..c38319bf1 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -63,6 +63,7 @@ URL: [url]', 'add_review' => 'بدأ المراجعة', 'add_subfolder' => 'إضافة مجلد فرعي', 'add_to_clipboard' => 'اضف الى لوحة القصاصات', +'add_transmittal' => '', 'add_user' => 'إضافة مستخدم', 'add_user_to_group' => 'إضافة مستخدم لمجموعة', 'add_workflow' => 'اضف مسار عمل جديد', @@ -257,6 +258,7 @@ URL: [url]', 'documents_locked_by_you' => 'المستندات محمية من التعديل بواسطتك', 'documents_only' => 'مستندات فقط', 'documents_to_approve' => 'مستندات في انتظار الموافقة', +'documents_to_receipt' => '', 'documents_to_review' => 'مستندات في انتظار المراجعة', 'documents_user_requiring_attention' => 'مستندات ملكك تستلزم انتباهك', 'document_already_checkedout' => '', @@ -621,6 +623,7 @@ URL: [url]', 'no_attached_files' => 'لا يوجد مرفقات', 'no_current_version' => '', 'no_default_keywords' => 'لايوجد كلمات بحثية متاحة', +'no_docs_checked_out' => '', 'no_docs_locked' => 'لايوجد مستندات حاليا مقفلة/محمية من التعديل', 'no_docs_to_approve' => 'لايوجد مستندات حالية في انتظار الموافقة', 'no_docs_to_look_at' => 'لايوجد مستندات حاليا تستدعي انتباهك', @@ -680,6 +683,7 @@ URL: [url]', 'quota_exceeded' => 'لقد قمت بتعدي المساحة المخصصة لك بمقدار [bytes].', 'quota_is_disabled' => '', 'quota_warning' => 'اقصى مساحة للقرص الصلب تم تعديها بمقدار [bytes]. من فضلك قم بمسح بعض المستندات او اصدارات سابقة منها', +'receipt_summary' => '', 'recipients' => '', 'refresh' => 'اعادة تحميل', 'rejected' => 'مرفوض', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index 49fbe2f9c..b7c9e8e75 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -59,6 +59,7 @@ $text = array( 'add_review' => 'Рецензирай', 'add_subfolder' => 'Добави подпапка', 'add_to_clipboard' => 'Добави към clipboard', +'add_transmittal' => '', 'add_user' => 'Добави потребител', 'add_user_to_group' => 'Добави потребител в група', 'add_workflow' => 'Добави нов workflow', @@ -242,6 +243,7 @@ $text = array( 'documents_locked_by_you' => 'Документи, блокирани от Вас', 'documents_only' => 'Само документи', 'documents_to_approve' => 'Документи, чакащи Вашето утвърждаване', +'documents_to_receipt' => '', 'documents_to_review' => 'Документы, чакащи Вашата рецензия', 'documents_user_requiring_attention' => 'Ваши документи, изискващи внимание', 'document_already_checkedout' => '', @@ -528,6 +530,7 @@ $text = array( 'no_attached_files' => 'Няма прикрачени файлове', 'no_current_version' => '', 'no_default_keywords' => 'Няма ключови думи', +'no_docs_checked_out' => '', 'no_docs_locked' => 'Няма блокирани документи', 'no_docs_to_approve' => 'Няма документи, нуждаещи се от утвърждаване', 'no_docs_to_look_at' => 'Няма документи, нуждаещи се от внимание', @@ -581,6 +584,7 @@ $text = array( 'quota_exceeded' => 'Вашата дискова квота е превишена с [bytes].', 'quota_is_disabled' => '', 'quota_warning' => 'Вашето max. използуване на диска е превишена с [bytes]. Please remove documents or previous versions.', +'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Обнови', 'rejected' => 'Отказан', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index 7e19e30e7..959b17a9a 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -59,6 +59,7 @@ $text = array( 'add_review' => 'Enviar revisiót', 'add_subfolder' => 'Afegir subdirectori', 'add_to_clipboard' => '', +'add_transmittal' => '', 'add_user' => 'Afegir nou usuari', 'add_user_to_group' => '', 'add_workflow' => '', @@ -247,6 +248,7 @@ URL: [url]', 'documents_locked_by_you' => 'Documents bloquejats per vostè', 'documents_only' => '', 'documents_to_approve' => 'Documents en espera d\'aprovació d\'usuaris', +'documents_to_receipt' => '', 'documents_to_review' => 'Documents en espera de revisió d\'usuaris', 'documents_user_requiring_attention' => 'Documents de la seva propietat que requereixen atenció', 'document_already_checkedout' => '', @@ -533,6 +535,7 @@ URL: [url]', 'no_attached_files' => 'No hi ha fitxers adjunts', 'no_current_version' => '', 'no_default_keywords' => 'No hi ha mots clau disponibles', +'no_docs_checked_out' => '', 'no_docs_locked' => 'No hi ha documents bloquejats.', 'no_docs_to_approve' => 'Actualmente no hi ha documents que necessitin aprovació.', 'no_docs_to_look_at' => 'No hi ha documents que necessitin atenció.', @@ -586,6 +589,7 @@ URL: [url]', 'quota_exceeded' => '', 'quota_is_disabled' => '', 'quota_warning' => '', +'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Refresh', 'rejected' => 'Rebutjat', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index f63a24cf1..4dd9f5b5f 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/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 (681), kreml (455) +// Translators: Admin (682), kreml (455) $text = array( 'accept' => 'Přijmout', @@ -63,6 +63,7 @@ URL: [url]', 'add_review' => 'Poslat ke kontrole', 'add_subfolder' => 'Přidat podsložku', 'add_to_clipboard' => 'Přidat do schránky', +'add_transmittal' => '', 'add_user' => 'Přidat nového uživatele', 'add_user_to_group' => 'Přidat uživatele do skupiny', 'add_workflow' => 'Přidat nový pracovní postup', @@ -162,7 +163,7 @@ URL: [url]', 'backup_remove' => 'Odstranit soubor zálohy', 'backup_tools' => 'Nástroje pro zálohování', 'between' => 'mezi', -'bg_BG' => 'Bulharsky', +'bg_BG' => 'Bulharština', 'browse' => 'Prohlížet', 'calendar' => 'Kalendář', 'calendar_week' => 'Kaledářní týden', @@ -264,6 +265,7 @@ URL: [url]', 'documents_locked_by_you' => 'Vámi uzamčené dokumenty', 'documents_only' => 'Pouze dokumenty', 'documents_to_approve' => 'Dokumenty čekající na schválení uživatele', +'documents_to_receipt' => '', 'documents_to_review' => 'Dokumenty čekající na kontrolu uživatele', 'documents_user_requiring_attention' => 'Dokumenty, které uživatel vlastní a vyžadují pozornost', 'document_already_checkedout' => '', @@ -628,6 +630,7 @@ URL: [url]', 'no_attached_files' => 'Žádné přiložené soubory', 'no_current_version' => 'Používáte starou verzi SeedDMS. Nejnovější dostupná verze je [latestversion].', 'no_default_keywords' => 'Nejsou dostupná žádná klíčová slova.', +'no_docs_checked_out' => '', 'no_docs_locked' => 'Žádné uzamčené dokumenty', 'no_docs_to_approve' => 'Momentálně neexistují žádné dokumenty, které vyžadují schválení.', 'no_docs_to_look_at' => 'Žádné dokumenty, které vyžadují pozornost.', @@ -691,6 +694,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.', +'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Obnovit', 'rejected' => 'Odmítnuto', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index 2375b0b0e..5148fb308 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 (2006), dgrutsch (18) +// Translators: Admin (2012), dgrutsch (18) $text = array( 'accept' => 'Übernehmen', @@ -63,6 +63,7 @@ URL: [url]', 'add_review' => 'Überprüfung hinzufügen', 'add_subfolder' => 'Unterordner anlegen', 'add_to_clipboard' => 'Zur Zwischenablage hinzufügen', +'add_transmittal' => 'Transmittal hinzufügen', 'add_user' => 'Neuen Benutzer anlegen', 'add_user_to_group' => 'Benutzer in Gruppe einfügen', 'add_workflow' => 'Neuen Workflow anlegen', @@ -269,6 +270,7 @@ URL: [url]', 'documents_locked_by_you' => 'Von mir gesperrte Dokumente', 'documents_only' => 'Nur Dokumente', 'documents_to_approve' => 'Freigabe erforderlich', +'documents_to_receipt' => 'Dokumente deren Empfang bestätigt werden muss', 'documents_to_review' => 'Prüfung erforderlich', 'documents_user_requiring_attention' => 'Diese Dokumente sollte ich mal nachsehen', 'document_already_checkedout' => 'Dieses Dokument ist bereits ausgecheckt', @@ -572,7 +574,7 @@ URL: [url]', 'move_folder' => 'Verschieben', 'my_account' => 'Mein Profil', 'my_documents' => 'Meine Dokumente', -'my_transmittals' => '', +'my_transmittals' => 'Meine Übergabedokumente', 'name' => 'Name', 'needs_workflow_action' => 'Dieses Dokument erfordert eine Aktion. Bitte schauen Sie auf den Workflow-Reiter.', 'never' => 'nie', @@ -632,6 +634,7 @@ URL: [url]', 'no_attached_files' => 'Keine angehängten Dokumente', 'no_current_version' => 'Sie verwenden eine ältere Version als die zur Zeit verfügbare Version [latestversion].', 'no_default_keywords' => 'Keine Vorlagen vorhanden', +'no_docs_checked_out' => 'Keine Dokumente ausgecheckt', 'no_docs_locked' => 'Keine Dokumente gesperrt.', 'no_docs_to_approve' => 'Es gibt zur Zeit keine Dokumente, die eine Freigabe erfordern.', 'no_docs_to_look_at' => 'Keine Dokumente, nach denen geschaut werden müsste.', @@ -699,6 +702,7 @@ Sollen Sie danach immer noch Problem 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.', +'receipt_summary' => 'Übersicht Bestätigungen', 'recipients' => 'Empfänger', 'refresh' => 'Aktualisieren', 'rejected' => 'abgelehnt', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index ca9cfecc7..9f7fc5a89 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 (1142), dgrutsch (3), netixw (14) +// Translators: Admin (1145), dgrutsch (3), netixw (14) $text = array( 'accept' => 'Accept', @@ -63,6 +63,7 @@ URL: [url]', 'add_review' => 'Add review', 'add_subfolder' => 'Add subfolder', 'add_to_clipboard' => 'Add to clipboard', +'add_transmittal' => 'Add transmittal', 'add_user' => 'Add new user', 'add_user_to_group' => 'Add user to group', 'add_workflow' => 'Add new workflow', @@ -269,6 +270,7 @@ URL: [url]', 'documents_locked_by_you' => 'Documents locked by you', 'documents_only' => 'Documents only', 'documents_to_approve' => 'Documents awaiting your approval', +'documents_to_receipt' => 'Documents awaiting to confirm the receipt', 'documents_to_review' => 'Documents awaiting your review', 'documents_user_requiring_attention' => 'Documents owned by you that require attention', 'document_already_checkedout' => 'This document is already checked out', @@ -632,6 +634,7 @@ URL: [url]', 'no_attached_files' => 'No attached files', 'no_current_version' => 'You are running an old version of SeedDMS. The latest available version is [latestversion].', 'no_default_keywords' => 'No keywords available', +'no_docs_checked_out' => 'No documents checked out', 'no_docs_locked' => 'No documents locked.', 'no_docs_to_approve' => 'There are currently no documents that require approval.', 'no_docs_to_look_at' => 'No documents that need attention.', @@ -699,6 +702,7 @@ If you have still 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.', +'receipt_summary' => '', 'recipients' => 'Recipients', 'refresh' => 'Refresh', 'rejected' => 'Rejected', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index caa5ccade..1a77229b7 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -63,6 +63,7 @@ URL: [url]', 'add_review' => 'Enviar revisión', 'add_subfolder' => 'Añadir subcarpeta', 'add_to_clipboard' => 'Añadir al portapapeles', +'add_transmittal' => '', 'add_user' => 'Añadir nuevo usuario', 'add_user_to_group' => 'Añadir usuario a grupo', 'add_workflow' => 'Añadir nuevo flujo de trabajo', @@ -264,6 +265,7 @@ URL: [url]', 'documents_locked_by_you' => 'Documentos bloqueados por usted', 'documents_only' => 'Solo documentos', 'documents_to_approve' => 'Documentos en espera de aprobación de usuarios', +'documents_to_receipt' => '', 'documents_to_review' => 'Documentos en espera de revisión de usuarios', 'documents_user_requiring_attention' => 'Documentos de su propiedad que requieren atención', 'document_already_checkedout' => '', @@ -628,6 +630,7 @@ URL: [url]', 'no_attached_files' => 'No hay ficheros adjuntos', 'no_current_version' => 'Está utilizando una versión desactualizada de este producto. La última versión disponible es [latestversion].', 'no_default_keywords' => 'No hay palabras clave disponibles', +'no_docs_checked_out' => '', 'no_docs_locked' => 'No hay documentos bloqueados.', 'no_docs_to_approve' => 'Actualmente no hay documentos que necesiten aprobación.', 'no_docs_to_look_at' => 'No hay documentos que necesiten atención.', @@ -695,6 +698,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.', +'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Actualizar', 'rejected' => 'Rechazado', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 53b6348ab..5f661d3d9 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -63,6 +63,7 @@ URL: [url]', 'add_review' => 'Soumettre la correction', 'add_subfolder' => 'Ajouter un sous-dossier', 'add_to_clipboard' => 'Ajouter au presse-papiers', +'add_transmittal' => '', 'add_user' => 'Ajouter un utilisateur', 'add_user_to_group' => 'Ajouter un utilisateur au groupe', 'add_workflow' => 'Ajouter un workflow', @@ -264,6 +265,7 @@ URL: [url]', 'documents_locked_by_you' => 'Documents verrouillés', 'documents_only' => 'Documents uniquement', 'documents_to_approve' => 'Documents en attente d\'approbation', +'documents_to_receipt' => '', 'documents_to_review' => 'Documents en attente de correction', 'documents_user_requiring_attention' => 'Documents à surveiller', 'document_already_checkedout' => '', @@ -627,6 +629,7 @@ URL: [url]', 'no_attached_files' => 'Aucun fichier attaché', 'no_current_version' => 'Vous utilisez une vieille version de SeedDMS. La dernière version disponible est la [latestversion].', 'no_default_keywords' => 'Aucun mot-clé disponible', +'no_docs_checked_out' => '', 'no_docs_locked' => 'Aucun document verrouillé', 'no_docs_to_approve' => 'Aucun document ne nécessite actuellement une approbation', 'no_docs_to_look_at' => 'Aucun document à surveiller', @@ -692,6 +695,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' => 'Le support des quota est actuellement désactivé dans les réglages. Affecter un quota utilisateur n\'aura pas d\'effet jusqu\'à ce qu\'il soit de nouveau activé.', 'quota_warning' => 'Votre taille maximale de disque est dépassée de [bytes]. SVP supprimer des documents ou d\'anciennes versions.', +'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Actualiser', 'rejected' => 'Rejeté', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index 60a77c125..63fdb8e45 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 (552), ribaz (1019) +// Translators: Admin (558), ribaz (1019) $text = array( 'accept' => 'Elfogad', @@ -63,6 +63,7 @@ URL: [url]', 'add_review' => 'Felülvizsgálat küldése', 'add_subfolder' => 'Alkönyvtár hozzáadása', 'add_to_clipboard' => 'Vágólaphoz hozzáad', +'add_transmittal' => '', 'add_user' => 'Új felhasználó hozzáadása', 'add_user_to_group' => 'Felhasználó csoporthoz rendelése', 'add_workflow' => 'Új munkafolyamat hozzáadása', @@ -264,6 +265,7 @@ URL: [url]', 'documents_locked_by_you' => 'Ön által zárolt dokumentumok', 'documents_only' => 'Csak dokumentumok', 'documents_to_approve' => 'Jóváhagyására váró dokumentumok', +'documents_to_receipt' => '', 'documents_to_review' => 'Felülvizsgálatára váró dokumentumok', 'documents_user_requiring_attention' => 'Az Ön tulajdonában álló dokumentumok, amelyekre figyelmet kell fordítani', 'document_already_checkedout' => '', @@ -628,6 +630,7 @@ URL: [url]', 'no_attached_files' => 'Nincsenek csatolt állományok', 'no_current_version' => 'Ön a SeedDMS régebbi változatát futtatja. A legutolsó elérhető verzió [latestversion].', 'no_default_keywords' => 'Nincsenek elérhető kulcsszavak', +'no_docs_checked_out' => '', 'no_docs_locked' => 'Nincsenek zárolt dokumentumok.', 'no_docs_to_approve' => 'Nincsenek jóváhagyandó dokumentumok.', 'no_docs_to_look_at' => 'Nincs karbantartást igénylő dokumentum.', @@ -695,6 +698,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.', +'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Frissítés', 'rejected' => 'Elutasított', @@ -897,7 +901,7 @@ URL: [url]', 'settings_enableConverting' => 'Konvertálás engedélyezése', 'settings_enableConverting_desc' => 'Engedélyezi/tiltja az állományok konverzióját', 'settings_enableDropUpload' => 'Gyorsfeltöltés engedélyezése', -'settings_enableDropUpload_desc' => '', +'settings_enableDropUpload_desc' => 'Be/Ki kapcsolja a \'Mappa nézet\' oldalon a fogd és vidd feltöltéshez tartozó területetet', 'settings_enableDuplicateDocNames' => 'Azonos dokumentum név engedélyezése', 'settings_enableDuplicateDocNames_desc' => 'Engedélyezi az azonos dokumentum neveket egy mappában.', 'settings_enableEmail' => 'Email engedélyezése', @@ -914,8 +918,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => 'Ha beállítja az állományok feltöltése elérhető lesz egy jumploadernek hívott java appleten keresztül a böngészőprogram állomány méret korlátja nélkül. Ez engedélyezi több állomány feltöltését egy lépésben.', 'settings_enableNotificationAppRev' => 'A felülvizsgáló/jóváhagyó értesítés engedélyezése', 'settings_enableNotificationAppRev_desc' => 'Ellenőrzi az értesítés küldését a felülvizsgálónak/jóváhagyónak új dokumentum változat hozzáadásakor', -'settings_enableNotificationWorkflow' => '', -'settings_enableNotificationWorkflow_desc' => '', +'settings_enableNotificationWorkflow' => 'A felhasználó értesítése a következő munkafolyamatnál', +'settings_enableNotificationWorkflow_desc' => 'Ha ez az opció be van kapcsolva, a felhasználók és csoportok melyekkel műveletet kell végezni a következő munkafolyamat-átmenetnél értesítést kapnak. Akkor is, ha nem adtak hozzá értesítőt.', 'settings_enableOwnerNotification' => 'Engedélyezi a tulajdonos értesítését alapesetben', 'settings_enableOwnerNotification_desc' => 'Ellenőrzi az értesítés hozzáadását a tulajdonosnak ha egy dokumentum hozzáadásra kerül.', 'settings_enableOwnerRevApp' => 'Engedélyezi a felülvizsgálatot/jóváhagyást a tulajdonosnak', @@ -1005,8 +1009,8 @@ URL: [url]', 'settings_php_gd2' => 'PHP kiterjesztés : php_gd2', 'settings_php_mbstring' => 'PHP kiterjesztés : php_mbstring', 'settings_php_version' => 'PHP verzió', -'settings_presetExpirationDate' => '', -'settings_presetExpirationDate_desc' => '', +'settings_presetExpirationDate' => 'Lejárat beállítása', +'settings_presetExpirationDate_desc' => 'Minden feltöltött dokumentumhoz ezt a lejárati dátumot rendeli hozzá. A PHP strtotime() függvényének formátuma használható, pl.: +5 weeks.', 'settings_previewWidthDetail' => 'Előnézeti képek szélessége (részletek)', 'settings_previewWidthDetail_desc' => 'A részletek oldalon megjelenő előnézeti képek szélessége', 'settings_previewWidthList' => 'Előnézeti képek szélessége (lista)', @@ -1078,7 +1082,7 @@ URL: [url]', 'settings_workflowMode_desc' => 'A részletes munkafolyamat engedélyezi saját kiadási munkafolyamat megadását a dokumentum változatokhoz.', 'settings_workflowMode_valadvanced' => 'részletes', 'settings_workflowMode_valtraditional' => 'hagyományos', -'settings_workflowMode_valtraditional_only_approval' => '', +'settings_workflowMode_valtraditional_only_approval' => 'hagyományos (áttekintés nélkül)', 'settings_zendframework' => 'Zend keretrendszer', 'set_expiry' => 'Lejárat beállítása', 'set_owner' => 'Tulajdonos beállítása', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index a52157763..a5bcb9ef0 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -63,6 +63,7 @@ URL: [url]', 'add_review' => 'Invio revisione', 'add_subfolder' => 'Aggiungi sottocartella', 'add_to_clipboard' => 'Aggiungi agli appunti', +'add_transmittal' => '', 'add_user' => 'Aggiungi un nuovo utente', 'add_user_to_group' => 'Aggiungi un utente al gruppo', 'add_workflow' => 'Crea un flusso di lavoro', @@ -269,6 +270,7 @@ URL: [url]', 'documents_locked_by_you' => 'Documenti bloccati da te', 'documents_only' => 'Solo documenti', 'documents_to_approve' => 'Documenti in attesa della tua approvazione', +'documents_to_receipt' => '', 'documents_to_review' => 'Documenti in attesa della tua revisione', 'documents_user_requiring_attention' => 'Tuoi documenti in attesa di revisione o approvazione', 'document_already_checkedout' => '', @@ -633,6 +635,7 @@ URL: [url]', 'no_attached_files' => 'Nessun file allegato', 'no_current_version' => 'La corrente versione di SeedDMS non è aggiornata. La versione più recente disponibile è la [latestversion].', 'no_default_keywords' => 'Nessuna parola-chiave disponibile', +'no_docs_checked_out' => '', 'no_docs_locked' => 'Nessun documento bloccato.', 'no_docs_to_approve' => 'Non ci sono documenti che richiedano approvazione.', 'no_docs_to_look_at' => 'Non ci sono documenti che richiedano attenzione.', @@ -700,6 +703,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.', +'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Ricarica', 'rejected' => 'Rifiutato', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index c921a99e4..665102946 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -63,6 +63,7 @@ URL: [url]', 'add_review' => 'Verzend [Controle]', 'add_subfolder' => 'Submap toevoegen', 'add_to_clipboard' => 'Toevoegen aan klembord', +'add_transmittal' => '', 'add_user' => 'Nieuwe gebruiker toevoegen', 'add_user_to_group' => 'Gebruiker aan groep toevoegen', 'add_workflow' => 'Nieuwe workflow toevoegen', @@ -257,6 +258,7 @@ URL: [url]', 'documents_locked_by_you' => 'Documenten door U geblokkeerd', 'documents_only' => 'Alleen documenten', 'documents_to_approve' => 'Documenten die wachten op uw goedkeuring', +'documents_to_receipt' => '', 'documents_to_review' => 'Documenten die wachten op uw controle', 'documents_user_requiring_attention' => 'Eigen documenten die (nog) aandacht behoeven', 'document_already_checkedout' => '', @@ -620,6 +622,7 @@ URL: [url]', 'no_attached_files' => 'Geen bijlagen', 'no_current_version' => 'U werkt met een oude versie van SeedDMS. De laatste versie beschikbaar is [latestversion].', 'no_default_keywords' => 'Geen Sleutelwoorden beschikbaar', +'no_docs_checked_out' => '', 'no_docs_locked' => 'Geen documenten in gebruik.', 'no_docs_to_approve' => 'Er zijn momenteel geen documenten die Goedkeuring behoeven.', 'no_docs_to_look_at' => 'Geen documenten die aandacht behoeven.', @@ -688,6 +691,7 @@ Mocht u de komende minuten geen email ontvangen, probeer het dan nogmaals en con 'quota_exceeded' => 'Uw data quota is overschreden met [bytes].', 'quota_is_disabled' => 'Quota support is momenteel niet aktief in de eigenschappen. Een user quota zetten zal geen effect hebben tot quotas actief zijn.', 'quota_warning' => 'Uw maximale data gebruik is overschreden met [bytes]. Gelieve documenten of eerdere versies te verwijderen.', +'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Verversen', 'rejected' => 'Afgewezen', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index cfcad2fb4..673290531 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -63,6 +63,7 @@ URL: [url]', 'add_review' => 'Zatwierdź recenzję', 'add_subfolder' => 'Dodaj podfolder', 'add_to_clipboard' => 'Dodaj do schowka', +'add_transmittal' => '', 'add_user' => 'Dodaj nowego użytkownika', 'add_user_to_group' => 'Przypisz użytkownika do grupy', 'add_workflow' => 'Dodaj nowy proces', @@ -257,6 +258,7 @@ URL: [url]', 'documents_locked_by_you' => 'Dokumenty zablokowane przez Ciebie', 'documents_only' => 'Tylko dokumenty', 'documents_to_approve' => 'Dokumenty oczekujące na Twoje zatwierdzenie', +'documents_to_receipt' => '', 'documents_to_review' => 'Dokumenty oczekujące na Twoją recenzję', 'documents_user_requiring_attention' => 'Dokumenty należące do Ciebie, które wymagają uwagi', 'document_already_checkedout' => '', @@ -621,6 +623,7 @@ URL: [url]', 'no_attached_files' => 'Brak załączonych plików', 'no_current_version' => '', 'no_default_keywords' => 'Nie ma słów kluczowych', +'no_docs_checked_out' => '', 'no_docs_locked' => 'Brak zablokowanych dokumentów.', 'no_docs_to_approve' => 'Aktualnie nie ma dokumentów wymagających akceptacji.', 'no_docs_to_look_at' => 'Brak dokumentów wymagających uwagi.', @@ -688,6 +691,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.', +'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Odśwież', 'rejected' => 'Odrzucony', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index e481b2db5..99a3a80be 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -63,6 +63,7 @@ URL: [url]', 'add_review' => '', 'add_subfolder' => 'Criar sub-pasta', 'add_to_clipboard' => 'Adicionar ao clipboard', +'add_transmittal' => '', 'add_user' => 'Novo usuário', 'add_user_to_group' => 'Adicionar usuário ao grupo', 'add_workflow' => 'Adicionar novo fluxo de trabalho', @@ -264,6 +265,7 @@ URL: [url]', 'documents_locked_by_you' => 'Documentos bloqueados por você', 'documents_only' => 'Somente documentos', 'documents_to_approve' => 'Documents Awaiting User\'s Approval', +'documents_to_receipt' => '', 'documents_to_review' => 'Documents Awaiting User\'s Review', 'documents_user_requiring_attention' => 'Documents Owned by User That Require Attention', 'document_already_checkedout' => '', @@ -626,6 +628,7 @@ URL: [url]', 'no_attached_files' => 'Não há arquivos anexados', 'no_current_version' => 'Você está executando uma versão antiga do SeedDMS. A última versão disponível é [latestversion].', 'no_default_keywords' => 'não há palavras-chave disponíveis', +'no_docs_checked_out' => '', 'no_docs_locked' => 'Nenhum documento bloqueado.', 'no_docs_to_approve' => 'There are currently no documents that require approval.', 'no_docs_to_look_at' => 'Não há documentos que precisam de atenção.', @@ -693,6 +696,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.', +'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Atualizar', 'rejected' => 'Rejected', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index d8deddceb..a26ee7275 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/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 (1003), balan (6) +// Translators: Admin (1005), balan (6) $text = array( 'accept' => 'Accept', @@ -63,6 +63,7 @@ URL: [url]', 'add_review' => 'Trimite revizuire', 'add_subfolder' => 'Adaugă subfolder', 'add_to_clipboard' => 'Adaugă in clipboard', +'add_transmittal' => '', 'add_user' => 'Adaugă utilizator nou', 'add_user_to_group' => 'Adaugă utilizator la grup', 'add_workflow' => 'Adaugă workflow nou', @@ -162,7 +163,7 @@ URL: [url]', 'backup_remove' => 'Sterge fișier backup', 'backup_tools' => 'Backup tools', 'between' => 'între', -'bg_BG' => '', +'bg_BG' => 'Bulgară', 'browse' => 'Browse', 'calendar' => 'Calendar', 'calendar_week' => 'Săptămână calendar', @@ -264,6 +265,7 @@ URL: [url]', 'documents_locked_by_you' => 'Documente blocate de tine', 'documents_only' => 'Doar documente', 'documents_to_approve' => 'Documente care așteaptă aprobarea dumneavoastră', +'documents_to_receipt' => '', 'documents_to_review' => 'Documente care așteaptă revizuirea dumneavoastră', 'documents_user_requiring_attention' => 'Documente deținute de tine care necesită atenție', 'document_already_checkedout' => '', @@ -628,6 +630,7 @@ URL: [url]', 'no_attached_files' => 'Nu sunt fișiere atașate', 'no_current_version' => 'Utilizați o versiune veche de SeedDMS. Cea mai recentă versiune disponibilă este [latestversion].', 'no_default_keywords' => 'Nu există cuvinte cheie disponibile', +'no_docs_checked_out' => '', 'no_docs_locked' => 'Nici un document blocat.', 'no_docs_to_approve' => 'Momentan nu există documente care necesită aprobarea.', 'no_docs_to_look_at' => 'Nici un document care necesită atenție.', @@ -695,6 +698,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.', +'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Refresh', 'rejected' => 'Respins', @@ -1174,7 +1178,7 @@ URL: [url]', 'transmittal_comment' => '', 'transmittal_name' => '', 'trigger_workflow' => 'Workflow', -'tr_TR' => '', +'tr_TR' => 'Turcă', 'tuesday' => 'Marți', 'tuesday_abbr' => 'Ma', 'type_to_search' => 'Tastați pentru a căuta', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index 9162d4a2e..dead290d1 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -63,6 +63,7 @@ URL: [url]', 'add_review' => 'Рецензировать', 'add_subfolder' => 'Добавить подкаталог', 'add_to_clipboard' => 'Добавить в буфер', +'add_transmittal' => '', 'add_user' => 'Добавить пользователя', 'add_user_to_group' => 'Добавить пользователя в группу', 'add_workflow' => 'Добавить процесс', @@ -257,6 +258,7 @@ URL: [url]', 'documents_locked_by_you' => 'Документы, заблокированные вами', 'documents_only' => 'только документы', 'documents_to_approve' => 'Документы, ожидающие вашего утверждения', +'documents_to_receipt' => '', 'documents_to_review' => 'Документы, ожидающие вашей рецензии', 'documents_user_requiring_attention' => 'Ваши документы, требующие внимания', 'document_already_checkedout' => '', @@ -620,6 +622,7 @@ URL: [url]', 'no_attached_files' => 'Нет приложений', 'no_current_version' => '', 'no_default_keywords' => 'Нет меток', +'no_docs_checked_out' => '', 'no_docs_locked' => 'Нет заблокированных документов', 'no_docs_to_approve' => 'Нет документов, нуждающихся в утверждении', 'no_docs_to_look_at' => 'Нет документов, нуждающихся во внимании', @@ -685,6 +688,7 @@ URL: [url]', 'quota_exceeded' => 'Ваша дисковая квота превышена на [bytes].', 'quota_is_disabled' => '', 'quota_warning' => 'Ваша дисковая квота превышена на [bytes]. Удалите ненужные документы или их предыдущие версии.', +'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Обновить', 'rejected' => 'Отклонён', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index a36b59de3..218c1d78a 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -59,6 +59,7 @@ $text = array( 'add_review' => 'Poslať kontrolu', 'add_subfolder' => 'Pridať podzložku', 'add_to_clipboard' => 'Pridaj do schránky', +'add_transmittal' => '', 'add_user' => 'Pridať nového používatela', 'add_user_to_group' => '', 'add_workflow' => '', @@ -242,6 +243,7 @@ $text = array( 'documents_locked_by_you' => 'Vami uzamknuté dokumenty', 'documents_only' => '', 'documents_to_approve' => 'Dokumenty čakajúce na schválenie používateľa', +'documents_to_receipt' => '', 'documents_to_review' => 'Dokumenty čakajúce na kontrolu používateľa', 'documents_user_requiring_attention' => 'Dokumenty, ktoré používateľ vlastní a vyžadujú pozornosť', 'document_already_checkedout' => '', @@ -528,6 +530,7 @@ $text = array( 'no_attached_files' => 'Žiadne prílohy', 'no_current_version' => '', 'no_default_keywords' => 'Nie sú dostupné žiadne kľúčové slová.', +'no_docs_checked_out' => '', 'no_docs_locked' => '', 'no_docs_to_approve' => 'Momentálne neexistujú žiadne dokumenty, ktoré vyžadujú schválenie.', 'no_docs_to_look_at' => '', @@ -581,6 +584,7 @@ $text = array( 'quota_exceeded' => '', 'quota_is_disabled' => '', 'quota_warning' => '', +'receipt_summary' => '', 'recipients' => '', 'refresh' => '', 'rejected' => 'Odmietnuté', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index fcdcfcfbd..92786a186 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -63,6 +63,7 @@ URL: [url]', 'add_review' => 'Skicka granskning', 'add_subfolder' => 'Lägg till katalog', 'add_to_clipboard' => 'Flytta till Urklipp', +'add_transmittal' => '', 'add_user' => 'Lägg till ny användare', 'add_user_to_group' => 'Lägg till användare till grupp', 'add_workflow' => 'Lägg till nytt arbetsflöde', @@ -257,6 +258,7 @@ URL: [url]', 'documents_locked_by_you' => 'Dokument som du har låst', 'documents_only' => 'Bara dokument', 'documents_to_approve' => 'Dokument som du behöver godkänna', +'documents_to_receipt' => '', 'documents_to_review' => 'Dokument som du behöver granska', 'documents_user_requiring_attention' => 'Dokument som du behöver granska/godkänna', 'document_already_checkedout' => '', @@ -621,6 +623,7 @@ URL: [url]', 'no_attached_files' => 'Inga filer har bifogats.', 'no_current_version' => 'Du har en gammal version av SeedDMS. Senaste versionen är [latestversion].', 'no_default_keywords' => 'Inga nyckelord tillgängliga', +'no_docs_checked_out' => '', 'no_docs_locked' => 'Inga dokument är låsta.', 'no_docs_to_approve' => 'Det finns inga dokument som du behöver godkänna.', 'no_docs_to_look_at' => 'Det finns inga dokument som behöver godkännas eller granskas.', @@ -680,6 +683,7 @@ URL: [url]', 'quota_exceeded' => 'Din minneskvot har överskridits med [bytes].', 'quota_is_disabled' => '', 'quota_warning' => 'Din maximala minneskvot har överskridits med [bytes]. Ta bort dokument eller tidigare versioner.', +'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Uppdatera', 'rejected' => 'Avvisat', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 36b64ef5c..466cb247c 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -62,6 +62,7 @@ URL: [url]', 'add_review' => 'Kabul et', 'add_subfolder' => 'Alt klasör ekle', 'add_to_clipboard' => 'Panoya ekle', +'add_transmittal' => '', 'add_user' => 'Yeni kullanıcı ekle', 'add_user_to_group' => 'Kullanıcıyı gruba ekle', 'add_workflow' => 'Yeni iş akışı ekle', @@ -263,6 +264,7 @@ URL: [url]', 'documents_locked_by_you' => 'Doküman sizin tarafınızdan kilitlendi', 'documents_only' => 'Sadece dokümanlar', 'documents_to_approve' => 'Onayınızı bekleyen dokümanlar', +'documents_to_receipt' => '', 'documents_to_review' => 'Kontrol etmenizi bekleyen dokümanlar', 'documents_user_requiring_attention' => 'Dikkatinizi gerektiren size ait dokümanlar', 'document_already_checkedout' => '', @@ -627,6 +629,7 @@ URL: [url]', 'no_attached_files' => 'Ek dosya yok', 'no_current_version' => 'Kullandığınız SeedDMS versiyonu eski görünüyor. Son versiyon [latestversion].', 'no_default_keywords' => 'Anahtar kelime yok', +'no_docs_checked_out' => '', 'no_docs_locked' => 'Kilitli doküman yok.', 'no_docs_to_approve' => 'Şu anda onay bekleyen doküman yok.', 'no_docs_to_look_at' => 'Dikkat edilmesi gereken bir doküman yok.', @@ -696,6 +699,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.', +'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Yenile', 'rejected' => 'Reddedildi', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index 1a7514ba9..e58a9afad 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/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 (552), fengjohn (5) +// Translators: Admin (575), fengjohn (5) $text = array( 'accept' => '接受', @@ -63,6 +63,7 @@ URL: [url]', 'add_review' => '提交校对', 'add_subfolder' => '添加子文件夹', 'add_to_clipboard' => '复制', +'add_transmittal' => '', 'add_user' => '添加新用户', 'add_user_to_group' => '', 'add_workflow' => '', @@ -248,6 +249,7 @@ URL: [url]', 'documents_locked_by_you' => '被您锁定的文档', 'documents_only' => '指定文件', 'documents_to_approve' => '待您审核的文档', +'documents_to_receipt' => '', 'documents_to_review' => '待您校对的文档', 'documents_user_requiring_attention' => '需您关注的文档', 'document_already_checkedout' => '', @@ -341,8 +343,8 @@ URL: [url]', 'files_deletion' => '删除文件', 'files_deletion_warning' => '通过此操作,您可以删除整个DMS(文档管理系统)文件夹里的所有文件.但版本信息将被保留', 'file_size' => '文件大小', -'filter_for_documents' => '', -'filter_for_folders' => '', +'filter_for_documents' => '文档新增过滤', +'filter_for_folders' => '文件夹新增过滤', 'folder' => '文件夹', 'folders' => '文件夹', 'folders_and_documents_statistic' => '内容概要', @@ -484,15 +486,15 @@ URL: [url]', 'mimetype' => 'MIME类型', 'minutes' => '', 'misc' => '其他', -'missing_checksum' => '', -'missing_filesize' => '', +'missing_checksum' => '缺失校验', +'missing_filesize' => '缺失文件大小', 'missing_transition_user_group' => '', 'monday' => 'Monday', 'monday_abbr' => '', 'monthly' => '', 'month_view' => '月视图', 'move' => '移动', -'move_clipboard' => '', +'move_clipboard' => '移动剪切板', 'move_document' => '移动文档', 'move_folder' => '移动文件夹', 'my_account' => '我的账户', @@ -534,6 +536,7 @@ URL: [url]', 'no_attached_files' => '无附件', 'no_current_version' => '', 'no_default_keywords' => '无关键字', +'no_docs_checked_out' => '', 'no_docs_locked' => '无锁定的文档', 'no_docs_to_approve' => '当前没有需要审核的文档', 'no_docs_to_look_at' => '没有需要关注的文档', @@ -555,7 +558,7 @@ URL: [url]', 'old' => 'Old', 'only_jpg_user_images' => '只用jpg格式的图片才可以作为用户身份图片', 'order_by_sequence_off' => '', -'original_filename' => '', +'original_filename' => '原始文件名', 'owner' => '所有者', 'ownership_changed_email' => '所有者已变更', 'ownership_changed_email_body' => '', @@ -587,6 +590,7 @@ URL: [url]', 'quota_exceeded' => '', 'quota_is_disabled' => '配额的支持', 'quota_warning' => '', +'receipt_summary' => '', 'recipients' => '', 'refresh' => '', 'rejected' => '拒绝', @@ -640,7 +644,7 @@ URL: [url]', 'rm_document_category' => '删除分类', 'rm_file' => '删除文件', 'rm_folder' => '删除文件夹', -'rm_from_clipboard' => '', +'rm_from_clipboard' => '从剪切板删除', 'rm_group' => '删除该组', 'rm_transmittal' => '', 'rm_user' => '删除该用户', @@ -806,8 +810,8 @@ URL: [url]', 'settings_extraPath_desc' => '附加软件的路径。这是包含目录,例如在ADODB目录或额外的PEAR包', 'settings_firstDayOfWeek' => '', 'settings_firstDayOfWeek_desc' => '', -'settings_footNote' => '', -'settings_footNote_desc' => '', +'settings_footNote' => '附注', +'settings_footNote_desc' => '显示在每个页面底部的信息', 'settings_guestID' => '', 'settings_guestID_desc' => '', 'settings_httpRoot' => '', @@ -821,7 +825,7 @@ URL: [url]', 'settings_install_welcome_title' => '', 'settings_install_zendframework' => '', 'settings_language' => '语言设置', -'settings_language_desc' => '', +'settings_language_desc' => '默认语言(“语言”文件夹的一个子文件夹的名字', 'settings_logFileEnable' => '', 'settings_logFileEnable_desc' => '', 'settings_logFileRotation' => '', @@ -864,12 +868,12 @@ URL: [url]', 'settings_php_version' => '', 'settings_presetExpirationDate' => '', 'settings_presetExpirationDate_desc' => '', -'settings_previewWidthDetail' => '', -'settings_previewWidthDetail_desc' => '', -'settings_previewWidthList' => '', -'settings_previewWidthList_desc' => '', -'settings_printDisclaimer' => '', -'settings_printDisclaimer_desc' => '', +'settings_previewWidthDetail' => '缩略图宽度(详情页中)', +'settings_previewWidthDetail_desc' => '详情页面中缩略图的宽度', +'settings_previewWidthList' => '缩略图宽度(列表中)', +'settings_previewWidthList_desc' => '列表中缩略图的宽度', +'settings_printDisclaimer' => '显示免责声明', +'settings_printDisclaimer_desc' => '如果开启,这个免责声明信息将在每个页面的底部显示', 'settings_quota' => '', 'settings_quota_desc' => '', 'settings_restricted' => '', @@ -882,11 +886,11 @@ URL: [url]', 'settings_Server' => '', 'settings_showMissingTranslations' => '', 'settings_showMissingTranslations_desc' => '', -'settings_Site' => '', +'settings_Site' => '站点设置', 'settings_siteDefaultPage' => '网站的默认页', 'settings_siteDefaultPage_desc' => '', -'settings_siteName' => '', -'settings_siteName_desc' => '', +'settings_siteName' => '站点名称', +'settings_siteName_desc' => '用于页面标题的站点名称,默认为SeedDMS', 'settings_SMTP' => 'SMTP 服务器设定', 'settings_smtpPassword' => '', 'settings_smtpPassword_desc' => '', @@ -915,9 +919,9 @@ URL: [url]', 'settings_strictFormCheck' => '', 'settings_strictFormCheck_desc' => '', 'settings_suggestionvalue' => '', -'settings_System' => '', +'settings_System' => '系统设置', 'settings_theme' => '主题设置', -'settings_theme_desc' => '', +'settings_theme_desc' => '默认风格(“风格”文件夹的一个子文件夹的名字', 'settings_titleDisplayHack' => '', 'settings_titleDisplayHack_desc' => '', 'settings_undelUserIds' => '', @@ -966,7 +970,7 @@ URL: [url]', 'splash_invalid_folder_id' => '', 'splash_invalid_searchterm' => '', 'splash_moved_clipboard' => '', -'splash_removed_from_clipboard' => '', +'splash_removed_from_clipboard' => '已从剪切板删除', 'splash_rm_attribute' => '', 'splash_rm_document' => '文档已被移除', 'splash_rm_folder' => '已删除的文件夹', @@ -1034,7 +1038,7 @@ URL: [url]', 'unknown_keyword_category' => '未知类别', 'unknown_owner' => '未知所有者ID号', 'unknown_user' => '未知用户ID号', -'unlinked_content' => '', +'unlinked_content' => '未链接内容', 'unlinked_documents' => '', 'unlinked_folders' => '', 'unlinking_objects' => '', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 9d214e617..3d24ee2a1 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -63,6 +63,7 @@ URL: [url]', 'add_review' => '提交校對', 'add_subfolder' => '添加子資料夾', 'add_to_clipboard' => '複製', +'add_transmittal' => '', 'add_user' => '添加新用戶', 'add_user_to_group' => '添加新用戶至群組', 'add_workflow' => '添加工作流程', @@ -246,6 +247,7 @@ URL: [url]', 'documents_locked_by_you' => '被您鎖定的文檔', 'documents_only' => '指定檔', 'documents_to_approve' => '待您審核的文檔', +'documents_to_receipt' => '', 'documents_to_review' => '待您校對的文檔', 'documents_user_requiring_attention' => '需您關注的文檔', 'document_already_checkedout' => '', @@ -532,6 +534,7 @@ URL: [url]', 'no_attached_files' => '無附件', 'no_current_version' => '', 'no_default_keywords' => '無關鍵字', +'no_docs_checked_out' => '', 'no_docs_locked' => '無鎖定的文檔', 'no_docs_to_approve' => '當前沒有需要審核的文檔', 'no_docs_to_look_at' => '沒有需要關注的文檔', @@ -585,6 +588,7 @@ URL: [url]', 'quota_exceeded' => '', 'quota_is_disabled' => '', 'quota_warning' => '', +'receipt_summary' => '', 'recipients' => '', 'refresh' => '', 'rejected' => '拒絕', From 7d664ac105f2851fc2e287b06630f70bd7008945 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 8 May 2015 08:30:35 +0200 Subject: [PATCH 0077/2006] correct wrong phrase if there are no group receipts --- views/bootstrap/class.ReceiptSummary.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.ReceiptSummary.php b/views/bootstrap/class.ReceiptSummary.php index 2576ff3ea..725aa16ce 100644 --- a/views/bootstrap/class.ReceiptSummary.php +++ b/views/bootstrap/class.ReceiptSummary.php @@ -135,7 +135,7 @@ class SeedDMS_View_ReceiptSummary extends SeedDMS_Bootstrap_Style { if (!$printheader) { echo "\n"; }else{ - printMLText("empty_notify_list"); + printMLText("no_docs_to_receipt"); } From cf2160993f024578c2acd7a474864633d2e7ffc6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 8 May 2015 08:32:09 +0200 Subject: [PATCH 0078/2006] correct wrong phrase if there are no group approvals/reviews --- views/bootstrap/class.ApprovalSummary.php | 2 +- views/bootstrap/class.ReviewSummary.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.ApprovalSummary.php b/views/bootstrap/class.ApprovalSummary.php index 26c1d1c7d..932b3fb7e 100644 --- a/views/bootstrap/class.ApprovalSummary.php +++ b/views/bootstrap/class.ApprovalSummary.php @@ -133,7 +133,7 @@ class SeedDMS_View_ApprovalSummary extends SeedDMS_Bootstrap_Style { if (!$printheader) { echo "\n\n"; }else{ - printMLText("empty_notify_list"); + printMLText("no_approval_needed"); } $this->contentContainerEnd(); diff --git a/views/bootstrap/class.ReviewSummary.php b/views/bootstrap/class.ReviewSummary.php index fc58772bc..49001f7af 100644 --- a/views/bootstrap/class.ReviewSummary.php +++ b/views/bootstrap/class.ReviewSummary.php @@ -135,7 +135,7 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style { if (!$printheader) { echo "\n"; }else{ - printMLText("empty_notify_list"); + printMLText("no_docs_to_review"); } From 9955a0e07bb744a6152524d4d4d1712a28dbc629 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 11 May 2015 09:28:31 +0200 Subject: [PATCH 0079/2006] rename tblDocumentRevisers to tblDocumentRevisors --- install/create_tables-innodb.sql | 9 +++++---- install/create_tables-sqlite3.sql | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/install/create_tables-innodb.sql b/install/create_tables-innodb.sql index c88ae3310..92e08a044 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -250,6 +250,7 @@ CREATE TABLE `tblDocumentContent` ( `mimeType` varchar(100) NOT NULL default '', `fileSize` BIGINT, `checksum` char(32), + `revsiondate` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`), UNIQUE (`document`, `version`), CONSTRAINT `tblDocumentContent_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) @@ -418,10 +419,10 @@ CREATE TABLE `tblDocumentReceiptLog` ( -- -------------------------------------------------------- -- --- Table structure for table `tblDocumentRevisers` +-- Table structure for table `tblDocumentRevisors` -- -CREATE TABLE `tblDocumentRevisers` ( +CREATE TABLE `tblDocumentRevisors` ( `revisionID` int(11) NOT NULL auto_increment, `documentID` int(11) NOT NULL default '0', `version` smallint(5) unsigned NOT NULL default '0', @@ -430,7 +431,7 @@ CREATE TABLE `tblDocumentRevisers` ( `startdate` datetime default NULL, PRIMARY KEY (`revisionID`), UNIQUE KEY `documentID` (`documentID`,`version`,`type`,`required`), - CONSTRAINT `tblDocumentRevisers_document` FOREIGN KEY (`documentID`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE + CONSTRAINT `tblDocumentRevisors_document` FOREIGN KEY (`documentID`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -447,7 +448,7 @@ CREATE TABLE `tblDocumentRevisionLog` ( `date` datetime NOT NULL default '0000-00-00 00:00:00', `userID` int(11) NOT NULL default '0', PRIMARY KEY (`revisionLogID`), - CONSTRAINT `tblDocumentRevisionLog_revision` FOREIGN KEY (`revisionID`) REFERENCES `tblDocumentRevisers` (`revisionID`) ON DELETE CASCADE, + CONSTRAINT `tblDocumentRevisionLog_revision` FOREIGN KEY (`revisionID`) REFERENCES `tblDocumentRevisors` (`revisionID`) ON DELETE CASCADE, CONSTRAINT `tblDocumentRevisionLog_user` FOREIGN KEY (`userID`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/install/create_tables-sqlite3.sql b/install/create_tables-sqlite3.sql index def876660..5d38a6c1e 100644 --- a/install/create_tables-sqlite3.sql +++ b/install/create_tables-sqlite3.sql @@ -223,6 +223,7 @@ CREATE TABLE `tblDocumentContent` ( `mimeType` varchar(70) NOT NULL default '', `fileSize` INTEGER, `checksum` char(32), + `revsiondate` INTEGER default NULL, UNIQUE (`document`,`version`) ) ; @@ -367,7 +368,7 @@ CREATE TABLE `tblDocumentRecipients` ( CREATE TABLE `tblDocumentRevisionLog` ( `revisionLogID` INTEGER PRIMARY KEY AUTOINCREMENT, - `revisionID` INTEGER NOT NULL default 0 REFERENCES `tblDocumentRevisers` (`revisionID`) ON DELETE CASCADE, + `revisionID` INTEGER NOT NULL default 0 REFERENCES `tblDocumentRevisors` (`revisionID`) ON DELETE CASCADE, `status` INTEGER NOT NULL default 0, `comment` TEXT NOT NULL, `date` TEXT NOT NULL default '0000-00-00 00:00:00', @@ -377,10 +378,10 @@ CREATE TABLE `tblDocumentRevisionLog` ( -- -------------------------------------------------------- -- --- Table structure for table `tblDocumentRevisers` +-- Table structure for table `tblDocumentRevisors` -- -CREATE TABLE `tblDocumentRevisers` ( +CREATE TABLE `tblDocumentRevisors` ( `revisionID` INTEGER PRIMARY KEY AUTOINCREMENT, `documentID` INTEGER NOT NULL default '0' REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, `version` INTEGER unsigned NOT NULL default '0', From 7b41fa961c9d23ed33ea43d5772232c747bab9af Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 11 May 2015 09:29:00 +0200 Subject: [PATCH 0080/2006] lots of key corrections --- languages/ar_EG/lang.inc | 14 +++++++------- languages/bg_BG/lang.inc | 14 +++++++------- languages/ca_ES/lang.inc | 14 +++++++------- languages/cs_CZ/lang.inc | 14 +++++++------- languages/de_DE/lang.inc | 14 +++++++------- languages/en_GB/lang.inc | 14 +++++++------- languages/es_ES/lang.inc | 14 +++++++------- languages/fr_FR/lang.inc | 14 +++++++------- languages/hu_HU/lang.inc | 14 +++++++------- languages/it_IT/lang.inc | 14 +++++++------- languages/nl_NL/lang.inc | 14 +++++++------- languages/pl_PL/lang.inc | 14 +++++++------- languages/pt_BR/lang.inc | 14 +++++++------- languages/ro_RO/lang.inc | 14 +++++++------- languages/ru_RU/lang.inc | 14 +++++++------- languages/sk_SK/lang.inc | 14 +++++++------- languages/sv_SE/lang.inc | 14 +++++++------- languages/tr_TR/lang.inc | 14 +++++++------- languages/zh_CN/lang.inc | 14 +++++++------- languages/zh_TW/lang.inc | 14 +++++++------- 20 files changed, 140 insertions(+), 140 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index c38319bf1..29442c0ec 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -180,7 +180,7 @@ URL: [url]', 'change_password' => 'تغيير كلمة السر', 'change_password_message' => 'تم تغيير كلمة السر.', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => 'تغيير الحالة', 'charts' => 'ﺝﺩﺍﻮﻟ', 'chart_docsaccumulated_title' => '', @@ -697,7 +697,7 @@ URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - تم ازالة المرفقات', 'removed_recipient' => '', 'removed_reviewer' => 'تم ازالته من قائمة المراجعة', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => 'تم ازالة مسار العمل من اصدار المستند مستند: [name] اصدار: [version] @@ -748,8 +748,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - تم تقديم المراجعة', 'review_summary' => 'ملخص المراجعة', 'review_update_failed' => 'خطأ في تحديث حالة المراجعة. التحديث فشل.', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => 'اعادة بدء مسار العمل', 'rewind_workflow_email_body' => 'اعادة بدء مسار العمل المستند: [name] @@ -814,12 +814,12 @@ URL: [url]', 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'اضغط لاختيار مجموعة المراجعون', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => 'اضغط لاختيار موافق فردي', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'اضغط لاختيار مراجع فردي', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'اختر واحد', 'select_users' => 'اضغط لاختيار المستخدم', 'select_workflow' => 'اختر مسار العمل', @@ -1191,7 +1191,7 @@ URL: [url]', 'update_locked_msg' => 'هذا المستند محمي من التعديل.', 'update_recipients' => '', 'update_reviewers' => 'تحيث قائمة المراجعين', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => 'تم الرفع بواسطة', 'uploading_failed' => 'عملية رفع واحد من ملفاتك فشلت . من فضلك قم بالتأكد من اقصى ملف يمكن تحميله', 'uploading_maxsize' => 'الملف المرفوع يتخطى حجم الملف القياسي المسموح', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index b7c9e8e75..5984ee8bc 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -165,7 +165,7 @@ $text = array( 'change_password' => 'Промени паролата', 'change_password_message' => 'Паролата променена', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => 'Промени статусът', 'charts' => '', 'chart_docsaccumulated_title' => '', @@ -595,7 +595,7 @@ $text = array( 'removed_file_email_subject' => '', 'removed_recipient' => '', 'removed_reviewer' => 'изтрит от списъка с рецензиращи', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => '', 'removed_workflow_email_subject' => '', 'remove_marked_files' => '', @@ -626,8 +626,8 @@ $text = array( 'review_submit_email_subject' => '', 'review_summary' => 'Сводка по рецензиите', 'review_update_failed' => 'грешка при обновяване статуса на рецензията', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => 'Превърти процес', 'rewind_workflow_email_body' => '', 'rewind_workflow_email_subject' => '', @@ -679,12 +679,12 @@ $text = array( 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'Кликни да избереш група рецензенти', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => 'Кликни да избереш утвърждаващ', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Кликни да избереш рецензент', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'Избери един', 'select_users' => 'Кликни да избереш потребители', 'select_workflow' => 'Избери процес', @@ -1047,7 +1047,7 @@ $text = array( 'update_locked_msg' => 'Този документ е блокиран', 'update_recipients' => '', 'update_reviewers' => 'Обнови списъка с рецензиращи', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => 'Качен от', 'uploading_failed' => 'Качването не стана. Свържете се с админа', 'uploading_maxsize' => '', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index 959b17a9a..7742b0961 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -170,7 +170,7 @@ URL: [url]', 'change_password' => '', 'change_password_message' => '', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => 'Canviar estat', 'charts' => '', 'chart_docsaccumulated_title' => '', @@ -600,7 +600,7 @@ URL: [url]', 'removed_file_email_subject' => '', 'removed_recipient' => '', 'removed_reviewer' => 'Ha estat eliminat de la llista de revisors', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => '', 'removed_workflow_email_subject' => '', 'remove_marked_files' => '', @@ -631,8 +631,8 @@ URL: [url]', 'review_submit_email_subject' => '', 'review_summary' => 'Resum de revisió', 'review_update_failed' => 'Error actualitzant l\'estat de la revisió. L\'actualizació ha fallat.', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => '', 'rewind_workflow_email_body' => '', 'rewind_workflow_email_subject' => '', @@ -684,12 +684,12 @@ URL: [url]', 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => '', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => '', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => '', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'Seleccionar un', 'select_users' => '', 'select_workflow' => '', @@ -1052,7 +1052,7 @@ URL: [url]', 'update_locked_msg' => 'Aquest document està bloquejat.', 'update_recipients' => '', 'update_reviewers' => 'Actualitzar llista de revisors', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => 'Enviat per', 'uploading_failed' => 'Enviament (Upload) fallat. Si us plau, contacteu amb l\'administrador.', 'uploading_maxsize' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index 4dd9f5b5f..4aaf43605 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -187,7 +187,7 @@ URL: [url]', 'change_password' => 'Změnit heslo', 'change_password_message' => 'Vaše heslo bylo změněno.', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => 'Změna stavu', 'charts' => 'Grafy', 'chart_docsaccumulated_title' => 'Počet dokumentů', @@ -708,7 +708,7 @@ URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Odstraněná příloha', 'removed_recipient' => '', 'removed_reviewer' => 'byl odstraněn ze seznamu kontrolorů.', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => 'Odstraněn pracovní postup z verze dokumentu: [name] Verze: [version] Praconí postup: [workflow] @@ -757,8 +757,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Odesláno přezkoumání', 'review_summary' => 'Souhrn kontroly', 'review_update_failed' => 'Chyba při aktualizaci stavu kontroly. Aktualizace selhala.', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => 'Nové spuštění pracovního postupu', 'rewind_workflow_email_body' => 'Pracovní postup byl spuštěn znovu Dokument: [name] @@ -823,12 +823,12 @@ URL: [url]', 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'Kliknutím vyberte skupinu posuzovatele', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => 'Kliknutím vyberte jednotlivého schvalovatele', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Klepnutím vyberte jednotlivého posuzovatele', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'Vyberte jeden', 'select_users' => 'Kliknutím vyberte uživatele', 'select_workflow' => 'Vyberte postup práce', @@ -1200,7 +1200,7 @@ URL: [url]', 'update_locked_msg' => 'Tento dokument je zamčený.', 'update_recipients' => 'Update list of recipients', 'update_reviewers' => 'Aktualizovat seznam kontrolorů', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => 'Nahrál', 'uploading_failed' => 'Nahrání selhalo. Prosím, kontaktujte správce.', 'uploading_maxsize' => 'Nahrávaný soubor je větší než maximální velikost pro upload.', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index 5148fb308..79be3092b 100644 --- a/languages/de_DE/lang.inc +++ b/languages/de_DE/lang.inc @@ -192,7 +192,7 @@ URL: [url]', 'change_password' => 'Passwort ändern', 'change_password_message' => 'Ihr Passwort wurde geändert.', 'change_recipients' => 'Empfänger ändern', -'change_revisers' => 'Wiedervorlage ändern', +'change_revisors' => 'Wiedervorlage ändern', 'change_status' => 'Status ändern', 'charts' => 'Diagramme', 'chart_docsaccumulated_title' => 'Anzahl Dokumente', @@ -716,7 +716,7 @@ URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Anhang gelöscht', 'removed_recipient' => 'ist von der Empfängerliste entfernt worden', 'removed_reviewer' => 'ist von der Prüfer-Liste entfernt worden.', -'removed_reviser' => 'ist von der Liste der Wiederholungsprüfer entfernt worden.', +'removed_revispr' => 'ist von der Liste der Wiederholungsprüfer entfernt worden.', 'removed_workflow_email_body' => 'Workflow von Dokumentenversion entfernt Dokument: [name] Version: [version] @@ -777,8 +777,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Prüfung ausgeführt', 'review_summary' => 'Übersicht Prüfungen', 'review_update_failed' => 'Störung bei Aktualisierung des Prüfstatus. Aktualisierung gescheitert.', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => 'Zurück zum Anfangszustand', 'rewind_workflow_email_body' => 'Workflow wurde zurückgestellt Dokument: [name] @@ -843,12 +843,12 @@ URL: [url]', 'select_grp_notification' => 'Klicken zur Auswahl einer Beobachtergruppe', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'Klicken zur Auswahl einer Prüfgruppe', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => 'Klicken zur Auswahl eines Freigebers', 'select_ind_notification' => 'Klicken zur Auswahl eines Beobachters', 'select_ind_recipients' => 'Click to select individual recipients', 'select_ind_reviewers' => 'Klicken zur Auswahl eines Prüfers', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'Bitte wählen', 'select_users' => 'Klicken zur Auswahl eines Benutzers', 'select_workflow' => 'Workflow auswählen', @@ -1220,7 +1220,7 @@ URL: [url]', 'update_locked_msg' => 'Dieses Dokument wurde gesperrt

    Die Sperrung wurde von [username] eingerichtet.
    ', 'update_recipients' => 'Liste der Empfänger aktualisieren', 'update_reviewers' => 'Liste der Prüfer aktualisieren', -'update_reviser' => 'Liste der Wiederholungsprüfer ändern', +'update_revisor' => 'Liste der Wiederholungsprüfer ändern', 'uploaded_by' => 'Hochgeladen durch', 'uploading_failed' => 'Das Hochladen einer Datei ist fehlgeschlagen. Bitte überprüfen Sie die maximale Dateigröße für Uploads.', 'uploading_maxsize' => 'Die Datei überschreitet die maximale Dateigröße für Uploads.', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index 9f7fc5a89..2a326419c 100644 --- a/languages/en_GB/lang.inc +++ b/languages/en_GB/lang.inc @@ -192,7 +192,7 @@ URL: [url]', 'change_password' => 'Change password', 'change_password_message' => 'Your password has been changed.', 'change_recipients' => 'Change recipients', -'change_revisers' => 'Change resubmission', +'change_revisors' => 'Change resubmission', 'change_status' => 'Change Status', 'charts' => 'Charts', 'chart_docsaccumulated_title' => 'Number of documents', @@ -716,7 +716,7 @@ URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Removed attachment', 'removed_recipient' => 'has been removed from the list of recipients.', 'removed_reviewer' => 'has been removed from the list of reviewers.', -'removed_reviser' => 'has been removed from the list of resubmitter.', +'removed_revispr' => 'has been removed from the list of resubmitter.', 'removed_workflow_email_body' => 'Removed workflow from document version Document: [name] Version: [version] @@ -784,8 +784,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Submitted review', 'review_summary' => 'Review Summary', 'review_update_failed' => 'Error updating review status. Update failed.', -'reviser_already_assigned' => 'User is already assigned as an resubmitter.', -'reviser_already_removed' => 'Resubmitter has already been removed from revision process or has already revised the document.', +'revisor_already_assigned' => 'User is already assigned as an resubmitter.', +'revisor_already_removed' => 'Resubmitter has already been removed from revision process or has already revised the document.', 'rewind_workflow' => 'Rewind workflow', 'rewind_workflow_email_body' => 'Workflow was rewinded Document: [name] @@ -850,12 +850,12 @@ URL: [url]', 'select_grp_notification' => 'Click to select group notification', 'select_grp_recipients' => 'Click to select group of recipients', 'select_grp_reviewers' => 'Click to select group reviewer', -'select_grp_revisers' => 'Click to select group of resubmitters', +'select_grp_revisors' => 'Click to select group of resubmitters', 'select_ind_approvers' => 'Click to select individual approver', 'select_ind_notification' => 'Click to select individual notification', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Click to select individual reviewer', -'select_ind_revisers' => 'Click to select individual resubmitters', +'select_ind_revisors' => 'Click to select individual resubmitters', 'select_one' => 'Select one', 'select_users' => 'Click to select users', 'select_workflow' => 'Select workflow', @@ -1227,7 +1227,7 @@ URL: [url]', 'update_locked_msg' => 'This document is locked.', 'update_recipients' => '', 'update_reviewers' => 'Update List of Reviewers', -'update_reviser' => 'Update list of resubmitters', +'update_revisor' => 'Update list of resubmitters', 'uploaded_by' => 'Uploaded by', 'uploading_failed' => 'Uploading one of your files failed. Please check your maximum upload file size.', 'uploading_maxsize' => 'The uploaded file exceeds the maximum upload file size.', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index 1a77229b7..b3c2ff093 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -187,7 +187,7 @@ URL: [url]', 'change_password' => 'cambiar contraseña', 'change_password_message' => 'Su contraseña se ha modificado.', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => 'cambiar estado', 'charts' => 'Gráficos', 'chart_docsaccumulated_title' => 'Cantidad de documentos', @@ -712,7 +712,7 @@ URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Eliminar adjunto', 'removed_recipient' => '', 'removed_reviewer' => 'Ha sido eliminado de la lista de revisores.', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => 'Eliminar flujo de trabajo de la versión del documento Documento: [name] Versión: [version] @@ -763,8 +763,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Revisión enviada', 'review_summary' => 'Resumen de revisión', 'review_update_failed' => 'Error actualizando el estado de la revisión. La actualización ha fallado.', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => 'Retroceso del flujo de trabajo', 'rewind_workflow_email_body' => 'Flujo de trabajo fue retrocedido Documento: [name] @@ -829,12 +829,12 @@ URL: [url]', 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'Haga Click para seleccionar grupo de revisores', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => 'Haga Click para seleccionar aprobador individual', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Haga Click para seleccionar revisor individual', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'Seleccionar uno', 'select_users' => 'Haga Click para seleccionar usuarios', 'select_workflow' => 'Selecionar Flujo de Trabajo', @@ -1206,7 +1206,7 @@ URL: [url]', 'update_locked_msg' => 'Este documento está bloqueado.', 'update_recipients' => '', 'update_reviewers' => 'Actualizar lista de revisores', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => 'Enviado por', 'uploading_failed' => 'Envío (Upload) fallido. Por favor contacte con el Administrador.', 'uploading_maxsize' => 'El archivo subido supera el tamaño máximo de upload', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 5f661d3d9..579a46ea8 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -187,7 +187,7 @@ URL: [url]', 'change_password' => 'Changer de mot de passe', 'change_password_message' => 'Votre mot de passe a été changé.', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => 'Modifier le statut', 'charts' => 'Graphiques', 'chart_docsaccumulated_title' => 'Nombre de documents', @@ -709,7 +709,7 @@ URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Attachement supprimé', 'removed_recipient' => '', 'removed_reviewer' => 'a été retiré de la liste des correcteurs.', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => 'Workflow du document supprimé: [name] Version: [version] Workflow: [workflow] @@ -752,8 +752,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Correction soumise', 'review_summary' => 'Sommaire de correction', 'review_update_failed' => 'Erreur lors de la mise à jour de la correction. Echec de la mise à jour.', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => 'Remonter le workflow', 'rewind_workflow_email_body' => '', 'rewind_workflow_email_subject' => '[sitename]: [name] - Le workflow a été réinitialisé', @@ -805,12 +805,12 @@ URL: [url]', 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'Cliquer pour choisir un groupe de correcteur', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => 'Cliquer pour choisir un approbateur individuel', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Cliquer pour choisir un correcteur individuel', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'Selectionner', 'select_users' => 'Cliquer pour choisir un utilisateur', 'select_workflow' => 'Choisir un workflow', @@ -1173,7 +1173,7 @@ URL: [url]', 'update_locked_msg' => 'Ce document est verrouillé.', 'update_recipients' => '', 'update_reviewers' => 'Mise à jour de la liste de correcteurs', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => 'Déposé par', 'uploading_failed' => 'Dépose du document échoué. SVP Contactez le responsable.', 'uploading_maxsize' => 'La taille du fichier téléchargé excède la taille maximale accepté', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index 63fdb8e45..0123bb35e 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -187,7 +187,7 @@ URL: [url]', 'change_password' => 'Jelszó módosítása', 'change_password_message' => 'Jelszava módosításra került.', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => 'Állapot módosítása', 'charts' => 'Diagramok', 'chart_docsaccumulated_title' => 'Dokumentumok száma', @@ -712,7 +712,7 @@ URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Eltávolított melléklet', 'removed_recipient' => '', 'removed_reviewer' => 'eltávolításra került a felülvizsgálók listájáról.', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => 'Dokumentum változatból eltávolított munkafolyamat Dokumentum: [name] Verzió: [version] @@ -763,8 +763,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Beküldött felülvizsgálat', 'review_summary' => 'Felülvizsgálat összefoglaló', 'review_update_failed' => 'Hiba a felülvizsgálat állapot frissítése során. Frissítés sikertelen.', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => 'Munkafolyamat visszajátszás', 'rewind_workflow_email_body' => 'Munkafolyamat visszajátszva Dokumentum: [name] @@ -828,12 +828,12 @@ URL: [url]', 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'Kattintson a csoport felülvizsgáló kijelöléséhez', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => 'Kattintson az önálló jóváhagyó kijelöléséhez', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Kattintson az önálló felülvizsgáló kijelöléséhez', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'Vßlasszon egyet', 'select_users' => 'Kattintson a felhasználó kiválasztásához', 'select_workflow' => 'Munkafolyamat választás', @@ -1205,7 +1205,7 @@ URL: [url]', 'update_locked_msg' => 'Ez a dokumentum zárolt.', 'update_recipients' => '', 'update_reviewers' => 'Felülvizsgálók listájának frissítése', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => 'Feltöltötte', 'uploading_failed' => 'Állományai egyikének feltöltése sikertelen. Kérjük ellenőrizze a legnagyobb feltölthető állomány méretet.', 'uploading_maxsize' => 'A feltöltött fájl nagyobb, mint a megengedezz maximális méret', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index a5bcb9ef0..506b70108 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -192,7 +192,7 @@ URL: [url]', 'change_password' => 'Cambia la password', 'change_password_message' => 'La password è stata cambiata', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => 'Modifica lo Stato', 'charts' => 'Grafici', 'chart_docsaccumulated_title' => 'Numero di documenti', @@ -717,7 +717,7 @@ URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Allegato rimosso', 'removed_recipient' => '', 'removed_reviewer' => 'é stato rimosso dalla lista dei revisori.', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => 'Flusso di lavoro rimosso dalla versione del documento Documento: [name] Versione: [version] @@ -785,8 +785,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Sottoposta revisione', 'review_summary' => 'Dettaglio revisioni', 'review_update_failed' => 'Errore nella variazione dello stato di revisione. Aggiornamento fallito.', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => 'Inverti il flusso di lavoro', 'rewind_workflow_email_body' => 'Il flusso di lavoro è stato invertito Document: [name] @@ -851,12 +851,12 @@ URL: [url]', 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'Seleziona gruppo revisore', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => 'Seleziona approvatore', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Seleziona revisore', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'Seleziona uno', 'select_users' => 'Clicca per selezionare gli utenti', 'select_workflow' => 'Seleziona il flusso di lavoro', @@ -1228,7 +1228,7 @@ URL: [url]', 'update_locked_msg' => 'Questo documento è bloccato.', 'update_recipients' => '', 'update_reviewers' => 'Aggiorna lista revisori', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => 'Caricato da', 'uploading_failed' => 'Upload fallito. Controllare la dimensione massima caricabile consentita.', 'uploading_maxsize' => 'Il file caricato supera la dimensione massima consentita.', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 665102946..0130a989b 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -180,7 +180,7 @@ URL: [url]', 'change_password' => 'Wijzig wachtwoord', 'change_password_message' => 'Wachtwoord is gewijzigd.', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => 'Wijzig Status', 'charts' => 'Grafieken', 'chart_docsaccumulated_title' => 'Aantal documenten', @@ -705,7 +705,7 @@ URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Bijlage verwijderd', 'removed_recipient' => '', 'removed_reviewer' => 'is verwijderd uit de lijst van [Controleurs].', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => 'Workflow verwijderd van document versiedocument: [name] Versie: [version] Workflow: [workflow] @@ -754,8 +754,8 @@ URL: [url', 'review_submit_email_subject' => '[sitename]: [name] - Beoordeling toegevoegd', 'review_summary' => '[Controle] Samenvatting', 'review_update_failed' => 'Foutmelding: fout bij bijwerken [Controle] Status. Bijwerken mislukt.', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => 'Terugzetten workflow', 'rewind_workflow_email_body' => 'Workflow is teruggezet Document: [name] @@ -820,12 +820,12 @@ URL: [url]', 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'Klik om groep beoordelaar te selecteren', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => 'Klik om individuele beoordelaar te selecteren', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Klik om individuele beoordelaar te selecteren', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'Selecteer een', 'select_users' => 'Klik om gebruikers te selecteren', 'select_workflow' => 'Selecteer workflow', @@ -1197,7 +1197,7 @@ URL: [url]', 'update_locked_msg' => 'Dit document is geblokkeerd.', 'update_recipients' => '', 'update_reviewers' => 'Bijwerken lijst van [Controleurs]', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => 'Ge-upload door', 'uploading_failed' => 'Upload mislukt. Neem contact op met de [Beheerder].', 'uploading_maxsize' => 'Het geuploade bestand overschrijdt de maximum grootte.', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 673290531..8cf4f90c6 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -180,7 +180,7 @@ URL: [url]', 'change_password' => 'Zmiana hasła', 'change_password_message' => 'Twoje hasło zostało zmienione.', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => 'Zmień status', 'charts' => 'Wykresy', 'chart_docsaccumulated_title' => 'Liczba dokumentów', @@ -705,7 +705,7 @@ URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Usunięty załącznik', 'removed_recipient' => '', 'removed_reviewer' => 'został usunięty z listy recenzentów.', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => 'Usunięcie procesu z wersji dokumentu Dokument: [name] Wersja: [version] @@ -742,8 +742,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Napisano recenzję', 'review_summary' => 'Podsumowanie opiniowania', 'review_update_failed' => 'Błąd podczas aktualizowania statusu recenzji. Aktualizacja nie powiodła się.', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => 'Przewiń proces', 'rewind_workflow_email_body' => 'Przewinięcie procesu Dokument: [name] @@ -808,12 +808,12 @@ URL: [url]', 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'Kliknij by wybrać grupę recenzentów', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => 'Kliknij by wybrać zatwierdzającego', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Kliknij by wybrać recenzenta', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'Wybierz', 'select_users' => 'Kliknij by wybrać użytkowników', 'select_workflow' => 'Wybierz proces', @@ -1185,7 +1185,7 @@ URL: [url]', 'update_locked_msg' => 'Ten dokument jest zablokowany.', 'update_recipients' => '', 'update_reviewers' => 'Aktualizuj listę recenzentów', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => 'Przesłane przez', 'uploading_failed' => 'Przesyłanie nie powiodło się. Skontaktuj się z administratorem.', 'uploading_maxsize' => 'Rozmiar pliku większy niż dopuszczalny', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 99a3a80be..9325dbb65 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -187,7 +187,7 @@ URL: [url]', 'change_password' => 'Modificar senha', 'change_password_message' => 'Sua senha foi modificada.', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => 'Mudar status', 'charts' => 'Gráficos', 'chart_docsaccumulated_title' => 'Número de documentos', @@ -710,7 +710,7 @@ URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Anexo removido', 'removed_recipient' => '', 'removed_reviewer' => 'has been removed from the list of reviewers.', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => 'Removido do fluxo de trabalho de documentos version Document: [name] Versão: [version] @@ -760,8 +760,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Revisão submetida', 'review_summary' => 'Review Summary', 'review_update_failed' => 'Error updating review status. Update failed.', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => 'Fluxo de trabalho revisto', 'rewind_workflow_email_body' => 'Fluxo de processo foi revisto Documento: [name] @@ -826,12 +826,12 @@ URL: [url]', 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'Clique para selecionar o grupo revisor', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => 'Clique para selecionar aprovador indivídual', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Clique para selecionar revisor individual', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'Selecione um', 'select_users' => 'Clique para selecionar os usuários', 'select_workflow' => 'Selecione o fluxo de trabalho', @@ -1203,7 +1203,7 @@ URL: [url]', 'update_locked_msg' => 'Este documento está travado.', 'update_recipients' => '', 'update_reviewers' => 'Update List of Reviewers', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => 'Inserido por', 'uploading_failed' => 'Inserção falhou. Por favor contacte o administrador', 'uploading_maxsize' => 'O arquivo excede o tamanho máximo permitido para upload.', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index a26ee7275..b37ffd735 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -187,7 +187,7 @@ URL: [url]', 'change_password' => 'Schimbă parola', 'change_password_message' => 'Parola dumneavoastra a fost schimbată.', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => 'Schimbă status', 'charts' => 'Grafice', 'chart_docsaccumulated_title' => 'Numărul de documente', @@ -712,7 +712,7 @@ URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Atașament eliminat', 'removed_recipient' => '', 'removed_reviewer' => 'a fost eliminat din lista de revizuitori.', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => 'Workflow eliminat din versiunea documentului Document: [name] Versiune: [version] @@ -763,8 +763,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Revizuire trimisă', 'review_summary' => 'Sumar revizuire', 'review_update_failed' => 'Eroare actualizarea status revizuire. Actualizarea a eșuat.', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => 'Derulare workflow', 'rewind_workflow_email_body' => 'Workflow derulat Document: [name] @@ -829,12 +829,12 @@ URL: [url]', 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'Click pentru a selecta grupul de revizuitori', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => 'Click pentru a selecta un aprobator individual', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Click pentru a selecta un revizuitor individual', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'Selectați unul', 'select_users' => 'Click pentru a selecta utilizatori', 'select_workflow' => 'Selectați workflow', @@ -1206,7 +1206,7 @@ URL: [url]', 'update_locked_msg' => 'Acest document este blocat.', 'update_recipients' => '', 'update_reviewers' => 'Actualizare Listă de revizuitori', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => 'Adaugate de', 'uploading_failed' => 'Încărcarea unuia dintre fișierele a eșuat. Vă rugăm să verificați dimensiunea maximă de încărcare fișiere.', 'uploading_maxsize' => 'Fișierul încărcat depășește dimensiunea maximă de încărcare fișiere.', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index dead290d1..aa1300b93 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -180,7 +180,7 @@ URL: [url]', 'change_password' => 'Изменить пароль', 'change_password_message' => 'Пароль изменён', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => 'Изменить статус', 'charts' => 'Диаграммы', 'chart_docsaccumulated_title' => 'Количество документов', @@ -702,7 +702,7 @@ URL: [url]', 'removed_file_email_subject' => '[sitename]: удалено приложение к «[document]»', 'removed_recipient' => '', 'removed_reviewer' => 'удалён из списка рецензирующих', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => 'Удалён процесс из версии документа Документ: [name] Версия: [version] @@ -753,8 +753,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: отправлена рецензия на «[name]»', 'review_summary' => 'Сводка по рецензии', 'review_update_failed' => 'Ошибка обновления статуса рецензии', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => 'Начать процесс с начала', 'rewind_workflow_email_body' => 'Процесс был начат с начала Документ: [name] @@ -819,12 +819,12 @@ URL: [url]', 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'Выберите рецензирующую группу', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => 'Выберите индивидуального утверждающего', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Выберите индивидуального рецензента', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'Выберите', 'select_users' => 'Выберите пользователей', 'select_workflow' => 'Выберите процесс', @@ -1196,7 +1196,7 @@ URL: [url]', 'update_locked_msg' => 'Этот документ заблокирован', 'update_recipients' => '', 'update_reviewers' => 'Обновить список рецензирующих', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => 'Загрузил(а)', 'uploading_failed' => 'Загрузка не удалась. Свяжитесь с администратором.', 'uploading_maxsize' => 'Размер загруженного файла превышает максимально возможный', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 218c1d78a..453beb798 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -165,7 +165,7 @@ $text = array( 'change_password' => '', 'change_password_message' => '', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => 'Zmeniť stav', 'charts' => '', 'chart_docsaccumulated_title' => '', @@ -595,7 +595,7 @@ $text = array( 'removed_file_email_subject' => '', 'removed_recipient' => '', 'removed_reviewer' => 'bol odstránený zo zoznamu kontrolórov.', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => '', 'removed_workflow_email_subject' => '', 'remove_marked_files' => '', @@ -626,8 +626,8 @@ $text = array( 'review_submit_email_subject' => '', 'review_summary' => 'Zhrnutie kontroly', 'review_update_failed' => 'Chyba pri aktualizácii stavu kontroly. Aktualizácia zlyhala.', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => '', 'rewind_workflow_email_body' => '', 'rewind_workflow_email_subject' => '', @@ -679,12 +679,12 @@ $text = array( 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => '', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => '', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => '', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'Vyberte jeden', 'select_users' => '', 'select_workflow' => '', @@ -1047,7 +1047,7 @@ $text = array( 'update_locked_msg' => 'Tento dokument je zamknutý.', 'update_recipients' => '', 'update_reviewers' => 'Aktualizovať zoznam kontrolórov', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => 'Nahral', 'uploading_failed' => 'Nahranie zlyhalo. Prosám, kontaktujte správcu.', 'uploading_maxsize' => 'Uploadovaný súbor prekročil maximálnu povolenú velkosť.', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 92786a186..1a02dcfb7 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -180,7 +180,7 @@ URL: [url]', 'change_password' => 'Ändra lösenord', 'change_password_message' => 'Ditt lösenord har ändrats.', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => 'Ändra status', 'charts' => 'Diagram', 'chart_docsaccumulated_title' => 'Antal dokument', @@ -697,7 +697,7 @@ URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Borttagen bilaga', 'removed_recipient' => '', 'removed_reviewer' => 'har tagits bort från listan med personer som ska granska dokumentet.', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => 'Arbetsflöde borttagen från dokument version Dokument: [name] Version: [version] @@ -748,8 +748,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Skickat granskning', 'review_summary' => 'Sammanfattning av granskningen', 'review_update_failed' => 'Fel vid uppdatering av granskningsstatus. Kunde inte uppdatera.', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => 'Återställ arbetsflödet', 'rewind_workflow_email_body' => 'Återställ arbetsflödet Dokument: [name] @@ -814,12 +814,12 @@ URL: [url]', 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'Välj en grupp som ska granska', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => 'Välj en person som ska godkänna', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Välj en person som ska granska', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'Välj', 'select_users' => 'Välj användare', 'select_workflow' => 'Välj arbetsflöde', @@ -1191,7 +1191,7 @@ URL: [url]', 'update_locked_msg' => 'Dokumentet är låst.', 'update_recipients' => '', 'update_reviewers' => 'Uppdatera listan med personer som granskar', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => 'Uppladdat av', 'uploading_failed' => 'Fel vid uppladdningen. Kontakta administratören.', 'uploading_maxsize' => 'Uppladdade filen översteg maxgränsen för storleken på filstorlek', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 466cb247c..577c43d5a 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -186,7 +186,7 @@ URL: [url]', 'change_password' => 'Parola degiştir', 'change_password_message' => 'Parolanız değişti.', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => 'Değişme Durumu', 'charts' => 'Grafikler', 'chart_docsaccumulated_title' => 'Doküman sayısı', @@ -713,7 +713,7 @@ URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Ek silindi', 'removed_recipient' => '', 'removed_reviewer' => 'kontrol edenler listesinden çıkarıldı', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => 'Doküman versiyonundan iş akışı silindi Doküman: [name] Versiyon: [version] @@ -764,8 +764,8 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Kontrol gönderildi', 'review_summary' => 'Kontrol Özeti', 'review_update_failed' => 'Kontrol güncelleme durumu hatalı. Güncelleme başarısız.', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => 'İş akışını geri al', 'rewind_workflow_email_body' => 'İş akışı geri alındı Doküman: [name] @@ -830,12 +830,12 @@ URL: [url]', 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'Grup kontrol edeni seçmek için tıklayın', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => 'Bireysel onaylanı seçmek için tıklayın', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Biresysel kontrol edeni seçmek için tıklayın', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => 'Birini seçiniz', 'select_users' => 'Kullanıcı seçmek için tıklayın', 'select_workflow' => 'İş akışı seç', @@ -1207,7 +1207,7 @@ URL: [url]', 'update_locked_msg' => 'Bu doküman kilitli.', 'update_recipients' => '', 'update_reviewers' => 'Kontrol edenlerin listesini güncelle', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => 'Yükleyen', 'uploading_failed' => 'Dosyalardan biri yüklenirken başarısız oldu. Maksimum yükleme boyutunuzu kontrol ediniz.', 'uploading_maxsize' => 'Yüklenen dosya maksimum yükleme boyutundan fazla.', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index e58a9afad..59bd81cde 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -169,7 +169,7 @@ URL: [url]', 'change_password' => '', 'change_password_message' => '', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => '变更状态', 'charts' => '图表', 'chart_docsaccumulated_title' => '', @@ -601,7 +601,7 @@ URL: [url]', 'removed_file_email_subject' => '', 'removed_recipient' => '', 'removed_reviewer' => '已经从校对人名单中删除', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => '', 'removed_workflow_email_subject' => '', 'remove_marked_files' => '', @@ -632,8 +632,8 @@ URL: [url]', 'review_submit_email_subject' => '', 'review_summary' => '校对汇总', 'review_update_failed' => '错误 更新校对状态.更新失败', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => '', 'rewind_workflow_email_body' => '', 'rewind_workflow_email_subject' => '', @@ -685,12 +685,12 @@ URL: [url]', 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => '', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => '', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => '', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => '选择一个', 'select_users' => '点击选择用户', 'select_workflow' => '', @@ -1053,7 +1053,7 @@ URL: [url]', 'update_locked_msg' => '该文档被锁定', 'update_recipients' => '', 'update_reviewers' => '更新校对人名单', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => '上传者', 'uploading_failed' => '文件太大无法上传!请处理后重新上传。', 'uploading_maxsize' => '最大上传限制', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 3d24ee2a1..eaa7088d5 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -169,7 +169,7 @@ URL: [url]', 'change_password' => '變更密碼', 'change_password_message' => '變更密碼提示', 'change_recipients' => '', -'change_revisers' => '', +'change_revisors' => '', 'change_status' => '變更狀態', 'charts' => '圖表', 'chart_docsaccumulated_title' => '', @@ -599,7 +599,7 @@ URL: [url]', 'removed_file_email_subject' => '', 'removed_recipient' => '', 'removed_reviewer' => '已經從校對人名單中刪除', -'removed_reviser' => '', +'removed_revispr' => '', 'removed_workflow_email_body' => '', 'removed_workflow_email_subject' => '', 'remove_marked_files' => '', @@ -630,8 +630,8 @@ URL: [url]', 'review_submit_email_subject' => '', 'review_summary' => '校對匯總', 'review_update_failed' => '錯誤 更新校對狀態.更新失敗', -'reviser_already_assigned' => '', -'reviser_already_removed' => '', +'revisor_already_assigned' => '', +'revisor_already_removed' => '', 'rewind_workflow' => '', 'rewind_workflow_email_body' => '', 'rewind_workflow_email_subject' => '', @@ -683,12 +683,12 @@ URL: [url]', 'select_grp_notification' => '', 'select_grp_recipients' => '', 'select_grp_reviewers' => '', -'select_grp_revisers' => '', +'select_grp_revisors' => '', 'select_ind_approvers' => '', 'select_ind_notification' => '', 'select_ind_recipients' => '', 'select_ind_reviewers' => '', -'select_ind_revisers' => '', +'select_ind_revisors' => '', 'select_one' => '選擇一個', 'select_users' => '點擊選擇用戶', 'select_workflow' => '', @@ -1051,7 +1051,7 @@ URL: [url]', 'update_locked_msg' => '該文檔被鎖定', 'update_recipients' => '', 'update_reviewers' => '更新校對人名單', -'update_reviser' => '', +'update_revisor' => '', 'uploaded_by' => '上傳者', 'uploading_failed' => '文件太大無法上傳!請處理後重新上傳。', 'uploading_maxsize' => '最大上傳限制', From 0fab2df676607a0917bd2b23d185b82835b89ec4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 11 May 2015 09:29:34 +0200 Subject: [PATCH 0081/2006] many changes on revision workflow --- SeedDMS_Core/Core/inc.ClassDocument.php | 555 ++++++++++++++---------- SeedDMS_Core/Core/inc.ClassGroup.php | 27 +- SeedDMS_Core/Core/inc.ClassUser.php | 46 +- 3 files changed, 359 insertions(+), 269 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 49f103a2c..7329b714d 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -64,6 +64,41 @@ define("S_OBSOLETE", -2); */ define("S_EXPIRED", -3); +/** + * The different states a workflow log can be in. This is used in + * all tables tblDocumentXXXLog + */ +/* + * workflow is in a neutral status waiting for action of user + */ +define("S_LOG_WAITING", 0); + +/* + * workflow has been successful ended. The document content has been + * approved, reviewed, aknowledged or revised + */ +define("S_LOG_ACCEPTED", 1); + +/* + * workflow has been unsuccessful ended. The document content has been + * rejected + */ +define("S_LOG_REJECTED", -1); + +/* + * user has been removed from workflow. This can be for different reasons + * 1. the user has been actively removed from the workflow, 2. the user has + * been deleted. + */ +define("S_LOG_USER_REMOVED", -2); + +/* + * workflow is sleeping until reactivation. The workflow has been set up + * but not started. This is only valid for the revision workflow, which + * may run over and over again. + */ +define("S_LOG_SLEEPING", -3); + /** * Class to represent a document in the document management system * @@ -591,7 +626,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ if($lc) { $st=$lc->getStatus(); - if (($st["status"]==S_DRAFT_REV || $st["status"]==S_DRAFT_APP || $st["status"]==S_IN_WORKFLOW || $st["status"]==S_RELEASED) && $this->hasExpired()){ + if (($st["status"]==S_DRAFT_REV || $st["status"]==S_DRAFT_APP || $st["status"]==S_IN_WORKFLOW || $st["status"]==S_RELEASED || $st["status"]==S_IN_REVISION) && $this->hasExpired()){ return $lc->setStatus(S_EXPIRED,"", $this->getOwner()); } elseif ($st["status"]==S_EXPIRED && !$this->hasExpired() ){ @@ -1620,7 +1655,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $this->_content = array(); foreach ($resArr as $row) - array_push($this->_content, new SeedDMS_Core_DocumentContent($row["id"], $this, $row["version"], $row["comment"], $row["date"], $row["createdBy"], $row["dir"], $row["orgFileName"], $row["fileType"], $row["mimeType"], $row['fileSize'], $row['checksum'])); + array_push($this->_content, new SeedDMS_Core_DocumentContent($row["id"], $this, $row["version"], $row["comment"], $row["date"], $row["createdBy"], $row["dir"], $row["orgFileName"], $row["fileType"], $row["mimeType"], $row['fileSize'], $row['checksum'], $row['reviѕiondate'])); } return $this->_content; @@ -1652,7 +1687,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return false; $resArr = $resArr[0]; - return new SeedDMS_Core_DocumentContent($resArr["id"], $this, $resArr["version"], $resArr["comment"], $resArr["date"], $resArr["createdBy"], $resArr["dir"], $resArr["orgFileName"], $resArr["fileType"], $resArr["mimeType"], $resArr['fileSize'], $resArr['checksum']); + return new SeedDMS_Core_DocumentContent($resArr["id"], $this, $resArr["version"], $resArr["comment"], $resArr["date"], $resArr["createdBy"], $resArr["dir"], $resArr["orgFileName"], $resArr["fileType"], $resArr["mimeType"], $resArr['fileSize'], $resArr['checksum'], $resArr['revisiondate']); } /* }}} */ function getLatestContent() { /* {{{ */ @@ -1666,7 +1701,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return false; $resArr = $resArr[0]; - $this->_latestContent = new SeedDMS_Core_DocumentContent($resArr["id"], $this, $resArr["version"], $resArr["comment"], $resArr["date"], $resArr["createdBy"], $resArr["dir"], $resArr["orgFileName"], $resArr["fileType"], $resArr["mimeType"], $resArr['fileSize'], $resArr['checksum']); + $this->_latestContent = new SeedDMS_Core_DocumentContent($resArr["id"], $this, $resArr["version"], $resArr["comment"], $resArr["date"], $resArr["createdBy"], $resArr["dir"], $resArr["orgFileName"], $resArr["fileType"], $resArr["mimeType"], $resArr['fileSize'], $resArr['checksum'], $resArr['revisiondate']); } return $this->_latestContent; } /* }}} */ @@ -2374,15 +2409,27 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ } } } + $pendingRevision=false; + unset($this->_revisionStatus); // force to be reloaded from DB + $revsisionStatus=$this->getRevisionStatus(); + if (is_array($revsisionStatus) && count($revsisionStatus)>0) { + foreach ($revsisionStatus as $a){ + if ($a["status"]==0){ + $pendingRevision=true; + break; + } + } + } unset($this->_workflow); // force to be reloaded from DB if ($this->getWorkflow()) $this->setStatus(S_IN_WORKFLOW,$msg,$user); elseif ($pendingReview) $this->setStatus(S_DRAFT_REV,$msg,$user); elseif ($pendingApproval) $this->setStatus(S_DRAFT_APP,$msg,$user); + elseif ($pendingRevision) $this->setStatus(S_IN_REVISION,$msg,$user); else $this->setStatus(S_RELEASED,$msg,$user); } /* }}} */ - function SeedDMS_Core_DocumentContent($id, $document, $version, $comment, $date, $userID, $dir, $orgFileName, $fileType, $mimeType, $fileSize=0, $checksum='') { /* {{{ */ + function SeedDMS_Core_DocumentContent($id, $document, $version, $comment, $date, $userID, $dir, $orgFileName, $fileType, $mimeType, $fileSize=0, $checksum='', $revisionDate=null) { /* {{{ */ parent::__construct($id); $this->_document = $document; $this->_version = (int) $version; @@ -2402,6 +2449,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ $this->_checksum = $checksum; $this->_workflow = null; $this->_workflowState = null; + $this->_revisionDate = $revisionDate; } /* }}} */ function getVersion() { return $this->_version; } @@ -2412,6 +2460,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ function getFileName(){ return $this->_version . $this->_fileType; } function getDir() { return $this->_dir; } function getMimeType() { return $this->_mimeType; } + function getRevisionDate() { return $this->_revisionDate; } function getDocument() { return $this->_document; } function getUser() { /* {{{ */ @@ -2422,6 +2471,21 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ function getPath() { return $this->_document->getDir() . $this->_version . $this->_fileType; } + function setRevisionDate($date = false) { /* {{{ */ + $db = $this->_document->_dms->getDB(); + + if(!$date) + $date = date('Y-m-d'); + + $queryStr = "UPDATE tblDocumentContent SET revisiondate = ".$db->qstr($date)." WHERE `document` = " . $this->_document->getID() . " AND `version` = " . $this->_version; + if (!$db->getResult($queryStr)) + return false; + + $this->_revisionDate = $date; + + return true; + } /* }}} */ + function setDate($date = false) { /* {{{ */ $db = $this->_document->_dms->getDB(); @@ -2566,6 +2630,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ * S_DRAFT_APP, 1 * S_RELEASED, 2 * S_IN_WORKFLOW, 3 + * S_IN_REVISION, 4 * S_REJECTED, -1 * S_OBSOLETE, -2 * S_EXPIRED, -3 @@ -2892,7 +2957,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (1 || !isset($this->_revisionStatus)) { /* First get a list of all revisions for this document content */ $queryStr= - "SELECT revisionID FROM tblDocumentRevisers WHERE `version`='".$this->_version + "SELECT revisionID FROM tblDocumentRevisors WHERE `version`='".$this->_version ."' AND `documentID` = '". $this->_document->getID() ."' "; $recs = $db->getResultArray($queryStr); if (is_bool($recs) && !$recs) @@ -2901,16 +2966,16 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if($recs) { foreach($recs as $rec) { $queryStr= - "SELECT `tblDocumentRevisers`.*, `tblDocumentRevisionLog`.`revisionLogID`, ". + "SELECT `tblDocumentRevisors`.*, `tblDocumentRevisionLog`.`revisionLogID`, ". "`tblDocumentRevisionLog`.`status`, ". "`tblDocumentRevisionLog`.`comment`, ". "`tblDocumentRevisionLog`.`date`, ". "`tblDocumentRevisionLog`.`userID`, `tblUsers`.`fullName`, `tblGroups`.`name` AS `groupName` ". - "FROM `tblDocumentRevisers` ". + "FROM `tblDocumentRevisors` ". "LEFT JOIN `tblDocumentRevisionLog` USING (`revisionID`) ". - "LEFT JOIN `tblUsers` on `tblUsers`.`id` = `tblDocumentRevisers`.`required` ". - "LEFT JOIN `tblGroups` on `tblGroups`.`id` = `tblDocumentRevisers`.`required` ". - "WHERE `tblDocumentRevisers`.`revisionID` = '". $rec['revisionID'] ."' ". + "LEFT JOIN `tblUsers` on `tblUsers`.`id` = `tblDocumentRevisors`.`required` ". + "LEFT JOIN `tblGroups` on `tblGroups`.`id` = `tblDocumentRevisors`.`required` ". + "WHERE `tblDocumentRevisors`.`revisionID` = '". $rec['revisionID'] ."' ". "ORDER BY `tblDocumentRevisionLog`.`revisionLogID` DESC LIMIT ".(int) $limit; $res = $db->getResultArray($queryStr); @@ -2925,7 +2990,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return $this->_revisionStatus; } /* }}} */ - function addIndReviewer($user, $requestUser, $listadmin=false) { /* {{{ */ + function addIndReviewer($user, $requestUser) { /* {{{ */ $db = $this->_document->_dms->getDB(); $userID = $user->getID(); @@ -2934,21 +2999,6 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if($this->_document->getAccessMode($user) < M_READ) { return -2; } - /* - if (!isset($this->_readAccessList)) { - $this->_readAccessList = $this->_document->getReadAccessList($listadmin); - } - $approved = false; - foreach ($this->_readAccessList["users"] as $appUser) { - if ($userID == $appUser->getID()) { - $approved = true; - break; - } - } - if (!$approved) { - return -2; - } - */ // Check to see if the user has already been added to the review list. $reviewStatus = $user->getReviewStatus($this->_document->getID(), $this->_version); @@ -3155,7 +3205,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ } } /* }}} */ - function addIndApprover($user, $requestUser, $listadmin=false) { /* {{{ */ + function addIndApprover($user, $requestUser) { /* {{{ */ $db = $this->_document->_dms->getDB(); $userID = $user->getID(); @@ -3164,19 +3214,6 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if($this->_document->getAccessMode($user) < M_READ) { return -2; } - /* - $readAccessList = $this->_document->getReadAccessList($listadmin); - $approved = false; - foreach ($readAccessList["users"] as $appUser) { - if ($userID == $appUser->getID()) { - $approved = true; - break; - } - } - if (!$approved) { - return -2; - } - */ // Check to see if the user has already been added to the approvers list. $approvalStatus = $user->getApprovalStatus($this->_document->getID(), $this->_version); @@ -3373,7 +3410,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return 0; } /* }}} */ - function addIndRecipient($user, $requestUser, $listadmin=false) { /* {{{ */ + function addIndRecipient($user, $requestUser) { /* {{{ */ $db = $this->_document->_dms->getDB(); $userID = $user->getID(); @@ -3483,46 +3520,85 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return 0; } /* }}} */ - function addIndReviser($user, $requestUser, $listadmin=false) { /* {{{ */ - $db = $this->_document->_dms->getDB(); + /** + * Add an individual revisor to the document content + * + * This function adds a user as a revisor but doesn't start the + * revision workflow by default. This behaviour is different from all + * other workflows (approval, review, receipt), because it doesn't add + * the initial entry in the revision log, which starts the workflow. + * It just adds the revisors to the content. The workflow is started + * at a later point in time by adding the first entry in the revision log. + * + * @param object $user user to be added as a revisor + * @param object $requestUser user requesting the addition + * @return integer 0 if successful otherwise a value < 0 + */ + function addRevisor($object, $requestUser) { /* {{{ */ + $dms = $this->_document->_dms; + $db = $dms->getDB(); - $userID = $user->getID(); + /* getRevisionStatus() returns an array with either an element + * 'indstatus' (user) or 'status' (group) containing the revision log + */ + if(get_class($object) == $dms->getClassname('user')) { + $field = 'indstatus'; + $type = 0; - // Get the list of users and groups with read access to this document. - if($this->_document->getAccessMode($user) < M_READ) { - return -2; + // Get the list of users and groups with read access to this document. + if($this->_document->getAccessMode($object) < M_READ) { + return -2; + } + } elseif(get_class($object) == $dms->getClassname('group')) { + $field = 'status'; + $type = 1; + + // Get the list of users and groups with read access to this document. + if($this->_document->getGroupAccessMode($object) < M_READ) { + return -2; + } + } else { + return -1; } - // Check to see if the user has already been added to the reviser list. - $revisionStatus = $user->getRevisionStatus($this->_document->getID(), $this->_version); + // Check to see if the user has already been added to the revisor list. + $revisionStatus = $object->getRevisionStatus($this->_document->getID(), $this->_version); if (is_bool($revisionStatus) && !$revisionStatus) { return -1; } + + /* There are two cases: 1. the user has not been added at all or 2. + * the user was added before but has been removed later. In both + * cases the user may be added. In case 2. 'indstatus' will be set + * and the last status is -2. If it is not -2, then the user is still + * in the process and cannot be added again. + */ $indstatus = false; - if (count($revisionStatus["indstatus"]) > 0) { - $indstatus = array_pop($revisionStatus["indstatus"]); - if($indstatus["status"]!=-2) { - // User is already on the list of recipients; return an error. - return -3; + if(isset($revisionStatus[$field])) { + if (count($revisionStatus[$field]) > 0) { + $indstatus = array_pop($revisionStatus[$field]); + if($indstatus["status"] != S_LOG_USER_REMOVED) { + // User is already on the list of recipients; return an error. + return -3; + } } } - // Add the user into the revisers database. - if (!$indstatus || ($indstatus && $indstatus["status"]!=-2)) { - $queryStr = "INSERT INTO `tblDocumentRevisers` (`documentID`, `version`, `type`, `required`) ". - "VALUES ('". $this->_document->getID() ."', '". $this->_version ."', '0', '". $userID ."')"; + // Add the user into the revisors database. + if (!$indstatus) { + $queryStr = "INSERT INTO `tblDocumentRevisors` (`documentID`, `version`, `type`, `required`) ". + "VALUES ('". $this->_document->getID() ."', '". $this->_version ."', '". $type ."', '". $object->getID() ."')"; $res = $db->getResult($queryStr); if (is_bool($res) && !$res) { return -1; } $revisionID = $db->getInsertID(); - } - else { + } else { $revisionID = isset($indstatus["revisionID"]) ? $indstatus["revisionID"] : NULL; } $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". - "VALUES ('". $revisionID ."', '0', '', CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; + "VALUES ('". $revisionID ."', '".S_LOG_SLEEPING."', '', CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; $res = $db->getResult($queryStr); if (is_bool($res) && !$res) { return -1; @@ -3531,63 +3607,12 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return 0; } /* }}} */ - function addGrpReviser($group, $requestUser) { /* {{{ */ - $db = $this->_document->_dms->getDB(); + function addIndRevisor($user, $requestUser, $donotstart=true) { /* {{{ */ + return self::addRevisor($user, $requestUser, $donotstart); + } /* }}} */ - $groupID = $group->getID(); - - // Get the list of users and groups with read access to this document. - if (!isset($this->_readAccessList)) { - // TODO: error checking. - $this->_readAccessList = $this->_document->getReadAccessList(); - } - $approved = false; - foreach ($this->_readAccessList["groups"] as $appGroup) { - if ($groupID == $appGroup->getID()) { - $approved = true; - break; - } - } - if (!$approved) { - return -2; - } - - // Check to see if the group has already been added to the review list. - $revisionStatus = $group->getRevisionStatus($this->_document->getID(), $this->_version); - if (is_bool($revisionStatus) && !$revisionStatus) { - return -1; - } - $status = false; - if (count($revisionStatus["status"]) > 0) { - $status = array_pop($revisionStatus["status"]); - if($status["status"]!=-2) { - // User is already on the list of recipients; return an error. - return -3; - } - } - - // Add the group into the recipients database. - if (!$status || ($status && $status["status"]!=-2)) { - $queryStr = "INSERT INTO `tblDocumentRevisers` (`documentID`, `version`, `type`, `required`) ". - "VALUES ('". $this->_document->getID() ."', '". $this->_version ."', '1', '". $groupID ."')"; - $res = $db->getResult($queryStr); - if (is_bool($res) && !$res) { - return -1; - } - $revisionID = $db->getInsertID(); - } - else { - $revisionID = isset($status["revisionID"]) ? $status["revisionID"] : NULL; - } - - $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". - "VALUES ('". $revisionID ."', '0', '', CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; - $res = $db->getResult($queryStr); - if (is_bool($res) && !$res) { - return -1; - } - - return 0; + function addGrpRevisor($group, $requestUser, $donotstart=true) { /* {{{ */ + return self::addRevisor($group, $requestUser, $donotstart); } /* }}} */ /** @@ -3595,19 +3620,20 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ * * This method will add an entry to the table tblDocumentReceiptLog. * It will first check if the user is ment to receipt the document version. - * It not the return value is -3. - * Next it will check if the users has been removed from the list of + * If not the return value is -3. + * Next it will check if the user has been removed from the list of * recipients. In that case -4 will be returned. * If the given receipt has been set by the user before, it cannot - * be set again and 0 will be returned. Іf the review could be succesfully - * added, the review log id will be returned. + * be set again and 0 will be returned. Іf the receipt could be succesfully + * added, the receiptview log id will be returned. * * @see SeedDMS_Core_DocumentContent::setApprovalByInd() * @param object $user user doing the receipt * @param object $requestUser user asking for the receipt, this is mostly * @param integer $status the status of the receipt, possible values are - * 0=unprocessed (maybe used to reset a status) + * 0=unprocessed (may be used to reset a status) * 1=received, + * -1=rejected, * -2=user is deleted (use {link * SeedDMS_Core_DocumentContent::delIndRecipient} instead) * the user currently logged in. @@ -3627,7 +3653,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return -3; } $indstatus = array_pop($receiptStatus["indstatus"]); - if ($indstatus["status"]==-2) { + if ($indstatus["status"] == S_LOG_USER_REMOVED) { // User has been deleted from recipients return -4; } @@ -3702,39 +3728,62 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ * * This method will add an entry to the table tblDocumentRevisionLog. * It will first check if the user is ment to revision the document version. - * It not the return value is -3. - * Next it will check if the users has been removed from the list of + * If not the return value is -3. + * Next it will check if the user has been removed from the list of * recipients. In that case -4 will be returned. * If the given revision has been set by the user before, it cannot - * be set again and 0 will be returned. Іf the review could be succesfully - * added, the review log id will be returned. + * be set again and 0 will be returned. Іf the revision could be succesfully + * added, the revision log id will be returned. * * @see SeedDMS_Core_DocumentContent::setApprovalByInd() * @param object $user user doing the revision * @param object $requestUser user asking for the revision, this is mostly + * the user currently logged in. * @param integer $status the status of the revision, possible values are - * 0=unprocessed (maybe used to reset a status) + * 0=unprocessed (may be used to reset a status) * 1=received, * -2=user is deleted (use {link * SeedDMS_Core_DocumentContent::delIndRecipient} instead) - * the user currently logged in. - * @return integer new revision log id + * -3=workflow revision is sleeping + * @return integer new revision log id, 0, or a value < 0. 0 means the + * status has not changed because the new status is equal the current + * status. A value < 0 indicate + * an error. -1: internal error, -3: user may not revise this document + * -4: the user has been removed from the list of revisors, + * -5: the revision has not been started at all. */ - function setRevisionByInd($user, $requestUser, $status, $comment) { /* {{{ */ - $db = $this->_document->_dms->getDB(); + function setRevision($object, $requestUser, $status, $comment) { /* {{{ */ + $dms = $this->_document->_dms; + $db = $dms->getDB(); - // Check to see if the user can be removed from the review list. - $revisionStatus = $user->getRevisionStatus($this->_document->getID(), $this->_version); + /* getRevisionStatus() returns an array with either an element + * 'indstatus' (user) or 'status' (group) containing the revision log + */ + if(get_class($object) == $dms->getClassname('user')) { + $field = 'indstatus'; + } elseif(get_class($object) == $dms->getClassname('group')) { + $field = 'status'; + } else { + return -1; + } + + // Check to see if the user/group can be removed from the review list. + $revisionStatus = $object->getRevisionStatus($this->_document->getID(), $this->_version); if (is_bool($revisionStatus) && !$revisionStatus) { return -1; } - if (count($revisionStatus["indstatus"])==0) { + if (!isset($revisionStatus[$field])) { // User is not assigned to revision this document. No action required. // Return an error. return -3; } - $indstatus = array_pop($revisionStatus["indstatus"]); - if ($indstatus["status"]==-2) { + $indstatus = array_pop($revisionStatus[$field]); + + /* check if revision workflow has been started already */ + if($indstatusi['status'] == S_LOG_SLEEPING && ($status == S_LOG_REJECTED || $status == S_LOG_ACCEPTED)) + return -5; + + if ($indstatus["status"] == -2) { // User has been deleted from recipients return -4; } @@ -3743,7 +3792,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return 0; $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, - `comment`, `date`, `userID`) ". + `comment`, `date`, `userID`) ". "VALUES ('". $indstatus["revisionID"] ."', '". (int) $status ."', ".$db->qstr($comment).", CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; @@ -3756,53 +3805,13 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ } } /* }}} */ - /** - * Add a revision to the document content - * - * This method is similar to - * {@see SeedDMS_Core_DocumentContent::setRevisionByInd()} but adds a revision - * for a group instead of a user. - * - * @param object $group group doing the revision - * @param object $requestUser user asking for the revision, this is mostly - * the user currently logged in. - * @return integer new revision log id - */ + function setRevisionByInd($user, $requestUser, $status, $comment) { /* {{{ */ + return self::setRevision($user, $requestUser, $status, $comment); + } /* }}} */ + function setRevisionByGrp($group, $requestUser, $status, $comment) { /* {{{ */ - $db = $this->_document->_dms->getDB(); - - // Check to see if the user can be removed from the recipient list. - $revisionStatus = $group->getRevisionStatus($this->_document->getID(), $this->_version); - if (is_bool($revisionStatus) && !$revisionStatus) { - return -1; - } - if (count($revisionStatus)==0) { - // User is not assigned to revision this document. No action required. - // Return an error. - return -3; - } - if ($revisionStatus[0]["status"]==-2) { - // Group has been deleted from recipients - return -4; - } - - // Check if the status is really different from the current status - if ($revisionStatus[0]["status"] == $status) - return 0; - - $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`recipientsID`, `status`, - `comment`, `date`, `userID`) ". - "VALUES ('". $revisionStatus[0]["recipientsID"] ."', '". - (int) $status ."', ".$db->qstr($comment).", CURRENT_TIMESTAMP, '". - $requestUser->getID() ."')"; - $res=$db->getResult($queryStr); - if (is_bool($res) && !$res) - return -1; - else { - $revisionLogID = $db->getInsertID(); - return $revisionLogID; - } - } /* }}} */ + return self::setRevision($group, $requestUser, $status, $comment); + } /* }}} */ function delIndReviewer($user, $requestUser) { /* {{{ */ $db = $this->_document->_dms->getDB(); @@ -3817,7 +3826,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (count($reviewStatus["indstatus"])==0) { // User is not assigned to review this document. No action required. // Return an error. - return -3; + return -2; } $indstatus = array_pop($reviewStatus["indstatus"]); if ($indstatus["status"]!=0) { @@ -3849,7 +3858,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (count($reviewStatus)==0) { // User is not assigned to review this document. No action required. // Return an error. - return -3; + return -2; } if ($reviewStatus[0]["status"]!=0) { // User has already submitted a review or has already been deleted; @@ -3880,7 +3889,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (count($approvalStatus["indstatus"])==0) { // User is not assigned to approve this document. No action required. // Return an error. - return -3; + return -2; } $indstatus = array_pop($approvalStatus["indstatus"]); if ($indstatus["status"]!=0) { @@ -3912,7 +3921,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (count($approvalStatus)==0) { // User is not assigned to approve this document. No action required. // Return an error. - return -3; + return -2; } if ($approvalStatus[0]["status"]!=0) { // User has already submitted an approval or has already been deleted; @@ -3943,7 +3952,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (count($receiptStatus["indstatus"])==0) { // User is not assigned to receipt this document. No action required. // Return an error. - return -3; + return -2; } $indstatus = array_pop($receiptStatus["indstatus"]); if ($indstatus["status"]!=0) { @@ -3975,7 +3984,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (count($receiptStatus["status"])==0) { // User is not assigned to receipt this document. No action required. // Return an error. - return -3; + return -2; } $status = array_pop($receiptStatus["status"]); if ($tatus["status"]!=0) { @@ -3994,68 +4003,133 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return 0; } /* }}} */ - function delIndReviser($user, $requestUser) { /* {{{ */ - $db = $this->_document->_dms->getDB(); + /** + * Removes a user from the revision workflow + * + * This methods behaves differently from one in the other workflows, e.g. + * {@see SeedDMS_Core_DocumentContent::delIndReviewer}, because it + * also takes into account if the workflow has been started already. + * A workflow has been started, when there are entries in the revision log. + * If the revision workflow has not been started, then the user will + * be silently removed from the list of revisors. If the workflow has + * started already, then log entry will indicated the removal of the + * user (just as it is done with the other workflows) + * + * @param object $object user/group which is to be removed + * @param object $requestUser user requesting the removal + * @return integer 0 if removal was successfull, -1 if an internal error + * occured, -3 if the user is not in the list of revisors + * + */ + function delRevisor($object, $requestUser, $msg='') { /* {{{ */ + $dms = $this->_document->_dms; + $db = $dms->getDB(); - $userID = $user->getID(); + /* getRevisionStatus() returns an array with either an element + * 'indstatus' (user) or 'status' (group) containing the revision log + */ + if(get_class($object) == $dms->getClassname('user')) { + $field = 'indstatus'; + $type = 0; + } elseif(get_class($object) == $dms->getClassname('group')) { + $field = 'status'; + $type = 1; + } else { + return -1; + } - // Check to see if the user can be removed from the reviser list. - $revisionStatus = $user->getRevisionStatus($this->_document->getID(), $this->_version); + // Check to see if the user/group can be removed from the revisor list. + $revisionStatus = $object->getRevisionStatus($this->_document->getID(), $this->_version); if (is_bool($revisionStatus) && !$revisionStatus) { return -1; } - if (count($revisionStatus["indstatus"])==0) { + + if (!isset($revisionStatus[$field])) { // User is not assigned to revision this document. No action required. // Return an error. - return -3; - } - $indstatus = array_pop($revisionStatus["indstatus"]); - if ($indstatus["status"]!=0) { - // User has already submitted a revision or has already been deleted; - // return an error. - return -3; + return -2; } - $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". - "VALUES ('". $indstatus["revisionID"] ."', '-2', '', CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; - $res = $db->getResult($queryStr); - if (is_bool($res) && !$res) { - return -1; + /* If the revision log doesn't contain an entry yet, then remove the + * user/group from the list of revisors. The first case should not happen. + */ + if(count($revisionStatus[$field]) == 0) { + $queryStr = "DELETE from tblDocumentRevisors WHERE `documentID` = ". $this->_document->getID() ." AND `version` = ".$this->_version." AND `type` = ". $type ." AND `required` = ".$object->getID(); + echo $queryStr; + if (!$db->getResult($queryStr)) { + return -1; + } + } else { + $indstatus = array_pop($revisionStatus[$field]); + if ($indstatus["status"] != S_LOG_WAITING && $indstatus["status"] != S_LOG_SLEEPING) { + // User has already submitted a revision or has already been deleted; + // return an error. + return -3; + } + + $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". + "VALUES ('". $indstatus["revisionID"] ."', '".S_LOG_USER_REMOVED."', ".$db->qstr($msg).", CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; + $res = $db->getResult($queryStr); + if (is_bool($res) && !$res) { + return -1; + } } return 0; } /* }}} */ - function delGrpReviser($group, $requestUser) { /* {{{ */ - $db = $this->_document->_dms->getDB(); + function delIndRevisor($user, $requestUser, $msg='') { /* {{{ */ + return self::delRevisor($user, $requestUser, $msg); + } /* }}} */ - $groupID = $group->getID(); + function delGrpRevisor($group, $requestUser, $msg='') { /* {{{ */ + return self::delRevisor($group, $requestUser, $msg); + } /* }}} */ - // Check to see if the user can be removed from the reviser list. - $revisionStatus = $group->getRevisionStatus($this->_document->getID(), $this->_version); - if (is_bool($revisionStatus) && !$revisionStatus) { - return -1; - } - if (count($revisionStatus["status"])==0) { - // User is not assigned to revision this document. No action required. - // Return an error. - return -3; - } - $status = array_pop($revisionStatus["status"]); - if ($tatus["status"]!=0) { - // User has already submitted a revision or has already been deleted; - // return an error. - return -3; + /** + * Start a new revision workflow + * + * This function starts a new revision unless there are users/groups + * having finished the previous revision. This means the log status + * must be S_LOG_SLEEPING or the user/group was removed (S_LOG_USER_REMOVED) + * + * @param object $requestUser user requesting the revision start + * @param string $msg message saved for the initial log message + */ + function startRevision($requestUser, $msg='') { /* {{{ */ + $dms = $this->_document->_dms; + $db = $dms->getDB(); + + $revisionStatus = self::getRevisionStatus(); + if(!$revisionStatus) + return false; + + /* A new revision may only be started if we are not in the middle of + * revision or the user/group has been removed from the workflow + */ + foreach($revisionStatus as $status) { + if($status['status'] != S_LOG_SLEEPING && $status['status'] != S_LOG_USER_REMOVED) + return false; } - $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". - "VALUES ('". $status["revisionID"] ."', '-2', '', CURRENT_TIMESTAMP, '". $requestUser->getID() ."')"; - $res = $db->getResult($queryStr); - if (is_bool($res) && !$res) { - return -1; + $db->startTransaction(); + foreach($revisionStatus as $status) { + if($status['status'] == S_LOG_SLEEPING) { + $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, + `comment`, `date`, `userID`) ". + "VALUES ('". $status["revisionID"] ."', ". + S_LOG_WAITING.", ".$db->qstr($msg).", CURRENT_TIMESTAMP, '". + $requestUser->getID() ."')"; + $res=$db->getResult($queryStr); + if (is_bool($res) && !$res) { + $db->rollbackTransaction(); + return false; + } + } } + $db->commitTransaction(); + return true; - return 0; } /* }}} */ /** @@ -4880,6 +4954,11 @@ class SeedDMS_Core_DocumentFile { /* {{{ */ */ protected $_mimeType; + /** + * @var string date when revision starts + */ + protected $_revisionDate; + /** * @var string name of the file that was originally uploaded */ @@ -4963,12 +5042,13 @@ class SeedDMS_Core_AddContentResultSet { /* {{{ */ } /* }}} */ function addReviewer($reviewer, $type, $status) { /* {{{ */ + $dms = $this->_dms; if (!is_object($reviewer) || (strcasecmp($type, "i") && strcasecmp($type, "g")) && !is_integer($status)){ return false; } if (!strcasecmp($type, "i")) { - if (strcasecmp(get_class($reviewer), "SeedDMS_Core_User")) { + if (strcasecmp(get_class($reviewer), $dms->getClassname("user"))) { return false; } if ($this->_indReviewers == null) { @@ -4977,7 +5057,7 @@ class SeedDMS_Core_AddContentResultSet { /* {{{ */ $this->_indReviewers[$status][] = $reviewer; } if (!strcasecmp($type, "g")) { - if (strcasecmp(get_class($reviewer), "SeedDMS_Core_Group")) { + if (strcasecmp(get_class($reviewer), $dms->getClassname("group"))) { return false; } if ($this->_grpReviewers == null) { @@ -4989,12 +5069,13 @@ class SeedDMS_Core_AddContentResultSet { /* {{{ */ } /* }}} */ function addApprover($approver, $type, $status) { /* {{{ */ + $dms = $this->_dms; if (!is_object($approver) || (strcasecmp($type, "i") && strcasecmp($type, "g")) && !is_integer($status)){ return false; } if (!strcasecmp($type, "i")) { - if (strcasecmp(get_class($approver), "SeedDMS_Core_User")) { + if (strcasecmp(get_class($approver), $dms->getClassname("user"))) { return false; } if ($this->_indApprovers == null) { @@ -5003,7 +5084,7 @@ class SeedDMS_Core_AddContentResultSet { /* {{{ */ $this->_indApprovers[$status][] = $approver; } if (!strcasecmp($type, "g")) { - if (strcasecmp(get_class($approver), "SeedDMS_Core_Group")) { + if (strcasecmp(get_class($approver), $dms->getClassname("group"))) { return false; } if ($this->_grpApprovers == null) { diff --git a/SeedDMS_Core/Core/inc.ClassGroup.php b/SeedDMS_Core/Core/inc.ClassGroup.php index 693424e1f..ac0eb531b 100644 --- a/SeedDMS_Core/Core/inc.ClassGroup.php +++ b/SeedDMS_Core/Core/inc.ClassGroup.php @@ -326,7 +326,7 @@ class SeedDMS_Core_Group { $revisionStatus = $this->getRevisionStatus(); foreach ($revisionStatus as $r) { $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". - "VALUES ('". $r["revisionID"] ."', '-2', 'Revisers group removed from process', CURRENT_TIMESTAMP, '". $user->getID() ."')"; + "VALUES ('". $r["revisionID"] ."', '-2', 'Revisors group removed from process', CURRENT_TIMESTAMP, '". $user->getID() ."')"; $res=$db->getResult($queryStr); if(!$res) { $db->rollbackTransaction(); @@ -439,27 +439,30 @@ class SeedDMS_Core_Group { $status = array(); - // See if the group is assigned as a reviser. - $queryStr = "SELECT `tblDocumentRevisers`.*, `tblDocumentRevisionLog`.`status`, ". + // See if the group is assigned as a revisor. + $queryStr = "SELECT `tblDocumentRevisors`.*, `tblDocumentRevisionLog`.`status`, ". "`tblDocumentRevisionLog`.`comment`, `tblDocumentRevisionLog`.`date`, ". "`tblDocumentRevisionLog`.`userID` ". - "FROM `tblDocumentRevisers` ". + "FROM `tblDocumentRevisors` ". "LEFT JOIN `tblDocumentRevisionLog` USING (`revisionID`) ". - "WHERE `tblDocumentRevisers`.`type`='1' ". - ($documentID==null ? "" : "AND `tblDocumentRevisers`.`documentID` = '". (int) $documentID ."' "). - ($version==null ? "" : "AND `tblDocumentRevisers`.`version` = '". (int) $version ."' "). - "AND `tblDocumentRevisers`.`required`='". $this->_id ."' "; + "WHERE `tblDocumentRevisors`.`type`='1' ". + ($documentID==null ? "" : "AND `tblDocumentRevisors`.`documentID` = '". (int) $documentID ."' "). + ($version==null ? "" : "AND `tblDocumentRevisors`.`version` = '". (int) $version ."' "). + "AND `tblDocumentRevisors`.`required`='". $this->_id ."' "; $resArr = $db->getResultArray($queryStr); if (is_bool($resArr) && $resArr == false) return false; if (count($resArr)>0) { + $status['status'] = array(); foreach ($resArr as $res) { - if(isset($status["status"][$res['documentID']])) { - if($status["status"][$res['documentID']]['date'] < $res['date']) { + if($res['date']) { + if(isset($status["status"][$res['documentID']])) { + if($status["status"][$res['documentID']]['date'] < $res['date']) { + $status["status"][$res['documentID']] = $res; + } + } else { $status["status"][$res['documentID']] = $res; } - } else { - $status["status"][$res['documentID']] = $res; } } } diff --git a/SeedDMS_Core/Core/inc.ClassUser.php b/SeedDMS_Core/Core/inc.ClassUser.php index f5bb4ebd9..e36631ae6 100644 --- a/SeedDMS_Core/Core/inc.ClassUser.php +++ b/SeedDMS_Core/Core/inc.ClassUser.php @@ -700,7 +700,7 @@ class SeedDMS_Core_User { $revisionStatus = $this->getRevisionStatus(); foreach ($revisionStatus["indstatus"] as $ri) { $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". - "VALUES ('". $ri["revisionID"] ."', '-2', 'Reviser removed from process', CURRENT_TIMESTAMP, '". $user->getID() ."')"; + "VALUES ('". $ri["revisionID"] ."', '-2', 'Revisor removed from process', CURRENT_TIMESTAMP, '". $user->getID() ."')"; $res=$db->getResult($queryStr); if(!$res) { $db->rollbackTransaction(); @@ -1193,56 +1193,62 @@ class SeedDMS_Core_User { * @param int $documentID optional document id for which to retrieve the * revisions * @param int $version optional version of the document - * @return array list of all revisions + * @return array list of all revisions. If the result array has no elements, + * then the user was not a revisor. If there elements for 'indstatus' or + * 'grpstatus' then the revision hasn't been started. */ function getRevisionStatus($documentID=null, $version=null) { /* {{{ */ $db = $this->_dms->getDB(); - $status = array("indstatus"=>array(), "grpstatus"=>array()); + $status = array(); - // See if the user is assigned as an individual reviser. - $queryStr = "SELECT `tblDocumentRevisers`.*, `tblDocumentRevisionLog`.`status`, ". + // See if the user is assigned as an individual revisor. + $queryStr = "SELECT `tblDocumentRevisors`.*, `tblDocumentRevisionLog`.`status`, ". "`tblDocumentRevisionLog`.`comment`, `tblDocumentRevisionLog`.`date`, ". "`tblDocumentRevisionLog`.`userID` ". - "FROM `tblDocumentRevisers` ". + "FROM `tblDocumentRevisors` ". "LEFT JOIN `tblDocumentRevisionLog` USING (`revisionID`) ". - "WHERE `tblDocumentRevisers`.`type`='0' ". - ($documentID==null ? "" : "AND `tblDocumentRevisers`.`documentID` = '". (int) $documentID ."' "). - ($version==null ? "" : "AND `tblDocumentRevisers`.`version` = '". (int) $version ."' "). - "AND `tblDocumentRevisers`.`required`='". $this->_id ."' ". + "WHERE `tblDocumentRevisors`.`type`='0' ". + ($documentID==null ? "" : "AND `tblDocumentRevisors`.`documentID` = '". (int) $documentID ."' "). + ($version==null ? "" : "AND `tblDocumentRevisors`.`version` = '". (int) $version ."' "). + "AND `tblDocumentRevisors`.`required`='". $this->_id ."' ". "ORDER BY `tblDocumentRevisionLog`.`revisionLogID` DESC"; $resArr = $db->getResultArray($queryStr); if (is_bool($resArr) && $resArr === false) return false; if (count($resArr)>0) { + $status['indstatus'] = array(); foreach ($resArr as $res) { - if(isset($status["indstatus"][$res['documentID']])) { - if($status["indstatus"][$res['documentID']]['date'] < $res['date']) { + if($res['date']) { + if(isset($status["indstatus"][$res['documentID']])) { + if($status["indstatus"][$res['documentID']]['date'] < $res['date']) { + $status["indstatus"][$res['documentID']] = $res; + } + } else { $status["indstatus"][$res['documentID']] = $res; } - } else { - $status["indstatus"][$res['documentID']] = $res; } } } // See if the user is the member of a group that has been assigned to // revision the document version. - $queryStr = "SELECT `tblDocumentRevisers`.*, `tblDocumentRevisionLog`.`status`, ". + $queryStr = "SELECT `tblDocumentRevisors`.*, `tblDocumentRevisionLog`.`status`, ". "`tblDocumentRevisionLog`.`comment`, `tblDocumentRevisionLog`.`date`, ". "`tblDocumentRevisionLog`.`userID` ". - "FROM `tblDocumentRevisers` ". + "FROM `tblDocumentRevisors` ". "LEFT JOIN `tblDocumentRevisionLog` USING (`revisionID`) ". - "LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`groupID` = `tblDocumentRevisers`.`required` ". - "WHERE `tblDocumentRevisers`.`type`='1' ". - ($documentID==null ? "" : "AND `tblDocumentRevisers`.`documentID` = '". (int) $documentID ."' "). - ($version==null ? "" : "AND `tblDocumentRevisers`.`version` = '". (int) $version ."' "). + "LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`groupID` = `tblDocumentRevisors`.`required` ". + "WHERE `tblDocumentRevisors`.`type`='1' ". + ($documentID==null ? "" : "AND `tblDocumentRevisors`.`documentID` = '". (int) $documentID ."' "). + ($version==null ? "" : "AND `tblDocumentRevisors`.`version` = '". (int) $version ."' "). "AND `tblGroupMembers`.`userID`='". $this->_id ."' ". "ORDER BY `tblDocumentRevisionLog`.`revisionLogID` DESC"; $resArr = $db->getResultArray($queryStr); if (is_bool($resArr) && $resArr === false) return false; if (count($resArr)>0) { + $status['grpstatus'] = array(); foreach ($resArr as $res) { if(isset($status["grpstatus"][$res['documentID']])) { if($status["grpstatus"][$res['documentID']]['date'] < $res['date']) { From 608a86d45cb14073d4f26da747c483fe9c0e9817 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 11 May 2015 09:30:13 +0200 Subject: [PATCH 0082/2006] rename reviser to revisor, added revision workflow to document page --- inc/inc.ClassAccessOperation.php | 27 ++++++-- op/op.SetRevisers.php | 34 +++++++--- views/bootstrap/class.SetRevisers.php | 39 +++++++----- views/bootstrap/class.ViewDocument.php | 86 +++++++++++++++++++++++++- 4 files changed, 153 insertions(+), 33 deletions(-) diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index 9c3ed17fd..08174df6c 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -126,15 +126,15 @@ class SeedDMS_AccessOperation { } /* }}} */ /** - * Check if revisers may be edited + * Check if revisors may be edited * * This check can only be done for documents. Setting the document - * revisers is only allowed if version modification is turned on + * revisors is only allowed if version modification is turned on * in the settings. The - * admin may even set revisers if is disallowed in the + * admin may even set revisors if is disallowed in the * settings. */ - function maySetRevisers() { /* {{{ */ + function maySetRevisors() { /* {{{ */ if(get_class($this->obj) == 'SeedDMS_Core_Document') { $latestContent = $this->obj->getLatestContent(); $status = $latestContent->getStatus(); @@ -264,5 +264,24 @@ class SeedDMS_AccessOperation { } return false; } /* }}} */ + + /** + * Check if document content may be revised + * + * Revising a document content is only allowed if the document was not + * obsoleted. There are other requirements which are not taken into + * account here. + */ + function mayRevise() { /* {{{ */ + if(get_class($this->obj) == 'SeedDMS_Core_Document') { + $latestContent = $this->obj->getLatestContent(); + $status = $latestContent->getStatus(); + if ($status["status"]!=S_OBSOLETE) { + return true; + } + } + return false; + } /* }}} */ + } ?> diff --git a/op/op.SetRevisers.php b/op/op.SetRevisers.php index 28fdac5ef..b661aa458 100644 --- a/op/op.SetRevisers.php +++ b/op/op.SetRevisers.php @@ -56,6 +56,14 @@ if (!is_object($content)) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); } +if (isset($_POST["startdate"])) { + $startdate = $_POST["startdate"]; +} else { + $startdate = date('Y-m-d'); +} + +$content->setRevisionDate($startdate); + $folder = $document->getFolder(); // Retrieve a list of all users and groups that have read rights. @@ -87,8 +95,8 @@ foreach ($revisionStatus as $i=>$rs) { } // Get the list of proposed recipients, stripping out any duplicates. -$pIndRev = (isset($_POST["indRevisers"]) ? array_values(array_unique($_POST["indRevisers"])) : array()); -$pGrpRev = (isset($_POST["grpRevisers"]) ? array_values(array_unique($_POST["grpRevisers"])) : array()); +$pIndRev = (isset($_POST["indRevisors"]) ? array_values(array_unique($_POST["indRevisors"])) : array()); +$pGrpRev = (isset($_POST["grpRevisors"]) ? array_values(array_unique($_POST["grpRevisors"])) : array()); foreach ($pIndRev as $p) { if (is_numeric($p)) { if (isset($accessIndex["i"][$p])) { @@ -96,7 +104,7 @@ foreach ($pIndRev as $p) { if (!isset($revisionIndex["i"][$p])) { // Proposed recipient is not a current recipient, so add as a new // recipient. - $res = $content->addIndReviser($accessIndex["i"][$p], $user); + $res = $content->addIndRevisor($accessIndex["i"][$p], $user); $unm = $accessIndex["i"][$p]->getFullName(); $uml = $accessIndex["i"][$p]->getEmail(); @@ -147,17 +155,20 @@ foreach ($pIndRev as $p) { } if (count($revisionIndex["i"]) > 0) { foreach ($revisionIndex["i"] as $rx=>$rv) { - if ($rv["status"] == 0) { + // if ($rv["status"] == 0) { // User is to be removed from the recipients list. if (!isset($accessIndex["i"][$rx])) { // User does not have any revision privileges for this document // revision or does not exist. + /* Take this out for now $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". "VALUES ('". $revisionStatus[$rv["idx"]]["revisionID"] ."', '-2', '".getMLText("removed_recipient")."', NOW(), '". $user->getID() ."')"; $res = $db->getResult($queryStr); + */ + $res = $content->delIndRevisor($dms->getUser($rx), $user, getMLText("removed_recipient")); } else { - $res = $content->delIndReviser($accessIndex["i"][$rx], $user); + $res = $content->delIndRevisor($accessIndex["i"][$rx], $user); $unm = $accessIndex["i"][$rx]->getFullName(); $uml = $accessIndex["i"][$rx]->getEmail(); switch ($res) { @@ -195,7 +206,7 @@ if (count($revisionIndex["i"]) > 0) { break; } } - } +// } } } foreach ($pGrpRev as $p) { @@ -205,7 +216,7 @@ foreach ($pGrpRev as $p) { if (!isset($revisionIndex["g"][$p])) { // Proposed recipient is not a current recipient, so add as a new // recipient. - $res = $content->addGrpReviser($accessIndex["g"][$p], $user); + $res = $content->addGrpRevisor($accessIndex["g"][$p], $user); $gnm = $accessIndex["g"][$p]->getName(); switch ($res) { case 0: @@ -251,17 +262,20 @@ foreach ($pGrpRev as $p) { } if (count($revisionIndex["g"]) > 0) { foreach ($revisionIndex["g"] as $rx=>$rv) { - if ($rv["status"] == 0) { +// if ($rv["status"] == 0) { // Group is to be removed from the recipientist. if (!isset($accessIndex["g"][$rx])) { // Group does not have any revision privileges for this document // revision or does not exist. + /* $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". "VALUES ('". $revisionStatus[$rv["idx"]]["revisionID"] ."', '-2', '".getMLText("removed_recipient")."', NOW(), '". $user->getID() ."')"; $res = $db->getResult($queryStr); +*/ + $res = $content->delGrpRevisor($dms->getGroup($rx), $user, getMLText("removed_recipient")); } else { - $res = $content->delGrpReviser($accessIndex["g"][$rx], $user); + $res = $content->delGrpRevisor($accessIndex["g"][$rx], $user); $gnm = $accessIndex["g"][$rx]->getName(); switch ($res) { case 0: @@ -298,7 +312,7 @@ if (count($revisionIndex["g"]) > 0) { break; } } - } +// } } } diff --git a/views/bootstrap/class.SetRevisers.php b/views/bootstrap/class.SetRevisers.php index 54e53b978..187ff2f03 100644 --- a/views/bootstrap/class.SetRevisers.php +++ b/views/bootstrap/class.SetRevisers.php @@ -1,6 +1,6 @@ params['dms']; @@ -49,12 +49,15 @@ class SeedDMS_View_SetRevisers extends SeedDMS_Bootstrap_Style { // Retrieve a list of all users and groups that have revision privileges. $docAccess = $document->getReadAccessList(); - // Retrieve list of currently assigned revisers, along with + // Retrieve list of currently assigned revisors, along with // their latest status. $revisionStatus = $content->getRevisionStatus(); - $startdate = '2015-05-23'; + echo "

    ";
    +		print_r($revisionStatus);
    +		echo "
    "; + $startdate = substr($content->getRevisionDate(), 0, 10); - // Index the revision results for easy cross-reference with the reviser list. + // Index the revision results for easy cross-reference with the revisor list. $revisionIndex = array("i"=>array(), "g"=>array()); foreach ($revisionStatus as $i=>$rs) { if ($rs["type"]==0) { @@ -67,27 +70,28 @@ class SeedDMS_View_SetRevisers extends SeedDMS_Bootstrap_Style { contentContainerStart(); ?> -
    + -contentSubHeading(getMLText("update_revisers"));?> +contentSubHeading(getMLText("update_revisors"));?> - - + +
    :
    - getID()])) { switch ($revisionIndex["i"][$usr->getID()]["status"]) { - case 0: + case S_LOG_WAITING: + case S_LOG_SLEEPING: print ""; break; - case -2: + case S_LOG_USER_REMOVED: print ""; break; default: @@ -102,19 +106,20 @@ class SeedDMS_View_SetRevisers extends SeedDMS_Bootstrap_Style {
    :
    - getID()])) { switch ($revisionIndex["g"][$group->getID()]["status"]) { - case 0: + case S_LOG_WAITING: + case S_LOG_SLEEPING: print ""; break; - case -2: + case S_LOG_USER_REMOVED: print ""; break; default: - print ""; + print ""; break; } } else { diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index b356b735e..f209a02e9 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -178,6 +178,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { $reviewStatus = $latestContent->getReviewStatus(); $approvalStatus = $latestContent->getApprovalStatus(); $receiptStatus = $latestContent->getReceiptStatus(); + $revisionStatus = $latestContent->getRevisionStatus(); ?>
    @@ -330,6 +331,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if(is_array($receiptStatus) && count($receiptStatus)>0) { ?>
  • +0) { +?> +
  • @@ -450,8 +456,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if($accessop->maySetRecipients()) { print "
  • ".getMLText("change_recipients")."
  • "; } - if($accessop->maySetRevisers()) { - print "
  • ".getMLText("change_revisers")."
  • "; + if($accessop->maySetRevisors()) { + print "
  • ".getMLText("change_revisors")."
  • "; } if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { // Allow changing reviewers/approvals only if not reviewed @@ -1036,6 +1042,82 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { $this->contentContainerEnd(); ?>
    +0) { +?> +
    +contentContainerStart(); + print "\n"; + + print ""; + + print "\n"; + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + + foreach ($revisionStatus as $r) { + $required = null; + $is_recipient = false; + switch ($r["type"]) { + case 0: // Reviewer is an individual. + $required = $dms->getUser($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } + else { + $reqName = htmlspecialchars($required->getFullName()." (".$required->getLogin().")"); + } + if($r["required"] == $user->getId() && ($user->getId() != $owner->getId() || $enableownerrevapp == 1)) + $is_recipient = true; + break; + case 1: // Reviewer is a group. + $required = $dms->getGroup($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } + else { + $reqName = "".htmlspecialchars($required->getName()).""; + if($required->isMember($user) && ($user->getId() != $owner->getId() || $enableownerrevapp == 1)) + $is_recipient = true; + } + break; + } + print "\n"; + print "\n"; + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n\n"; + } +?> +
    \n"; + $this->contentSubHeading(getMLText("revisors")); + print "
    ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
    ".$reqName."
    • ".$r["date"]."
    • "; + /* $updateUser is the user who has done the receipt */ + $updateUser = $dms->getUser($r["userID"]); + print "
    • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$r["userID"]."'")."
    ".htmlspecialchars($r["comment"])."".getReceiptStatusText($r["status"])."
    +contentContainerEnd(); +?> +
    1) { From 9859737668d1ebbe85ee9a39c58d5d36951db138 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 11 May 2015 09:32:10 +0200 Subject: [PATCH 0083/2006] fix typo in file --- op/{op.SetRevisers.php => op.SetRevisors.php} | 0 out/{out.SetRevisers.php => out.SetRevisors.php} | 0 views/bootstrap/{class.SetRevisers.php => class.SetRevisors.php} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename op/{op.SetRevisers.php => op.SetRevisors.php} (100%) rename out/{out.SetRevisers.php => out.SetRevisors.php} (100%) rename views/bootstrap/{class.SetRevisers.php => class.SetRevisors.php} (100%) diff --git a/op/op.SetRevisers.php b/op/op.SetRevisors.php similarity index 100% rename from op/op.SetRevisers.php rename to op/op.SetRevisors.php diff --git a/out/out.SetRevisers.php b/out/out.SetRevisors.php similarity index 100% rename from out/out.SetRevisers.php rename to out/out.SetRevisors.php diff --git a/views/bootstrap/class.SetRevisers.php b/views/bootstrap/class.SetRevisors.php similarity index 100% rename from views/bootstrap/class.SetRevisers.php rename to views/bootstrap/class.SetRevisors.php From 71da44c618a86dc0412b3de972ccf020234cb43d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2015 19:05:02 +0200 Subject: [PATCH 0084/2006] add missing files for revising documents --- op/op.ReviseDocument.php | 217 +++++++++++++++++++++++ views/bootstrap/class.ReviseDocument.php | 199 +++++++++++++++++++++ 2 files changed, 416 insertions(+) create mode 100644 op/op.ReviseDocument.php create mode 100644 views/bootstrap/class.ReviseDocument.php diff --git a/op/op.ReviseDocument.php b/op/op.ReviseDocument.php new file mode 100644 index 000000000..ec035177a --- /dev/null +++ b/op/op.ReviseDocument.php @@ -0,0 +1,217 @@ + getMLText("invalid_request_token"))),getMLText("invalid_request_token")); +} + +if (!isset($_POST["documentid"]) || !is_numeric($_POST["documentid"]) || intval($_POST["documentid"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$documentid = $_POST["documentid"]; +$document = $dms->getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!isset($_POST["version"]) || !is_numeric($_POST["version"]) || intval($_POST["version"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +$version = $_POST["version"]; +$content = $document->getContentByVersion($version); + +if (!is_object($content)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +// operation is only allowed for the last document version +$latestContent = $document->getLatestContent(); +if ($latestContent->getVersion()!=$version) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +// verify if document has expired +if ($document->hasExpired()){ + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!isset($_POST["revisionStatus"]) || !is_numeric($_POST["revisionStatus"]) || + (intval($_POST["revisionStatus"])!=1 && intval($_POST["revisionStatus"])!=-1)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_revision_status")); +} + +if ($_POST["revisionType"] == "ind") { + $comment = $_POST["comment"]; + $revisionLogID = $latestContent->setRevision($user, $user, $_POST["revisionStatus"], $comment); +} elseif ($_POST["revisionType"] == "grp") { + $comment = $_POST["comment"]; + $group = $dms->getGroup($_POST['revisionGroup']); + $revisionLogID = $latestContent->setRevision($group, $user, $_POST["revisionStatus"], $comment); +} + +if(0 > $revisionLogID) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("revision_update_failed")); +} else { + // Send an email notification to the document updater. + if($notifier) { + $nl=$document->getNotifyList(); + $folder = $document->getFolder(); + + $subject = "revision_submit_email_subject"; + $message = "revision_submit_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['version'] = $version; + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['status'] = getRevisionStatusText($_POST["revisionStatus"]); + $params['comment'] = $comment; + $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['sitename'] = $settings->_siteName; + $params['http_root'] = $settings->_httpRoot; + $notifier->toList($user, $nl["users"], $subject, $message, $params); + foreach ($nl["groups"] as $grp) { + $notifier->toGroup($user, $grp, $subject, $message, $params); + } + $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params); + } +} + +/* Check to see if the overall status for the document version needs + * to be updated. + */ +if ($_POST["revisionStatus"] == -1){ + + if($content->setStatus(S_REJECTED,$comment,$user)) { + // Send notification to subscribers. + if($notifier) { + $nl=$document->getNotifyList(); + $folder = $document->getFolder(); + $subject = "document_status_changed_email_subject"; + $message = "document_status_changed_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['status'] = getRevisionStatusText(S_REJECTED); + $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['sitename'] = $settings->_siteName; + $params['http_root'] = $settings->_httpRoot; + $notifier->toList($user, $nl["users"], $subject, $message, $params); + foreach ($nl["groups"] as $grp) { + $notifier->toGroup($user, $grp, $subject, $message, $params); + } + $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params); + } + } + +} else { + + $docRevisionStatus = $content->getRevisionStatus(); + if (is_bool($docRevisionStatus) && !$docRevisionStatus) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("cannot_retrieve_revision_snapshot")); + } + $revisionCT = 0; + $revisionTotal = 0; + foreach ($docRevisionStatus as $drstat) { + if ($drstat["status"] == 1) { + $revisionCT++; + } + if ($drstat["status"] != -2) { + $revisionTotal++; + } + } + // If all revisions have been received and there are no rejections, + // then release the document otherwise put it back into revision workflow + if ($revisionCT == $revisionTotal) { + $newStatus=S_RELEASED; + if ($content->finishRevision($user, $newStatus, '', getMLText("automatic_status_update"))) { + // Send notification to subscribers. + if($notifier) { + $nl=$document->getNotifyList(); + $folder = $document->getFolder(); + $subject = "document_status_changed_email_subject"; + $message = "document_status_changed_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['status'] = getRevisionStatusText($newStatus); + $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['sitename'] = $settings->_siteName; + $params['http_root'] = $settings->_httpRoot; + $notifier->toList($user, $nl["users"], $subject, $message, $params); + foreach ($nl["groups"] as $grp) { + $notifier->toGroup($user, $grp, $subject, $message, $params); + } + } + } + } else { + /* Setting the status to S_IN_REVISION though it is already in that + * status doesn't harm, as setStatus() will catch it. + */ + $newStatus=S_IN_REVISION; + if($content->setStatus($newStatus,$comment,$user)) { + // Send notification to subscribers. + if($notifier) { + $nl=$document->getNotifyList(); + $folder = $document->getFolder(); + $subject = "document_status_changed_email_subject"; + $message = "document_status_changed_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['status'] = getRevisionStatusText($newStatus); + $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['sitename'] = $settings->_siteName; + $params['http_root'] = $settings->_httpRoot; + $notifier->toList($user, $nl["users"], $subject, $message, $params); + foreach ($nl["groups"] as $grp) { + $notifier->toGroup($user, $grp, $subject, $message, $params); + } + $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params); + } + } + } +} + +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + +?> diff --git a/views/bootstrap/class.ReviseDocument.php b/views/bootstrap/class.ReviseDocument.php new file mode 100644 index 000000000..88523777f --- /dev/null +++ b/views/bootstrap/class.ReviseDocument.php @@ -0,0 +1,199 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for ReviseDocument view + * + * @category DMS + * @package SeedDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_View_ReviseDocument extends SeedDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $content = $this->params['version']; + $revisionid = $this->params['revisionid']; + + $reviews = $content->getRevisionStatus(); + foreach($reviews as $review) { + if($review['revisionID'] == $revisionid) { + $revisionStatus = $review; + break; + } + } + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); + $this->contentHeading(getMLText("submit_review")); +?> + + +contentContainerStart(); + + // Display the Revision form. + if ($revisionStatus['type'] == 0) { + if($revisionStatus["status"]!=0) { + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + $indUser = $dms->getUser($revisionStatus["userID"]); + print ""; + print "
    ".getMLText("status")."".getMLText("comment")."".getMLText("last_update")."
    "; + printRevisionStatusText($revisionStatus["status"]); + print "".htmlspecialchars($revisionStatus["comment"])."".$revisionStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ."

    "; + } +?> + + + + + + + + + + + + + + + +
    :
    + +
    + + + + +"; + print "".getMLText("status").""; + print "".getMLText("comment").""; + print "".getMLText("last_update").""; + print ""; + print ""; + printRevisionStatusText($revisionStatus["status"]); + print ""; + print "".htmlspecialchars($revisionStatus["comment"]).""; + $indUser = $dms->getUser($revisionStatus["userID"]); + print "".$revisionStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) .""; + print "
    \n"; + } + +?> +
    + + + + + + + + + + + + + + +
    :
    : + +
    + + '/> + + +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> From 22c5470b9ba544dfb3d79e3283cf495a1d30c768 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2015 19:05:47 +0200 Subject: [PATCH 0085/2006] add missing file to revise document --- out/out.ReviseDocument.php | 82 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 out/out.ReviseDocument.php diff --git a/out/out.ReviseDocument.php b/out/out.ReviseDocument.php new file mode 100644 index 000000000..a07f4b312 --- /dev/null +++ b/out/out.ReviseDocument.php @@ -0,0 +1,82 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$document = $dms->getDocument(intval($_GET["documentid"])); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +$folder = $document->getFolder(); + +if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); +} + +if (!isset($_GET["version"]) || !is_numeric($_GET["version"]) || intval($_GET["version"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); +} +$version = $_GET["version"]; +$content = $document->getContentByVersion($version); +if (!is_object($content)) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); +} + +// operation is admitted only for last deocument version +$latestContent = $document->getLatestContent(); +if ($latestContent->getVersion()!=$version) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); +} +// verify if document has expired +if ($document->hasExpired()){ + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); +} + +$revisions = $content->getRevisionStatus(); +if(!$revisions) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("no_action")); +} + +/* Create object for checking access to certain operations */ +$accessop = new SeedDMS_AccessOperation($document, $user, $settings); + +$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); +$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$content, 'revisionid'=>(int) $_GET['revisionid'])); +if($view) { + $view->setParam('accessobject', $accessop); + $view->show(); + exit; +} + +?> From 4c74bda247d9d3ba3fc6a10fb067fe60f7a94546 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2015 19:06:23 +0200 Subject: [PATCH 0086/2006] add files to download content of transmittal --- controllers/class.TransmittalDownload.php | 40 ++++++++++++++++++ op/op.TransmittalDownload.php | 51 +++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 controllers/class.TransmittalDownload.php create mode 100644 op/op.TransmittalDownload.php diff --git a/controllers/class.TransmittalDownload.php b/controllers/class.TransmittalDownload.php new file mode 100644 index 000000000..73ade9f50 --- /dev/null +++ b/controllers/class.TransmittalDownload.php @@ -0,0 +1,40 @@ + + * @copyright Copyright (C) 2010-2013 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Class which does the busines logic for downloading a transmittal + * + * @category DMS + * @package SeedDMS + * @author Uwe Steinmann + * @copyright Copyright (C) 2010-2013 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_Controller_TransmittalDownload extends SeedDMS_Controller_Common { + + public function run() { + $dms = $this->params['dms']; + $user = $this->params['user']; + $transmittal = $this->params['transmittal']; + + $items = $transmittal->getItems(); + foreach($items as $item) { + $content = $item->getContent(); + $document = $content->getDocument(); + if ($document->getAccessMode($user) >= M_READ) { + echo $document->getName(); + } + } + } +} + diff --git a/op/op.TransmittalDownload.php b/op/op.TransmittalDownload.php new file mode 100644 index 000000000..9ddcf6ca2 --- /dev/null +++ b/op/op.TransmittalDownload.php @@ -0,0 +1,51 @@ +getTransmittal($transmittalid); + + if (!is_object($transmittal)) { + UI::exitError(getMLText("my_account"), getMLText("invalid_version")); + } + + if($transmittal->getUser()->getID() != $user->getID()) { + UI::exitError(getMLText("my_account"), getMLText("access_denied")); + } + + + $controller->setParam('transmittal', $transmittal); + $controller->run(); +} From a5d77d7cbbe4b80a0316d9656cca1af3bd670a1c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2015 19:07:26 +0200 Subject: [PATCH 0087/2006] add more document lists --- SeedDMS_Core/Core/inc.ClassDMS.php | 32 +++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 37eb6f9e8..b1c8916f7 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -691,7 +691,7 @@ class SeedDMS_Core_DMS { $queryStr = ''; } break; - case 'ReiptByMe': // Documents I have to receipt + case 'ReceiptByMe': // Documents I have to receipt $user = $param1; // Get document list for the current user. $receiptStatus = $user->getReceiptStatus(); @@ -714,6 +714,36 @@ class SeedDMS_Core_DMS { $docCSV .= (strlen($docCSV)==0 ? "" : ", ")."'".$d."'"; } + if (strlen($docCSV)>0) { + $queryStr .= "AND `tblDocuments`.`id` IN (" . $docCSV . ") ". + "ORDER BY `statusDate` DESC"; + } else { + $queryStr = ''; + } + break; + case 'ReviseByMe': // Documents I have to receipt + $user = $param1; + // Get document list for the current user. + $revisionStatus = $user->getRevisionStatus(); + + // Create a comma separated list of all the documentIDs whose information is + // required. + $dList = array(); + foreach ($revisionStatus["indstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + foreach ($revisionStatus["grpstatus"] as $st) { + if (!in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + $docCSV = ""; + foreach ($dList as $d) { + $docCSV .= (strlen($docCSV)==0 ? "" : ", ")."'".$d."'"; + } + if (strlen($docCSV)>0) { $queryStr .= "AND `tblDocuments`.`id` IN (" . $docCSV . ") ". "ORDER BY `statusDate` DESC"; From 448dc172d0957ef13ecc720ae96901db70054c78 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2015 19:07:59 +0200 Subject: [PATCH 0088/2006] add functions to manage revising documents --- SeedDMS_Core/Core/inc.ClassDocument.php | 112 +++++++++++++++++++++++- 1 file changed, 108 insertions(+), 4 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 7329b714d..e58dba462 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -637,6 +637,39 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return false; } /* }}} */ + /** + * Check if latest content of the document has a schedult + * revision workflow. + * The method will update the document status log database table + * if needed. + * + * @param object $user user requesting the possible automatic change + * @param string $next next date for review + * @return boolean true if status has changed + */ + function checkForDueRevisionWorkflow($user, $next=''){ /* {{{ */ + $lc=$this->getLatestContent(); + if($lc) { + $st=$lc->getStatus(); + + if($st["status"] == S_RELEASED) { + if($lc->getRevisionDate() && $lc->getRevisionDate() <= date('Y-m-d 00:00:00')) { + if($lc->startRevision($user, 'Automatic start of revision workflow')) { + if($next) { + $tmp = explode('-', substr($next, 0, 10)); + if(checkdate($tmp[1], $tmp[2], $tmp[0])) + $lc->setRevisionDate($next); + } else { + $lc->setRevisionDate(false); + } + return true; + } + } + } + } + return false; + } /* }}} */ + /** * Check if document is locked * @@ -2475,9 +2508,12 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ $db = $this->_document->_dms->getDB(); if(!$date) - $date = date('Y-m-d'); - - $queryStr = "UPDATE tblDocumentContent SET revisiondate = ".$db->qstr($date)." WHERE `document` = " . $this->_document->getID() . " AND `version` = " . $this->_version; + $queryStr = "UPDATE tblDocumentContent SET revisiondate = null WHERE `document` = " . $this->_document->getID() . " AND `version` = " . $this->_version; + elseif($date == 'now') + $queryStr = "UPDATE tblDocumentContent SET revisiondate = CURRENT_TIMESTAMP WHERE `document` = " . $this->_document->getID() . " AND `version` = " . $this->_version; + else + $queryStr = "UPDATE tblDocumentContent SET revisiondate = ".$db->qstr($date)." WHERE `document` = " . $this->_document->getID() . " AND `version` = " . $this->_version; + echo $queryStr; if (!$db->getResult($queryStr)) return false; @@ -2733,7 +2769,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ // If the supplied value lies outside of the accepted range, return an // error. - if ($status < -3 || $status > 3) { + if ($status < -3 || $status > 4) { return false; } @@ -2892,6 +2928,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ * Get the current receipt status of the document content * The receipt status is a list of receipts * + * @param integer $limit maximum number of status changes per receiver * @return array list of receipts */ function getReceiptStatus($limit=1) { /* {{{ */ @@ -2943,6 +2980,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ * Get the current revision status of the document content * The revision status is a list of revisions * + * @param integer $limit maximum number of records per revisor * @return array list of revisions */ function getRevisionStatus($limit=1) { /* {{{ */ @@ -4112,6 +4150,11 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return false; } + /* Make sure all Logs will be set to the right status, in order to + * prevent inconsistent states. Actually it could be a feature to + * force only some users/groups to revise the document, but for now + * this may not be possible. + */ $db->startTransaction(); foreach($revisionStatus as $status) { if($status['status'] == S_LOG_SLEEPING) { @@ -4127,6 +4170,67 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ } } } + if(!$this->setStatus(S_IN_REVISION, "Started revision", $requestUser)) { + $db->rollbackTransaction(); + return false; + } + $db->commitTransaction(); + return true; + + } /* }}} */ + + /** + * Finish a revision workflow + * + * This function ends a revision This means the log status + * is set back S_LOG_SLEEPING and the document status is set as + * passed to the method. The function doesn't not check if all + * users/groups has made it vote already. + * + * @param object $requestUser user requesting the revision start + * @param integer $docstatus document status + * @param string $msg message saved in revision log + * @param string $msg message saved in document status log + */ + function finishRevision($requestUser, $docstatus, $msg='', $docmsg='') { /* {{{ */ + $dms = $this->_document->_dms; + $db = $dms->getDB(); + + $revisionStatus = self::getRevisionStatus(); + if(!$revisionStatus) + return false; + + /* A revision may only be finished if it wasn't finished already + */ + foreach($revisionStatus as $status) { + if($status['status'] == S_LOG_SLEEPING) + return false; + } + + /* Make sure all Logs will be set to the right status, in order to + * prevent inconsistent states. Actually it could be a feature to + * end only some users/groups to revise the document, but for now + * this may not be possible. + */ + $db->startTransaction(); + foreach($revisionStatus as $status) { + if($status['status'] != S_LOG_SLEEPING && $status['status'] != S_LOG_USER_REMOVED) { + $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, + `comment`, `date`, `userID`) ". + "VALUES ('". $status["revisionID"] ."', ". + S_LOG_SLEEPING.", ".$db->qstr($msg).", CURRENT_TIMESTAMP, '". + $requestUser->getID() ."')"; + $res=$db->getResult($queryStr); + if (is_bool($res) && !$res) { + $db->rollbackTransaction(); + return false; + } + } + } + if(!$this->setStatus($docstatus, $docmsg, $requestUser)) { + $db->rollbackTransaction(); + return false; + } $db->commitTransaction(); return true; From 309be28256e6a80a75560d426ece925cb1ba2b55 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2015 19:08:55 +0200 Subject: [PATCH 0089/2006] add getUser() --- SeedDMS_Core/Core/inc.ClassTransmittal.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SeedDMS_Core/Core/inc.ClassTransmittal.php b/SeedDMS_Core/Core/inc.ClassTransmittal.php index aeba37d7a..bac682edb 100644 --- a/SeedDMS_Core/Core/inc.ClassTransmittal.php +++ b/SeedDMS_Core/Core/inc.ClassTransmittal.php @@ -191,6 +191,8 @@ class SeedDMS_Core_Transmittal { return true; } /* }}} */ + function getUser() { return $this->_user; } + function getItems() { /* {{{ */ $db = $this->_dms->getDB(); From 6cfdea17b37b90e92fd96019dc59d7c95dfde868 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2015 19:10:02 +0200 Subject: [PATCH 0090/2006] add function to return revision status --- inc/inc.Language.php | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/inc/inc.Language.php b/inc/inc.Language.php index e1c84374a..4baae226a 100644 --- a/inc/inc.Language.php +++ b/inc/inc.Language.php @@ -176,7 +176,7 @@ function getReceiptStatusText($status, $date=0) { /* {{{ */ return getMLText("status_recipient_removed"); break; case -1: - return getMLText("status_recipient_rejected").($date !=0 ? " ".$date : ""); + return getMLText("status_receipt_rejected").($date !=0 ? " ".$date : ""); break; case 0: return getMLText("status_not_receipted"); @@ -191,6 +191,38 @@ function getReceiptStatusText($status, $date=0) { /* {{{ */ } } /* }}} */ +function printRevisionStatusText($status, $date=0) { /* {{{ */ + print getRevisionStatusText($status, $date); +} /* }}} */ + +function getRevisionStatusText($status, $date=0) { /* {{{ */ + if (is_null($status)) { + return getMLText("status_unknown"); + } + else { + switch ($status) { + case -3: + return getMLText("status_revision_sleeping"); + break; + case -2: + return getMLText("status_revisor_removed"); + break; + case -1: + return getMLText("status_revision_rejected").($date !=0 ? " ".$date : ""); + break; + case 0: + return getMLText("status_not_revised"); + break; + case 1: + return getMLText("status_revised").($date !=0 ? " ".$date : ""); + break; + default: + return getMLText("status_unknown"); + break; + } + } +} /* }}} */ + function printApprovalStatusText($status, $date=0) { /* {{{ */ if (is_null($status)) { print getMLText("status_unknown"); @@ -272,6 +304,9 @@ function getOverallStatusText($status) { /* {{{ */ case S_EXPIRED: return getMLText("expired"); break; + case S_IN_REVISION: + return getMLText("in_revision"); + break; default: return getMLText("status_unknown"); break; From 5296edb8d20af01ea307e68f039541d1d6658835 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2015 19:10:40 +0200 Subject: [PATCH 0091/2006] more updates and new phrases --- languages/ar_EG/lang.inc | 11 ++++++++++- languages/bg_BG/lang.inc | 11 ++++++++++- languages/ca_ES/lang.inc | 11 ++++++++++- languages/cs_CZ/lang.inc | 11 ++++++++++- languages/de_DE/lang.inc | 13 +++++++++++-- languages/en_GB/lang.inc | 13 +++++++++++-- languages/es_ES/lang.inc | 13 +++++++++++-- languages/fr_FR/lang.inc | 11 ++++++++++- languages/hu_HU/lang.inc | 11 ++++++++++- languages/it_IT/lang.inc | 11 ++++++++++- languages/nl_NL/lang.inc | 11 ++++++++++- languages/pl_PL/lang.inc | 11 ++++++++++- languages/pt_BR/lang.inc | 11 ++++++++++- languages/ro_RO/lang.inc | 11 ++++++++++- languages/ru_RU/lang.inc | 11 ++++++++++- languages/sk_SK/lang.inc | 11 ++++++++++- languages/sv_SE/lang.inc | 11 ++++++++++- languages/tr_TR/lang.inc | 11 ++++++++++- languages/zh_CN/lang.inc | 11 ++++++++++- languages/zh_TW/lang.inc | 11 ++++++++++- 20 files changed, 203 insertions(+), 23 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index 29442c0ec..03554a7d2 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -485,6 +485,7 @@ URL: [url]', 'invalid_target_folder' => 'معرف خاطىء لمجلد الهدف', 'invalid_user_id' => 'معرف مستخدم خاطىء', 'invalid_version' => 'اصدار مستند خاطىء', +'in_revision' => '', 'in_workflow' => 'رهن مسار عمل', 'is_disabled' => 'تعطيل الحساب', 'is_hidden' => 'اخفاء من قائمة المستخدمين', @@ -748,6 +749,9 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - تم تقديم المراجعة', 'review_summary' => 'ملخص المراجعة', 'review_update_failed' => 'خطأ في تحديث حالة المراجعة. التحديث فشل.', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => 'اعادة بدء مسار العمل', @@ -1119,10 +1123,15 @@ URL: [url]', 'status_not_approved' => 'لم تتم الموافقة بعد', 'status_not_receipted' => '', 'status_not_reviewed' => 'لم تتم مراجعته بعد', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'تمت المراجعة', 'status_reviewer_rejected' => 'مسودة مرفوضة', 'status_reviewer_removed' => 'تم ازالة مراجع من العملية', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => 'مجهول', 'storage_size' => 'حجم التخزين', 'submit_approval' => 'ادخال موافقة', @@ -1191,7 +1200,7 @@ URL: [url]', 'update_locked_msg' => 'هذا المستند محمي من التعديل.', 'update_recipients' => '', 'update_reviewers' => 'تحيث قائمة المراجعين', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => 'تم الرفع بواسطة', 'uploading_failed' => 'عملية رفع واحد من ملفاتك فشلت . من فضلك قم بالتأكد من اقصى ملف يمكن تحميله', 'uploading_maxsize' => 'الملف المرفوع يتخطى حجم الملف القياسي المسموح', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index 5984ee8bc..5bb782a7b 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -416,6 +416,7 @@ $text = array( 'invalid_target_folder' => 'Неправилен идентификатор на целевата папка', 'invalid_user_id' => 'Неправилен идентификатор на потребителя', 'invalid_version' => 'Неправилна версия на документа', +'in_revision' => '', 'in_workflow' => 'в процес', 'is_disabled' => 'забранена сметка', 'is_hidden' => 'Не показвай в списъка с потребители', @@ -626,6 +627,9 @@ $text = array( 'review_submit_email_subject' => '', 'review_summary' => 'Сводка по рецензиите', 'review_update_failed' => 'грешка при обновяване статуса на рецензията', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => 'Превърти процес', @@ -984,10 +988,15 @@ $text = array( 'status_not_approved' => 'Не утвърден', 'status_not_receipted' => '', 'status_not_reviewed' => 'Не рецензиран', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Рецензиран', 'status_reviewer_rejected' => 'Чернова отказана', 'status_reviewer_removed' => 'Рецензиращия премахнат от процеса', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => 'Неизвестен', 'storage_size' => 'Размер на хранилището', 'submit_approval' => 'Утвърди', @@ -1047,7 +1056,7 @@ $text = array( 'update_locked_msg' => 'Този документ е блокиран', 'update_recipients' => '', 'update_reviewers' => 'Обнови списъка с рецензиращи', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => 'Качен от', 'uploading_failed' => 'Качването не стана. Свържете се с админа', 'uploading_maxsize' => '', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index 7742b0961..fb2d569f0 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -421,6 +421,7 @@ URL: [url]', 'invalid_target_folder' => 'ID de carpeta destinació no válid', 'invalid_user_id' => 'ID d\'usuari no vàlid', 'invalid_version' => 'La versión de documento no és vàlida', +'in_revision' => '', 'in_workflow' => '', 'is_disabled' => '', 'is_hidden' => 'Amagar de la llista d\'usuaris', @@ -631,6 +632,9 @@ URL: [url]', 'review_submit_email_subject' => '', 'review_summary' => 'Resum de revisió', 'review_update_failed' => 'Error actualitzant l\'estat de la revisió. L\'actualizació ha fallat.', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => '', @@ -989,10 +993,15 @@ URL: [url]', 'status_not_approved' => 'Sense aprovar', 'status_not_receipted' => '', 'status_not_reviewed' => 'Sense revisar', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Revisat', 'status_reviewer_rejected' => 'Esborrany rebutjat', 'status_reviewer_removed' => 'Revisor eliminat del procés', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => 'Desconegut', 'storage_size' => 'Storage size', 'submit_approval' => 'Enviar aprovació', @@ -1052,7 +1061,7 @@ URL: [url]', 'update_locked_msg' => 'Aquest document està bloquejat.', 'update_recipients' => '', 'update_reviewers' => 'Actualitzar llista de revisors', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => 'Enviat per', 'uploading_failed' => 'Enviament (Upload) fallat. Si us plau, contacteu amb l\'administrador.', 'uploading_maxsize' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index 4aaf43605..3beecc59f 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -492,6 +492,7 @@ URL: [url]', 'invalid_target_folder' => 'Neplatné cílové ID adresáře', 'invalid_user_id' => 'Neplatné ID uživatele', 'invalid_version' => 'Neplatná verze dokumentu', +'in_revision' => '', 'in_workflow' => 'Zpracováváno', 'is_disabled' => 'Zakázaný účet', 'is_hidden' => 'Utajit v seznamu uživatelů', @@ -757,6 +758,9 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Odesláno přezkoumání', 'review_summary' => 'Souhrn kontroly', 'review_update_failed' => 'Chyba při aktualizaci stavu kontroly. Aktualizace selhala.', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => 'Nové spuštění pracovního postupu', @@ -1128,10 +1132,15 @@ URL: [url]', 'status_not_approved' => 'Neschválený', 'status_not_receipted' => '', 'status_not_reviewed' => 'Nezkontrolovaný', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Zkontrolovaný', 'status_reviewer_rejected' => 'Návrh zamítnut', 'status_reviewer_removed' => 'Kontrolor odstraněn z procesu', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => 'Neznámý', 'storage_size' => 'Velikost úložiště', 'submit_approval' => 'Poslat ke schválení', @@ -1200,7 +1209,7 @@ URL: [url]', 'update_locked_msg' => 'Tento dokument je zamčený.', 'update_recipients' => 'Update list of recipients', 'update_reviewers' => 'Aktualizovat seznam kontrolorů', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => 'Nahrál', 'uploading_failed' => 'Nahrání selhalo. Prosím, kontaktujte správce.', 'uploading_maxsize' => 'Nahrávaný soubor je větší než maximální velikost pro upload.', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index 79be3092b..feb83d058 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 (2012), dgrutsch (18) +// Translators: Admin (2020), dgrutsch (18) $text = array( 'accept' => 'Übernehmen', @@ -497,6 +497,7 @@ URL: [url]', 'invalid_target_folder' => 'Unzulässige Ziel-Ordner Identifikation', 'invalid_user_id' => 'Unzulässige Benutzernummer', 'invalid_version' => 'Unzulässige Dokumenten-Version', +'in_revision' => 'Erneute Prüfung', 'in_workflow' => 'im Workflow', 'is_disabled' => 'Anmeldung sperren', 'is_hidden' => 'In der Benutzerliste verbergen', @@ -777,6 +778,9 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Prüfung ausgeführt', 'review_summary' => 'Übersicht Prüfungen', 'review_update_failed' => 'Störung bei Aktualisierung des Prüfstatus. Aktualisierung gescheitert.', +'revise_document' => 'Dokument überprüfen', +'revise_document_on' => '', +'revisors' => 'Überprüfer', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => 'Zurück zum Anfangszustand', @@ -1148,10 +1152,15 @@ URL: [url]', 'status_not_approved' => 'keine Freigabe', 'status_not_receipted' => 'Empfang noch nicht bestätigt', 'status_not_reviewed' => 'nicht geprüft', +'status_not_revised' => 'nicht überprüft', +'status_receipted' => 'Empfang bestätigt', 'status_recipient_removed' => 'Empfänger aus Liste entfernt', 'status_reviewed' => 'geprüft', 'status_reviewer_rejected' => 'Entwurf abgelehnt', 'status_reviewer_removed' => 'Prüfer wurde vom Prozess ausgeschlossen', +'status_revised' => 'überprüft', +'status_revision_sleeping' => 'wartend', +'status_revisor_removed' => 'Überprüfer von Liste entfernt', 'status_unknown' => 'unbekannt', 'storage_size' => 'Speicherverbrauch', 'submit_approval' => 'Freigabe hinzufügen', @@ -1220,7 +1229,7 @@ URL: [url]', 'update_locked_msg' => 'Dieses Dokument wurde gesperrt

    Die Sperrung wurde von [username] eingerichtet.
    ', 'update_recipients' => 'Liste der Empfänger aktualisieren', 'update_reviewers' => 'Liste der Prüfer aktualisieren', -'update_revisor' => 'Liste der Wiederholungsprüfer ändern', +'update_revisors' => 'Liste der Wiederholungsprüfer ändern', 'uploaded_by' => 'Hochgeladen durch', 'uploading_failed' => 'Das Hochladen einer Datei ist fehlgeschlagen. Bitte überprüfen Sie die maximale Dateigröße für Uploads.', 'uploading_maxsize' => 'Die Datei überschreitet die maximale Dateigröße für Uploads.', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index 2a326419c..aa662ec70 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 (1145), dgrutsch (3), netixw (14) +// Translators: Admin (1154), dgrutsch (3), netixw (14) $text = array( 'accept' => 'Accept', @@ -497,6 +497,7 @@ URL: [url]', 'invalid_target_folder' => 'Invalid Target Folder ID', 'invalid_user_id' => 'Invalid User ID', 'invalid_version' => 'Invalid Document Version', +'in_revision' => 'In revision', 'in_workflow' => 'In workflow', 'is_disabled' => 'Disable account', 'is_hidden' => 'Hide from users list', @@ -784,6 +785,9 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Submitted review', 'review_summary' => 'Review Summary', 'review_update_failed' => 'Error updating review status. Update failed.', +'revise_document' => 'Revise document', +'revise_document_on' => 'Next revision of document version on [date]', +'revisors' => 'Revisors', 'revisor_already_assigned' => 'User is already assigned as an resubmitter.', 'revisor_already_removed' => 'Resubmitter has already been removed from revision process or has already revised the document.', 'rewind_workflow' => 'Rewind workflow', @@ -1155,10 +1159,15 @@ URL: [url]', 'status_not_approved' => 'Not approved', 'status_not_receipted' => 'Not receipted yet', 'status_not_reviewed' => 'Not reviewed', +'status_not_revised' => 'not revised', +'status_receipted' => 'Receipted', 'status_recipient_removed' => 'Recipient removed from list', 'status_reviewed' => 'Reviewed', 'status_reviewer_rejected' => 'Draft rejected', 'status_reviewer_removed' => 'Reviewer removed from process', +'status_revised' => 'revised', +'status_revision_sleeping' => 'pending', +'status_revisor_removed' => 'Revisor removed from list', 'status_unknown' => 'Unknown', 'storage_size' => 'Storage size', 'submit_approval' => 'Submit approval', @@ -1227,7 +1236,7 @@ URL: [url]', 'update_locked_msg' => 'This document is locked.', 'update_recipients' => '', 'update_reviewers' => 'Update List of Reviewers', -'update_revisor' => 'Update list of resubmitters', +'update_revisors' => 'Update list of resubmitters', 'uploaded_by' => 'Uploaded by', 'uploading_failed' => 'Uploading one of your files failed. Please check your maximum upload file size.', 'uploading_maxsize' => 'The uploaded file exceeds the maximum upload file size.', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index b3c2ff093..7e3c66fda 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/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 (936), angel (123), francisco (2), jaimem (14) +// Translators: Admin (937), angel (123), francisco (2), jaimem (14) $text = array( 'accept' => 'Aceptar', @@ -492,6 +492,7 @@ URL: [url]', 'invalid_target_folder' => 'ID de carpeta destino no válido', 'invalid_user_id' => 'ID de usuario no válido', 'invalid_version' => 'Versión de documento no válida', +'in_revision' => '', 'in_workflow' => 'En flujo de trabajo', 'is_disabled' => 'Deshabilitar cuenta', 'is_hidden' => 'Ocultar de la lista de usuarios', @@ -763,6 +764,9 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Revisión enviada', 'review_summary' => 'Resumen de revisión', 'review_update_failed' => 'Error actualizando el estado de la revisión. La actualización ha fallado.', +'revise_document' => '', +'revise_document_on' => 'Nächste Überprüfung des Dokuments am [date]', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => 'Retroceso del flujo de trabajo', @@ -1134,10 +1138,15 @@ URL: [url]', 'status_not_approved' => 'Sin aprobar', 'status_not_receipted' => '', 'status_not_reviewed' => 'Sin revisar', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Revisado', 'status_reviewer_rejected' => 'Borrador rechazado', 'status_reviewer_removed' => 'Revisor eliminado del proceso', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => 'Desconocido', 'storage_size' => 'Tamaño de almacenamiento', 'submit_approval' => 'Enviar aprobación', @@ -1206,7 +1215,7 @@ URL: [url]', 'update_locked_msg' => 'Este documento está bloqueado.', 'update_recipients' => '', 'update_reviewers' => 'Actualizar lista de revisores', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => 'Enviado por', 'uploading_failed' => 'Envío (Upload) fallido. Por favor contacte con el Administrador.', 'uploading_maxsize' => 'El archivo subido supera el tamaño máximo de upload', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 579a46ea8..a959e318a 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -492,6 +492,7 @@ URL: [url]', 'invalid_target_folder' => 'Identifiant de dossier cible invalide', 'invalid_user_id' => 'Identifiant utilisateur invalide', 'invalid_version' => 'Version de document invalide', +'in_revision' => '', 'in_workflow' => 'Dans le workflow', 'is_disabled' => 'Compte désactivé', 'is_hidden' => 'Cacher de la liste utilisateur', @@ -752,6 +753,9 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Correction soumise', 'review_summary' => 'Sommaire de correction', 'review_update_failed' => 'Erreur lors de la mise à jour de la correction. Echec de la mise à jour.', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => 'Remonter le workflow', @@ -1110,10 +1114,15 @@ URL: [url]', 'status_not_approved' => 'Non approuvé', 'status_not_receipted' => '', 'status_not_reviewed' => 'Non corrigé', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Corrigé', 'status_reviewer_rejected' => 'Correction rejetée', 'status_reviewer_removed' => 'Correcteur retiré du processus', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => 'Inconnu', 'storage_size' => 'Taille occupée', 'submit_approval' => 'Soumettre approbation', @@ -1173,7 +1182,7 @@ URL: [url]', 'update_locked_msg' => 'Ce document est verrouillé.', 'update_recipients' => '', 'update_reviewers' => 'Mise à jour de la liste de correcteurs', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => 'Déposé par', 'uploading_failed' => 'Dépose du document échoué. SVP Contactez le responsable.', 'uploading_maxsize' => 'La taille du fichier téléchargé excède la taille maximale accepté', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index 0123bb35e..ba4e957ff 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -492,6 +492,7 @@ URL: [url]', 'invalid_target_folder' => 'Érvénytelen cél mappa állapot', 'invalid_user_id' => 'Érvénytelen felhasználói azonosító', 'invalid_version' => 'Érvénytelen dokumentum változat', +'in_revision' => '', 'in_workflow' => 'Munkafolyamatban', 'is_disabled' => 'Hozzáférés tiltás', 'is_hidden' => 'Felhasználó listáról elrejt', @@ -763,6 +764,9 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Beküldött felülvizsgálat', 'review_summary' => 'Felülvizsgálat összefoglaló', 'review_update_failed' => 'Hiba a felülvizsgálat állapot frissítése során. Frissítés sikertelen.', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => 'Munkafolyamat visszajátszás', @@ -1133,10 +1137,15 @@ URL: [url]', 'status_not_approved' => 'Nem jóváhagyott', 'status_not_receipted' => '', 'status_not_reviewed' => 'Nem felülvizsgált', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Felülvizsgált', 'status_reviewer_rejected' => 'Piszkozat elutasítva', 'status_reviewer_removed' => 'Felülvizsgáló eltávolítva a folyamatból', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => 'Ismeretlen', 'storage_size' => 'Tároló mérete', 'submit_approval' => 'Jóváhagyás küldése', @@ -1205,7 +1214,7 @@ URL: [url]', 'update_locked_msg' => 'Ez a dokumentum zárolt.', 'update_recipients' => '', 'update_reviewers' => 'Felülvizsgálók listájának frissítése', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => 'Feltöltötte', 'uploading_failed' => 'Állományai egyikének feltöltése sikertelen. Kérjük ellenőrizze a legnagyobb feltölthető állomány méretet.', 'uploading_maxsize' => 'A feltöltött fájl nagyobb, mint a megengedezz maximális méret', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index 506b70108..ba897303c 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -497,6 +497,7 @@ URL: [url]', 'invalid_target_folder' => 'ID cartella selezionata non valido', 'invalid_user_id' => 'ID utente non valido', 'invalid_version' => 'Versione del documento non valida', +'in_revision' => '', 'in_workflow' => 'In fase di lavorazione', 'is_disabled' => 'Account Disabilitato', 'is_hidden' => 'Nascondi dalla lista utenti', @@ -785,6 +786,9 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Sottoposta revisione', 'review_summary' => 'Dettaglio revisioni', 'review_update_failed' => 'Errore nella variazione dello stato di revisione. Aggiornamento fallito.', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => 'Inverti il flusso di lavoro', @@ -1156,10 +1160,15 @@ URL: [url]', 'status_not_approved' => 'Non ancora approvato', 'status_not_receipted' => '', 'status_not_reviewed' => 'Non ancora revisionato', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Revisionato', 'status_reviewer_rejected' => 'Bozza rifiutata', 'status_reviewer_removed' => 'Revisore rimosso dal processo', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => 'Sconosciuto', 'storage_size' => 'Spazio di archiviazione', 'submit_approval' => 'Invio approvazione', @@ -1228,7 +1237,7 @@ URL: [url]', 'update_locked_msg' => 'Questo documento è bloccato.', 'update_recipients' => '', 'update_reviewers' => 'Aggiorna lista revisori', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => 'Caricato da', 'uploading_failed' => 'Upload fallito. Controllare la dimensione massima caricabile consentita.', 'uploading_maxsize' => 'Il file caricato supera la dimensione massima consentita.', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 0130a989b..6ee3c676e 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -485,6 +485,7 @@ URL: [url]', 'invalid_target_folder' => 'Foutief Doel Map ID', 'invalid_user_id' => 'Foutief Gebruiker ID', 'invalid_version' => 'Foutief Document Versie', +'in_revision' => '', 'in_workflow' => 'In workflow', 'is_disabled' => 'Deactiveer account', 'is_hidden' => 'Afschermen van Gebruikerslijst', @@ -754,6 +755,9 @@ URL: [url', 'review_submit_email_subject' => '[sitename]: [name] - Beoordeling toegevoegd', 'review_summary' => '[Controle] Samenvatting', 'review_update_failed' => 'Foutmelding: fout bij bijwerken [Controle] Status. Bijwerken mislukt.', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => 'Terugzetten workflow', @@ -1125,10 +1129,15 @@ URL: [url]', 'status_not_approved' => 'Niet goedgekeurd', 'status_not_receipted' => '', 'status_not_reviewed' => 'Niet gecontroleerd', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Gecontroleerd', 'status_reviewer_rejected' => 'Klad Controle [Afgewezen]', 'status_reviewer_removed' => '[Controleur] verwijderd van dit proces', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => 'Onbekend', 'storage_size' => 'Omvang opslag', 'submit_approval' => 'Verzend [Goedkeuring]', @@ -1197,7 +1206,7 @@ URL: [url]', 'update_locked_msg' => 'Dit document is geblokkeerd.', 'update_recipients' => '', 'update_reviewers' => 'Bijwerken lijst van [Controleurs]', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => 'Ge-upload door', 'uploading_failed' => 'Upload mislukt. Neem contact op met de [Beheerder].', 'uploading_maxsize' => 'Het geuploade bestand overschrijdt de maximum grootte.', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 8cf4f90c6..0c86e994c 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -485,6 +485,7 @@ URL: [url]', 'invalid_target_folder' => 'Nieprawidłowy identyfikator folderu docelowego', 'invalid_user_id' => 'Nieprawidłowy identyfikator użytkownika', 'invalid_version' => 'Nieprawidłowa wersja dokumentu', +'in_revision' => '', 'in_workflow' => 'W procesie', 'is_disabled' => 'Konto nieaktywne', 'is_hidden' => 'Nie pokazuj na liście użytkowników', @@ -742,6 +743,9 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Napisano recenzję', 'review_summary' => 'Podsumowanie opiniowania', 'review_update_failed' => 'Błąd podczas aktualizowania statusu recenzji. Aktualizacja nie powiodła się.', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => 'Przewiń proces', @@ -1113,10 +1117,15 @@ URL: [url]', 'status_not_approved' => 'Nie zatwierdzone', 'status_not_receipted' => '', 'status_not_reviewed' => 'Nie zrecenzowane', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Zrecenzowane', 'status_reviewer_rejected' => 'Szkic odrzucony', 'status_reviewer_removed' => 'Recenzent usunięty z procesu', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => 'Nieznany', 'storage_size' => 'Zajętość dysku', 'submit_approval' => 'Zaakceptuj', @@ -1185,7 +1194,7 @@ URL: [url]', 'update_locked_msg' => 'Ten dokument jest zablokowany.', 'update_recipients' => '', 'update_reviewers' => 'Aktualizuj listę recenzentów', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => 'Przesłane przez', 'uploading_failed' => 'Przesyłanie nie powiodło się. Skontaktuj się z administratorem.', 'uploading_maxsize' => 'Rozmiar pliku większy niż dopuszczalny', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 9325dbb65..9d574ec04 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -491,6 +491,7 @@ URL: [url]', 'invalid_target_folder' => 'Invalid Target Folder ID', 'invalid_user_id' => 'Invalid User ID', 'invalid_version' => 'Invalid Document Version', +'in_revision' => '', 'in_workflow' => 'No fluxo de trabalho', 'is_disabled' => 'Desativar conta', 'is_hidden' => 'Ocultar perfil da lista de usuários', @@ -760,6 +761,9 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Revisão submetida', 'review_summary' => 'Review Summary', 'review_update_failed' => 'Error updating review status. Update failed.', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => 'Fluxo de trabalho revisto', @@ -1131,10 +1135,15 @@ URL: [url]', 'status_not_approved' => 'Not approved', 'status_not_receipted' => '', 'status_not_reviewed' => '', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => '', 'status_reviewer_rejected' => '', 'status_reviewer_removed' => '', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => 'Unknown', 'storage_size' => 'Tamanho de armazenamento', 'submit_approval' => '', @@ -1203,7 +1212,7 @@ URL: [url]', 'update_locked_msg' => 'Este documento está travado.', 'update_recipients' => '', 'update_reviewers' => 'Update List of Reviewers', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => 'Inserido por', 'uploading_failed' => 'Inserção falhou. Por favor contacte o administrador', 'uploading_maxsize' => 'O arquivo excede o tamanho máximo permitido para upload.', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index b37ffd735..970dd3a78 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -492,6 +492,7 @@ URL: [url]', 'invalid_target_folder' => 'ID Folder țintă invalid', 'invalid_user_id' => 'ID Utilizator invalid', 'invalid_version' => 'Versiune Document invalidă', +'in_revision' => '', 'in_workflow' => 'În workflow', 'is_disabled' => 'Dezactivează cont', 'is_hidden' => 'Ascunde din lista de utilizatori', @@ -763,6 +764,9 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Revizuire trimisă', 'review_summary' => 'Sumar revizuire', 'review_update_failed' => 'Eroare actualizarea status revizuire. Actualizarea a eșuat.', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => 'Derulare workflow', @@ -1134,10 +1138,15 @@ URL: [url]', 'status_not_approved' => 'Neaprobat', 'status_not_receipted' => '', 'status_not_reviewed' => 'Nerevizuit', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Revizuit', 'status_reviewer_rejected' => 'Proiect respins', 'status_reviewer_removed' => 'Revizuitor eliminat din proces', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => 'Necunoscut', 'storage_size' => 'Dimensiunea de stocare', 'submit_approval' => 'Trimite aprobare', @@ -1206,7 +1215,7 @@ URL: [url]', 'update_locked_msg' => 'Acest document este blocat.', 'update_recipients' => '', 'update_reviewers' => 'Actualizare Listă de revizuitori', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => 'Adaugate de', 'uploading_failed' => 'Încărcarea unuia dintre fișierele a eșuat. Vă rugăm să verificați dimensiunea maximă de încărcare fișiere.', 'uploading_maxsize' => 'Fișierul încărcat depășește dimensiunea maximă de încărcare fișiere.', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index aa1300b93..c44382470 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -485,6 +485,7 @@ URL: [url]', 'invalid_target_folder' => 'Неверный идентификатор целевого каталога', 'invalid_user_id' => 'Неверный идентификатор пользователя', 'invalid_version' => 'Неверная версия документа', +'in_revision' => '', 'in_workflow' => 'В процессе', 'is_disabled' => 'Отключить учётную запись', 'is_hidden' => 'Не показывать в
    списке пользователей', @@ -753,6 +754,9 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: отправлена рецензия на «[name]»', 'review_summary' => 'Сводка по рецензии', 'review_update_failed' => 'Ошибка обновления статуса рецензии', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => 'Начать процесс с начала', @@ -1124,10 +1128,15 @@ URL: [url]', 'status_not_approved' => 'Не утверждён', 'status_not_receipted' => '', 'status_not_reviewed' => 'Не рецензирован', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Рецензирован', 'status_reviewer_rejected' => 'Черновик отклонён', 'status_reviewer_removed' => 'Рецензирующий удалён из процесса', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => 'Неизвестный', 'storage_size' => 'Размер хранилища', 'submit_approval' => 'Утвердить', @@ -1196,7 +1205,7 @@ URL: [url]', 'update_locked_msg' => 'Этот документ заблокирован', 'update_recipients' => '', 'update_reviewers' => 'Обновить список рецензирующих', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => 'Загрузил(а)', 'uploading_failed' => 'Загрузка не удалась. Свяжитесь с администратором.', 'uploading_maxsize' => 'Размер загруженного файла превышает максимально возможный', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 453beb798..9a036c327 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -416,6 +416,7 @@ $text = array( 'invalid_target_folder' => 'Neplatné cieľové ID zložky', 'invalid_user_id' => 'Neplatné ID používateľa', 'invalid_version' => 'Neplatná verzia dokumentu', +'in_revision' => '', 'in_workflow' => '', 'is_disabled' => '', 'is_hidden' => 'Nezobrazovať v zozname používateľov', @@ -626,6 +627,9 @@ $text = array( 'review_submit_email_subject' => '', 'review_summary' => 'Zhrnutie kontroly', 'review_update_failed' => 'Chyba pri aktualizácii stavu kontroly. Aktualizácia zlyhala.', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => '', @@ -984,10 +988,15 @@ $text = array( 'status_not_approved' => 'Neschválený', 'status_not_receipted' => '', 'status_not_reviewed' => 'Neskontrolovaný', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Skontrolovaný', 'status_reviewer_rejected' => 'Návrh zamietnutý', 'status_reviewer_removed' => 'Kontrolór odstránený z procesu', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => 'Neznámy', 'storage_size' => 'Objem dát', 'submit_approval' => 'Poslať schválenie', @@ -1047,7 +1056,7 @@ $text = array( 'update_locked_msg' => 'Tento dokument je zamknutý.', 'update_recipients' => '', 'update_reviewers' => 'Aktualizovať zoznam kontrolórov', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => 'Nahral', 'uploading_failed' => 'Nahranie zlyhalo. Prosám, kontaktujte správcu.', 'uploading_maxsize' => 'Uploadovaný súbor prekročil maximálnu povolenú velkosť.', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 1a02dcfb7..14aacc907 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -485,6 +485,7 @@ URL: [url]', 'invalid_target_folder' => 'Ogiltigt ID för målkatalogen', 'invalid_user_id' => 'Ogiltigt användar-ID', 'invalid_version' => 'Ogiltig dokumentversion', +'in_revision' => '', 'in_workflow' => 'Utkast: under bearbetning', 'is_disabled' => 'Inaktivera kontot', 'is_hidden' => 'Dölj från listan med användare', @@ -748,6 +749,9 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Skickat granskning', 'review_summary' => 'Sammanfattning av granskningen', 'review_update_failed' => 'Fel vid uppdatering av granskningsstatus. Kunde inte uppdatera.', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => 'Återställ arbetsflödet', @@ -1119,10 +1123,15 @@ URL: [url]', 'status_not_approved' => 'Ej godkänt', 'status_not_receipted' => '', 'status_not_reviewed' => 'Ej granskat', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Granskat', 'status_reviewer_rejected' => 'Utkast avvisat', 'status_reviewer_removed' => 'Person som granskar har tagits bort från processen', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => 'Okänd', 'storage_size' => 'Platsstorlek', 'submit_approval' => 'Skicka godkännande', @@ -1191,7 +1200,7 @@ URL: [url]', 'update_locked_msg' => 'Dokumentet är låst.', 'update_recipients' => '', 'update_reviewers' => 'Uppdatera listan med personer som granskar', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => 'Uppladdat av', 'uploading_failed' => 'Fel vid uppladdningen. Kontakta administratören.', 'uploading_maxsize' => 'Uppladdade filen översteg maxgränsen för storleken på filstorlek', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 577c43d5a..6ff0447e7 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -491,6 +491,7 @@ URL: [url]', 'invalid_target_folder' => 'Geçersiz Hedef Klasör ID', 'invalid_user_id' => 'Geçersiz Kullanıcı ID', 'invalid_version' => 'Geçersiz Doküman Versiyonu', +'in_revision' => '', 'in_workflow' => 'İş Akışında', 'is_disabled' => 'Hesap devredışı', 'is_hidden' => 'Kullanıcı listesinde gizle', @@ -764,6 +765,9 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Kontrol gönderildi', 'review_summary' => 'Kontrol Özeti', 'review_update_failed' => 'Kontrol güncelleme durumu hatalı. Güncelleme başarısız.', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => 'İş akışını geri al', @@ -1135,10 +1139,15 @@ URL: [url]', 'status_not_approved' => 'Onaylanmadı', 'status_not_receipted' => '', 'status_not_reviewed' => 'Kontrol edilmedi', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Kontrol edildi', 'status_reviewer_rejected' => 'Taslak reddedildi', 'status_reviewer_removed' => 'Kontrol eden süreci sildi', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => 'Bilinmeyen', 'storage_size' => 'Depo boyutu', 'submit_approval' => 'Onay ver', @@ -1207,7 +1216,7 @@ URL: [url]', 'update_locked_msg' => 'Bu doküman kilitli.', 'update_recipients' => '', 'update_reviewers' => 'Kontrol edenlerin listesini güncelle', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => 'Yükleyen', 'uploading_failed' => 'Dosyalardan biri yüklenirken başarısız oldu. Maksimum yükleme boyutunuzu kontrol ediniz.', 'uploading_maxsize' => 'Yüklenen dosya maksimum yükleme boyutundan fazla.', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index 59bd81cde..c61604e4c 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -422,6 +422,7 @@ URL: [url]', 'invalid_target_folder' => '无效目标文件夹ID号', 'invalid_user_id' => '无效用户ID号', 'invalid_version' => '无效文档版本', +'in_revision' => '', 'in_workflow' => '', 'is_disabled' => '禁用帐户', 'is_hidden' => '从用户列表中隐藏', @@ -632,6 +633,9 @@ URL: [url]', 'review_submit_email_subject' => '', 'review_summary' => '校对汇总', 'review_update_failed' => '错误 更新校对状态.更新失败', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => '', @@ -990,10 +994,15 @@ URL: [url]', 'status_not_approved' => '未批准', 'status_not_receipted' => '', 'status_not_reviewed' => '未校对', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => '通过', 'status_reviewer_rejected' => '拟拒绝', 'status_reviewer_removed' => '从校对队列中删除', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => '未知', 'storage_size' => '存储大小', 'submit_approval' => '提交审核', @@ -1053,7 +1062,7 @@ URL: [url]', 'update_locked_msg' => '该文档被锁定', 'update_recipients' => '', 'update_reviewers' => '更新校对人名单', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => '上传者', 'uploading_failed' => '文件太大无法上传!请处理后重新上传。', 'uploading_maxsize' => '最大上传限制', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index eaa7088d5..907a3abc0 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -420,6 +420,7 @@ URL: [url]', 'invalid_target_folder' => '無效目的檔案夾ID號', 'invalid_user_id' => '無效用戶ID號', 'invalid_version' => '無效文檔版本', +'in_revision' => '', 'in_workflow' => '', 'is_disabled' => '禁用帳戶', 'is_hidden' => '從用戶列表中隱藏', @@ -630,6 +631,9 @@ URL: [url]', 'review_submit_email_subject' => '', 'review_summary' => '校對匯總', 'review_update_failed' => '錯誤 更新校對狀態.更新失敗', +'revise_document' => '', +'revise_document_on' => '', +'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', 'rewind_workflow' => '', @@ -988,10 +992,15 @@ URL: [url]', 'status_not_approved' => '未批准', 'status_not_receipted' => '', 'status_not_reviewed' => '未校對', +'status_not_revised' => '', +'status_receipted' => '', 'status_recipient_removed' => '', 'status_reviewed' => '通過', 'status_reviewer_rejected' => '擬拒絕', 'status_reviewer_removed' => '從校對佇列中刪除', +'status_revised' => '', +'status_revision_sleeping' => '', +'status_revisor_removed' => '', 'status_unknown' => '未知', 'storage_size' => '存儲大小', 'submit_approval' => '提交審核', @@ -1051,7 +1060,7 @@ URL: [url]', 'update_locked_msg' => '該文檔被鎖定', 'update_recipients' => '', 'update_reviewers' => '更新校對人名單', -'update_revisor' => '', +'update_revisors' => '', 'uploaded_by' => '上傳者', 'uploading_failed' => '文件太大無法上傳!請處理後重新上傳。', 'uploading_maxsize' => '最大上傳限制', From 4101a8363979a6701a161f76aba225be4799b12d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2015 19:11:17 +0200 Subject: [PATCH 0092/2006] better error checking --- op/op.SetRevisors.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/op/op.SetRevisors.php b/op/op.SetRevisors.php index b661aa458..9057ccf0a 100644 --- a/op/op.SetRevisors.php +++ b/op/op.SetRevisors.php @@ -62,7 +62,9 @@ if (isset($_POST["startdate"])) { $startdate = date('Y-m-d'); } -$content->setRevisionDate($startdate); +if(!$content->setRevisionDate($startdate)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); +} $folder = $document->getFolder(); From f083b6fd7a0def5278c8ae569f01166880da9871 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2015 19:11:38 +0200 Subject: [PATCH 0093/2006] check for due revision workflow --- out/out.ViewDocument.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/out/out.ViewDocument.php b/out/out.ViewDocument.php index 31cf836ee..cc13a5384 100644 --- a/out/out.ViewDocument.php +++ b/out/out.ViewDocument.php @@ -65,6 +65,13 @@ if ($document->verifyLastestContentExpriry()){ header("Location:../out/out.ViewDocument.php?documentid=".$document->getID()); } +/* Recalculate the status of a document and reload the page if the status + * has changed. A status change may occur if a revision workflow is due + */ +if ($document->checkForDueRevisionWorkflow($user)){ + header("Location:../out/out.ViewDocument.php?documentid=".$document->getID()); +} + if($view) { $view->setParam('dms', $dms); $view->setParam('user', $user); From bc7407ad855830d0e0b628febc7c85a9c5420111 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2015 19:12:22 +0200 Subject: [PATCH 0094/2006] add transmittal mgr to user menu, some code cleanup --- views/bootstrap/class.Bootstrap.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index d875e5c92..65279136f 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -259,6 +259,7 @@ $(document).ready(function () { if (!$this->params['user']->isGuest()) { echo "

  • ".getMLText("my_documents")."
  • \n"; echo "
  • ".getMLText("my_account")."
  • \n"; + echo "
  • ".getMLText("my_transmittals")."
  • \n"; echo "
  • \n"; } $showdivider = false; @@ -1524,24 +1525,27 @@ $('#delete-folder-btn-".$folderid."').popover({ $links = $document->getDocumentLinks(); $links = SeedDMS_Core_DMS::filterDocumentLinks($user, $links); + $content .= ""; if (file_exists($dms->contentDir . $latestContent->getPath())) { - $content .= ""; + $content .= ""; if($previewer->hasPreview($latestContent)) { $content .= "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; } else { $content .= "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; } - $content .= ""; + $content .= ""; } else - $content .= "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - - $content .= "" . htmlspecialchars($document->getName()) . ""; + $content .= "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + $content .= ""; + + $content .= ""; + $content .= "" . htmlspecialchars($document->getName()) . ""; $content .= "
    ".getMLText('owner').": ".htmlspecialchars($owner->getFullName()).", ".getMLText('creation_date').": ".date('Y-m-d', $document->getDate()).", ".getMLText('version')." ".$version." - ".date('Y-m-d', $latestContent->getDate()).""; if($comment) { $content .= "
    ".htmlspecialchars($comment).""; } $content .= "\n"; -// $content .= "".htmlspecialchars($owner->getFullName()).""; + $content .= ""; $attentionstr = ''; if ( $document->isLocked() ) { @@ -1557,8 +1561,9 @@ $('#delete-folder-btn-".$folderid."').popover({ $content .= count($files)." ".getMLText("linked_files")."
    "; if(count($links)) $content .= count($links)." ".getMLText("linked_documents")."
    "; - $content .= getOverallStatusText($status["status"]).""; -// $content .= "".$version.""; + $content .= getOverallStatusText($status["status"]).""; + $content .= "\n"; + $content .= ""; $content .= "
    "; if($document->getAccessMode($user) >= M_ALL) { From d538bde57962b3ffff6cd626a7314d8a7358ee11 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2015 19:13:08 +0200 Subject: [PATCH 0095/2006] add more lists of documents --- views/bootstrap/class.MyDocuments.php | 114 +++++++++++++++++++++++++- 1 file changed, 112 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.MyDocuments.php b/views/bootstrap/class.MyDocuments.php index 8c8f97f86..32429b2e9 100644 --- a/views/bootstrap/class.MyDocuments.php +++ b/views/bootstrap/class.MyDocuments.php @@ -267,6 +267,118 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { $this->contentContainerEnd(); } + // Get document list for the current user. + $revisionStatus = $user->getRevisionStatus(); + + $resArr = $dms->getDocumentList('ReviseByMe', $user); + if (is_bool($resArr) && !$resArr) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer(getMLText("internal_error_exit")); + $this->htmlEndPage(); + exit; + } + if($resArr) { + /* Create an array to hold all of these results, and index the array + * by document id. This makes it easier to retrieve document ID + * information later on and saves us having to repeatedly poll the + * database every time new document information is required. + */ + $docIdx = array(); + foreach ($resArr as $res) { + /* verify expiry */ + if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ + $res["status"]=S_EXPIRED; + } + $docIdx[$res["id"]][$res["version"]] = $res; + } + + $this->contentHeading(getMLText("documents_to_revise")); + $this->contentContainerStart(); + $printheader=true; + $iRev = array(); + $dList = array(); + foreach ($revisionStatus["indstatus"] as $st) { + + if ( $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && !in_array($st["documentID"], $dList) ) { + $dList[] = $st["documentID"]; + $document = $dms->getDocument($st["documentID"]); + + if ($printheader){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + + print "\n"; + $latestContent = $document->getLatestContent(); + $previewer->createPreview($latestContent); + print ""; + print ""; + print ""; + print ""; + print ""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; + } + } + foreach ($revisionStatus["grpstatus"] as $st) { + + if (!in_array($st["documentID"], $iRev) && $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && !in_array($st["documentID"], $dList) && $docIdx[$st["documentID"]][$st["version"]]['owner'] != $user->getId()) { + $dList[] = $st["documentID"]; + $document = $dms->getDocument($st["documentID"]); + + if ($printheader){ + print "
    ".getMLText("name")."".getMLText("owner")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    "; + if($previewer->hasPreview($latestContent)) { + print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } else { + print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) ."
    "; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + $printheader=false; + } + + print "\n"; + $latestContent = $document->getLatestContent(); + $previewer->createPreview($latestContent); + print ""; + print ""; + print ""; + print ""; + print ""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; + } + } + if (!$printheader){ + echo "\n
    ".getMLText("name")."".getMLText("owner")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    "; + if($previewer->hasPreview($latestContent)) { + print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } else { + print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."
    "; + }else{ + printMLText("no_docs_to_revise"); + } + $this->contentContainerEnd(); + } + /* Get list of documents owned by current user that are * pending review or pending approval. */ @@ -344,12 +456,10 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { */ $docIdx = array(); foreach ($resArr as $res) { - /* verify expiry */ if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ $res["status"]=S_EXPIRED; } - $docIdx[$res["id"]][$res["version"]] = $res; } $this->contentHeading(getMLText("documents_to_receipt")); From 20227a44a4f3389d1b1d0a9f06deff48fd6e3b8d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2015 19:13:34 +0200 Subject: [PATCH 0096/2006] take out debug code --- views/bootstrap/class.SetRevisors.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/views/bootstrap/class.SetRevisors.php b/views/bootstrap/class.SetRevisors.php index 187ff2f03..9e8d612a0 100644 --- a/views/bootstrap/class.SetRevisors.php +++ b/views/bootstrap/class.SetRevisors.php @@ -52,9 +52,6 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Bootstrap_Style { // Retrieve list of currently assigned revisors, along with // their latest status. $revisionStatus = $content->getRevisionStatus(); - echo "
    ";
    -		print_r($revisionStatus);
    -		echo "
    "; $startdate = substr($content->getRevisionDate(), 0, 10); // Index the revision results for easy cross-reference with the revisor list. @@ -74,6 +71,7 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Bootstrap_Style { contentSubHeading(getMLText("update_revisors"));?> +
    :
    From d446034193566bb40423db7f481a44b9593255af Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2015 19:13:55 +0200 Subject: [PATCH 0097/2006] nicer output of item list --- views/bootstrap/class.TransmittalMgr.php | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/views/bootstrap/class.TransmittalMgr.php b/views/bootstrap/class.TransmittalMgr.php index e073022e5..a6b3e10c1 100644 --- a/views/bootstrap/class.TransmittalMgr.php +++ b/views/bootstrap/class.TransmittalMgr.php @@ -130,29 +130,25 @@ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { $this->contentContainerStart(); $this->showTransmittalForm($seltransmittal); $this->contentContainerEnd(); + if($seltransmittal) { $items = $seltransmittal->getItems(); if($items) { print ""; print "\n\n"; - print "\n"; - print "\n"; print "\n"; + print "\n"; + print "\n"; + print "\n"; print "\n\n\n"; foreach($items as $item) { - print ""; - print ""; - print ""; - print ""; + if ($document->getAccessMode($user) >= M_READ) + echo $this->documentListRow($document, $previewer, false, $content->getVersion()); } print "\n
    ".getMLText("document")."".getMLText("version")."".getMLText("name")."".getMLText("status")."".getMLText("action")."
    "; $content = $item->getContent(); $document = $content->getDocument(); - print $content->getVersion(); - print ""; - echo $this->documentListRow($document, $previewer, false, $content->getVersion()); - print $item->getDate(); - print "
    \n"; + print "getID()."\">".getMLText('download').""; } } ?> From 3efa77e78f42eb86eb92e738589671cd8ac1f14d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 May 2015 19:14:25 +0200 Subject: [PATCH 0098/2006] add generic function for printing a workflow protocol --- views/bootstrap/class.ViewDocument.php | 256 ++++++++++++++----------- 1 file changed, 143 insertions(+), 113 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index f209a02e9..30f8aaa42 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -110,6 +110,93 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } /* }}} */ + /** + * Output a protocol + * + * @param object $attribute attribute + */ + protected function printProtocol($latestContent, $type="") { /* {{{ */ + $dms = $this->params['dms']; +?> + + + +getReviewStatus(10); + break; + case "approval": + $statusList = $latestContent->getApprovalStatus(10); + break; + case "revision": + $statusList = $latestContent->getRevisionStatus(10); + break; + case "receipt": + $statusList = $latestContent->getReceiptStatus(10); + break; + default: + $statusList = array(); + } + foreach($statusList as $rec) { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } +?> +
    /
    "; + switch ($rec["type"]) { + case 0: // individual. + $required = $dms->getUser($rec["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$rec["required"]."'"; + } else { + $reqName = htmlspecialchars($required->getFullName()." (".$required->getLogin().")"); + } + break; + case 1: // Approver is a group. + $required = $dms->getGroup($rec["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$rec["required"]."'"; + } + else { + $reqName = "".htmlspecialchars($required->getName()).""; + } + break; + } + echo $reqName; + echo ""; + echo "".$rec['date']." - "; + $updateuser = $dms->getUser($rec["userID"]); + if(!is_object($required)) + echo getMLText("unknown_user"); + else + echo htmlspecialchars($updateuser->getFullName()." (".$updateuser->getLogin().")"); + echo ""; + if($rec['comment']) + echo "
    ".htmlspecialchars($rec['comment']); + echo "
    "; + switch($type) { + case "review": + echo getReviewStatusText($rec["status"]); + break; + case "approval": + echo getApprovalStatusText($rec["status"]); + break; + case "revision": + echo getRevisionStatusText($rec["status"]); + break; + case "receipt": + echo getReceiptStatusText($rec["status"]); + break; + default: + } + echo "
    +params['dms']; @@ -335,7 +422,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } if(is_array($revisionStatus) && count($revisionStatus)>0) { ?> -
  • +
  • @@ -669,120 +756,27 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } print "\n"; + $this->contentContainerEnd(); + if($user->isAdmin()) { - $this->contentContainerEnd(); ?>
    - - - -getReviewStatus(10); - foreach($reviewStatusList as $rec) { - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } -?> -
    /
    "; - switch ($rec["type"]) { - case 0: // Approver is an individual. - $required = $dms->getUser($rec["required"]); - if (!is_object($required)) { - $reqName = getMLText("unknown_user")." '".$rec["required"]."'"; - } - else { - $reqName = htmlspecialchars($required->getFullName()." (".$required->getLogin().")"); - } - break; - case 1: // Approver is a group. - $required = $dms->getGroup($rec["required"]); - if (!is_object($required)) { - $reqName = getMLText("unknown_group")." '".$rec["required"]."'"; - } - else { - $reqName = "".htmlspecialchars($required->getName()).""; - } - break; - } - echo $reqName; - echo ""; - echo "".$rec['date']." - "; - $updateuser = $dms->getUser($rec["userID"]); - if(!is_object($required)) - echo getMLText("unknown_user"); - else - echo htmlspecialchars($updateuser->getFullName()." (".$updateuser->getLogin().")"); - echo ""; - if($rec['comment']) - echo "
    ".htmlspecialchars($rec['comment']); - echo "
    "; - echo getApprovalStatusText($rec["status"]); - echo "
    -
    - -
    - - - -getApprovalStatus(10); - foreach($approvalStatusList as $rec) { - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } -?> -
    /
    "; - switch ($rec["type"]) { - case 0: // Approver is an individual. - $required = $dms->getUser($rec["required"]); - if (!is_object($required)) { - $reqName = getMLText("unknown_user")." '".$rec["required"]."'"; - } - else { - $reqName = htmlspecialchars($required->getFullName()." (".$required->getLogin().")"); - } - break; - case 1: // Approver is a group. - $required = $dms->getGroup($rec["required"]); - if (!is_object($required)) { - $reqName = getMLText("unknown_group")." '".$rec["required"]."'"; - } - else { - $reqName = "".htmlspecialchars($required->getName()).""; - } - break; - } - echo $reqName; - echo ""; - echo "".$rec['date']." - "; - $updateuser = $dms->getUser($rec["userID"]); - if(!is_object($required)) - echo getMLText("unknown_user"); - else - echo htmlspecialchars($updateuser->getFullName()." (".$updateuser->getLogin().")"); - echo ""; - if($rec['comment']) - echo "
    ".htmlspecialchars($rec['comment']); - echo "
    "; - echo getApprovalStatusText($rec["status"]); - echo "
    + printProtocol($latestContent, 'review'); ?>
    +
    + printProtocol($latestContent, 'approval'); ?> +
    +
    contentContainerEnd(); + if($user->isAdmin()) { +?> +
    +
    +printProtocol($latestContent, 'receipt'); +?> +
    +
    +
    0) { ?> -
    +
    getRevisionDate()) { +?> +
    + substr($latestContent->getRevisionDate(), 0, 10))); +?> +
    + +
    +contentContainerStart(); print "\n"; @@ -1093,18 +1113,18 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "\n"; print "\n"; print ""; print "\n"; - print "\n"; + print "\n"; print "
    ".$reqName."
    • ".$r["date"]."
    • "; - /* $updateUser is the user who has done the receipt */ + /* $updateUser is the user who has done the revision */ $updateUser = $dms->getUser($r["userID"]); print "
    • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$r["userID"]."'")."
    ".htmlspecialchars($r["comment"])."".getReceiptStatusText($r["status"])."".getRevisionStatusText($r["status"])."
    contentContainerEnd(); + $this->contentContainerEnd(); + if($user->isAdmin()) { ?> -
    +
    +
    +printProtocol($latestContent, 'revision'); +?> +
    +
    + +
    1) { From 540b1ece0a0a7c8e9702c7cd713b9898c3619815 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 May 2015 17:32:10 +0200 Subject: [PATCH 0099/2006] add getSize(), updateContent() etc. --- SeedDMS_Core/Core/inc.ClassTransmittal.php | 53 +++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassTransmittal.php b/SeedDMS_Core/Core/inc.ClassTransmittal.php index bac682edb..310689474 100644 --- a/SeedDMS_Core/Core/inc.ClassTransmittal.php +++ b/SeedDMS_Core/Core/inc.ClassTransmittal.php @@ -101,6 +101,9 @@ class SeedDMS_Core_Transmittal { * @return object instance of class SeedDMS_Core_Transmittal */ public static function getInstance($id, $dms, $by='') { /* {{{ */ + if(!$dms || get_class($dms) != 'SeedDMS_Core_DMS') + return false; + $db = $dms->getDB(); switch($by) { @@ -217,6 +220,21 @@ class SeedDMS_Core_Transmittal { return $this->_items; } /* }}} */ + function getSize() { /* {{{ */ + $db = $this->_dms->getDB(); + + if (!$this->_items) { + self::getItems(); + } + + $size = 0; + foreach ($this->_items as $item) { + $content = $item->getContent(); + $size += $content->getFileSize(); + } + return $size; + } /* }}} */ + /** * Add an item to the transmittal * @@ -240,6 +258,7 @@ class SeedDMS_Core_Transmittal { return SeedDMS_Core_TransmittalItem::getInstance($itemID); } /* }}} */ + } /** @@ -290,6 +309,9 @@ class SeedDMS_Core_TransmittalItem { } public static function getInstance($id, $dms) { /* {{{ */ + if(!$dms || get_class($dms) != 'SeedDMS_Core_DMS') + return false; + $db = $dms->getDB(); $queryStr = "SELECT * FROM tblTransmittalItems WHERE id = " . (int) $id; @@ -303,7 +325,7 @@ class SeedDMS_Core_TransmittalItem { $transmittal = SeedDMS_Core_Transmittal::getInstance($resArr['transmittal'], $dms); $dclassname = $dms->getClassname('document'); $document = $dclassname::getInstance($resArr['document'], $dms); - $content = $document->getVersion($resArr['version']); + $content = $document->getContentByVersion((int) $resArr['version']); $item = new self($resArr["id"], $transmittal, $content, $resArr["date"]); $item->setDMS($dms); @@ -316,6 +338,8 @@ class SeedDMS_Core_TransmittalItem { function getID() { return $this->_id; } + function getTransmittal() { return $this->_transmittal; } + function getContent() { return $this->_content; } function getDate() { return $this->_date; } @@ -331,5 +355,32 @@ class SeedDMS_Core_TransmittalItem { return true; } /* }}} */ + + /** + * Check if the content referenzed by the transmittal item is unequal + * to the latest content of the document. + * + * This function updateѕ always to the latest version of the document, + * even if the version in the item is higher. This can happen if a + * version has been removed. + * + * @return boolean/integer false in case of an error, otherwise the new + * version. + */ + function updateContent() { /* {{{ */ + $db = $this->_dms->getDB(); + $transmittal = $this->_transmittal; + + $document = $this->_content->getDocument(); + $latestcontent = $document->getLatestContent(); + if($latestcontent->getVersion() != $this->_content->getVersion()) { + $queryStr = "UPDATE tblTransmittalItems set version = ".$latestcontent->getVersion()." WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) { + return false; + } + } + + return $latestcontent->getVersion(); + } /* }}} */ } ?> From 359f030ddba7f57a471b61c2c28cf89a8d01a657 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 May 2015 17:32:44 +0200 Subject: [PATCH 0100/2006] make it work again with new language dirs --- develop/retrieveml.sh | 2 +- develop/transcomp.php | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/develop/retrieveml.sh b/develop/retrieveml.sh index 3f45c0554..bd0577131 100644 --- a/develop/retrieveml.sh +++ b/develop/retrieveml.sh @@ -1,3 +1,3 @@ #!/bin/sh # This command retrieves the strings that need to be translated -sgrep -o "%r\n" '"getMLText(\"" __ "\""' */*.php|sort|uniq -c +sgrep -o "%r\n" '"getMLText(\"" __ "\""' */*.php views/bootstrap/*.php |sort|uniq -c diff --git a/develop/transcomp.php b/develop/transcomp.php index e24d75fad..c4755bf24 100644 --- a/develop/transcomp.php +++ b/develop/transcomp.php @@ -1,7 +1,7 @@ $value) { if(!isset($allkeys[$key])) { @@ -45,8 +46,8 @@ foreach(array('English', 'German', 'Italian', 'Slovak', 'Czech') as $lang) { exit; $fpout = fopen('php://stdout', 'w'); -foreach(array_keys($langarr['English']) as $key) { - $data = array($key, $langarr['English'][$key], $langarr['German'][$key]); +foreach(array_keys($langarr['en_GB']) as $key) { + $data = array($key, $langarr['en_GB'][$key], $langarr['de_DE'][$key]); fputcsv($fpout, $data); } ?> From d7232aa8cd8504c3516dec623e87ad86c9fb8f2c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 May 2015 17:34:23 +0200 Subject: [PATCH 0101/2006] fix key of phrase --- op/op.AddTransmittal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op/op.AddTransmittal.php b/op/op.AddTransmittal.php index 80a5fbcb4..1fc840d71 100644 --- a/op/op.AddTransmittal.php +++ b/op/op.AddTransmittal.php @@ -40,7 +40,7 @@ $comment = $_POST["comment"]; $transmittal = $dms->addTransmittal($name, $comment, $user); if (!is_object($transmittal)) { - UI::exitError(getMLText("my_document"), getMLText("error_occured")); + UI::exitError(getMLText("my_documents"), getMLText("error_occured")); } add_log_line("?name=".$name); From 6f3594d294596b33d159b46ec53c02599df29d78 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 May 2015 17:34:50 +0200 Subject: [PATCH 0102/2006] add cmd [remove|update]transmittalitem --- op/op.Ajax.php | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/op/op.Ajax.php b/op/op.Ajax.php index a85a6c9bf..b38a69302 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -646,6 +646,74 @@ switch($command) { } break; /* }}} */ + case 'removetransmittalitem': /* {{{ */ + if($user) { + if(!checkFormKey('removetransmittalitem', 'GET')) { + header('Content-Type', 'application/json'); + echo json_encode(array('success'=>false, 'message'=>getMLText('invalid_request_token'), 'data'=>'')); + } else { + $item = SeedDMS_Core_TransmittalItem::getInstance((int) $_REQUEST['id'], $dms); + if($item) { + $transmittal = $item->getTransmittal(); + if($transmittal) { + if ($transmittal->getUser()->getID() == $user->getID()) { + if($item->remove()) { + header('Content-Type', 'application/json'); + echo json_encode(array('success'=>true, 'message'=>'', 'data'=>'')); + } else { + header('Content-Type', 'application/json'); + echo json_encode(array('success'=>false, 'message'=>'Error removing transmittal item', 'data'=>'')); + } + } else { + header('Content-Type', 'application/json'); + echo json_encode(array('success'=>false, 'message'=>'No access', 'data'=>'')); + } + } else { + header('Content-Type', 'application/json'); + echo json_encode(array('success'=>false, 'message'=>'No transmittal', 'data'=>'')); + } + } else { + header('Content-Type', 'application/json'); + echo json_encode(array('success'=>false, 'message'=>'No transmittal item', 'data'=>'')); + } + } + } + break; /* }}} */ + + case 'updatetransmittalitem': /* {{{ */ + if($user) { + if(!checkFormKey('updatetransmittalitem', 'GET')) { + header('Content-Type', 'application/json'); + echo json_encode(array('success'=>false, 'message'=>getMLText('invalid_request_token'), 'data'=>'')); + } else { + $item = SeedDMS_Core_TransmittalItem::getInstance((int) $_REQUEST['id'], $dms); + if($item) { + $transmittal = $item->getTransmittal(); + if($transmittal) { + if ($transmittal->getUser()->getID() == $user->getID()) { + if($item->updateContent()) { + header('Content-Type', 'application/json'); + echo json_encode(array('success'=>true, 'message'=>'', 'data'=>'')); + } else { + header('Content-Type', 'application/json'); + echo json_encode(array('success'=>false, 'message'=>'Error removing transmittal item', 'data'=>'')); + } + } else { + header('Content-Type', 'application/json'); + echo json_encode(array('success'=>false, 'message'=>'No access', 'data'=>'')); + } + } else { + header('Content-Type', 'application/json'); + echo json_encode(array('success'=>false, 'message'=>'No transmittal', 'data'=>'')); + } + } else { + header('Content-Type', 'application/json'); + echo json_encode(array('success'=>false, 'message'=>'No transmittal item', 'data'=>'')); + } + } + } + break; /* }}} */ + } add_log_line(); ?> From 3aa22eccbdc62c1eeaddae557172fb3a68df4583 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 May 2015 17:35:36 +0200 Subject: [PATCH 0103/2006] add icon from removing and updating transmittal item --- views/bootstrap/class.TransmittalMgr.php | 149 ++++++++++++++++++++++- 1 file changed, 147 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.TransmittalMgr.php b/views/bootstrap/class.TransmittalMgr.php index a6b3e10c1..481836dcc 100644 --- a/views/bootstrap/class.TransmittalMgr.php +++ b/views/bootstrap/class.TransmittalMgr.php @@ -31,6 +31,137 @@ require_once("class.Bootstrap.php"); */ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { + /** + * Add some javascript at the bottom of the page + */ + function addAdditionalJS(){ /* {{{ */ + $this->addFooterJS(" + $('body').on('click', 'button.removetransmittalitem', function(ev){ + ev.preventDefault(); + var element = $(this); + attr_rel = $(ev.currentTarget).attr('rel'); + attr_msg = $(ev.currentTarget).attr('msg'); + attr_formtoken = $(ev.currentTarget).attr('formtoken'); + id = attr_rel; + $.get('../op/op.Ajax.php', + { command: 'removetransmittalitem', id: id, formtoken: attr_formtoken }, + function(data) { +// console.log(data); + if(data.success) { + $('#table-row-transmittalitem-'+id).hide('slow'); + noty({ + text: attr_msg, + type: 'success', + dismissQueue: true, + layout: 'topRight', + theme: 'defaultTheme', + timeout: 1500, + }); + } else { + noty({ + text: data.message, + type: 'error', + dismissQueue: true, + layout: 'topRight', + theme: 'defaultTheme', + timeout: 3500, + }); + } + }, + 'json' + ); + }); + $('body').on('click', 'button.updatetransmittalitem', function(ev){ + ev.preventDefault(); + var element = $(this); + attr_rel = $(ev.currentTarget).attr('rel'); + attr_msg = $(ev.currentTarget).attr('msg'); + attr_formtoken = $(ev.currentTarget).attr('formtoken'); + id = attr_rel; + $.get('../op/op.Ajax.php', + { command: 'updatetransmittalitem', id: id, formtoken: attr_formtoken }, + function(data) { +// console.log(data); + if(data.success) { + $('#update-transmittalitem-btn-'+id).hide('slow'); + noty({ + text: attr_msg, + type: 'success', + dismissQueue: true, + layout: 'topRight', + theme: 'defaultTheme', + timeout: 1500, + }); + } else { + noty({ + text: data.message, + type: 'error', + dismissQueue: true, + layout: 'topRight', + theme: 'defaultTheme', + timeout: 3500, + }); + } + }, + 'json' + ); + $('#update-transmittalitem-btn-'+id).popover('hide'); + }); +"); + } /* }}} */ + + /** + * Print button for updating the transmittal item to the newest version + * + * @param object $item + * @param string $msg message shown in case of successful update + */ + function printUpdateItemButton($item, $msg, $return=false){ /* {{{ */ + $itemid = $item->getID(); + $content = ''; + $content .= ''; + $this->addFooterJS(" +$('#update-transmittalitem-btn-".$itemid."').popover({ + title: '".getMLText("update_transmittalitem")."', + placement: 'left', + html: true, + content: \"
    ".htmlspecialchars(getMLText("confirm_update_transmittalitem"), ENT_QUOTES)."
    \"}); +"); + if($return) + return $content; + else + echo $content; + return ''; + } /* }}} */ + + /** + * Print button with link for deleting a transmittal item + * + * This button works just like the printDeleteDocumentButton() + * + * @param object $item transmittal item to be deleted + * @param string $msg message shown in case of successful deletion + * @param boolean $return return html instead of printing it + * @return string html content if $return is true, otherwise an empty string + */ + function printDeleteItemButton($item, $msg, $return=false){ /* {{{ */ + $itemid = $item->getID(); + $content = ''; + $content .= ''; + $this->addFooterJS(" +$('#delete-transmittalitem-btn-".$itemid."').popover({ + title: '".getMLText("rm_transmittalitem")."', + placement: 'left', + html: true, + content: \"
    ".htmlspecialchars(getMLText("confirm_rm_transmittalitem"), ENT_QUOTES)."
    \"}); +"); + if($return) + return $content; + else + echo $content; + return ''; + } /* }}} */ + function showTransmittalForm($transmittal) { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; @@ -106,12 +237,15 @@ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { print "\n\n"; print "".getMLText("name")."\n"; print "".getMLText("comment")."\n"; + print "#\n"; print "\n"; print "\n\n\n"; foreach($transmittals as $transmittal) { print "\n"; print "".$transmittal->getName().""; print "".$transmittal->getComment().""; + $items = $transmittal->getItems(); + print "".count($items)." (".SeedDMS_Core_File::format_filesize($transmittal->getSize()).")"; print ""; print "
    "; print "getID()."\" title=\"".getMLText("edit_transmittal_props")."\">"; @@ -134,18 +268,29 @@ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { if($seltransmittal) { $items = $seltransmittal->getItems(); if($items) { + $this->addAdditionalJS(); print ""; print "\n\n"; print "\n"; print "\n"; print "\n"; + print "\n"; print "\n"; print "\n\n\n"; foreach($items as $item) { $content = $item->getContent(); $document = $content->getDocument(); - if ($document->getAccessMode($user) >= M_READ) - echo $this->documentListRow($document, $previewer, false, $content->getVersion()); + $latestcontent = $document->getLatestContent(); + if ($document->getAccessMode($user) >= M_READ) { + echo "getID()."\">"; + echo $this->documentListRow($document, $previewer, true, $content->getVersion()); + echo ""; + echo ""; + } } print "\n
    ".getMLText("name")."".getMLText("status")."".getMLText("document")."".getMLText("action")."
    "; + $this->printDeleteItemButton($item, ''); + if($latestcontent->getVersion() != $content->getVersion()) + $this->printUpdateItemButton($item, getMLText('transmittalitem_updated', array('prevversion'=>$content->getVersion(), 'newversion'=>$latestcontent->getVersion()))); + echo "
    \n"; print "getID()."\">".getMLText('download').""; From 37fe7925a4c27a7c6e85a5e4987db669c89e5979 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 May 2015 17:37:53 +0200 Subject: [PATCH 0104/2006] add checking for duplicates --- SeedDMS_Core/Core/inc.ClassDMS.php | 28 ++++++++++++++++++++++++++ out/out.ObjectCheck.php | 3 ++- views/bootstrap/class.ObjectCheck.php | 29 +++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index b1c8916f7..a48d28a4a 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -2339,6 +2339,34 @@ class SeedDMS_Core_DMS { } /* }}} */ + /** + * Returns document content which is duplicated + * + * This method is for finding document content which is available twice + * in the database. The checksum of a document content was introduced + * in version 4.0.0 of SeedDMS for finding duplicates. + */ + function getDuplicateDocumentContent() { /* {{{ */ + $queryStr = "SELECT a.*, b.id as dupid FROM tblDocumentContent a LEFT JOIN tblDocumentContent b ON a.checksum=b.checksum where a.id!=b.id ORDER by a.id"; + $resArr = $this->db->getResultArray($queryStr); + if (!$resArr) + return false; + + $versions = array(); + foreach($resArr as $row) { + $document = new $this->classnames['document']($row['document'], '', '', '', '', '', '', '', '', '', '', ''); + $document->setDMS($this); + $version = new $this->classnames['documentcontent']($row['id'], $document, $row['version'], $row['comment'], $row['date'], $row['createdBy'], $row['dir'], $row['orgFileName'], $row['fileType'], $row['mimeType'], $row['fileSize'], $row['checksum']); + if(!isset($versions[$row['dupid']])) { + $versions[$row['id']]['content'] = $version; + $versions[$row['id']]['duplicates'] = array(); + } else + $versions[$row['dupid']]['duplicates'][] = $version; + } + return $versions; + + } /* }}} */ + /** * Returns statitical information * diff --git a/out/out.ObjectCheck.php b/out/out.ObjectCheck.php index d4d16f42e..c0457c94b 100644 --- a/out/out.ObjectCheck.php +++ b/out/out.ObjectCheck.php @@ -62,10 +62,11 @@ $unlinkedfolders = $dms->checkFolders(); $unlinkeddocuments = $dms->checkDocuments(); $nofilesizeversions = $dms->getNoFileSizeDocumentContent(); $nochecksumversions = $dms->getNoChecksumDocumentContent(); +$duplicateversions = $dms->getDuplicateDocumentContent(); $rootfolder = $dms->getFolder($settings->_rootFolderID); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'unlinkedcontent'=>$unlinkedversions, 'unlinkedfolders'=>$unlinkedfolders, 'unlinkeddocuments'=>$unlinkeddocuments, 'nofilesizeversions'=>$nofilesizeversions, 'nochecksumversions'=>$nochecksumversions, 'unlink'=>$unlink, 'setfilesize'=>$setfilesize, 'setchecksum'=>$setchecksum, 'repair'=>$repair, 'rootfolder'=>$rootfolder)); +$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'unlinkedcontent'=>$unlinkedversions, 'unlinkedfolders'=>$unlinkedfolders, 'unlinkeddocuments'=>$unlinkeddocuments, 'nofilesizeversions'=>$nofilesizeversions, 'nochecksumversions'=>$nochecksumversions, 'duplicateversions'=>$duplicateversions, 'unlink'=>$unlink, 'setfilesize'=>$setfilesize, 'setchecksum'=>$setchecksum, 'repair'=>$repair, 'rootfolder'=>$rootfolder)); if($view) { $view->show(); exit; diff --git a/views/bootstrap/class.ObjectCheck.php b/views/bootstrap/class.ObjectCheck.php index d3c87b68c..a312d972f 100644 --- a/views/bootstrap/class.ObjectCheck.php +++ b/views/bootstrap/class.ObjectCheck.php @@ -172,6 +172,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Bootstrap_Style { $unlinkeddocuments = $this->params['unlinkeddocuments']; $nofilesizeversions = $this->params['nofilesizeversions']; $nochecksumversions = $this->params['nochecksumversions']; + $duplicateversions = $this->params['duplicateversions']; $repair = $this->params['repair']; $unlink = $this->params['unlink']; $setfilesize = $this->params['setfilesize']; @@ -340,6 +341,34 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Bootstrap_Style { } } + $this->contentContainerEnd(); + + $this->contentHeading(getMLText("duplicate_content")); + $this->contentContainerStart(); + + if($duplicateversions) { + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + foreach($duplicateversions as $rec) { + $version = $rec['content']; + $doc = $version->getDocument(); + print ""; + print ""; + print ""; + print "\n"; + } + print "
    ".getMLText("document")."".getMLText("version")."".getMLText("original_filename")."".getMLText("mimetype")."
    ".$doc->getId()."".$version->getVersion()."".$version->getOriginalFileName()."".$version->getMimeType().""; + foreach($rec['duplicates'] as $duplicate) { + print $duplicate->getVersion(); + } + print "
    \n"; + } + $this->contentContainerEnd(); $this->htmlEndPage(); } /* }}} */ From bdd75ecfee9eb54e3ceb2e7ba2091d00fd735172 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 May 2015 18:41:10 +0200 Subject: [PATCH 0105/2006] fix addContent() --- SeedDMS_Core/Core/inc.ClassTransmittal.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassTransmittal.php b/SeedDMS_Core/Core/inc.ClassTransmittal.php index 310689474..96e2acbac 100644 --- a/SeedDMS_Core/Core/inc.ClassTransmittal.php +++ b/SeedDMS_Core/Core/inc.ClassTransmittal.php @@ -249,14 +249,14 @@ class SeedDMS_Core_Transmittal { $document = $item->getDocument(); $queryStr = "INSERT INTO `tblTransmittalItems` (`transmittal`, `document`, `version`, `date`) ". - "VALUES ('". $this->_id ."', $document->getID(), $item->getVersion(), CURRENT_TIMESTAMP)"; + "VALUES ('". $this->_id ."', ".$document->getID().", ".$item->getVersion().", CURRENT_TIMESTAMP)"; $res=$db->getResult($queryStr); if(!$res) { return false; } $itemID = $db->getInsertID(); - return SeedDMS_Core_TransmittalItem::getInstance($itemID); + return SeedDMS_Core_TransmittalItem::getInstance($itemID, $this->_dms); } /* }}} */ } From 2d967f87412900fe758b75b75e7e86a2ce1bc955 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 May 2015 18:41:27 +0200 Subject: [PATCH 0106/2006] replace # in table header --- views/bootstrap/class.TransmittalMgr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.TransmittalMgr.php b/views/bootstrap/class.TransmittalMgr.php index 481836dcc..1767a3d44 100644 --- a/views/bootstrap/class.TransmittalMgr.php +++ b/views/bootstrap/class.TransmittalMgr.php @@ -237,7 +237,7 @@ $('#delete-transmittalitem-btn-".$itemid."').popover({ print "\n\n"; print "".getMLText("name")."\n"; print "".getMLText("comment")."\n"; - print "#\n"; + print "".getMLText("size")."\n"; print "\n"; print "\n\n\n"; foreach($transmittals as $transmittal) { From fe9229c8bc34c4a3775c0bc67ce199df1403f6dd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 May 2015 18:42:03 +0200 Subject: [PATCH 0107/2006] add link for addind content to transmittal --- views/bootstrap/class.ViewDocument.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 30f8aaa42..671c0f1b8 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -562,7 +562,10 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if($accessop->maySetExpires()) { print "
  • ".getMLText("set_expiry")."
  • "; } - */ + */ + if($dms->getAllTransmittals($user)) { + print "
  • getVersion()."\">".getMLText("add_to_transmittal")."
  • "; + } if($accessop->mayEditComment()) { print "
  • getVersion()."\">".getMLText("edit_comment")."
  • "; } From eb7f3613ca85a9b7c3fe41c27dcca0f563608240 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 May 2015 18:43:28 +0200 Subject: [PATCH 0108/2006] add scripts for adding content to a transmittal --- op/op.AddToTransmittal.php | 85 ++++++++++++++++++++++ out/out.AddToTransmittal.php | 69 ++++++++++++++++++ views/bootstrap/class.AddToTransmittal.php | 73 +++++++++++++++++++ 3 files changed, 227 insertions(+) create mode 100644 op/op.AddToTransmittal.php create mode 100644 out/out.AddToTransmittal.php create mode 100644 views/bootstrap/class.AddToTransmittal.php diff --git a/op/op.AddToTransmittal.php b/op/op.AddToTransmittal.php new file mode 100644 index 000000000..c87d4d9d5 --- /dev/null +++ b/op/op.AddToTransmittal.php @@ -0,0 +1,85 @@ + getMLText("invalid_request_token"))),getMLText("invalid_request_token")); +} + +if (!isset($_POST["documentid"]) || !is_numeric($_POST["documentid"]) || intval($_POST["documentid"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} +$documentid = $_POST["documentid"]; +$document = $dms->getDocument($documentid); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); +} + +if (!isset($_POST["version"]) || !is_numeric($_POST["version"]) || intval($_POST["version"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +$version_num = $_POST["version"]; +$version = $document->getContentByVersion($version_num); + +if (!is_object($version)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +if (!isset($_POST["assignTo"]) || !is_numeric($_POST["assignTo"]) || intval($_POST["assignTo"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +$transmittalid = $_POST["assignTo"]; +$transmittal = $dms->getTransmittal($transmittalid); + +if (!is_object($transmittal)) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +if ($transmittal->getUser()->getID() != $user->getID()) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); +} + +if($transmittal->addContent($version)) { + $session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_add_to_transmittal'))); +} else { + $session->setSplashMsg(array('type'=>'error', 'msg'=>getMLText('splash_error_add_to_transmittal'))); +} + +add_log_line("?documentid=".$documentid."&version".$version_num); + +header("Location:../out/out.ViewDocument.php?documentid=".$documentid); + +?> diff --git a/out/out.AddToTransmittal.php b/out/out.AddToTransmittal.php new file mode 100644 index 000000000..b909f9461 --- /dev/null +++ b/out/out.AddToTransmittal.php @@ -0,0 +1,69 @@ + getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} +$document = $dms->getDocument($_GET["documentid"]); + +if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); +} + +if ($document->getAccessMode($user) < M_ALL) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); +} + +if (!isset($_GET["version"]) || !is_numeric($_GET["version"]) || intval($_GET["version"]<1)) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); +} + +$content = $document->getContentByVersion($_GET["version"]); +if (!is_object($content)) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); +} + +$folder = $document->getFolder(); +$transmittals = $dms->getAllTransmittals($user); + +/* Create object for checking access to certain operations */ +$accessop = new SeedDMS_AccessOperation($document, $user, $settings); + +$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); +$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$content)); +if($view) { + $view->setParam('accessobject', $accessop); + $view->setParam('transmittals', $transmittals); + $view->show(); + exit; +} + +?> diff --git a/views/bootstrap/class.AddToTransmittal.php b/views/bootstrap/class.AddToTransmittal.php new file mode 100644 index 000000000..a67775739 --- /dev/null +++ b/views/bootstrap/class.AddToTransmittal.php @@ -0,0 +1,73 @@ + + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Include parent class + */ +require_once("class.Bootstrap.php"); + +/** + * Class which outputs the html page for AddToTransmittal view + * + * @category DMS + * @package SeedDMS + * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann + * @copyright Copyright (C) 2002-2005 Markus Westphal, + * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, + * 2010-2012 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_View_AddToTransmittal extends SeedDMS_Bootstrap_Style { + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $transmittals = $this->params['transmittals']; + $content = $this->params['version']; + + $this->htmlStartPage(getMLText("my_documents")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("my_documents"), "my_documents"); + $this->contentHeading(getMLText("add_to_transmittal")); + $this->contentContainerStart(); + +?> +
    + + + + + +

    +: + +

    + +

    + +
    +contentContainerEnd(); + $this->htmlEndPage(); + } /* }}} */ +} +?> From ce572f82cbb6ee3834a79c33857053e096e854c5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 15 May 2015 07:16:46 +0200 Subject: [PATCH 0109/2006] add option -u to set the user doing the upload (Bug #214) --- utils/adddoc.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/utils/adddoc.php b/utils/adddoc.php index 1b6df25d9..2ad644b7d 100644 --- a/utils/adddoc.php +++ b/utils/adddoc.php @@ -20,6 +20,7 @@ function usage() { /* {{{ */ echo " -s : set sequence for file (used for ordering files within a folder\n"; echo " -n : set name of file\n"; echo " -V : set version of file (defaults to 1).\n"; + echo " -u : login name of user\n"; echo " -f : upload this file\n"; echo " -s : set sequence of file\n"; echo " -t set mimetype of file manually. Do not do that unless you know\n"; @@ -27,7 +28,7 @@ function usage() { /* {{{ */ } /* }}} */ $version = "0.0.1"; -$shortoptions = "F:c:C:k:K:s:V:f:n:t:hv"; +$shortoptions = "F:c:C:k:K:s:V:u:f:n:t:hv"; $longoptions = array('help', 'version', 'config:'); if(false === ($options = getopt($shortoptions, $longoptions))) { usage(); @@ -104,6 +105,11 @@ if(isset($options['n'])) { $name = $options['n']; } +$username = ''; +if(isset($options['u'])) { + $username = $options['u']; +} + $filename = ''; if(isset($options['f'])) { $filename = $options['f']; @@ -141,7 +147,10 @@ $dms->setEnableConverting($settings->_enableConverting); $dms->setViewOnlineFileTypes($settings->_viewOnlineFileTypes); /* Create a global user object */ -$user = $dms->getUser(1); +if($username) + $user = $dms->getUserByLogin(); +else + $user = $dms->getUser(1); if(is_readable($filename)) { if(filesize($filename)) { From 54525d60eff15e15cf02a5f94b69994340fcd884 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 15 May 2015 14:22:16 +0200 Subject: [PATCH 0110/2006] make revsiondate default to NULL --- install/create_tables-innodb.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/create_tables-innodb.sql b/install/create_tables-innodb.sql index 92e08a044..99e2ff7a2 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -250,7 +250,7 @@ CREATE TABLE `tblDocumentContent` ( `mimeType` varchar(100) NOT NULL default '', `fileSize` BIGINT, `checksum` char(32), - `revsiondate` datetime NOT NULL default '0000-00-00 00:00:00', + `revsiondate` datetime default NULL, PRIMARY KEY (`id`), UNIQUE (`document`, `version`), CONSTRAINT `tblDocumentContent_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) From 277fe6d5ad2c6cac31d4dda7d302b987cba030db Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 16 May 2015 19:41:43 +0200 Subject: [PATCH 0111/2006] lots of new phrases --- languages/ar_EG/lang.inc | 19 ++++ languages/bg_BG/lang.inc | 19 ++++ languages/ca_ES/lang.inc | 19 ++++ languages/cs_CZ/lang.inc | 19 ++++ languages/de_DE/lang.inc | 33 +++++-- languages/en_GB/lang.inc | 23 ++++- languages/es_ES/lang.inc | 21 ++++- languages/fr_FR/lang.inc | 19 ++++ languages/hu_HU/lang.inc | 19 ++++ languages/it_IT/lang.inc | 19 ++++ languages/nl_NL/lang.inc | 19 ++++ languages/pl_PL/lang.inc | 19 ++++ languages/pt_BR/lang.inc | 19 ++++ languages/ro_RO/lang.inc | 195 +++++++++++++++++++++++---------------- languages/ru_RU/lang.inc | 19 ++++ languages/sk_SK/lang.inc | 19 ++++ languages/sv_SE/lang.inc | 19 ++++ languages/tr_TR/lang.inc | 19 ++++ languages/zh_CN/lang.inc | 19 ++++ languages/zh_TW/lang.inc | 19 ++++ 20 files changed, 489 insertions(+), 87 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index 03554a7d2..62af0eecc 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -61,8 +61,10 @@ URL: [url]', 'add_multiple_files' => 'إضافة مستندات عديدة - سيتم استخدام اسم الملف كاسم المستند', 'add_receipt' => '', 'add_review' => 'بدأ المراجعة', +'add_revision' => '', 'add_subfolder' => 'إضافة مجلد فرعي', 'add_to_clipboard' => 'اضف الى لوحة القصاصات', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => 'إضافة مستخدم', 'add_user_to_group' => 'إضافة مستخدم لمجموعة', @@ -225,8 +227,10 @@ URL: [url]', 'confirm_rm_folder_files' => 'هل تود حقا ازالة كل الملفات الموجودة بالمجلد "[foldername]" وكل مافي المجلدات الفرعية؟
    كن حذرا: هذا الاجراء لايمكن التراجع فيه', 'confirm_rm_group' => 'هل تود حقا ازالة المجموعة "[groupname]"?
    كن حذرا: هذا الاجراء لايمكن التراجع فيه', 'confirm_rm_log' => 'هل تود حقا ازالة ملف السجل "[logname]"?
    كن حذرا: هذا الاجراء لايمكن التراجع فيه', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => 'هل تود حقا ازالة المستخدم "[username]"?
    كن حذرا: هذا الاجراء لايمكن التراجع فيه', 'confirm_rm_version' => 'هل تود حقا ازالة الاصدار [version] الخاص بالمستند "[documentname]"?
    كن حذرا: هذا الاجراء لايمكن التراجع فيه', +'confirm_update_transmittalitem' => '', 'content' => 'المحتوى', 'continue' => 'استمرار', 'create_fulltext_index' => 'انشاء فهرس للنص الكامل', @@ -260,6 +264,7 @@ URL: [url]', 'documents_to_approve' => 'مستندات في انتظار الموافقة', 'documents_to_receipt' => '', 'documents_to_review' => 'مستندات في انتظار المراجعة', +'documents_to_revise' => '', 'documents_user_requiring_attention' => 'مستندات ملكك تستلزم انتباهك', 'document_already_checkedout' => '', 'document_already_locked' => 'هذا المستند محمي ضد التعديل', @@ -445,6 +450,7 @@ URL: [url]', 'group_exists' => 'المجموعة موجودة بالفعل.', 'group_management' => 'إدارة المجموعات', 'group_members' => 'أعضاء المجموعة', +'group_receipt_summary' => '', 'group_review_summary' => 'ملخص مراجعة المجموعة', 'guest_login' => 'الدخول كضيف', 'guest_login_disabled' => 'دخول ضيف غير متاح.', @@ -628,7 +634,9 @@ URL: [url]', 'no_docs_locked' => 'لايوجد مستندات حاليا مقفلة/محمية من التعديل', 'no_docs_to_approve' => 'لايوجد مستندات حالية في انتظار الموافقة', 'no_docs_to_look_at' => 'لايوجد مستندات حاليا تستدعي انتباهك', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'لايوجد مستندات حاليا متاحة للمراجعة', +'no_docs_to_revise' => '', 'no_email_or_login' => '', 'no_fulltextindex' => 'لايوجد فهرس للنص الكامل متاح', 'no_groups' => 'لايوجد مجموعات', @@ -684,6 +692,7 @@ URL: [url]', 'quota_exceeded' => 'لقد قمت بتعدي المساحة المخصصة لك بمقدار [bytes].', 'quota_is_disabled' => '', 'quota_warning' => 'اقصى مساحة للقرص الصلب تم تعديها بمقدار [bytes]. من فضلك قم بمسح بعض المستندات او اصدارات سابقة منها', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => 'اعادة تحميل', @@ -751,6 +760,7 @@ URL: [url]', 'review_update_failed' => 'خطأ في تحديث حالة المراجعة. التحديث فشل.', 'revise_document' => '', 'revise_document_on' => '', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -773,6 +783,7 @@ URL: [url]', 'rm_from_clipboard' => 'ازالة من لوحة القصاصات', 'rm_group' => 'ازالة هذه المجموعة', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => 'ازالة هذا المستخدم', 'rm_version' => 'ازالة اصدار', 'rm_workflow' => 'ازالة مسار عمل', @@ -1125,11 +1136,13 @@ URL: [url]', 'status_not_reviewed' => 'لم تتم مراجعته بعد', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'تمت المراجعة', 'status_reviewer_rejected' => 'مسودة مرفوضة', 'status_reviewer_removed' => 'تم ازالة مراجع من العملية', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => 'مجهول', @@ -1138,6 +1151,7 @@ URL: [url]', 'submit_login' => 'تسجيل الدخول', 'submit_password' => 'تحديد كلمة سر جديدة', 'submit_password_forgotten' => 'بدء العملية', +'submit_receipt' => '', 'submit_review' => 'بدأ المراجعة', 'submit_userinfo' => 'ادخال بيانات', 'substitute_user' => 'استبدال المستخدم', @@ -1169,8 +1183,12 @@ Parent folder: [folder_path] المستخدم: [username] URL: [url]', 'transition_triggered_email_subject' => '[sitename]: [name] - تم تحريك انتقال مسار العمل', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => 'مسار العمل', 'tr_TR' => 'ﺕﺮﻜﻳﺓ', 'tuesday' => 'الثلاثاء', @@ -1201,6 +1219,7 @@ URL: [url]', 'update_recipients' => '', 'update_reviewers' => 'تحيث قائمة المراجعين', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => 'تم الرفع بواسطة', 'uploading_failed' => 'عملية رفع واحد من ملفاتك فشلت . من فضلك قم بالتأكد من اقصى ملف يمكن تحميله', 'uploading_maxsize' => 'الملف المرفوع يتخطى حجم الملف القياسي المسموح', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index 5bb782a7b..516751ba0 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -57,8 +57,10 @@ $text = array( 'add_multiple_files' => 'Добави няколко файла (името на файла ще бъде използвано като име на документа)', 'add_receipt' => '', 'add_review' => 'Рецензирай', +'add_revision' => '', 'add_subfolder' => 'Добави подпапка', 'add_to_clipboard' => 'Добави към clipboard', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => 'Добави потребител', 'add_user_to_group' => 'Добави потребител в група', @@ -210,8 +212,10 @@ $text = array( 'confirm_rm_folder_files' => 'Изтрий всички файлове в папка "[foldername]" и нейните подпапки?
    Действието е перманентно', 'confirm_rm_group' => 'Изтрий група "[groupname]"?
    Действието е перманентно', 'confirm_rm_log' => 'Изтрий лог "[logname]"?
    Действието е перманентно', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => 'Изтрий потребител "[username]"?
    Действието е перманентно', 'confirm_rm_version' => 'Изтрий версия на [version] документ "[documentname]"?
    Действието е перманентно', +'confirm_update_transmittalitem' => '', 'content' => 'Съдържание', 'continue' => 'Продължи', 'create_fulltext_index' => 'Създай пълнотекстов индекс', @@ -245,6 +249,7 @@ $text = array( 'documents_to_approve' => 'Документи, чакащи Вашето утвърждаване', 'documents_to_receipt' => '', 'documents_to_review' => 'Документы, чакащи Вашата рецензия', +'documents_to_revise' => '', 'documents_user_requiring_attention' => 'Ваши документи, изискващи внимание', 'document_already_checkedout' => '', 'document_already_locked' => 'Документът е вече блокиран', @@ -376,6 +381,7 @@ $text = array( 'group_exists' => 'Групата вече съществува', 'group_management' => 'Управление на групи', 'group_members' => 'Членове на групата', +'group_receipt_summary' => '', 'group_review_summary' => 'Сводка по рецензирането на групи', 'guest_login' => 'Влез като гост', 'guest_login_disabled' => 'Входът като гост изключен', @@ -535,7 +541,9 @@ $text = array( 'no_docs_locked' => 'Няма блокирани документи', 'no_docs_to_approve' => 'Няма документи, нуждаещи се от утвърждаване', 'no_docs_to_look_at' => 'Няма документи, нуждаещи се от внимание', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'Няма документови, нуждаещи се от рецензия', +'no_docs_to_revise' => '', 'no_email_or_login' => '', 'no_fulltextindex' => 'Няма достъпен пълнотекстов индекс', 'no_groups' => 'Няма групи', @@ -585,6 +593,7 @@ $text = array( 'quota_exceeded' => 'Вашата дискова квота е превишена с [bytes].', 'quota_is_disabled' => '', 'quota_warning' => 'Вашето max. използуване на диска е превишена с [bytes]. Please remove documents or previous versions.', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Обнови', @@ -629,6 +638,7 @@ $text = array( 'review_update_failed' => 'грешка при обновяване статуса на рецензията', 'revise_document' => '', 'revise_document_on' => '', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -645,6 +655,7 @@ $text = array( 'rm_from_clipboard' => 'Премахни от clipboard буфера', 'rm_group' => 'Премахни тази група', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => 'Премахни тоз потребител', 'rm_version' => 'Премахни версия', 'rm_workflow' => 'Премахни процес', @@ -990,11 +1001,13 @@ $text = array( 'status_not_reviewed' => 'Не рецензиран', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Рецензиран', 'status_reviewer_rejected' => 'Чернова отказана', 'status_reviewer_removed' => 'Рецензиращия премахнат от процеса', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => 'Неизвестен', @@ -1003,6 +1016,7 @@ $text = array( 'submit_login' => 'Влез', 'submit_password' => 'Установи нова парола', 'submit_password_forgotten' => 'Започни процеса', +'submit_receipt' => '', 'submit_review' => 'Рецензирай', 'submit_userinfo' => 'Изпрати информация за потребител', 'substitute_user' => '', @@ -1025,8 +1039,12 @@ $text = array( 'transition_triggered_email' => 'Забелязана промяна на процес', 'transition_triggered_email_body' => '', 'transition_triggered_email_subject' => '', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => 'Процес', 'tr_TR' => '', 'tuesday' => 'вторник', @@ -1057,6 +1075,7 @@ $text = array( 'update_recipients' => '', 'update_reviewers' => 'Обнови списъка с рецензиращи', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => 'Качен от', 'uploading_failed' => 'Качването не стана. Свържете се с админа', 'uploading_maxsize' => '', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index fb2d569f0..18f1f0f43 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -57,8 +57,10 @@ $text = array( 'add_multiple_files' => 'Afegir múltiples fitxers (s\'utilitzarà el nom de fitxer com a nom del document)', 'add_receipt' => '', 'add_review' => 'Enviar revisiót', +'add_revision' => '', 'add_subfolder' => 'Afegir subdirectori', 'add_to_clipboard' => '', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => 'Afegir nou usuari', 'add_user_to_group' => '', @@ -215,8 +217,10 @@ URL: [url]', 'confirm_rm_folder_files' => '¿Vol realment eliminar tots els fitxers de la carpeta "[foldername]" i de les seves subcarpetes?
    Atenció: aquesta acció no es pot desfer.', 'confirm_rm_group' => '¿Vol realment eliminar el grup "[groupname]"?
    atenció: aquesta acció no es pot desfer.', 'confirm_rm_log' => '¿Vol realment eliminar el fitxer de registre "[logname]"?
    Atenció: aquesta acció no es pot desfer.', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => '¿Vol realment eliminar l\'usuari "[username]"?
    Atenció: aquesta acció no es pot desfer.', 'confirm_rm_version' => '¿Vol realment eliminar la versió [version] del document "[documentname]"?
    Atenció: aquesta acció no es pot desfer.', +'confirm_update_transmittalitem' => '', 'content' => 'Contingut', 'continue' => 'Continuar', 'create_fulltext_index' => '', @@ -250,6 +254,7 @@ URL: [url]', 'documents_to_approve' => 'Documents en espera d\'aprovació d\'usuaris', 'documents_to_receipt' => '', 'documents_to_review' => 'Documents en espera de revisió d\'usuaris', +'documents_to_revise' => '', 'documents_user_requiring_attention' => 'Documents de la seva propietat que requereixen atenció', 'document_already_checkedout' => '', 'document_already_locked' => 'Aquest document ja està bloquejat', @@ -381,6 +386,7 @@ URL: [url]', 'group_exists' => 'El grup ja existeix', 'group_management' => 'Grups', 'group_members' => 'Membres del grup', +'group_receipt_summary' => '', 'group_review_summary' => 'Resum del grup revisor', 'guest_login' => 'Accés com a invitat', 'guest_login_disabled' => 'El compte d\'invitat està deshabilitat.', @@ -540,7 +546,9 @@ URL: [url]', 'no_docs_locked' => 'No hi ha documents bloquejats.', 'no_docs_to_approve' => 'Actualmente no hi ha documents que necessitin aprovació.', 'no_docs_to_look_at' => 'No hi ha documents que necessitin atenció.', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'Actualmente no hi ha documents que necessitin revisió.', +'no_docs_to_revise' => '', 'no_email_or_login' => '', 'no_fulltextindex' => '', 'no_groups' => 'No hi ha grups', @@ -590,6 +598,7 @@ URL: [url]', 'quota_exceeded' => '', 'quota_is_disabled' => '', 'quota_warning' => '', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Refresh', @@ -634,6 +643,7 @@ URL: [url]', 'review_update_failed' => 'Error actualitzant l\'estat de la revisió. L\'actualizació ha fallat.', 'revise_document' => '', 'revise_document_on' => '', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -650,6 +660,7 @@ URL: [url]', 'rm_from_clipboard' => '', 'rm_group' => 'Eliminar aquest grup', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => 'Eliminar aquest usuari', 'rm_version' => 'Eliminar versió', 'rm_workflow' => '', @@ -995,11 +1006,13 @@ URL: [url]', 'status_not_reviewed' => 'Sense revisar', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Revisat', 'status_reviewer_rejected' => 'Esborrany rebutjat', 'status_reviewer_removed' => 'Revisor eliminat del procés', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => 'Desconegut', @@ -1008,6 +1021,7 @@ URL: [url]', 'submit_login' => 'Connectat', 'submit_password' => '', 'submit_password_forgotten' => '', +'submit_receipt' => '', 'submit_review' => 'Enviar revisiót', 'submit_userinfo' => '', 'substitute_user' => '', @@ -1030,8 +1044,12 @@ URL: [url]', 'transition_triggered_email' => '', 'transition_triggered_email_body' => '', 'transition_triggered_email_subject' => '', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => '', 'tr_TR' => '', 'tuesday' => 'Dimarts', @@ -1062,6 +1080,7 @@ URL: [url]', 'update_recipients' => '', 'update_reviewers' => 'Actualitzar llista de revisors', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => 'Enviat per', 'uploading_failed' => 'Enviament (Upload) fallat. Si us plau, contacteu amb l\'administrador.', 'uploading_maxsize' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index 3beecc59f..ce7f49d9b 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -61,8 +61,10 @@ URL: [url]', 'add_multiple_files' => 'Přidat více souborů (název souboru se použije jako název dokumentu)', 'add_receipt' => '', 'add_review' => 'Poslat ke kontrole', +'add_revision' => '', 'add_subfolder' => 'Přidat podsložku', 'add_to_clipboard' => 'Přidat do schránky', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => 'Přidat nového uživatele', 'add_user_to_group' => 'Přidat uživatele do skupiny', @@ -232,8 +234,10 @@ URL: [url]', 'confirm_rm_folder_files' => 'Skutečně chcete odstranit všechny soubory z podsložky "[foldername]" ?
    Buďte opatrní: Tuto akci nelze vrátit zpět.', 'confirm_rm_group' => 'Skutečně chcete odstranit skupinu "[groupname]"?
    Pozor: Akce je nevratná.', 'confirm_rm_log' => 'Skutečně chcete odstranit LOG soubor "[logname]"?
    Pozor: Akci nelze vrátit zpět.', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => 'Skutečně chcete odstranit uživatele "[username]"?
    Pozor: Akce je nevratná.', 'confirm_rm_version' => 'Skutečně chcete odstranit verzi [version] dokumentu "[documentname]"?
    Buďte opatrní: Tuto činnost není možné vrátit zpět.', +'confirm_update_transmittalitem' => '', 'content' => 'Domů', 'continue' => 'Pokračovat', 'create_fulltext_index' => 'Vytvořit fulltext index', @@ -267,6 +271,7 @@ URL: [url]', 'documents_to_approve' => 'Dokumenty čekající na schválení uživatele', 'documents_to_receipt' => '', 'documents_to_review' => 'Dokumenty čekající na kontrolu uživatele', +'documents_to_revise' => '', 'documents_user_requiring_attention' => 'Dokumenty, které uživatel vlastní a vyžadují pozornost', 'document_already_checkedout' => '', 'document_already_locked' => 'Tento dokument je už zamčený', @@ -452,6 +457,7 @@ URL: [url]', 'group_exists' => 'Skupina již existuje.', 'group_management' => 'Skupiny', 'group_members' => 'Členové skupiny', +'group_receipt_summary' => '', 'group_review_summary' => 'Souhrn revizí skupiny', 'guest_login' => 'Přihlásit se jako host', 'guest_login_disabled' => 'Přihlášení jako host je vypnuté.', @@ -635,7 +641,9 @@ URL: [url]', 'no_docs_locked' => 'Žádné uzamčené dokumenty', 'no_docs_to_approve' => 'Momentálně neexistují žádné dokumenty, které vyžadují schválení.', 'no_docs_to_look_at' => 'Žádné dokumenty, které vyžadují pozornost.', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'Momentálně neexistují žádné dokumenty, které vyžadují kontrolu.', +'no_docs_to_revise' => '', 'no_email_or_login' => 'Přihlašovací jméno a email musí být zadán', 'no_fulltextindex' => 'Není k dispozici "fulltext index"', 'no_groups' => 'Žádné skupiny', @@ -695,6 +703,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.', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Obnovit', @@ -760,6 +769,7 @@ URL: [url]', 'review_update_failed' => 'Chyba při aktualizaci stavu kontroly. Aktualizace selhala.', 'revise_document' => '', 'revise_document_on' => '', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -782,6 +792,7 @@ URL: [url]', 'rm_from_clipboard' => 'Odstranit ze schránky', 'rm_group' => 'Odstranit tuto skupinu', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => 'Odstranit tohoto uživatele', 'rm_version' => 'Odstranit verzi', 'rm_workflow' => 'Odstranit pracovní postup', @@ -1134,11 +1145,13 @@ URL: [url]', 'status_not_reviewed' => 'Nezkontrolovaný', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Zkontrolovaný', 'status_reviewer_rejected' => 'Návrh zamítnut', 'status_reviewer_removed' => 'Kontrolor odstraněn z procesu', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => 'Neznámý', @@ -1147,6 +1160,7 @@ URL: [url]', 'submit_login' => 'Přihlásit se', 'submit_password' => 'Zadat nové heslo', 'submit_password_forgotten' => 'Zahájit proces', +'submit_receipt' => '', 'submit_review' => 'Poslat ke kontrole', 'submit_userinfo' => 'Odeslat info', 'substitute_user' => 'Zaměnit uživatele', @@ -1178,8 +1192,12 @@ Nadřazená složky: [folder_path] Uživatel: [uživatelské jméno] URL: [url]', 'transition_triggered_email_subject' => '[sitename]: [name] - Transformace praconího postupu spuštěna', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => 'Pracovní postup', 'tr_TR' => 'Turecky', 'tuesday' => 'Úterý', @@ -1210,6 +1228,7 @@ URL: [url]', 'update_recipients' => 'Update list of recipients', 'update_reviewers' => 'Aktualizovat seznam kontrolorů', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => 'Nahrál', 'uploading_failed' => 'Nahrání selhalo. Prosím, kontaktujte správce.', 'uploading_maxsize' => 'Nahrávaný soubor je větší než maximální velikost pro upload.', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index feb83d058..6c46d7d54 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 (2020), dgrutsch (18) +// Translators: Admin (2045), dgrutsch (18) $text = array( 'accept' => 'Übernehmen', @@ -61,9 +61,11 @@ URL: [url]', 'add_multiple_files' => 'Mehrere Dateien hochladen (Dateiname wird als Dokumentenname verwendet)', 'add_receipt' => 'Empfang bestätigen', 'add_review' => 'Überprüfung hinzufügen', +'add_revision' => 'Wiederholungsprüfung hinzufügen', 'add_subfolder' => 'Unterordner anlegen', 'add_to_clipboard' => 'Zur Zwischenablage hinzufügen', -'add_transmittal' => 'Transmittal hinzufügen', +'add_to_transmittal' => 'Zur Dokumentenliste hinzufügen', +'add_transmittal' => 'Dokumentenliste hinzufügen', 'add_user' => 'Neuen Benutzer anlegen', 'add_user_to_group' => 'Benutzer in Gruppe einfügen', 'add_workflow' => 'Neuen Workflow anlegen', @@ -191,7 +193,7 @@ URL: [url]', 'change_assignments' => 'Zuweisungen ändern', 'change_password' => 'Passwort ändern', 'change_password_message' => 'Ihr Passwort wurde geändert.', -'change_recipients' => 'Empfänger ändern', +'change_recipients' => 'Empfängerliste ändern', 'change_revisors' => 'Wiedervorlage ändern', 'change_status' => 'Status ändern', 'charts' => 'Diagramme', @@ -237,8 +239,10 @@ URL: [url]', 'confirm_rm_folder_files' => 'Möchten Sie wirklich alle Dateien und Unterordner des Ordner "[foldername]" löschen?
    Vorsicht: Diese Operation kann nicht rückgängig gemacht werden.', 'confirm_rm_group' => 'Möchten Sie wirklich die Gruppe "[groupname]" löschen?
    Beachten Sie, dass diese Operation nicht rückgängig gemacht werden kann.', 'confirm_rm_log' => 'Möchten Sie wirklich die Log-Datei "[logname]" löschen?
    Beachten Sie, dass diese Operation nicht rückgängig gemacht werden kann.', +'confirm_rm_transmittalitem' => 'Löschen bestätigen', 'confirm_rm_user' => 'Möchten Sie wirklich den Benutzer "[username]" löschen?
    Beachten Sie, dass diese Operation nicht rückgängig gemacht werden kann.', 'confirm_rm_version' => 'Wollen Sie die Version [version] des Dokumentes "[documentname]" wirklich löschen?
    Achtung: Dieser Vorgang kann nicht rückgängig gemacht werden.', +'confirm_update_transmittalitem' => 'Aktualisierung bestätigen', 'content' => 'Inhalt', 'continue' => 'fortführen', 'create_fulltext_index' => 'Erzeuge Volltextindex', @@ -272,6 +276,7 @@ URL: [url]', 'documents_to_approve' => 'Freigabe erforderlich', 'documents_to_receipt' => 'Dokumente deren Empfang bestätigt werden muss', 'documents_to_review' => 'Prüfung erforderlich', +'documents_to_revise' => 'Erneute Prüfung erforderlich', 'documents_user_requiring_attention' => 'Diese Dokumente sollte ich mal nachsehen', 'document_already_checkedout' => 'Dieses Dokument ist bereits ausgecheckt', 'document_already_locked' => 'Dieses Dokument ist bereits gesperrt', @@ -364,7 +369,7 @@ URL: [url]', 'edit_folder_notify' => 'Beobachtung von Ordnern', 'edit_folder_props' => 'Bearbeiten', 'edit_group' => 'Gruppe bearbeiten', -'edit_transmittal_props' => '', +'edit_transmittal_props' => 'Attribute der Dokumentenliste bearbeiten', 'edit_user' => 'Benutzer bearbeiten', 'edit_user_details' => 'Benutzerdetails bearbeiten', 'email' => 'Email', @@ -457,6 +462,7 @@ URL: [url]', 'group_exists' => 'Gruppe existiert bereits', 'group_management' => 'Gruppenverwaltung', 'group_members' => 'Gruppenmitglieder', +'group_receipt_summary' => 'Übersicht Gruppenbestätigungen', 'group_review_summary' => 'Prüfergruppen', 'guest_login' => 'Als Gast anmelden', 'guest_login_disabled' => 'Anmeldung als Gast ist gesperrt.', @@ -575,7 +581,7 @@ URL: [url]', 'move_folder' => 'Verschieben', 'my_account' => 'Mein Profil', 'my_documents' => 'Meine Dokumente', -'my_transmittals' => 'Meine Übergabedokumente', +'my_transmittals' => 'Meine Dokumentenlisten', 'name' => 'Name', 'needs_workflow_action' => 'Dieses Dokument erfordert eine Aktion. Bitte schauen Sie auf den Workflow-Reiter.', 'never' => 'nie', @@ -639,7 +645,9 @@ URL: [url]', 'no_docs_locked' => 'Keine Dokumente gesperrt.', 'no_docs_to_approve' => 'Es gibt zur Zeit keine Dokumente, die eine Freigabe erfordern.', 'no_docs_to_look_at' => 'Keine Dokumente, nach denen geschaut werden müsste.', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'Es gibt zur Zeit keine Dokumente, die eine Prüfung erfordern.', +'no_docs_to_revise' => 'Es gibt zur Zeit keine Dokumente, die erneut geprüft werden müssen.', 'no_email_or_login' => 'Login und E-Mail müssen eingegeben werden', 'no_fulltextindex' => 'Kein Volltext-Index verfügbar', 'no_groups' => 'keine Gruppen', @@ -703,6 +711,7 @@ Sollen Sie danach immer noch Problem 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.', +'receipt_log' => 'Protokoll der Empfangsbestätigungen', 'receipt_summary' => 'Übersicht Bestätigungen', 'recipients' => 'Empfänger', 'refresh' => 'Aktualisieren', @@ -780,6 +789,7 @@ URL: [url]', 'review_update_failed' => 'Störung bei Aktualisierung des Prüfstatus. Aktualisierung gescheitert.', 'revise_document' => 'Dokument überprüfen', 'revise_document_on' => '', +'revision_log' => 'Protokoll der erneuten Prüfung', 'revisors' => 'Überprüfer', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -801,7 +811,8 @@ URL: [url]', 'rm_folder' => 'Löschen', 'rm_from_clipboard' => 'Aus Zwischenablage löschen', 'rm_group' => 'Diese Gruppe löschen', -'rm_transmittal' => '', +'rm_transmittal' => 'Dokumentenliste entfernen', +'rm_transmittalitem' => 'Eintrag löschen', 'rm_user' => 'Diesen Benutzer löschen', 'rm_version' => 'Version löschen', 'rm_workflow' => 'Lösche Workflow', @@ -845,7 +856,7 @@ URL: [url]', 'select_groups' => 'Klicken zur Auswahl einer Gruppe', 'select_grp_approvers' => 'Klicken zur Auswahl einer Freigabegruppe', 'select_grp_notification' => 'Klicken zur Auswahl einer Beobachtergruppe', -'select_grp_recipients' => '', +'select_grp_recipients' => 'Klicken zur Auswahl einer Empfängergruppe', 'select_grp_reviewers' => 'Klicken zur Auswahl einer Prüfgruppe', 'select_grp_revisors' => '', 'select_ind_approvers' => 'Klicken zur Auswahl eines Freigebers', @@ -1154,11 +1165,13 @@ URL: [url]', 'status_not_reviewed' => 'nicht geprüft', 'status_not_revised' => 'nicht überprüft', 'status_receipted' => 'Empfang bestätigt', +'status_receipt_rejected' => 'Abgelehnt', 'status_recipient_removed' => 'Empfänger aus Liste entfernt', 'status_reviewed' => 'geprüft', 'status_reviewer_rejected' => 'Entwurf abgelehnt', 'status_reviewer_removed' => 'Prüfer wurde vom Prozess ausgeschlossen', 'status_revised' => 'überprüft', +'status_revision_rejected' => 'Abgelehnt', 'status_revision_sleeping' => 'wartend', 'status_revisor_removed' => 'Überprüfer von Liste entfernt', 'status_unknown' => 'unbekannt', @@ -1167,6 +1180,7 @@ URL: [url]', 'submit_login' => 'Anmelden', 'submit_password' => 'Setze neues Passwort', 'submit_password_forgotten' => 'Neues Passwort setzen und per E-Mail schicken', +'submit_receipt' => 'Empfang bestätigen', 'submit_review' => 'Überprüfung hinzufügen', 'submit_userinfo' => 'Daten setzen', 'substitute_user' => 'Benutzer wechseln', @@ -1198,8 +1212,12 @@ Parent folder: [folder_path] User: [username] URL: [url]', 'transition_triggered_email_subject' => '[sitename]: [name] - Workflow transition triggered', +'transmittal' => 'Dokumentenliste', +'transmittalitem_removed' => 'Eintrag aus Dokumentenliste gelöscht', +'transmittalitem_updated' => 'Dokument auf neueste Version aktualisiert', 'transmittal_comment' => 'Kommentar', 'transmittal_name' => 'Name', +'transmittal_size' => 'Größe', 'trigger_workflow' => 'Workflow', 'tr_TR' => 'Türkisch', 'tuesday' => 'Dienstag', @@ -1230,6 +1248,7 @@ URL: [url]', 'update_recipients' => 'Liste der Empfänger aktualisieren', 'update_reviewers' => 'Liste der Prüfer aktualisieren', 'update_revisors' => 'Liste der Wiederholungsprüfer ändern', +'update_transmittalitem' => 'Auf neueste Dokumentenversion aktualisieren', 'uploaded_by' => 'Hochgeladen durch', 'uploading_failed' => 'Das Hochladen einer Datei ist fehlgeschlagen. Bitte überprüfen Sie die maximale Dateigröße für Uploads.', 'uploading_maxsize' => 'Die Datei überschreitet die maximale Dateigröße für Uploads.', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index aa662ec70..a27ea55b2 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 (1154), dgrutsch (3), netixw (14) +// Translators: Admin (1174), dgrutsch (3), netixw (14) $text = array( 'accept' => 'Accept', @@ -61,8 +61,10 @@ URL: [url]', 'add_multiple_files' => 'Add multiple files (will use filename as document name)', 'add_receipt' => 'Acknowledge reception', 'add_review' => 'Add review', +'add_revision' => 'Add approval', 'add_subfolder' => 'Add subfolder', 'add_to_clipboard' => 'Add to clipboard', +'add_to_transmittal' => 'Add to transmittal', 'add_transmittal' => 'Add transmittal', 'add_user' => 'Add new user', 'add_user_to_group' => 'Add user to group', @@ -191,7 +193,7 @@ URL: [url]', 'change_assignments' => 'Change Assignments', 'change_password' => 'Change password', 'change_password_message' => 'Your password has been changed.', -'change_recipients' => 'Change recipients', +'change_recipients' => 'Change list of recipients', 'change_revisors' => 'Change resubmission', 'change_status' => 'Change Status', 'charts' => 'Charts', @@ -237,8 +239,10 @@ URL: [url]', 'confirm_rm_folder_files' => 'Do you really want to remove all the files of the folder "[foldername]" and of its subfolders?
    Be careful: This action cannot be undone.', 'confirm_rm_group' => 'Do you really want to remove the group "[groupname]"?
    Be careful: This action cannot be undone.', 'confirm_rm_log' => 'Do you really want to remove log file "[logname]"?
    Be careful: This action cannot be undone.', +'confirm_rm_transmittalitem' => 'Confirm removal', 'confirm_rm_user' => 'Do you really want to remove the user "[username]"?
    Be careful: This action cannot be undone.', 'confirm_rm_version' => 'Do you really want to remove version [version] of document "[documentname]"?
    Be careful: This action cannot be undone.', +'confirm_update_transmittalitem' => 'Confirm update', 'content' => 'Content', 'continue' => 'Continue', 'create_fulltext_index' => 'Create fulltext index', @@ -272,6 +276,7 @@ URL: [url]', 'documents_to_approve' => 'Documents awaiting your approval', 'documents_to_receipt' => 'Documents awaiting to confirm the receipt', 'documents_to_review' => 'Documents awaiting your review', +'documents_to_revise' => 'Documents to revise', 'documents_user_requiring_attention' => 'Documents owned by you that require attention', 'document_already_checkedout' => 'This document is already checked out', 'document_already_locked' => 'This document is aleady locked', @@ -457,6 +462,7 @@ URL: [url]', 'group_exists' => 'Group already exists.', 'group_management' => 'Groups management', 'group_members' => 'Group members', +'group_receipt_summary' => '', 'group_review_summary' => 'Group review summary', 'guest_login' => 'Login as guest', 'guest_login_disabled' => 'Guest login is disabled.', @@ -639,7 +645,9 @@ URL: [url]', 'no_docs_locked' => 'No documents locked.', 'no_docs_to_approve' => 'There are currently no documents that require approval.', 'no_docs_to_look_at' => 'No documents that need attention.', +'no_docs_to_receipt' => 'No document receipts required', 'no_docs_to_review' => 'There are currently no documents that require review.', +'no_docs_to_revise' => 'There are currently no documents that need to be revised.', 'no_email_or_login' => 'Login and email must be entered', 'no_fulltextindex' => 'No fulltext index available', 'no_groups' => 'No groups', @@ -703,6 +711,7 @@ If you have still 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.', +'receipt_log' => 'Reception Log', 'receipt_summary' => '', 'recipients' => 'Recipients', 'refresh' => 'Refresh', @@ -787,6 +796,7 @@ URL: [url]', 'review_update_failed' => 'Error updating review status. Update failed.', 'revise_document' => 'Revise document', 'revise_document_on' => 'Next revision of document version on [date]', +'revision_log' => 'Revision log', 'revisors' => 'Revisors', 'revisor_already_assigned' => 'User is already assigned as an resubmitter.', 'revisor_already_removed' => 'Resubmitter has already been removed from revision process or has already revised the document.', @@ -809,6 +819,7 @@ URL: [url]', 'rm_from_clipboard' => 'Remove from clipboard', 'rm_group' => 'Remove this group', 'rm_transmittal' => 'Remove transmittal', +'rm_transmittalitem' => 'Remove item', 'rm_user' => 'Remove this user', 'rm_version' => 'Remove version', 'rm_workflow' => 'Remove Workflow', @@ -1161,11 +1172,13 @@ URL: [url]', 'status_not_reviewed' => 'Not reviewed', 'status_not_revised' => 'not revised', 'status_receipted' => 'Receipted', +'status_receipt_rejected' => 'Rejected', 'status_recipient_removed' => 'Recipient removed from list', 'status_reviewed' => 'Reviewed', 'status_reviewer_rejected' => 'Draft rejected', 'status_reviewer_removed' => 'Reviewer removed from process', 'status_revised' => 'revised', +'status_revision_rejected' => 'rejected', 'status_revision_sleeping' => 'pending', 'status_revisor_removed' => 'Revisor removed from list', 'status_unknown' => 'Unknown', @@ -1174,6 +1187,7 @@ URL: [url]', 'submit_login' => 'Sign in', 'submit_password' => 'Set new password', 'submit_password_forgotten' => 'Start process', +'submit_receipt' => 'Submit receipt', 'submit_review' => 'Submit review', 'submit_userinfo' => 'Submit info', 'substitute_user' => 'Substitute User', @@ -1205,8 +1219,12 @@ Parent folder: [folder_path] User: [username] URL: [url]', 'transition_triggered_email_subject' => '[sitename]: [name] - Workflow transition triggered', +'transmittal' => 'Transmittal', +'transmittalitem_removed' => 'Transmittal item removed', +'transmittalitem_updated' => 'Dokument updated to latest version', 'transmittal_comment' => 'Comment', 'transmittal_name' => 'Name', +'transmittal_size' => 'Size', 'trigger_workflow' => 'Workflow', 'tr_TR' => 'Turkish', 'tuesday' => 'Tuesday', @@ -1237,6 +1255,7 @@ URL: [url]', 'update_recipients' => '', 'update_reviewers' => 'Update List of Reviewers', 'update_revisors' => 'Update list of resubmitters', +'update_transmittalitem' => 'Update to latest document version', 'uploaded_by' => 'Uploaded by', 'uploading_failed' => 'Uploading one of your files failed. Please check your maximum upload file size.', 'uploading_maxsize' => 'The uploaded file exceeds the maximum upload file size.', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index 7e3c66fda..aaee4832d 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/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 (937), angel (123), francisco (2), jaimem (14) +// Translators: Admin (938), angel (123), francisco (2), jaimem (14) $text = array( 'accept' => 'Aceptar', @@ -61,8 +61,10 @@ URL: [url]', 'add_multiple_files' => 'Añadir múltiples ficheros (Se usará el nombre de fichero como nombre de documento)', 'add_receipt' => '', 'add_review' => 'Enviar revisión', +'add_revision' => '', 'add_subfolder' => 'Añadir subcarpeta', 'add_to_clipboard' => 'Añadir al portapapeles', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => 'Añadir nuevo usuario', 'add_user_to_group' => 'Añadir usuario a grupo', @@ -232,8 +234,10 @@ URL: [url]', 'confirm_rm_folder_files' => '¿Desea realmente eliminar todos los ficheros de la carpeta "[foldername]" y de sus subcarpetas?
    Atención: Esta acción no se puede deshacer.', 'confirm_rm_group' => '¿Desea realmente eliminar el grupo "[groupname]"?
    Atención: Esta acción no se puede deshacer.', 'confirm_rm_log' => '¿Desea realmente eliminar el fichero de registro "[logname]"?
    Atención: Esta acción no se puede deshacer.', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => '¿Desea realmente eliminar el usuario "[username]"?
    Atención: Esta acción no se puede deshacer.', 'confirm_rm_version' => '¿Desea realmente eliminar la versión [version] del documento "[documentname]"?
    Atención: esta acción no se puede deshacer.', +'confirm_update_transmittalitem' => '', 'content' => 'Contenido', 'continue' => 'Continuar', 'create_fulltext_index' => 'Crear índice de texto completo', @@ -267,6 +271,7 @@ URL: [url]', 'documents_to_approve' => 'Documentos en espera de aprobación de usuarios', 'documents_to_receipt' => '', 'documents_to_review' => 'Documentos en espera de revisión de usuarios', +'documents_to_revise' => '', 'documents_user_requiring_attention' => 'Documentos de su propiedad que requieren atención', 'document_already_checkedout' => '', 'document_already_locked' => 'Este documento ya está bloqueado', @@ -452,6 +457,7 @@ URL: [url]', 'group_exists' => 'El grupo ya existe.', 'group_management' => 'Gestion de Grupos', 'group_members' => 'Miembros de grupo', +'group_receipt_summary' => '', 'group_review_summary' => 'Resumen del grupo revisor', 'guest_login' => 'Acceso como invitado', 'guest_login_disabled' => 'La cuenta de invitado está deshabilitada.', @@ -635,7 +641,9 @@ URL: [url]', 'no_docs_locked' => 'No hay documentos bloqueados.', 'no_docs_to_approve' => 'Actualmente no hay documentos que necesiten aprobación.', 'no_docs_to_look_at' => 'No hay documentos que necesiten atención.', +'no_docs_to_receipt' => 'Keine Dokumentenempfangsbestätigung erforderlich', 'no_docs_to_review' => 'Actualmente no hay documentos que necesiten revisión.', +'no_docs_to_revise' => '', 'no_email_or_login' => 'Debe ingresar el usuario o e-mail', 'no_fulltextindex' => 'No hay índice de texto completo disponible', 'no_groups' => 'No hay grupos', @@ -699,6 +707,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.', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Actualizar', @@ -766,6 +775,7 @@ URL: [url]', 'review_update_failed' => 'Error actualizando el estado de la revisión. La actualización ha fallado.', 'revise_document' => '', 'revise_document_on' => 'Nächste Überprüfung des Dokuments am [date]', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -788,6 +798,7 @@ URL: [url]', 'rm_from_clipboard' => 'Borrar del portapapeles', 'rm_group' => 'Eliminar este grupo', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => 'Eliminar este usuario', 'rm_version' => 'Eliminar versión', 'rm_workflow' => 'Eliminar Flujo de Trabajo', @@ -1140,11 +1151,13 @@ URL: [url]', 'status_not_reviewed' => 'Sin revisar', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Revisado', 'status_reviewer_rejected' => 'Borrador rechazado', 'status_reviewer_removed' => 'Revisor eliminado del proceso', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => 'Desconocido', @@ -1153,6 +1166,7 @@ URL: [url]', 'submit_login' => 'Conectar', 'submit_password' => 'Fijar nueva contraseña', 'submit_password_forgotten' => 'Comenzar el proceso', +'submit_receipt' => '', 'submit_review' => 'Enviar revisión', 'submit_userinfo' => 'Enviar información', 'substitute_user' => 'Cambiar de usuario', @@ -1184,8 +1198,12 @@ Carpeta principal: [folder_path] Usuario: [username] URL: [url]', 'transition_triggered_email_subject' => '[sitename]: [name] - Workflow transition triggered', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => 'Flujo de Trabajo', 'tr_TR' => 'Turco', 'tuesday' => 'Martes', @@ -1216,6 +1234,7 @@ URL: [url]', 'update_recipients' => '', 'update_reviewers' => 'Actualizar lista de revisores', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => 'Enviado por', 'uploading_failed' => 'Envío (Upload) fallido. Por favor contacte con el Administrador.', 'uploading_maxsize' => 'El archivo subido supera el tamaño máximo de upload', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index a959e318a..25300a9c6 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -61,8 +61,10 @@ URL: [url]', 'add_multiple_files' => 'Ajouter plusieurs fichiers (le nom du fichier servira de nom de document)', 'add_receipt' => '', 'add_review' => 'Soumettre la correction', +'add_revision' => '', 'add_subfolder' => 'Ajouter un sous-dossier', 'add_to_clipboard' => 'Ajouter au presse-papiers', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => 'Ajouter un utilisateur', 'add_user_to_group' => 'Ajouter un utilisateur au groupe', @@ -232,8 +234,10 @@ URL: [url]', 'confirm_rm_folder_files' => 'Voulez-vous vraiment supprimer tous les fichiers du dossier "[foldername]" et ses sous-dossiers?
    Attention: Cette action ne peut pas être annulée.', 'confirm_rm_group' => 'Voulez-vous vraiment supprimer le groupe "[groupname]"?
    Attention: Cette action ne peut pas être annulée.', 'confirm_rm_log' => 'Voulez-vous vraiment supprimer le fichier log "[logname]"?
    Attention: Cette action ne peut pas être annulée.', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => 'Voulez-vous vraiment supprimer l\'utilisateur "[username]"?
    Attention: Cette action ne peut pas être annulée.', 'confirm_rm_version' => 'Voulez-vous réellement supprimer la [version] du document "[documentname]"?
    Attention: Cette action ne peut pas être annulée.', +'confirm_update_transmittalitem' => '', 'content' => 'Contenu', 'continue' => 'Continuer', 'create_fulltext_index' => 'Créer un index de recherche plein texte', @@ -267,6 +271,7 @@ URL: [url]', 'documents_to_approve' => 'Documents en attente d\'approbation', 'documents_to_receipt' => '', 'documents_to_review' => 'Documents en attente de correction', +'documents_to_revise' => '', 'documents_user_requiring_attention' => 'Documents à surveiller', 'document_already_checkedout' => '', 'document_already_locked' => 'Ce document est déjà verrouillé', @@ -452,6 +457,7 @@ URL: [url]', 'group_exists' => 'Ce groupe existe déjà.', 'group_management' => 'Groupes', 'group_members' => 'Membres de groupes', +'group_receipt_summary' => '', 'group_review_summary' => 'Résumé groupe correcteur', 'guest_login' => 'Se connecter comme invité', 'guest_login_disabled' => 'Connexion d\'invité désactivée.', @@ -634,7 +640,9 @@ URL: [url]', 'no_docs_locked' => 'Aucun document verrouillé', 'no_docs_to_approve' => 'Aucun document ne nécessite actuellement une approbation', 'no_docs_to_look_at' => 'Aucun document à surveiller', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'Aucun document en attente de correction', +'no_docs_to_revise' => '', 'no_email_or_login' => '', 'no_fulltextindex' => 'Aucun fichier d\'index disponibles', 'no_groups' => 'Aucun groupe', @@ -696,6 +704,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' => 'Le support des quota est actuellement désactivé dans les réglages. Affecter un quota utilisateur n\'aura pas d\'effet jusqu\'à ce qu\'il soit de nouveau activé.', 'quota_warning' => 'Votre taille maximale de disque est dépassée de [bytes]. SVP supprimer des documents ou d\'anciennes versions.', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Actualiser', @@ -755,6 +764,7 @@ URL: [url]', 'review_update_failed' => 'Erreur lors de la mise à jour de la correction. Echec de la mise à jour.', 'revise_document' => '', 'revise_document_on' => '', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -771,6 +781,7 @@ URL: [url]', 'rm_from_clipboard' => 'Supprimer le dossier du presse-papiers', 'rm_group' => 'Supprimer ce groupe', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => 'Supprimer cet utilisateur', 'rm_version' => 'Retirer la version', 'rm_workflow' => 'Supprimer le Workflow', @@ -1116,11 +1127,13 @@ URL: [url]', 'status_not_reviewed' => 'Non corrigé', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Corrigé', 'status_reviewer_rejected' => 'Correction rejetée', 'status_reviewer_removed' => 'Correcteur retiré du processus', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => 'Inconnu', @@ -1129,6 +1142,7 @@ URL: [url]', 'submit_login' => 'Connexion', 'submit_password' => 'Entrez nouveau mot de passe', 'submit_password_forgotten' => 'Envoyer', +'submit_receipt' => '', 'submit_review' => 'Soumettre la correction', 'submit_userinfo' => 'Soumettre info', 'substitute_user' => 'Utilisateur de substitution', @@ -1151,8 +1165,12 @@ URL: [url]', 'transition_triggered_email' => 'Transition de workflow activé', 'transition_triggered_email_body' => '', 'transition_triggered_email_subject' => '', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => 'Workflow', 'tr_TR' => 'Turc', 'tuesday' => 'Mardi', @@ -1183,6 +1201,7 @@ URL: [url]', 'update_recipients' => '', 'update_reviewers' => 'Mise à jour de la liste de correcteurs', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => 'Déposé par', 'uploading_failed' => 'Dépose du document échoué. SVP Contactez le responsable.', 'uploading_maxsize' => 'La taille du fichier téléchargé excède la taille maximale accepté', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index ba4e957ff..94f91f5c9 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -61,8 +61,10 @@ URL: [url]', 'add_multiple_files' => 'Több állomány hozzáadása (az állomány nevét használja dokumentum névként)', 'add_receipt' => '', 'add_review' => 'Felülvizsgálat küldése', +'add_revision' => '', 'add_subfolder' => 'Alkönyvtár hozzáadása', 'add_to_clipboard' => 'Vágólaphoz hozzáad', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => 'Új felhasználó hozzáadása', 'add_user_to_group' => 'Felhasználó csoporthoz rendelése', @@ -232,8 +234,10 @@ URL: [url]', 'confirm_rm_folder_files' => 'Biztosan el kívánja távolítani az összes állományt és almappát a "[foldername]" mappából?
    Legyen óvatos: Ez a művelet nem vonható vissza.', 'confirm_rm_group' => 'Biztosan el kívánja távolítani ezt a csoportot "[groupname]"?
    Legyen óvatos: Ez a művelet nem vonható vissza.', 'confirm_rm_log' => 'Biztosan el kívánja távolítani ezt a napló állományt "[logname]"?
    Legyen óvatos: Ez a művelet nem vonható vissza.', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => 'Biztosan el kívánja távolítani ezt a felhasználót "[username]"?
    Legyen óvatos: Ez a művelet nem vonható vissza.', 'confirm_rm_version' => 'Biztosan el kívánaj távolítani a dokumentum "[documentname]" [version] verzióját?
    Legyen óvatos: Ez a művelet nem vonható vissza.', +'confirm_update_transmittalitem' => '', 'content' => 'Tartalom', 'continue' => 'Folytatás', 'create_fulltext_index' => 'Teljes szöveg index létrehozása', @@ -267,6 +271,7 @@ URL: [url]', 'documents_to_approve' => 'Jóváhagyására váró dokumentumok', 'documents_to_receipt' => '', 'documents_to_review' => 'Felülvizsgálatára váró dokumentumok', +'documents_to_revise' => '', 'documents_user_requiring_attention' => 'Az Ön tulajdonában álló dokumentumok, amelyekre figyelmet kell fordítani', 'document_already_checkedout' => '', 'document_already_locked' => 'Ez a dokumentum már zárolt', @@ -452,6 +457,7 @@ URL: [url]', 'group_exists' => 'Csoport már létezik.', 'group_management' => 'Csoportok', 'group_members' => 'Csoporttagok', +'group_receipt_summary' => '', 'group_review_summary' => 'Csoport felülvizsgálat összefoglaló', 'guest_login' => 'Bejelentkezés vendégként', 'guest_login_disabled' => 'Vendég bejelentkezés letiltva.', @@ -635,7 +641,9 @@ URL: [url]', 'no_docs_locked' => 'Nincsenek zárolt dokumentumok.', 'no_docs_to_approve' => 'Nincsenek jóváhagyandó dokumentumok.', 'no_docs_to_look_at' => 'Nincs karbantartást igénylő dokumentum.', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'Nincsenek felülvizsgálandó dokumentumok.', +'no_docs_to_revise' => '', 'no_email_or_login' => 'Felhasználónevet és emailt meg kell adni', 'no_fulltextindex' => 'Nincs elérhető teljes szöveg index', 'no_groups' => 'Nincsenek csoportok', @@ -699,6 +707,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.', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Frissítés', @@ -766,6 +775,7 @@ URL: [url]', 'review_update_failed' => 'Hiba a felülvizsgálat állapot frissítése során. Frissítés sikertelen.', 'revise_document' => '', 'revise_document_on' => '', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -788,6 +798,7 @@ URL: [url]', 'rm_from_clipboard' => 'Eltávolítás a vágólapról', 'rm_group' => 'Csoport eltávolítása', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => 'Felhasználó eltávolítása', 'rm_version' => 'Változat eltávolítása', 'rm_workflow' => 'Munkafolyamat eltávolítása', @@ -1139,11 +1150,13 @@ URL: [url]', 'status_not_reviewed' => 'Nem felülvizsgált', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Felülvizsgált', 'status_reviewer_rejected' => 'Piszkozat elutasítva', 'status_reviewer_removed' => 'Felülvizsgáló eltávolítva a folyamatból', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => 'Ismeretlen', @@ -1152,6 +1165,7 @@ URL: [url]', 'submit_login' => 'Bejelentkezés', 'submit_password' => 'Új jelszó megadása', 'submit_password_forgotten' => 'Folyamat indítás', +'submit_receipt' => '', 'submit_review' => 'Felülvizsgálat küldése', 'submit_userinfo' => 'Információ küldése', 'substitute_user' => 'Helyettesítő felhasználó', @@ -1183,8 +1197,12 @@ Szülő mappa: [folder_path] Felhasználó: [username] URL: [url]', 'transition_triggered_email_subject' => '[sitename]: [name] - Munkamanet átmenet kiváltva', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => 'Munkafolyamat', 'tr_TR' => 'Török', 'tuesday' => 'Kedd', @@ -1215,6 +1233,7 @@ URL: [url]', 'update_recipients' => '', 'update_reviewers' => 'Felülvizsgálók listájának frissítése', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => 'Feltöltötte', 'uploading_failed' => 'Állományai egyikének feltöltése sikertelen. Kérjük ellenőrizze a legnagyobb feltölthető állomány méretet.', 'uploading_maxsize' => 'A feltöltött fájl nagyobb, mint a megengedezz maximális méret', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index ba897303c..6e7139dd3 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -61,8 +61,10 @@ URL: [url]', 'add_multiple_files' => 'Aggiungi documenti multipli (il nome del file verrà usato come nome del documento)', 'add_receipt' => '', 'add_review' => 'Invio revisione', +'add_revision' => '', 'add_subfolder' => 'Aggiungi sottocartella', 'add_to_clipboard' => 'Aggiungi agli appunti', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => 'Aggiungi un nuovo utente', 'add_user_to_group' => 'Aggiungi un utente al gruppo', @@ -237,8 +239,10 @@ URL: [url]', 'confirm_rm_folder_files' => 'Vuoi davvero rimuovere tutti i file dalla cartella "[foldername]" e dalle sue sottocartelle?
    Attenzione: questa operazione non può essere annullata.', 'confirm_rm_group' => 'Vuoi davvero rimuovere il gruppo "[groupname]"?
    Attenzione: questa operazione non può essere annullata.', 'confirm_rm_log' => 'Vuoi davvero rimuovere il file di log "[logname]"?
    Attenzione: questa operazione non può essere annullata.', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => 'Vuoi davvero rimuovere l\'utente "[username]"?
    Attenzione: questa operazione non può essere annullata.', 'confirm_rm_version' => 'Vuoi veramente eliminare la versione [version] del documento "[documentname]"?
    Attenzione: questa operazione non può essere annullata.', +'confirm_update_transmittalitem' => '', 'content' => 'Contenuto', 'continue' => 'Continua', 'create_fulltext_index' => 'Crea indice fulltext', @@ -272,6 +276,7 @@ URL: [url]', 'documents_to_approve' => 'Documenti in attesa della tua approvazione', 'documents_to_receipt' => '', 'documents_to_review' => 'Documenti in attesa della tua revisione', +'documents_to_revise' => '', 'documents_user_requiring_attention' => 'Tuoi documenti in attesa di revisione o approvazione', 'document_already_checkedout' => '', 'document_already_locked' => 'Questo documento è già bloccato', @@ -457,6 +462,7 @@ URL: [url]', 'group_exists' => 'Il gruppo è già esistente', 'group_management' => 'Amministrazione gruppi', 'group_members' => 'Membri del gruppo', +'group_receipt_summary' => '', 'group_review_summary' => 'Dettaglio revisioni di gruppo', 'guest_login' => 'Login come Ospite', 'guest_login_disabled' => 'Il login come Ospite è disabilitato.', @@ -640,7 +646,9 @@ URL: [url]', 'no_docs_locked' => 'Nessun documento bloccato.', 'no_docs_to_approve' => 'Non ci sono documenti che richiedano approvazione.', 'no_docs_to_look_at' => 'Non ci sono documenti che richiedano attenzione.', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'Non ci sono documenti che richiedano revisioni.', +'no_docs_to_revise' => '', 'no_email_or_login' => 'Login ed email devono essere digitate', 'no_fulltextindex' => 'Nessun indice fulltext disponibile', 'no_groups' => 'Nessun gruppo', @@ -704,6 +712,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.', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Ricarica', @@ -788,6 +797,7 @@ URL: [url]', 'review_update_failed' => 'Errore nella variazione dello stato di revisione. Aggiornamento fallito.', 'revise_document' => '', 'revise_document_on' => '', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -810,6 +820,7 @@ URL: [url]', 'rm_from_clipboard' => 'Rimuovi dalla clipboard', 'rm_group' => 'Rimuovi questo gruppo', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => 'Rimuovi questo utente', 'rm_version' => 'Rimuovi versione', 'rm_workflow' => 'Rimuovi flusso di lavoro', @@ -1162,11 +1173,13 @@ URL: [url]', 'status_not_reviewed' => 'Non ancora revisionato', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Revisionato', 'status_reviewer_rejected' => 'Bozza rifiutata', 'status_reviewer_removed' => 'Revisore rimosso dal processo', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => 'Sconosciuto', @@ -1175,6 +1188,7 @@ URL: [url]', 'submit_login' => 'Accedi', 'submit_password' => 'Impostazione nuova password', 'submit_password_forgotten' => 'Inizio processo di recupero', +'submit_receipt' => '', 'submit_review' => 'Invio revisione', 'submit_userinfo' => 'Invio info utente', 'substitute_user' => 'Impersona utente', @@ -1206,8 +1220,12 @@ Cartella: [folder_path] Utente: [username] URL: [url]', 'transition_triggered_email_subject' => 'Transizione del flusso di lavoro iniziata', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => 'Flusso di lavoro', 'tr_TR' => 'Turco', 'tuesday' => 'Martedì', @@ -1238,6 +1256,7 @@ URL: [url]', 'update_recipients' => '', 'update_reviewers' => 'Aggiorna lista revisori', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => 'Caricato da', 'uploading_failed' => 'Upload fallito. Controllare la dimensione massima caricabile consentita.', 'uploading_maxsize' => 'Il file caricato supera la dimensione massima consentita.', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 6ee3c676e..400e620ac 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -61,8 +61,10 @@ URL: [url]', 'add_multiple_files' => 'Meerdere bestanden toevoegen (Gebruikt bestandsnaam als document naam)', 'add_receipt' => '', 'add_review' => 'Verzend [Controle]', +'add_revision' => '', 'add_subfolder' => 'Submap toevoegen', 'add_to_clipboard' => 'Toevoegen aan klembord', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => 'Nieuwe gebruiker toevoegen', 'add_user_to_group' => 'Gebruiker aan groep toevoegen', @@ -225,8 +227,10 @@ URL: [url]', 'confirm_rm_folder_files' => 'Weet U zeker dat U alle bestanden en submappen van de map "[foldername]" wilt verwijderen?
    Let op: deze actie kan niet ongedaan worden gemaakt.', 'confirm_rm_group' => 'Weet U zeker dat U de Groep "[groupname]" wilt verwijderen?
    Let op: deze handeling kan niet ongedaan worden gemaakt.', 'confirm_rm_log' => 'Weet U zeker dat U het logbestand "[logname]" wilt verwijderen?
    Let op: deze handeling kan niet ongedaan worden gemaakt.', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => 'Weet U zeker dat U de Gebruiker "[username]" wilt verwijderen?
    Let op: deze handeling kan niet ongedaan worden gemaakt.', 'confirm_rm_version' => 'Weet U zeker dat U deze versie van het document "[documentname]" wilt verwijderen?
    Pas op: deze handeling kan niet ongedaan worden gemaakt.', +'confirm_update_transmittalitem' => '', 'content' => 'Welkomstpagina', 'continue' => 'Doorgaan', 'create_fulltext_index' => 'Creeer volledige tekst index', @@ -260,6 +264,7 @@ URL: [url]', 'documents_to_approve' => 'Documenten die wachten op uw goedkeuring', 'documents_to_receipt' => '', 'documents_to_review' => 'Documenten die wachten op uw controle', +'documents_to_revise' => '', 'documents_user_requiring_attention' => 'Eigen documenten die (nog) aandacht behoeven', 'document_already_checkedout' => '', 'document_already_locked' => 'Dit document is al geblokkeerd', @@ -445,6 +450,7 @@ URL: [url]', 'group_exists' => 'Groep bestaat reeds.', 'group_management' => 'Groepen beheer', 'group_members' => 'Groepsleden', +'group_receipt_summary' => '', 'group_review_summary' => 'Groep [Controle] samenvatting', 'guest_login' => 'Login als Gast', 'guest_login_disabled' => 'Gast login is uitgeschakeld.', @@ -627,7 +633,9 @@ URL: [url]', 'no_docs_locked' => 'Geen documenten in gebruik.', 'no_docs_to_approve' => 'Er zijn momenteel geen documenten die Goedkeuring behoeven.', 'no_docs_to_look_at' => 'Geen documenten die aandacht behoeven.', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'Er zijn momenteel geen documenten die Controle behoeven.', +'no_docs_to_revise' => '', 'no_email_or_login' => 'Gebruikersnaam en emailadres moeten worden ingevoerd', 'no_fulltextindex' => 'Geen volledigetekst index beschikbaar', 'no_groups' => 'Geen Groepen', @@ -692,6 +700,7 @@ Mocht u de komende minuten geen email ontvangen, probeer het dan nogmaals en con 'quota_exceeded' => 'Uw data quota is overschreden met [bytes].', 'quota_is_disabled' => 'Quota support is momenteel niet aktief in de eigenschappen. Een user quota zetten zal geen effect hebben tot quotas actief zijn.', 'quota_warning' => 'Uw maximale data gebruik is overschreden met [bytes]. Gelieve documenten of eerdere versies te verwijderen.', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Verversen', @@ -757,6 +766,7 @@ URL: [url', 'review_update_failed' => 'Foutmelding: fout bij bijwerken [Controle] Status. Bijwerken mislukt.', 'revise_document' => '', 'revise_document_on' => '', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -779,6 +789,7 @@ URL: [url]', 'rm_from_clipboard' => 'Verwijder van klembord', 'rm_group' => 'Verwijder deze Groep', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => 'Verwijder deze Gebruiker', 'rm_version' => 'Verwijder versie', 'rm_workflow' => 'Verwijder workflwo', @@ -1131,11 +1142,13 @@ URL: [url]', 'status_not_reviewed' => 'Niet gecontroleerd', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Gecontroleerd', 'status_reviewer_rejected' => 'Klad Controle [Afgewezen]', 'status_reviewer_removed' => '[Controleur] verwijderd van dit proces', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => 'Onbekend', @@ -1144,6 +1157,7 @@ URL: [url]', 'submit_login' => 'Log in', 'submit_password' => 'Nieuw wachtwoord instellen', 'submit_password_forgotten' => 'Start proces', +'submit_receipt' => '', 'submit_review' => 'Verzend [Controle]', 'submit_userinfo' => 'Wijzigingen opslaan', 'substitute_user' => 'Invaller/ vervanger Gebruiker', @@ -1175,8 +1189,12 @@ Parent folder: [folder_path] User: [username] URL: [url]', 'transition_triggered_email_subject' => '[sitename]: [name] - Workflow overgang geactiveerd', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => 'Workflow', 'tr_TR' => 'Turks', 'tuesday' => 'Dinsdag', @@ -1207,6 +1225,7 @@ URL: [url]', 'update_recipients' => '', 'update_reviewers' => 'Bijwerken lijst van [Controleurs]', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => 'Ge-upload door', 'uploading_failed' => 'Upload mislukt. Neem contact op met de [Beheerder].', 'uploading_maxsize' => 'Het geuploade bestand overschrijdt de maximum grootte.', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 0c86e994c..1593d5794 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -61,8 +61,10 @@ URL: [url]', 'add_multiple_files' => 'Dodaj wiele plików (Nazwy plików zostaną użyte jako nazwy dokumentów)', 'add_receipt' => '', 'add_review' => 'Zatwierdź recenzję', +'add_revision' => '', 'add_subfolder' => 'Dodaj podfolder', 'add_to_clipboard' => 'Dodaj do schowka', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => 'Dodaj nowego użytkownika', 'add_user_to_group' => 'Przypisz użytkownika do grupy', @@ -225,8 +227,10 @@ URL: [url]', 'confirm_rm_folder_files' => 'Czy rzeczywiście chcesz usunąć wszystkie pliki z folderu "[foldername]" oraz jego podfoldery?
    Ostrożnie: Ta operacja nie może być cofnięta.', 'confirm_rm_group' => 'Czy rzeczywiście chcesz usunąć grupę "[groupname]"?
    Ostrożnie: Ta operacja nie może być cofnięta.', 'confirm_rm_log' => 'Czy rzeczywiście chcesz usunąć plik dziennika "[logname]"?
    Ostrożnie: Ta operacja nie może być cofnięta.', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => 'Czy rzeczywiście chcesz usunąć użytkownika "[username]"?
    Ostrożnie: Ta operacja nie może być cofnięta.', 'confirm_rm_version' => 'Czy rzeczywiście chcesz usunąć wersję [version] dokumentu "[documentname]"?
    Ostrożnie: Ta operacja nie może być cofnięta.', +'confirm_update_transmittalitem' => '', 'content' => 'Zawartość', 'continue' => 'Kontynuuj', 'create_fulltext_index' => 'Utwórz indeks pełnotekstowy', @@ -260,6 +264,7 @@ URL: [url]', 'documents_to_approve' => 'Dokumenty oczekujące na Twoje zatwierdzenie', 'documents_to_receipt' => '', 'documents_to_review' => 'Dokumenty oczekujące na Twoją recenzję', +'documents_to_revise' => '', 'documents_user_requiring_attention' => 'Dokumenty należące do Ciebie, które wymagają uwagi', 'document_already_checkedout' => '', 'document_already_locked' => 'Ten dokument jest już zablokowany', @@ -445,6 +450,7 @@ URL: [url]', 'group_exists' => 'Grupa już istnieje.', 'group_management' => 'Zarządzanie grupami', 'group_members' => 'Członkowie grupy', +'group_receipt_summary' => '', 'group_review_summary' => 'Podsumowanie opiniowania dla grupy', 'guest_login' => 'Zalogowany jako gość', 'guest_login_disabled' => 'Logowanie dla gościa jest wyłączone.', @@ -628,7 +634,9 @@ URL: [url]', 'no_docs_locked' => 'Brak zablokowanych dokumentów.', 'no_docs_to_approve' => 'Aktualnie nie ma dokumentów wymagających akceptacji.', 'no_docs_to_look_at' => 'Brak dokumentów wymagających uwagi.', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'Aktualnie nie ma dokumentów oczekujących na recenzję.', +'no_docs_to_revise' => '', 'no_email_or_login' => '', 'no_fulltextindex' => 'Brak indeksu pełnotekstowego', 'no_groups' => 'Brak grup', @@ -692,6 +700,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.', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Odśwież', @@ -745,6 +754,7 @@ URL: [url]', 'review_update_failed' => 'Błąd podczas aktualizowania statusu recenzji. Aktualizacja nie powiodła się.', 'revise_document' => '', 'revise_document_on' => '', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -767,6 +777,7 @@ URL: [url]', 'rm_from_clipboard' => 'Usuń ze schowka', 'rm_group' => 'Usuń tą grupę', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => 'Usuń tego użytkownika', 'rm_version' => 'Usuń wersję', 'rm_workflow' => 'Usuń proces', @@ -1119,11 +1130,13 @@ URL: [url]', 'status_not_reviewed' => 'Nie zrecenzowane', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Zrecenzowane', 'status_reviewer_rejected' => 'Szkic odrzucony', 'status_reviewer_removed' => 'Recenzent usunięty z procesu', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => 'Nieznany', @@ -1132,6 +1145,7 @@ URL: [url]', 'submit_login' => 'Zaloguj się', 'submit_password' => 'Ustaw nowe hasło', 'submit_password_forgotten' => 'Uruchom proces', +'submit_receipt' => '', 'submit_review' => 'Zatwierdź recenzję', 'submit_userinfo' => 'Zatwierdź dane', 'substitute_user' => 'Zastępca użytkownika', @@ -1163,8 +1177,12 @@ Folder nadrzędny: [folder_path] Użytkownik: [username] URL: [url]', 'transition_triggered_email_subject' => '[sitename]: [name] - Uruchomiono proces przepływu', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => 'Proces', 'tr_TR' => 'Turecki', 'tuesday' => 'Wtorek', @@ -1195,6 +1213,7 @@ URL: [url]', 'update_recipients' => '', 'update_reviewers' => 'Aktualizuj listę recenzentów', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => 'Przesłane przez', 'uploading_failed' => 'Przesyłanie nie powiodło się. Skontaktuj się z administratorem.', 'uploading_maxsize' => 'Rozmiar pliku większy niż dopuszczalny', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 9d574ec04..2a9d7c1fe 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -61,8 +61,10 @@ URL: [url]', 'add_multiple_files' => 'Add multiple files (will use filename as document name)', 'add_receipt' => '', 'add_review' => '', +'add_revision' => '', 'add_subfolder' => 'Criar sub-pasta', 'add_to_clipboard' => 'Adicionar ao clipboard', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => 'Novo usuário', 'add_user_to_group' => 'Adicionar usuário ao grupo', @@ -232,8 +234,10 @@ URL: [url]', 'confirm_rm_folder_files' => 'Você realmente deseja remover todos os arquivos da pasta "[foldername]" e de suas subpastas
    Cuidado: Eáa ação não pode ser desfeita.', 'confirm_rm_group' => 'Do you really want to remove the group "[groupname]"?
    Be careful: This action cannot be undone.', 'confirm_rm_log' => 'Do you really want to remove log file "[logname]"?
    Be careful: This action cannot be undone.', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => 'Do you really want to remove the user "[username]"?
    Be careful: This action cannot be undone.', 'confirm_rm_version' => 'Deseja realmente remover versão [version] do documento "[documentname]"?
    Por favor, tenha cuidado porque esta ação não poderá ser desfeita.', +'confirm_update_transmittalitem' => '', 'content' => 'Conteúdo', 'continue' => 'Continue', 'create_fulltext_index' => 'Criar índice de texto completo', @@ -267,6 +271,7 @@ URL: [url]', 'documents_to_approve' => 'Documents Awaiting User\'s Approval', 'documents_to_receipt' => '', 'documents_to_review' => 'Documents Awaiting User\'s Review', +'documents_to_revise' => '', 'documents_user_requiring_attention' => 'Documents Owned by User That Require Attention', 'document_already_checkedout' => '', 'document_already_locked' => 'Este documento já está travado', @@ -451,6 +456,7 @@ URL: [url]', 'group_exists' => 'Group already exists.', 'group_management' => 'Grupos', 'group_members' => 'Grupo membros', +'group_receipt_summary' => '', 'group_review_summary' => 'Resumo da avaliação do grupo', 'guest_login' => 'Entre como convidado', 'guest_login_disabled' => 'Guest login is disabled.', @@ -633,7 +639,9 @@ URL: [url]', 'no_docs_locked' => 'Nenhum documento bloqueado.', 'no_docs_to_approve' => 'There are currently no documents that require approval.', 'no_docs_to_look_at' => 'Não há documentos que precisam de atenção.', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'There are currently no documents that require review.', +'no_docs_to_revise' => '', 'no_email_or_login' => 'Login e e-mail devem ser digitados', 'no_fulltextindex' => 'Nenhum índice de texto completo disponível', 'no_groups' => 'Sem grupos', @@ -697,6 +705,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.', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Atualizar', @@ -763,6 +772,7 @@ URL: [url]', 'review_update_failed' => 'Error updating review status. Update failed.', 'revise_document' => '', 'revise_document_on' => '', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -785,6 +795,7 @@ URL: [url]', 'rm_from_clipboard' => 'Remover da área de transferência', 'rm_group' => 'Remove este grupo', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => 'Remove este usuário', 'rm_version' => 'Remove versão', 'rm_workflow' => 'Retire do fluxo de trabalho', @@ -1137,11 +1148,13 @@ URL: [url]', 'status_not_reviewed' => '', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => '', 'status_reviewer_rejected' => '', 'status_reviewer_removed' => '', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => 'Unknown', @@ -1150,6 +1163,7 @@ URL: [url]', 'submit_login' => 'Entrar', 'submit_password' => 'Definir uma nova senha', 'submit_password_forgotten' => 'Iniciar processo', +'submit_receipt' => '', 'submit_review' => '', 'submit_userinfo' => 'Submeter informação', 'substitute_user' => 'Substituto do usuário', @@ -1181,8 +1195,12 @@ Parent pasta: [folder_path] User: [username] URL: [url]', 'transition_triggered_email_subject' => '[sitename]: [name] - Transição de fluxo de trabalho desencadeado', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => 'Fluxo de trabalho', 'tr_TR' => 'Turco', 'tuesday' => 'Tuesday', @@ -1213,6 +1231,7 @@ URL: [url]', 'update_recipients' => '', 'update_reviewers' => 'Update List of Reviewers', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => 'Inserido por', 'uploading_failed' => 'Inserção falhou. Por favor contacte o administrador', 'uploading_maxsize' => 'O arquivo excede o tamanho máximo permitido para upload.', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index 970dd3a78..e70f91d73 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/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 (1005), balan (6) +// Translators: Admin (1005), balan (87) $text = array( 'accept' => 'Accept', @@ -51,7 +51,7 @@ URL: [url]', 'add_approval' => 'Trimite aprobare', 'add_document' => 'Adaugă document', 'add_document_link' => 'Adauga link', -'add_document_notify' => '', +'add_document_notify' => 'Alocati notificare', 'add_doc_reviewer_approver_warning' => 'N.B. Documentele care nu au atasat revizuitori(reviwers) și/sau aprobatori sunt automat marcate ca "final(released)".', 'add_doc_workflow_warning' => 'N.B. Documentele care nu au atasat un workflow sunt automat marcate ca final(released)".', 'add_event' => 'Adaugă eveniment', @@ -59,11 +59,13 @@ URL: [url]', 'add_member' => 'Adaugă un membru', 'add_multiple_documents' => 'Adaugă documente multiple', 'add_multiple_files' => 'Adaugă fisiere multiple (va folosi numele fișierului ca nume de document)', -'add_receipt' => '', +'add_receipt' => 'Recunoaste receptia', 'add_review' => 'Trimite revizuire', +'add_revision' => '', 'add_subfolder' => 'Adaugă subfolder', 'add_to_clipboard' => 'Adaugă in clipboard', -'add_transmittal' => '', +'add_to_transmittal' => '', +'add_transmittal' => 'Adauga transmitere', 'add_user' => 'Adaugă utilizator nou', 'add_user_to_group' => 'Adaugă utilizator la grup', 'add_workflow' => 'Adaugă workflow nou', @@ -80,8 +82,13 @@ URL: [url]', 'and' => 'si', 'apply' => 'Aplică', 'approval_deletion_email' => 'Cerere de aprobare stearsă', -'approval_deletion_email_body' => '', -'approval_deletion_email_subject' => '', +'approval_deletion_email_body' => 'Cerere aprobare stearsa +Document: [name] +Versiune: [version] +Folder parinte: [folder_path] +Utilizator: [username] +URL: [url]', +'approval_deletion_email_subject' => '[sitename]: [name] - Cerere aprobare stearsa', 'approval_group' => 'Grup aprobare', 'approval_log' => 'Log aprobare', 'approval_request_email' => 'Cerere aprobare', @@ -106,8 +113,8 @@ URL: [url]', 'approval_summary' => 'Sumar aprobare', 'approval_update_failed' => 'Eroare actualizare status aprobare. Actualizarea nu a reușit.', 'approvers' => 'Aprobatori', -'approver_already_assigned' => '', -'approver_already_removed' => '', +'approver_already_assigned' => 'Utilizatorul este deja asignat ca un aprobator.', +'approver_already_removed' => 'Aprobatorul a fost deja eliminat din procesul de aprobare sau a trimis deja o aprobare.', 'april' => 'Aprilie', 'archive_creation' => 'Creare arhiva', 'archive_creation_warning' => 'Cu această operațiune puteți crea o arhiva care sa conțina fișierele din toate folderele DMS. După creare, arhiva va fi salvata în folderul de date din serverul dumneavoastră.
    AVERTISMENT:. O arhivă creată ca lizibilă pentru om nu va putea fi utilizata ca server de backup.', @@ -129,12 +136,12 @@ URL: [url]', 'attrdef_objtype' => 'Tip obiect', 'attrdef_regex' => 'Expresie regulată', 'attrdef_type' => 'Tip', -'attrdef_type_boolean' => '', -'attrdef_type_email' => '', -'attrdef_type_float' => '', -'attrdef_type_int' => '', -'attrdef_type_string' => '', -'attrdef_type_url' => '', +'attrdef_type_boolean' => 'Boolean', +'attrdef_type_email' => 'Email', +'attrdef_type_float' => 'Float', +'attrdef_type_int' => 'Intreg', +'attrdef_type_string' => 'String', +'attrdef_type_url' => 'URL', 'attrdef_valueset' => 'Set de valori', 'attributes' => 'Atribute', 'attribute_changed_email_body' => 'Atribut schimbat @@ -147,8 +154,8 @@ URL: [url]', 'attribute_changed_email_subject' => '[sitename]: [name] - Atribut schimbat', 'attribute_count' => 'Numărul de utilizări', 'attribute_value' => 'Valoare atribut', -'attr_malformed_email' => '', -'attr_malformed_url' => '', +'attr_malformed_email' => 'Valoarea \'[value]\' a atributului \'[attrname]\' nu este o adresa URL valida.', +'attr_malformed_url' => 'Valoarea \'[value]\' a atributului \'[attrname]\' nu este o adresa URL valida.', 'attr_max_values' => 'Numărul maxim de valori necesare pentru atributul [attrname] este depășit.', 'attr_min_values' => 'Numărul minim de valori necesare pentru atributul [attrname] nu este atins.', 'attr_no_regex_match' => 'Valoarea atributului nu se potrivește cu expresia regulată', @@ -186,8 +193,8 @@ URL: [url]', 'change_assignments' => 'Schimbă alocările', 'change_password' => 'Schimbă parola', 'change_password_message' => 'Parola dumneavoastra a fost schimbată.', -'change_recipients' => '', -'change_revisors' => '', +'change_recipients' => 'Schimba destinatari', +'change_revisors' => 'Schimba retrimiterea', 'change_status' => 'Schimbă status', 'charts' => 'Grafice', 'chart_docsaccumulated_title' => 'Numărul de documente', @@ -198,12 +205,12 @@ URL: [url]', 'chart_docsperuser_title' => 'Documente per utilizator', 'chart_selection' => 'Selectați grafic', 'chart_sizeperuser_title' => 'Spațiu pe disc per utilizator', -'checkedout_file_has_different_version' => '', -'checkedout_file_has_disappeared' => '', -'checkedout_file_is_unchanged' => '', -'checkin_document' => '', -'checkout_document' => '', -'checkout_is_disabled' => '', +'checkedout_file_has_different_version' => 'Versiunea verificata nu este identica cu versiunea curenta. Check in-ul nu va actualiza documentul.', +'checkedout_file_has_disappeared' => 'Fisierul documentului verificat a disparut. Check in-ul nu va fi posibil.', +'checkedout_file_is_unchanged' => 'Fisierul documentului verificat este inca neschimbat. Check in-ul nu va fi posibil. Daca nu planuiti modificari, puteti reseta starea de Verificare.', +'checkin_document' => 'Check In', +'checkout_document' => 'Verifica', +'checkout_is_disabled' => 'Verificarea documentelor este dezactivata in configurari.', 'choose_attrdef' => 'Vă rugăm să alegeți definiția atributului', 'choose_category' => 'Vă rugăm să alegeți', 'choose_group' => 'Alege grup', @@ -232,8 +239,10 @@ URL: [url]', 'confirm_rm_folder_files' => 'Sigur doriți să eliminați toate fișierele din folderul "[foldername]" si toate subfolderele?
    Fiți atenți: Această acțiune nu poate fi anulată.', 'confirm_rm_group' => 'Sigur doriți să eliminați grupul "[groupname]"?
    Fiți atenți: Această acțiune nu poate fi anulată.', 'confirm_rm_log' => 'Sigur doriți să eliminați fișierul log "[logname]"?
    Fiți atenți: Această acțiune nu poate fi anulată.', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => 'Sigur doriți să eliminați utilizatorul "[username]"?
    Fiți atenți: Această acțiune nu poate fi anulată.', 'confirm_rm_version' => 'Sigur doriți să eliminați versiunea [version] a documentului "[documentname]"?
    Fiți atenți: Această acțiune nu poate fi anulată.', +'confirm_update_transmittalitem' => '', 'content' => 'Conținut', 'continue' => 'Continuă', 'create_fulltext_index' => 'Creați indexul pentru tot textul', @@ -260,15 +269,16 @@ URL: [url]', 'discspace' => 'Spațiu pe disc', 'document' => 'Document', 'documents' => 'Documente', -'documents_checked_out_by_you' => '', +'documents_checked_out_by_you' => 'Documente verificate de tine', 'documents_in_process' => 'Documente în procesare', 'documents_locked_by_you' => 'Documente blocate de tine', 'documents_only' => 'Doar documente', 'documents_to_approve' => 'Documente care așteaptă aprobarea dumneavoastră', -'documents_to_receipt' => '', +'documents_to_receipt' => 'Documente in asteptare pentru confirmarea primirii', 'documents_to_review' => 'Documente care așteaptă revizuirea dumneavoastră', +'documents_to_revise' => 'Documente de revizut', 'documents_user_requiring_attention' => 'Documente deținute de tine care necesită atenție', -'document_already_checkedout' => '', +'document_already_checkedout' => 'Acest document este deja verificat', 'document_already_locked' => 'Acest document este deja blocat', 'document_comment_changed_email' => 'Comentariu schimbat', 'document_comment_changed_email_body' => 'Comentariu schimbat @@ -289,7 +299,7 @@ Utilizator: [username]', 'document_duplicate_name' => 'Nume document duplicat', 'document_has_no_workflow' => 'Documentul nu are workflow', 'document_infos' => 'Informații document', -'document_is_checked_out' => '', +'document_is_checked_out' => 'Documentul este in prezent verificat. Daca incarcati o noua versiune, versiunea verificata nu mai poate fi verificata din nou.', 'document_is_not_locked' => 'Acest document nu este blocat', 'document_link_by' => 'Corelat cu (Linked by)', 'document_link_public' => 'Public', @@ -301,7 +311,7 @@ Folder nou: [new_folder_path] Utilizator: [username] URL: [url]', 'document_moved_email_subject' => '[sitename]: [name] - Document mutat', -'document_not_checkedout' => '', +'document_not_checkedout' => 'Documentul nu este verificat.', 'document_renamed_email' => 'Document redenumit', 'document_renamed_email_body' => 'Nume document schimbat Document: [name] @@ -359,7 +369,7 @@ URL: [url]', 'edit_folder_notify' => 'Listă de notificare pentru folder', 'edit_folder_props' => 'Editează folder', 'edit_group' => 'Editează grup', -'edit_transmittal_props' => '', +'edit_transmittal_props' => 'Editeaza proprietatile de transmitere', 'edit_user' => 'Editează utilizator', 'edit_user_details' => 'Editează detalii utilizator', 'email' => 'Email', @@ -452,6 +462,7 @@ URL: [url]', 'group_exists' => 'Grupul există deja.', 'group_management' => 'Management grupuri', 'group_members' => 'Membrii grupului', +'group_receipt_summary' => '', 'group_review_summary' => 'Sumar revizuiri grup', 'guest_login' => 'Login ca oaspete', 'guest_login_disabled' => 'Logarea ca oaspete este dezactivată.', @@ -492,7 +503,7 @@ URL: [url]', 'invalid_target_folder' => 'ID Folder țintă invalid', 'invalid_user_id' => 'ID Utilizator invalid', 'invalid_version' => 'Versiune Document invalidă', -'in_revision' => '', +'in_revision' => 'In revizuire', 'in_workflow' => 'În workflow', 'is_disabled' => 'Dezactivează cont', 'is_hidden' => 'Ascunde din lista de utilizatori', @@ -570,7 +581,7 @@ URL: [url]', 'move_folder' => 'Mută Folder', 'my_account' => 'Contul Meu', 'my_documents' => 'Documentele Mele', -'my_transmittals' => '', +'my_transmittals' => 'Trimiterile mele', 'name' => 'Nume', 'needs_workflow_action' => 'Acest document necesită atenția dumneavoastră. Vă rugăm să verificați tab-ul workflow.', 'never' => 'niciodată', @@ -631,11 +642,13 @@ URL: [url]', 'no_attached_files' => 'Nu sunt fișiere atașate', 'no_current_version' => 'Utilizați o versiune veche de SeedDMS. Cea mai recentă versiune disponibilă este [latestversion].', 'no_default_keywords' => 'Nu există cuvinte cheie disponibile', -'no_docs_checked_out' => '', +'no_docs_checked_out' => 'Nu exista documente verificate', 'no_docs_locked' => 'Nici un document blocat.', 'no_docs_to_approve' => 'Momentan nu există documente care necesită aprobarea.', 'no_docs_to_look_at' => 'Nici un document care necesită atenție.', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'Momentan nu există documente care necesită revizuirea.', +'no_docs_to_revise' => 'In prezent nu exista documente care trebuie sa fie revizuite.', 'no_email_or_login' => 'Login și email trebuie să fie introduse', 'no_fulltextindex' => 'Nu există index pe tot textul disponibil', 'no_groups' => 'Nu există grupe', @@ -646,13 +659,13 @@ URL: [url]', 'no_update_cause_locked' => 'Deci, nu puteti sa actualizati acest document. Vă rugăm să contactați administratorul.', 'no_user_image' => 'Nu au fost găsite imagini', 'no_version_check' => 'Verificarea pentru o noua versiune SeedDMS a reușit! Acest lucru ar putea fi cauzat de setarea allow_url_fopen=0 în configurația php-ului dumneavoastră.', -'no_workflow_available' => '', +'no_workflow_available' => 'Nici un workflow disponibil', 'objectcheck' => 'Verificare folder/document', 'obsolete' => 'Învechit', 'october' => 'Octombrie', 'old' => 'Vechi', 'only_jpg_user_images' => 'Doar imagini .jpg pot fi utilizate ca imagine-utilizator', -'order_by_sequence_off' => '', +'order_by_sequence_off' => 'Ordonarea dupa secventa este dezactivata in setari. Daca doriti acest parametru sa aiba efect, va trebui sa-l reactivati.', 'original_filename' => 'Nume de fișier original', 'owner' => 'Proprietar', 'ownership_changed_email' => 'Proprietar schimbat', @@ -699,8 +712,9 @@ 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.', +'receipt_log' => '', 'receipt_summary' => '', -'recipients' => '', +'recipients' => 'Destinatari', 'refresh' => 'Refresh', 'rejected' => 'Respins', 'released' => 'Final(Released)', @@ -711,9 +725,9 @@ Document: [document] Utilizator: [username] URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Atașament eliminat', -'removed_recipient' => '', +'removed_recipient' => 'a fost eliminat de pe lista de destinatari.', 'removed_reviewer' => 'a fost eliminat din lista de revizuitori.', -'removed_revispr' => '', +'removed_revispr' => 'a fost eliminat din lista de retrimitori.', 'removed_workflow_email_body' => 'Workflow eliminat din versiunea documentului Document: [name] Versiune: [version] @@ -725,9 +739,16 @@ URL: [url]', 'remove_marked_files' => 'Eliminați fișierele marcate', 'repaired' => 'reparat', 'repairing_objects' => 'Reparare documente și foldere.', -'request_workflow_action_email_body' => '', -'request_workflow_action_email_subject' => '', -'reset_checkout' => '', +'request_workflow_action_email_body' => 'Workflow-ul a ajuns la o stare care necesita actiunea ta. +Document: [name] +Versiune: [version] +Workflow: [workflow] +Starea curenta: [current_state] +Folder parinte: [folder_path] +Utilizator: [username] +URL: [url]', +'request_workflow_action_email_subject' => 'Actiune workflow necesara', +'reset_checkout' => 'Termina verificarea', 'results_page' => 'Pagina rezultate', 'return_from_subworkflow' => 'Întoarcere din subworkflow', 'return_from_subworkflow_email_body' => 'Întoarcere din subworkflow @@ -744,13 +765,23 @@ URL: [url]', 'reviewer_already_assigned' => 'este deja alocat ca un revizuitor', 'reviewer_already_removed' => 'a fost deja eliminat din procesul de revizuire sau a postat deja o revizuire', 'review_deletion_email' => 'Cerere de revizuire eliminată', -'review_deletion_email_body' => '', -'review_deletion_email_subject' => '', +'review_deletion_email_body' => 'Cerere de revizuire eliminata +Document: [name] +Versiune: [version] +Folder parinte: [folder_path] +Utilizator: [username] +URL: [url]', +'review_deletion_email_subject' => '[sitename]: [name] - Cerere de revizuire eliminata', 'review_group' => 'Grup revizuire', 'review_log' => 'Log revizuire', 'review_request_email' => 'Cerere de revizuire', -'review_request_email_body' => '', -'review_request_email_subject' => '', +'review_request_email_body' => 'Cerere de revizuire +Document: [name] +Versiune: [version] +Folder parinte: [folder_path] +Utilizator: [username] +URL: [url]', +'review_request_email_subject' => '[sitename]: [name] - Cerere de revizuire', 'review_status' => 'Status revizuire:', 'review_submit_email' => 'Revizuire trimisă', 'review_submit_email_body' => 'Revizuire trimisă @@ -764,11 +795,12 @@ URL: [url]', 'review_submit_email_subject' => '[sitename]: [name] - Revizuire trimisă', 'review_summary' => 'Sumar revizuire', 'review_update_failed' => 'Eroare actualizarea status revizuire. Actualizarea a eșuat.', -'revise_document' => '', -'revise_document_on' => '', -'revisors' => '', -'revisor_already_assigned' => '', -'revisor_already_removed' => '', +'revise_document' => 'Revizuiti documentul', +'revise_document_on' => 'Urmatoarea revizuire a versiunii document pe [data]', +'revision_log' => 'Log revizuire', +'revisors' => 'Revizuitori', +'revisor_already_assigned' => 'Utilizatorul este deja asignat ca retrimitor.', +'revisor_already_removed' => 'Retrimitorul a fost deja eliminat din procesul de revizuire sau a revizuit deja documentul.', 'rewind_workflow' => 'Derulare workflow', 'rewind_workflow_email_body' => 'Workflow derulat Document: [name] @@ -787,7 +819,8 @@ URL: [url]', 'rm_folder' => 'Eliminați folder', 'rm_from_clipboard' => 'Eliminați din clipboard', 'rm_group' => 'Eliminați acest grup', -'rm_transmittal' => '', +'rm_transmittal' => 'Elimina transmiterea', +'rm_transmittalitem' => '', 'rm_user' => 'Eliminați acest utilizator', 'rm_version' => 'Eliminați versiune', 'rm_workflow' => 'Eliminați Workflow', @@ -830,15 +863,15 @@ URL: [url]', 'select_category' => 'Click pentru a selecta categoria', 'select_groups' => 'Click pentru a selecta grupuri', 'select_grp_approvers' => 'Click pentru a selecta grupul de aprobatori', -'select_grp_notification' => '', -'select_grp_recipients' => '', +'select_grp_notification' => 'Faceti click pentru a selecta o notificare de grup', +'select_grp_recipients' => 'Faceti click pentru a selecta un grup de destinatari', 'select_grp_reviewers' => 'Click pentru a selecta grupul de revizuitori', -'select_grp_revisors' => '', +'select_grp_revisors' => 'Faceti click pentru a selecta un grup de retrimitori', 'select_ind_approvers' => 'Click pentru a selecta un aprobator individual', -'select_ind_notification' => '', +'select_ind_notification' => 'Faceti click pentru a selecta o notificare individuala', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Click pentru a selecta un revizuitor individual', -'select_ind_revisors' => '', +'select_ind_revisors' => 'Faceti click pentru a selecta retrimitori individuali', 'select_one' => 'Selectați unul', 'select_users' => 'Click pentru a selecta utilizatori', 'select_workflow' => 'Selectați workflow', @@ -864,8 +897,8 @@ URL: [url]', 'settings_calendarDefaultView' => 'Vizualizare implicită Calendar', 'settings_calendarDefaultView_desc' => 'Vizualizare implicită Calendar', 'settings_cannot_disable' => 'Fișierul ENABLE_INSTALL_TOOL nu a putut fi șters', -'settings_checkOutDir' => '', -'settings_checkOutDir_desc' => '', +'settings_checkOutDir' => 'Director pentru documente verificate', +'settings_checkOutDir_desc' => 'Acesta este directorul unde se copie ultimul continut al unui document daca documentul este verificat. Daca faceti acest director accesibil pentru utilizatori, ei pot edita fisierul si ii pot face iar check in cand au terminat.', 'settings_contentDir' => 'Director conținut', 'settings_contentDir_desc' => 'Unde sunt stocate fișierele încărcate (este recomandat sa alegeti un director care nu este accesibil prin intermediul web-server-ului dumneavoastră)', 'settings_contentOffsetDir' => 'Conținut Director Offset', @@ -923,8 +956,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => 'Dacă este setat, incărcarea este de asemenea disponibilă prin intermediul unui applet Java numit jumploader fără limită de dimensiune a fișierului stabilită de browser. De asemenea, permite încărcarea mai multor fișiere într-un singur pas. Activand aceasta optiune va dezactiva optiunea http only cookies.', 'settings_enableNotificationAppRev' => 'Activare notificari rezuitor/aprobator', 'settings_enableNotificationAppRev_desc' => 'Bifati pentru a trimite o notificare către revizuitor/aprobator când se adaugă o nouă versiune la document', -'settings_enableNotificationWorkflow' => '', -'settings_enableNotificationWorkflow_desc' => '', +'settings_enableNotificationWorkflow' => 'Trimite notificare utilizatorilor din urmatorul pas al workflow-ului', +'settings_enableNotificationWorkflow_desc' => 'Daca aceasta optiune este activata, utilizatorii si grupurile care trebuie sa ia masuri in urmatorul pas din workflow vor fi notificati. Chiar daca ei nu au adaugat o notificare pentru document.', 'settings_enableOwnerNotification' => 'Activarea notificarii proprietarului, în mod implicit', 'settings_enableOwnerNotification_desc' => 'Bifati pentru a adăuga o notificare pentru proprietar în cazul în care un document este adăugat.', 'settings_enableOwnerRevApp' => 'Permite revizuirea/aprobarea de catre proprietar', @@ -1014,8 +1047,8 @@ URL: [url]', 'settings_php_gd2' => 'PHP extension : php_gd2', 'settings_php_mbstring' => 'PHP extension : php_mbstring', 'settings_php_version' => 'Versiune PHP', -'settings_presetExpirationDate' => '', -'settings_presetExpirationDate_desc' => '', +'settings_presetExpirationDate' => 'Data de expirare prestabilita', +'settings_presetExpirationDate_desc' => 'Toate documentele noi incarcate vor avea o data de expirare stabilita la aceasta valoare. Data introdusa poate fi specificata astfel incat sa fie inteleasa de functia PHP strtotime(), de exemplu +5 weeks.', 'settings_previewWidthDetail' => 'Lățimea imaginii de previzualizare (detalii)', 'settings_previewWidthDetail_desc' => 'Lățimea imaginii de previzualizare afișată pe pagina detalii', 'settings_previewWidthList' => 'Lățimea imaginii de previzualizare (listă)', @@ -1087,7 +1120,7 @@ URL: [url]', 'settings_workflowMode_desc' => 'Workflow-ul avansat permite să specificați propriul flux de lucru(workflow) pentru versiunile de documente.', 'settings_workflowMode_valadvanced' => 'avansat', 'settings_workflowMode_valtraditional' => 'traditional', -'settings_workflowMode_valtraditional_only_approval' => '', +'settings_workflowMode_valtraditional_only_approval' => 'traditional (fara revizuire)', 'settings_zendframework' => 'Zend Framework', 'set_expiry' => 'Setare Expirare', 'set_owner' => 'Setare Proprietar', @@ -1107,7 +1140,7 @@ URL: [url]', 'splash_add_user' => 'Utilizator nou adăugat', 'splash_cleared_clipboard' => 'Clipboard golit', 'splash_document_added' => 'Document adăugat', -'splash_document_checkedout' => '', +'splash_document_checkedout' => 'Document verificat', 'splash_document_edited' => 'Document salvat', 'splash_document_locked' => 'Document blocat', 'splash_document_unlocked' => 'Document deblocat', @@ -1136,23 +1169,26 @@ URL: [url]', 'status_approved' => 'Aprobat', 'status_approver_removed' => 'Aprobator eliminat din proces', 'status_not_approved' => 'Neaprobat', -'status_not_receipted' => '', +'status_not_receipted' => 'Neprimit inca', 'status_not_reviewed' => 'Nerevizuit', -'status_not_revised' => '', +'status_not_revised' => 'nerevizuit', 'status_receipted' => '', -'status_recipient_removed' => '', +'status_receipt_rejected' => '', +'status_recipient_removed' => 'Destinatar eliminat din lista', 'status_reviewed' => 'Revizuit', 'status_reviewer_rejected' => 'Proiect respins', 'status_reviewer_removed' => 'Revizuitor eliminat din proces', -'status_revised' => '', -'status_revision_sleeping' => '', -'status_revisor_removed' => '', +'status_revised' => 'revizuit', +'status_revision_rejected' => 'respins', +'status_revision_sleeping' => 'in asteptare', +'status_revisor_removed' => 'Revizuitor eliminat din lista', 'status_unknown' => 'Necunoscut', 'storage_size' => 'Dimensiunea de stocare', 'submit_approval' => 'Trimite aprobare', 'submit_login' => 'Sign in', 'submit_password' => 'Setare parolă nouă', 'submit_password_forgotten' => 'Start proces', +'submit_receipt' => '', 'submit_review' => 'Trimite revizuire', 'submit_userinfo' => 'Trimite informații', 'substitute_user' => 'Substituie Utilizator', @@ -1160,10 +1196,10 @@ URL: [url]', 'sunday_abbr' => 'Du', 'sv_SE' => 'Suedeză', 'switched_to' => 'Comutat pe', -'takeOverGrpApprover' => '', -'takeOverGrpReviewer' => '', -'takeOverIndApprover' => '', -'takeOverIndReviewer' => '', +'takeOverGrpApprover' => 'Preia grupul de aprobatori din ultima versiune.', +'takeOverGrpReviewer' => 'Preia grupul de revizuitori din ultima versiune.', +'takeOverIndApprover' => 'Preia aprobatorul individual din ultima versiune.', +'takeOverIndReviewer' => 'Preia revizuitorul individual din ultima versiune.', 'testmail_body' => 'Acest e-mail este doar pentru testarea configurarea email din SeedDMS', 'testmail_subject' => 'Mail de test', 'theme' => 'Temă', @@ -1184,8 +1220,12 @@ Folder parinte: [folder_path] Utilizator: [username] URL: [url]', 'transition_triggered_email_subject' => '[sitename]: [name] - Tranziție Workflow declanșată', -'transmittal_comment' => '', -'transmittal_name' => '', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', +'transmittal_comment' => 'Comentariu', +'transmittal_name' => 'Nume', +'transmittal_size' => '', 'trigger_workflow' => 'Workflow', 'tr_TR' => 'Turcă', 'tuesday' => 'Marți', @@ -1215,7 +1255,8 @@ URL: [url]', 'update_locked_msg' => 'Acest document este blocat.', 'update_recipients' => '', 'update_reviewers' => 'Actualizare Listă de revizuitori', -'update_revisors' => '', +'update_revisors' => 'Actualizati lista de retrimitori', +'update_transmittalitem' => '', 'uploaded_by' => 'Adaugate de', 'uploading_failed' => 'Încărcarea unuia dintre fișierele a eșuat. Vă rugăm să verificați dimensiunea maximă de încărcare fișiere.', 'uploading_maxsize' => 'Fișierul încărcat depășește dimensiunea maximă de încărcare fișiere.', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index c44382470..087a39eeb 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -61,8 +61,10 @@ URL: [url]', 'add_multiple_files' => 'Добавить несколько файлов (название файла будет названием документа)', 'add_receipt' => '', 'add_review' => 'Рецензировать', +'add_revision' => '', 'add_subfolder' => 'Добавить подкаталог', 'add_to_clipboard' => 'Добавить в буфер', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => 'Добавить пользователя', 'add_user_to_group' => 'Добавить пользователя в группу', @@ -225,8 +227,10 @@ URL: [url]', 'confirm_rm_folder_files' => 'Удалить в каталоге «[foldername]» все файлы и подкаталоги?
    Действие необратимо', 'confirm_rm_group' => 'Удалить группу «[groupname]»?
    Действие необратимо', 'confirm_rm_log' => 'Удалить журнал «[logname]»?
    Действие необратимо', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => 'Удалить пользователя «[username]»?
    Действие необратимо', 'confirm_rm_version' => 'Удалить версию [version] документа «[documentname]»?
    Действие необратимо', +'confirm_update_transmittalitem' => '', 'content' => 'Содержимое', 'continue' => 'Продолжить', 'create_fulltext_index' => 'Создать полнотекстовый индекс', @@ -260,6 +264,7 @@ URL: [url]', 'documents_to_approve' => 'Документы, ожидающие вашего утверждения', 'documents_to_receipt' => '', 'documents_to_review' => 'Документы, ожидающие вашей рецензии', +'documents_to_revise' => '', 'documents_user_requiring_attention' => 'Ваши документы, требующие внимания', 'document_already_checkedout' => '', 'document_already_locked' => 'Документ уже заблокирован', @@ -445,6 +450,7 @@ URL: [url]', 'group_exists' => 'Группа уже существует', 'group_management' => 'Управление группами', 'group_members' => 'Члены группы', +'group_receipt_summary' => '', 'group_review_summary' => 'Сводка по рецензированию группы', 'guest_login' => 'Войти как гость', 'guest_login_disabled' => 'Гостевой вход отключён', @@ -627,7 +633,9 @@ URL: [url]', 'no_docs_locked' => 'Нет заблокированных документов', 'no_docs_to_approve' => 'Нет документов, нуждающихся в утверждении', 'no_docs_to_look_at' => 'Нет документов, нуждающихся во внимании', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'Нет документов, нуждающихся в рецензии', +'no_docs_to_revise' => '', 'no_email_or_login' => '', 'no_fulltextindex' => 'Полнотекстовый индекс не доступен', 'no_groups' => 'Нет групп', @@ -689,6 +697,7 @@ URL: [url]', 'quota_exceeded' => 'Ваша дисковая квота превышена на [bytes].', 'quota_is_disabled' => '', 'quota_warning' => 'Ваша дисковая квота превышена на [bytes]. Удалите ненужные документы или их предыдущие версии.', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Обновить', @@ -756,6 +765,7 @@ URL: [url]', 'review_update_failed' => 'Ошибка обновления статуса рецензии', 'revise_document' => '', 'revise_document_on' => '', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -778,6 +788,7 @@ URL: [url]', 'rm_from_clipboard' => 'Удалить из буфера обмена', 'rm_group' => 'Удалить группу', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => 'Удалить пользователя', 'rm_version' => 'Удалить версию', 'rm_workflow' => 'Удалить процесс', @@ -1130,11 +1141,13 @@ URL: [url]', 'status_not_reviewed' => 'Не рецензирован', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Рецензирован', 'status_reviewer_rejected' => 'Черновик отклонён', 'status_reviewer_removed' => 'Рецензирующий удалён из процесса', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => 'Неизвестный', @@ -1143,6 +1156,7 @@ URL: [url]', 'submit_login' => 'Войти', 'submit_password' => 'Установить новый пароль', 'submit_password_forgotten' => 'Начать процесс', +'submit_receipt' => '', 'submit_review' => 'Рецензировать', 'submit_userinfo' => 'Отправить информацию', 'substitute_user' => 'Переключиться', @@ -1174,8 +1188,12 @@ URL: [url]', Пользователь: [username] URL: [url]', 'transition_triggered_email_subject' => '[sitename]: изменено состояние процесса для «[name]»', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => 'Процесс', 'tr_TR' => 'Турецкий', 'tuesday' => 'Вторник', @@ -1206,6 +1224,7 @@ URL: [url]', 'update_recipients' => '', 'update_reviewers' => 'Обновить список рецензирующих', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => 'Загрузил(а)', 'uploading_failed' => 'Загрузка не удалась. Свяжитесь с администратором.', 'uploading_maxsize' => 'Размер загруженного файла превышает максимально возможный', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 9a036c327..289af439b 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -57,8 +57,10 @@ $text = array( 'add_multiple_files' => 'Pridať viacero súborov (názov súboru sa použije ako názov dokumentu)', 'add_receipt' => '', 'add_review' => 'Poslať kontrolu', +'add_revision' => '', 'add_subfolder' => 'Pridať podzložku', 'add_to_clipboard' => 'Pridaj do schránky', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => 'Pridať nového používatela', 'add_user_to_group' => '', @@ -210,8 +212,10 @@ $text = array( 'confirm_rm_folder_files' => 'Skutočne si prajete odstrániť všetky súbory zložky "[foldername]" a všetkých jej podzložiek?
    Buďte opatrní, táto akcia je nezvratná.', 'confirm_rm_group' => 'Skutočne si prajete odstrániť skupinu "[groupname]"?
    Buďte opatrní, táto akcia je nezvratná.', 'confirm_rm_log' => 'Skutočne si prajete zmazať protokol "[logname]"?
    Buďte opatrní, táto akcia je nezvratná.', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => 'Skutočne si prajete odstrániť používateľa "[username]"?
    Buďte opatrní, táto akcia je nezvratná.', 'confirm_rm_version' => 'Naozaj chcete odstrániť verziu [version] dokumentu "[documentname]"?
    Buďte opatrní: Túto činnosť nemožno vrátiť späť.', +'confirm_update_transmittalitem' => '', 'content' => 'Obsah', 'continue' => 'Pokračovať', 'create_fulltext_index' => '', @@ -245,6 +249,7 @@ $text = array( 'documents_to_approve' => 'Dokumenty čakajúce na schválenie používateľa', 'documents_to_receipt' => '', 'documents_to_review' => 'Dokumenty čakajúce na kontrolu používateľa', +'documents_to_revise' => '', 'documents_user_requiring_attention' => 'Dokumenty, ktoré používateľ vlastní a vyžadujú pozornosť', 'document_already_checkedout' => '', 'document_already_locked' => 'Tento dokument je už zamknutý', @@ -376,6 +381,7 @@ $text = array( 'group_exists' => 'Skupina už existuje.', 'group_management' => 'Skupiny', 'group_members' => 'Členovia skupiny', +'group_receipt_summary' => '', 'group_review_summary' => 'Zhrnutie skupinovej recenzie', 'guest_login' => 'Prihlásiť sa ako hosť', 'guest_login_disabled' => 'Prihlásenie ako hosť je vypnuté.', @@ -535,7 +541,9 @@ $text = array( 'no_docs_locked' => '', 'no_docs_to_approve' => 'Momentálne neexistujú žiadne dokumenty, ktoré vyžadujú schválenie.', 'no_docs_to_look_at' => '', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'Momentálne neexistujú žiadne dokumenty, ktoré vyžadujú kontrolu.', +'no_docs_to_revise' => '', 'no_email_or_login' => '', 'no_fulltextindex' => '', 'no_groups' => 'Žiadne skupiny', @@ -585,6 +593,7 @@ $text = array( 'quota_exceeded' => '', 'quota_is_disabled' => '', 'quota_warning' => '', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => '', @@ -629,6 +638,7 @@ $text = array( 'review_update_failed' => 'Chyba pri aktualizácii stavu kontroly. Aktualizácia zlyhala.', 'revise_document' => '', 'revise_document_on' => '', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -645,6 +655,7 @@ $text = array( 'rm_from_clipboard' => '', 'rm_group' => 'Odstrániť túto skupinu', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => 'Odstrániť tohto používateľa', 'rm_version' => 'Odstrániť verziu', 'rm_workflow' => '', @@ -990,11 +1001,13 @@ $text = array( 'status_not_reviewed' => 'Neskontrolovaný', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Skontrolovaný', 'status_reviewer_rejected' => 'Návrh zamietnutý', 'status_reviewer_removed' => 'Kontrolór odstránený z procesu', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => 'Neznámy', @@ -1003,6 +1016,7 @@ $text = array( 'submit_login' => 'Prihlásiť sa', 'submit_password' => '', 'submit_password_forgotten' => '', +'submit_receipt' => '', 'submit_review' => 'Poslať kontrolu', 'submit_userinfo' => '', 'substitute_user' => 'Nahradiť používateľa', @@ -1025,8 +1039,12 @@ $text = array( 'transition_triggered_email' => '', 'transition_triggered_email_body' => '', 'transition_triggered_email_subject' => '', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => '', 'tr_TR' => 'Turecky', 'tuesday' => 'Utorok', @@ -1057,6 +1075,7 @@ $text = array( 'update_recipients' => '', 'update_reviewers' => 'Aktualizovať zoznam kontrolórov', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => 'Nahral', 'uploading_failed' => 'Nahranie zlyhalo. Prosám, kontaktujte správcu.', 'uploading_maxsize' => 'Uploadovaný súbor prekročil maximálnu povolenú velkosť.', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 14aacc907..340c07e6c 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -61,8 +61,10 @@ URL: [url]', 'add_multiple_files' => 'Lägg till flera dokument (använder filnamnet som dokumentnamn)', 'add_receipt' => '', 'add_review' => 'Skicka granskning', +'add_revision' => '', 'add_subfolder' => 'Lägg till katalog', 'add_to_clipboard' => 'Flytta till Urklipp', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => 'Lägg till ny användare', 'add_user_to_group' => 'Lägg till användare till grupp', @@ -225,8 +227,10 @@ URL: [url]', 'confirm_rm_folder_files' => 'Vill du verkligen ta bort alla filer i katalogen "[foldername]" och i katalogens undermappar?
    OBS! Filerna kan inte återskapas!', 'confirm_rm_group' => 'Vill du verkligen ta bort gruppen "[groupname]"?
    OBS! Gruppen kan inte återskapas!', 'confirm_rm_log' => 'Vill du verkligen ta bort loggfilen "[logname]"?
    OBS! Loggfilen kan inte återskapas!', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => 'Vill du verkligen ta bort användaren "[username]"?
    OBS! Användaren kan inte återskapas!', 'confirm_rm_version' => 'Vill du verkligen ta bort versionen [version] av dokumentet "[documentname]"?
    OBS! Versionen kan inte återskapas!', +'confirm_update_transmittalitem' => '', 'content' => 'Innehåll', 'continue' => 'Fortsätt', 'create_fulltext_index' => 'Skapa fulltext-sökindex', @@ -260,6 +264,7 @@ URL: [url]', 'documents_to_approve' => 'Dokument som du behöver godkänna', 'documents_to_receipt' => '', 'documents_to_review' => 'Dokument som du behöver granska', +'documents_to_revise' => '', 'documents_user_requiring_attention' => 'Dokument som du behöver granska/godkänna', 'document_already_checkedout' => '', 'document_already_locked' => 'Detta dokument är redan låst', @@ -445,6 +450,7 @@ URL: [url]', 'group_exists' => 'Grupp finns redan.', 'group_management' => 'Grupphantering', 'group_members' => 'Gruppmedlemmar', +'group_receipt_summary' => '', 'group_review_summary' => 'Sammanfattning av gruppgranskning', 'guest_login' => 'Gästinloggning', 'guest_login_disabled' => 'Gästinloggningen är inaktiverad.', @@ -628,7 +634,9 @@ URL: [url]', 'no_docs_locked' => 'Inga dokument är låsta.', 'no_docs_to_approve' => 'Det finns inga dokument som du behöver godkänna.', 'no_docs_to_look_at' => 'Det finns inga dokument som behöver godkännas eller granskas.', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'Det finns inga dokument som du behöver granska.', +'no_docs_to_revise' => '', 'no_email_or_login' => 'Användarnamn och epost måste anges', 'no_fulltextindex' => 'Fulltext-index saknas', 'no_groups' => 'Inga grupper', @@ -684,6 +692,7 @@ URL: [url]', 'quota_exceeded' => 'Din minneskvot har överskridits med [bytes].', 'quota_is_disabled' => '', 'quota_warning' => 'Din maximala minneskvot har överskridits med [bytes]. Ta bort dokument eller tidigare versioner.', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Uppdatera', @@ -751,6 +760,7 @@ URL: [url]', 'review_update_failed' => 'Fel vid uppdatering av granskningsstatus. Kunde inte uppdatera.', 'revise_document' => '', 'revise_document_on' => '', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -773,6 +783,7 @@ URL: [url]', 'rm_from_clipboard' => 'Ta bort från Urklipp', 'rm_group' => 'Ta bort denna grupp', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => 'Ta bort denna användare', 'rm_version' => 'Ta bort version', 'rm_workflow' => 'Ta bort arbetsflöde', @@ -1125,11 +1136,13 @@ URL: [url]', 'status_not_reviewed' => 'Ej granskat', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Granskat', 'status_reviewer_rejected' => 'Utkast avvisat', 'status_reviewer_removed' => 'Person som granskar har tagits bort från processen', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => 'Okänd', @@ -1138,6 +1151,7 @@ URL: [url]', 'submit_login' => 'Logga in', 'submit_password' => 'Sätt nytt lösenord', 'submit_password_forgotten' => 'Starta process', +'submit_receipt' => '', 'submit_review' => 'Skicka granskning', 'submit_userinfo' => 'Skicka info', 'substitute_user' => 'Byt användare', @@ -1169,8 +1183,12 @@ Aktuell status: [current_state] Användare: [username] URL: [url]', 'transition_triggered_email_subject' => '[sitename]: [name] - Arbetsflödesövergång utlöstes', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => 'Arbetsflöde', 'tr_TR' => 'Turkiska', 'tuesday' => 'tisdag', @@ -1201,6 +1219,7 @@ URL: [url]', 'update_recipients' => '', 'update_reviewers' => 'Uppdatera listan med personer som granskar', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => 'Uppladdat av', 'uploading_failed' => 'Fel vid uppladdningen. Kontakta administratören.', 'uploading_maxsize' => 'Uppladdade filen översteg maxgränsen för storleken på filstorlek', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 6ff0447e7..7f46b278f 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -60,8 +60,10 @@ URL: [url]', 'add_multiple_files' => 'Çoklu dosya ekle (dosya adı dokümanın adı olarak kullanılacak)', 'add_receipt' => '', 'add_review' => 'Kabul et', +'add_revision' => '', 'add_subfolder' => 'Alt klasör ekle', 'add_to_clipboard' => 'Panoya ekle', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => 'Yeni kullanıcı ekle', 'add_user_to_group' => 'Kullanıcıyı gruba ekle', @@ -231,8 +233,10 @@ URL: [url]', 'confirm_rm_folder_files' => '"[foldername]" klasöründeki tüm dosyaları ve alt klasörleri silmeyi onaylıyor musunuz?
    Dikkatli olun: Bu eylemin geri dönüşü yoktur.', 'confirm_rm_group' => '"[groupname]" grubunu silmeyi onaylıyor musunuz?
    Dikkatli olun: Bu eylemin geri dönüşü yoktur.', 'confirm_rm_log' => '"[logname]" log dosyasını silmeyi onaylıyor musunuz?
    Dikkatli olun: Bu eylemin geri dönüşü yoktur.', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => '"[username]" kullanıcısını silmeyi onaylıyor musunuz?
    Dikkatli olun: Bu eylemin geri dönüşü yoktur.', 'confirm_rm_version' => '"[documentname]" dokümanının [version] versiyonunu silmek istiyor musunuz?
    Dikkatli olun: Bu eylemin geri dönüşü yoktur.', +'confirm_update_transmittalitem' => '', 'content' => 'İçerik', 'continue' => 'Devam', 'create_fulltext_index' => 'Tam metin indeksi oluştur', @@ -266,6 +270,7 @@ URL: [url]', 'documents_to_approve' => 'Onayınızı bekleyen dokümanlar', 'documents_to_receipt' => '', 'documents_to_review' => 'Kontrol etmenizi bekleyen dokümanlar', +'documents_to_revise' => '', 'documents_user_requiring_attention' => 'Dikkatinizi gerektiren size ait dokümanlar', 'document_already_checkedout' => '', 'document_already_locked' => 'Bu doküman zaten kilitli', @@ -451,6 +456,7 @@ URL: [url]', 'group_exists' => 'Grup zaten mevcut.', 'group_management' => 'Grup yönetimi', 'group_members' => 'Grup üyeleri', +'group_receipt_summary' => '', 'group_review_summary' => 'Grup gözden geçirme özeti', 'guest_login' => 'Misafir olarak giriş yap', 'guest_login_disabled' => 'Misafir girişi devre dışı.', @@ -634,7 +640,9 @@ URL: [url]', 'no_docs_locked' => 'Kilitli doküman yok.', 'no_docs_to_approve' => 'Şu anda onay bekleyen doküman yok.', 'no_docs_to_look_at' => 'Dikkat edilmesi gereken bir doküman yok.', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'Şu anda kontrol bekleyen doküman yok.', +'no_docs_to_revise' => '', 'no_email_or_login' => 'Kullanıcı adı ve e-posta adresi girilmeli', 'no_fulltextindex' => 'Tam metin indeksi yok', 'no_groups' => 'Grup yok', @@ -700,6 +708,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.', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => 'Yenile', @@ -767,6 +776,7 @@ URL: [url]', 'review_update_failed' => 'Kontrol güncelleme durumu hatalı. Güncelleme başarısız.', 'revise_document' => '', 'revise_document_on' => '', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -789,6 +799,7 @@ URL: [url]', 'rm_from_clipboard' => 'Panodan sil', 'rm_group' => 'Bu grubu sil', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => 'Bu kullanıcıyı sil', 'rm_version' => 'Versiyonu sil', 'rm_workflow' => 'İş akışını sil', @@ -1141,11 +1152,13 @@ URL: [url]', 'status_not_reviewed' => 'Kontrol edilmedi', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => 'Kontrol edildi', 'status_reviewer_rejected' => 'Taslak reddedildi', 'status_reviewer_removed' => 'Kontrol eden süreci sildi', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => 'Bilinmeyen', @@ -1154,6 +1167,7 @@ URL: [url]', 'submit_login' => 'Giriş', 'submit_password' => 'Yeni parola ayarla', 'submit_password_forgotten' => 'Süreci başlat', +'submit_receipt' => '', 'submit_review' => 'Kabul et', 'submit_userinfo' => 'Bilgi gönder', 'substitute_user' => 'Kullanıcının Yerine Geç', @@ -1185,8 +1199,12 @@ Mevcut durum: [current_state] Kullanıcı: [username] URL: [url]', 'transition_triggered_email_subject' => '[sitename]: [name] - İş Akış Geçişi Tetiklendi', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => 'İş Akışı', 'tr_TR' => 'Türkçe', 'tuesday' => 'Salı', @@ -1217,6 +1235,7 @@ URL: [url]', 'update_recipients' => '', 'update_reviewers' => 'Kontrol edenlerin listesini güncelle', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => 'Yükleyen', 'uploading_failed' => 'Dosyalardan biri yüklenirken başarısız oldu. Maksimum yükleme boyutunuzu kontrol ediniz.', 'uploading_maxsize' => 'Yüklenen dosya maksimum yükleme boyutundan fazla.', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index c61604e4c..c6aa37ce4 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -61,8 +61,10 @@ URL: [url]', 'add_multiple_files' => '批量添加文档(文档名无法手动修改)', 'add_receipt' => '', 'add_review' => '提交校对', +'add_revision' => '', 'add_subfolder' => '添加子文件夹', 'add_to_clipboard' => '复制', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => '添加新用户', 'add_user_to_group' => '', @@ -214,8 +216,10 @@ URL: [url]', 'confirm_rm_folder_files' => '您确定要删除"[foldername]" 中所有文件及其子文件夹?
    请注意:此动作执行后不能撤销.', 'confirm_rm_group' => '您确定要删除"[groupname]"组?
    请注意:此动作执行后不能撤销.', 'confirm_rm_log' => '您确定要删除"[logname]"日志文件?
    请注意:此动作执行后不能撤销.', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => '您确定要删除"[username]"用户?
    请注意:此动作执行后不能撤销.', 'confirm_rm_version' => '您确定要删除"[documentname]文档的[version]版本文件?
    请注意:此动作执行后不能撤销.', +'confirm_update_transmittalitem' => '', 'content' => '内容', 'continue' => '继续', 'create_fulltext_index' => '创建全文索引', @@ -251,6 +255,7 @@ URL: [url]', 'documents_to_approve' => '待您审核的文档', 'documents_to_receipt' => '', 'documents_to_review' => '待您校对的文档', +'documents_to_revise' => '', 'documents_user_requiring_attention' => '需您关注的文档', 'document_already_checkedout' => '', 'document_already_locked' => '该文档已被锁定', @@ -382,6 +387,7 @@ URL: [url]', 'group_exists' => '组已存在', 'group_management' => '组管理', 'group_members' => '组成员', +'group_receipt_summary' => '', 'group_review_summary' => '校对组汇总', 'guest_login' => '来宾登录', 'guest_login_disabled' => '来宾登录被禁止', @@ -541,7 +547,9 @@ URL: [url]', 'no_docs_locked' => '无锁定的文档', 'no_docs_to_approve' => '当前没有需要审核的文档', 'no_docs_to_look_at' => '没有需要关注的文档', +'no_docs_to_receipt' => '', 'no_docs_to_review' => '当前没有需要校对的文档', +'no_docs_to_revise' => '', 'no_email_or_login' => '', 'no_fulltextindex' => '', 'no_groups' => '无组别', @@ -591,6 +599,7 @@ URL: [url]', 'quota_exceeded' => '', 'quota_is_disabled' => '配额的支持', 'quota_warning' => '', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => '', @@ -635,6 +644,7 @@ URL: [url]', 'review_update_failed' => '错误 更新校对状态.更新失败', 'revise_document' => '', 'revise_document_on' => '', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -651,6 +661,7 @@ URL: [url]', 'rm_from_clipboard' => '从剪切板删除', 'rm_group' => '删除该组', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => '删除该用户', 'rm_version' => '删除该版本', 'rm_workflow' => '', @@ -996,11 +1007,13 @@ URL: [url]', 'status_not_reviewed' => '未校对', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => '通过', 'status_reviewer_rejected' => '拟拒绝', 'status_reviewer_removed' => '从校对队列中删除', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => '未知', @@ -1009,6 +1022,7 @@ URL: [url]', 'submit_login' => '登录', 'submit_password' => '', 'submit_password_forgotten' => '', +'submit_receipt' => '', 'submit_review' => '提交校对', 'submit_userinfo' => '', 'substitute_user' => '代理人', @@ -1031,8 +1045,12 @@ URL: [url]', 'transition_triggered_email' => '', 'transition_triggered_email_body' => '', 'transition_triggered_email_subject' => '', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => '', 'tr_TR' => '土耳其', 'tuesday' => 'Tuesday', @@ -1063,6 +1081,7 @@ URL: [url]', 'update_recipients' => '', 'update_reviewers' => '更新校对人名单', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => '上传者', 'uploading_failed' => '文件太大无法上传!请处理后重新上传。', 'uploading_maxsize' => '最大上传限制', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 907a3abc0..5f9f110b7 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -61,8 +61,10 @@ URL: [url]', 'add_multiple_files' => '批量添加文檔(文檔名無法手動修改)', 'add_receipt' => '', 'add_review' => '提交校對', +'add_revision' => '', 'add_subfolder' => '添加子資料夾', 'add_to_clipboard' => '複製', +'add_to_transmittal' => '', 'add_transmittal' => '', 'add_user' => '添加新用戶', 'add_user_to_group' => '添加新用戶至群組', @@ -214,8 +216,10 @@ URL: [url]', 'confirm_rm_folder_files' => '您確定要刪除"[foldername]" 中所有檔及其子資料夾?
    請注意:此動作執行後不能撤銷.', 'confirm_rm_group' => '您確定要刪除"[groupname]"組?
    請注意:此動作執行後不能撤銷.', 'confirm_rm_log' => '您確定要刪除"[logname]"日誌檔?
    請注意:此動作執行後不能撤銷.', +'confirm_rm_transmittalitem' => '', 'confirm_rm_user' => '您確定要刪除"[username]"用戶?
    請注意:此動作執行後不能撤銷.', 'confirm_rm_version' => '您確定要刪除"[documentname]文檔的[version]版本檔?
    請注意:此動作執行後不能撤銷.', +'confirm_update_transmittalitem' => '', 'content' => '內容', 'continue' => '繼續', 'create_fulltext_index' => '創建全文索引', @@ -249,6 +253,7 @@ URL: [url]', 'documents_to_approve' => '待您審核的文檔', 'documents_to_receipt' => '', 'documents_to_review' => '待您校對的文檔', +'documents_to_revise' => '', 'documents_user_requiring_attention' => '需您關注的文檔', 'document_already_checkedout' => '', 'document_already_locked' => '該文檔已被鎖定', @@ -380,6 +385,7 @@ URL: [url]', 'group_exists' => '組已存在', 'group_management' => '組管理', 'group_members' => '組成員', +'group_receipt_summary' => '', 'group_review_summary' => '校對組匯總', 'guest_login' => '來賓登錄', 'guest_login_disabled' => '來賓登錄被禁止', @@ -539,7 +545,9 @@ URL: [url]', 'no_docs_locked' => '無鎖定的文檔', 'no_docs_to_approve' => '當前沒有需要審核的文檔', 'no_docs_to_look_at' => '沒有需要關注的文檔', +'no_docs_to_receipt' => '', 'no_docs_to_review' => '當前沒有需要校對的文檔', +'no_docs_to_revise' => '', 'no_email_or_login' => '', 'no_fulltextindex' => '', 'no_groups' => '無組別', @@ -589,6 +597,7 @@ URL: [url]', 'quota_exceeded' => '', 'quota_is_disabled' => '', 'quota_warning' => '', +'receipt_log' => '', 'receipt_summary' => '', 'recipients' => '', 'refresh' => '', @@ -633,6 +642,7 @@ URL: [url]', 'review_update_failed' => '錯誤 更新校對狀態.更新失敗', 'revise_document' => '', 'revise_document_on' => '', +'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', 'revisor_already_removed' => '', @@ -649,6 +659,7 @@ URL: [url]', 'rm_from_clipboard' => '', 'rm_group' => '刪除該組', 'rm_transmittal' => '', +'rm_transmittalitem' => '', 'rm_user' => '刪除該用戶', 'rm_version' => '刪除該版本', 'rm_workflow' => '', @@ -994,11 +1005,13 @@ URL: [url]', 'status_not_reviewed' => '未校對', 'status_not_revised' => '', 'status_receipted' => '', +'status_receipt_rejected' => '', 'status_recipient_removed' => '', 'status_reviewed' => '通過', 'status_reviewer_rejected' => '擬拒絕', 'status_reviewer_removed' => '從校對佇列中刪除', 'status_revised' => '', +'status_revision_rejected' => '', 'status_revision_sleeping' => '', 'status_revisor_removed' => '', 'status_unknown' => '未知', @@ -1007,6 +1020,7 @@ URL: [url]', 'submit_login' => '登錄', 'submit_password' => '', 'submit_password_forgotten' => '', +'submit_receipt' => '', 'submit_review' => '提交校對', 'submit_userinfo' => '', 'substitute_user' => '代理人', @@ -1029,8 +1043,12 @@ URL: [url]', 'transition_triggered_email' => '', 'transition_triggered_email_body' => '', 'transition_triggered_email_subject' => '', +'transmittal' => '', +'transmittalitem_removed' => '', +'transmittalitem_updated' => '', 'transmittal_comment' => '', 'transmittal_name' => '', +'transmittal_size' => '', 'trigger_workflow' => '', 'tr_TR' => '', 'tuesday' => 'Tuesday', @@ -1061,6 +1079,7 @@ URL: [url]', 'update_recipients' => '', 'update_reviewers' => '更新校對人名單', 'update_revisors' => '', +'update_transmittalitem' => '', 'uploaded_by' => '上傳者', 'uploading_failed' => '文件太大無法上傳!請處理後重新上傳。', 'uploading_maxsize' => '最大上傳限制', From b374e8e96282394acb711a315d9f958596297598 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 16 May 2015 19:42:07 +0200 Subject: [PATCH 0112/2006] fix output of message when item was deleted --- views/bootstrap/class.TransmittalMgr.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.TransmittalMgr.php b/views/bootstrap/class.TransmittalMgr.php index 1767a3d44..ffcf0a4e8 100644 --- a/views/bootstrap/class.TransmittalMgr.php +++ b/views/bootstrap/class.TransmittalMgr.php @@ -147,13 +147,13 @@ $('#update-transmittalitem-btn-".$itemid."').popover({ function printDeleteItemButton($item, $msg, $return=false){ /* {{{ */ $itemid = $item->getID(); $content = ''; - $content .= ''; + $content .= ''; $this->addFooterJS(" $('#delete-transmittalitem-btn-".$itemid."').popover({ title: '".getMLText("rm_transmittalitem")."', placement: 'left', html: true, - content: \"
    ".htmlspecialchars(getMLText("confirm_rm_transmittalitem"), ENT_QUOTES)."
    \"}); + content: \"
    ".htmlspecialchars(getMLText("confirm_rm_transmittalitem"), ENT_QUOTES)."
    \"}); "); if($return) return $content; @@ -237,7 +237,7 @@ $('#delete-transmittalitem-btn-".$itemid."').popover({ print "\n\n"; print "".getMLText("name")."\n"; print "".getMLText("comment")."\n"; - print "".getMLText("size")."\n"; + print "".getMLText("transmittal_size")."\n"; print "\n"; print "\n\n\n"; foreach($transmittals as $transmittal) { @@ -285,7 +285,7 @@ $('#delete-transmittalitem-btn-".$itemid."').popover({ echo "getID()."\">"; echo $this->documentListRow($document, $previewer, true, $content->getVersion()); echo "
    "; - $this->printDeleteItemButton($item, ''); + $this->printDeleteItemButton($item, getMLText('transmittalitem_removed')); if($latestcontent->getVersion() != $content->getVersion()) $this->printUpdateItemButton($item, getMLText('transmittalitem_updated', array('prevversion'=>$content->getVersion(), 'newversion'=>$latestcontent->getVersion()))); echo "
    "; From d4652a614ca038cb1b61fc11eabc3c504baeb945 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 19 May 2015 08:03:12 +0200 Subject: [PATCH 0113/2006] add functions for handling substitutes --- SeedDMS_Core/Core/inc.ClassUser.php | 139 +++++++++++++++++++++++++++- 1 file changed, 134 insertions(+), 5 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassUser.php b/SeedDMS_Core/Core/inc.ClassUser.php index e36631ae6..e654172fb 100644 --- a/SeedDMS_Core/Core/inc.ClassUser.php +++ b/SeedDMS_Core/Core/inc.ClassUser.php @@ -22,7 +22,7 @@ * 2010 Uwe Steinmann * @version Release: @package_version@ */ -class SeedDMS_Core_User { +class SeedDMS_Core_User { /* {{{ */ /** * @var integer id of user * @@ -67,9 +67,7 @@ class SeedDMS_Core_User { /** * @var string prefered language of user - * possible values are 'English', 'German', 'Chinese_ZH_TW', 'Czech' - * 'Francais', 'Hungarian', 'Italian', 'Portuguese_BR', 'Slovak', - * 'Spanish' + * possible values are subdirectories within the language directory * * @access protected */ @@ -125,6 +123,13 @@ class SeedDMS_Core_User { */ var $_homeFolder; + /** + * @var array list of users this user can substitute + * + * @access protected + */ + var $_substitutes; + /** * @var object reference to the dms instance this user belongs to * @@ -1488,5 +1493,129 @@ class SeedDMS_Core_User { return true; } /* }}} */ -} + /** + * Get all substitutes of the user + * + * These users are substitutes of the current user + * + * @return array list of users + */ + function getSubstitutes() { /* {{{ */ + $db = $this->_dms->getDB(); + + if (!isset($this->_substitutes)) { + $queryStr = "SELECT `tblUsers`.* FROM `tblUserSubstitutes` ". + "LEFT JOIN `tblUsers` ON `tblUserSubstitutes`.`substitute` = `tblUsers`.`id` ". + "WHERE `tblUserSubstitutes`.`user`='". $this->_id ."'"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + + $this->_substitutes = array(); + $classname = $this->_dms->getClassname('user'); + foreach ($resArr as $row) { + $user = new $classname($row["id"], $row["login"], $row["pwd"], $row["fullName"], $row["email"], $row["language"], $row["theme"], $row["comment"], $row["role"], $row["hidden"], $row["disabled"], $row["pwdExpiration"], $row["loginfailures"], $row["quota"], $row["homefolder"]); + $user->setDMS($this->_dms); + array_push($this->_substitutes, $user); + } + } + return $this->_substitutes; + } /* }}} */ + + /** + * Get all users this user is a substitute of + * + * @return array list of users + */ + function getReverseSubstitutes() { /* {{{ */ + $db = $this->_dms->getDB(); + + if (!isset($this->_substitutes)) + { + $queryStr = "SELECT tblUsers`.* FROM `tblUserSubstitutes` ". + "LEFT JOIN `tblUsers` ON `tblUserSubstitutes`.`user` = `tblUsers`.`userID` ". + "WHERE `tblUserSubstitutes`.`substitute`='". $this->_id ."'"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + + $this->_substitutes = array(); + $classname = $this->_dms->getClassname('user'); + foreach ($resArr as $row) { + $user = new $classname($row["id"], $row["login"], $row["pwd"], $row["fullName"], $row["email"], $row["language"], $row["theme"], $row["comment"], $row["role"], $row["hidden"], $row["disabled"], $row["pwdExpiration"], $row["loginfailures"], $row["quota"], $row["homefolder"]); + $user->setDMS($this->_dms); + array_push($this->_substitutes, $user); + } + } + return $this->_substitutes; + } /* }}} */ + + /** + * Add a substitute to the user + * + * @return boolean true if successful otherwise false + */ + function addSubstitute($substitute) { /* {{{ */ + $db = $this->_dms->getDB(); + + if(get_class($substitute) != $this->_dms->getClassname('user')) + return false; + + $queryStr = "SELECT * FROM tblUserSubstitutes WHERE user=" . $this->_id . " AND substitute=".$substitute->getID(); + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) return false; + if (count($resArr) == 1) return true; + + $queryStr = "INSERT INTO tblUserSubstitutes (user, substitute) VALUES (" . $this->_id . ", ".$substitute->getID().")"; + if (!$db->getResult($queryStr)) + return false; + + $this->_substitutes = null; + return true; + } /* }}} */ + + /** + * Remove a substitute from the user + * + * @return boolean true if successful otherwise false + */ + function removeSubstitute($substitute) { /* {{{ */ + $db = $this->_dms->getDB(); + + if(get_class($substitute) != $this->_dms->getClassname('user')) + return false; + + $queryStr = "SELECT * FROM tblUserSubstitutes WHERE user=" . $this->_id . " AND substitute=".$substitute->getID(); + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) return false; + if (count($resArr) == 0) return true; + + $queryStr = "DELETE FROM tblUserSubstitutes WHERE user=" . $this->_id . " AND substitute=".$substitute->getID(); + if (!$db->getResult($queryStr)) + return false; + + $this->_substitutes = null; + return true; + } + + /** + * Check if user is a substitute of the current user + * + * @return boolean true if successful otherwise false + */ + function isSubstitute($substitute) { /* {{{ */ + $db = $this->_dms->getDB(); + + if(get_class($substitute) != $this->_dms->getClassname('user')) + return false; + + $queryStr = "SELECT * FROM tblUserSubstitutes WHERE user=" . $this->_id . " AND substitute=".$substitute->getID(); + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) return false; + if (count($resArr) == 1) return true; + + return false; + } /* }}} */ + +} /* }}} */ ?> From fedcdb1b997cb0cc4b79278a2f0266626c684e42 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 19 May 2015 08:05:15 +0200 Subject: [PATCH 0114/2006] add table for user substitutes and not yet implemented acls --- install/create_tables-innodb.sql | 57 +++++++++++++++++++++ install/create_tables-sqlite3.sql | 83 +++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+) diff --git a/install/create_tables-innodb.sql b/install/create_tables-innodb.sql index 99e2ff7a2..8440c2927 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -72,6 +72,22 @@ CREATE TABLE `tblUsers` ( -- -------------------------------------------------------- +-- +-- Table structure for table `tblUserSubstitutes` +-- + +CREATE TABLE `tblUserSubstitutes` ( + `id` int(11) NOT NULL auto_increment, + `user` int(11) default null, + `substitute` int(11) default null, + PRIMARY KEY (`id`), + UNIQUE (`user`, `substitute`), + CONSTRAINT `tblUserSubstitutes_user` FOREIGN KEY (`user`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, + CONSTRAINT `tblUserSubstitutes_substitute` FOREIGN KEY (`user`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE +); + +-- -------------------------------------------------------- + -- -- Table structure for table `tblUserPasswordRequest` -- @@ -815,6 +831,47 @@ CREATE TABLE `tblTransmittalItems` ( -- -------------------------------------------------------- +-- +-- Table structure for access request objects +-- + +CREATE TABLE `tblAros` ( + `id` int(11) NOT NULL auto_increment, + `model` text NOT NULL, + `foreignid` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +-- +-- Table structure for access control objects +-- + +CREATE TABLE `tblAcos` ( + `id` int(11) NOT NULL auto_increment, + `model` text NOT NULL, + `foreignid` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- -------------------------------------------------------- + +-- +-- Table structure for acos/aros relation +-- + +CREATE TABLE `tblArosAcos` ( + `id` int(11) NOT NULL auto_increment, + `aro` int(11) NOT NULL DEFAULT '0', + `aco` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE (aco, aro), + CONSTRAINT `tblArosAcos_acos` FOREIGN KEY (`aco`) REFERENCES `tblAcos` (`id`) ON DELETE CASCADE, + CONSTRAINT `tblArosAcos_aros` FOREIGN KEY (`aro`) REFERENCES `tblAros` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- -------------------------------------------------------- + -- -- Table structure for version -- diff --git a/install/create_tables-sqlite3.sql b/install/create_tables-sqlite3.sql index 5d38a6c1e..bca377b64 100644 --- a/install/create_tables-sqlite3.sql +++ b/install/create_tables-sqlite3.sql @@ -63,11 +63,25 @@ CREATE TABLE `tblUsers` ( `disabled` INTEGER NOT NULL default '0', `quota` INTEGER, `homefolder` INTEGER default '0', + `homefolder` INTEGER default '0', UNIQUE (`login`) ); -- -------------------------------------------------------- +-- +-- Table structure for table `tblUserSubstitutes` +-- + +CREATE TABLE `tblUserSubstitutes` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `user` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, + `substitute` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, + UNIQUE (`user`, `substitute`) +); + +-- -------------------------------------------------------- + -- -- Table structure for table `tblUserPasswordRequest` -- @@ -366,6 +380,38 @@ CREATE TABLE `tblDocumentRecipients` ( -- Table structure for table `tblDocumentRevisionLog` -- +CREATE TABLE `tblDocumentRevisionLog` ( + `revisionLogID` INTEGER PRIMARY KEY AUTOINCREMENT, + `revisionID` INTEGER NOT NULL default '0', + `status` INTEGER NOT NULL default '0', + `comment` TEXT NOT NULL, + `date` TEXT NOT NULL default '0000-00-00 00:00:00', + `userID` INTEGER NOT NULL default 0 REFERENCES `tblUsers` (`id`) ON DELETE CASCADE +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentRevisors` +-- + +CREATE TABLE `tblDocumentRevisors` ( + `revisionID` INTEGER PRIMARY KEY AUTOINCREMENT, + `documentID` INTEGER NOT NULL default '0' REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, + `version` INTEGER unsigned NOT NULL default '0', + `type` INTEGER NOT NULL default '0', + `required` INTEGER NOT NULL default '0', + `startdate` TEXT default NULL, + UNIQUE KEY `documentID` (`documentID`,`version`,`type`,`required`), + CONSTRAINT `tblDocumentRevisors_document` FOREIGN KEY (`documentID`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE +); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `tblDocumentRevisionLog` +-- + CREATE TABLE `tblDocumentRevisionLog` ( `revisionLogID` INTEGER PRIMARY KEY AUTOINCREMENT, `revisionID` INTEGER NOT NULL default 0 REFERENCES `tblDocumentRevisors` (`revisionID`) ON DELETE CASCADE, @@ -706,6 +752,43 @@ CREATE TABLE `tblTransmittalItems` ( -- -------------------------------------------------------- +-- +-- Table structure for access request objects +-- + +CREATE TABLE `tblAros` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `model` TEXT NOT NULL, + `foreignid` INTEGER NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ; + + +-- +-- Table structure for access control objects +-- + +CREATE TABLE `tblAcos` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `model` TEXT NOT NULL, + `foreignid` INTEGER NOT NULL DEFAULT '0' +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for acos/aros relation +-- + +CREATE TABLE `tblArosAcos` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `aro` int(11) NOT NULL DEFAULT '0' REFERENCES `tblAros` (`id`) ON DELETE CASCADE, + `aco` int(11) NOT NULL DEFAULT '0' REFERENCES `tblAcos` (`id`) ON DELETE CASCADE, + UNIQUE (aco, aro), +) ; + +-- -------------------------------------------------------- + -- -- Table structure for version -- From 06c71cc332c8779a6f5b208c89563550fea9ef71 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 19 May 2015 08:06:24 +0200 Subject: [PATCH 0115/2006] add handling of substitutes --- op/op.UsrMgr.php | 28 ++++++++++++++++++++++++++++ views/bootstrap/class.UsrMgr.php | 27 +++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/op/op.UsrMgr.php b/op/op.UsrMgr.php index 6494ae454..99eecfc46 100644 --- a/op/op.UsrMgr.php +++ b/op/op.UsrMgr.php @@ -95,6 +95,14 @@ if ($action == "adduser") { $group->addUser($newUser); } } + + /* Set substitute user if set */ + if(isset($_POST["substitute"]) && $_POST["substitute"]) { + foreach($_POST["substitute"] as $substitute) { + $subsuser = $dms->getUser($substitute); + $newUser->addSubstitute($subsuser); + } + } } else UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); @@ -316,6 +324,26 @@ else if ($action == "edituser") { $group->removeUser($editedUser); } + /* Set substitute user if set */ + if(isset($_POST["substitute"]) && $_POST["substitute"]) + $newsubs = $_POST['substitute']; + else + $newsubs = array(); + $oldsubs = array(); + foreach($editedUser->getSubstitutes() as $k) + $oldsubs[] = $k->getID(); + + $addsubs = array_diff($newsubs, $oldsubs); + foreach($addsubs as $subid) { + $subsuser = $dms->getUser($subid); + $editedUser->addSubstitute($subsuser); + } + $delsubs = array_diff($oldsubs, $newsubs); + foreach($delsubs as $subid) { + $subsuser = $dms->getUser($subid); + $editedUser->removeSubstitute($subsuser); + } + $session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_edit_user'))); add_log_line(".php&action=edituser&userid=".$userid); } diff --git a/views/bootstrap/class.UsrMgr.php b/views/bootstrap/class.UsrMgr.php index d7cf2297a..86aa2a78c 100644 --- a/views/bootstrap/class.UsrMgr.php +++ b/views/bootstrap/class.UsrMgr.php @@ -35,6 +35,7 @@ class SeedDMS_View_UsrMgr extends SeedDMS_Bootstrap_Style { $dms = $this->params['dms']; $user = $this->params['user']; $seluser = $this->params['seluser']; + $users = $this->params['allusers']; $groups = $this->params['allgroups']; $passwordstrength = $this->params['passwordstrength']; $passwordexpiration = $this->params['passwordexpiration']; @@ -189,6 +190,32 @@ class SeedDMS_View_UsrMgr extends SeedDMS_Bootstrap_Style { + + +
    :
    + + + + + + From 20a695f5719d78962983b033aebd5fec05c4ec6f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 19 May 2015 13:26:10 +0200 Subject: [PATCH 0116/2006] minor html fixes --- views/bootstrap/class.UsrMgr.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.UsrMgr.php b/views/bootstrap/class.UsrMgr.php index 86aa2a78c..355831936 100644 --- a/views/bootstrap/class.UsrMgr.php +++ b/views/bootstrap/class.UsrMgr.php @@ -196,7 +196,7 @@ class SeedDMS_View_UsrMgr extends SeedDMS_Bootstrap_Style {
    :
    - getSubstitutes(); @@ -228,7 +228,7 @@ class SeedDMS_View_UsrMgr extends SeedDMS_Bootstrap_Style {
    :
    - Date: Tue, 19 May 2015 19:40:43 +0200 Subject: [PATCH 0117/2006] various new phrases --- languages/ar_EG/lang.inc | 4 ++++ languages/bg_BG/lang.inc | 4 ++++ languages/ca_ES/lang.inc | 4 ++++ languages/cs_CZ/lang.inc | 4 ++++ languages/de_DE/lang.inc | 6 +++++- languages/en_GB/lang.inc | 6 +++++- languages/es_ES/lang.inc | 4 ++++ languages/fr_FR/lang.inc | 4 ++++ languages/hu_HU/lang.inc | 4 ++++ languages/it_IT/lang.inc | 4 ++++ languages/nl_NL/lang.inc | 4 ++++ languages/pl_PL/lang.inc | 4 ++++ languages/pt_BR/lang.inc | 4 ++++ languages/ro_RO/lang.inc | 4 ++++ languages/ru_RU/lang.inc | 4 ++++ languages/sk_SK/lang.inc | 4 ++++ languages/sv_SE/lang.inc | 4 ++++ languages/tr_TR/lang.inc | 4 ++++ languages/zh_CN/lang.inc | 4 ++++ languages/zh_TW/lang.inc | 4 ++++ 20 files changed, 82 insertions(+), 2 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index 62af0eecc..ca7cf4617 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -685,6 +685,7 @@ URL: [url]', 'password_wrong' => 'كلمة سر خاطئة', 'personal_default_keywords' => 'قوائم الكلمات البحثية الشخصية', 'pl_PL' => 'ﺎﻠﺑﻮﻠﻧﺪﻳﺓ', +'possible_substitutes' => '', 'previous_state' => 'حالة سابقة', 'previous_versions' => 'اصدارات سابقة', 'pt_BR' => 'البرتغالية (BR)', @@ -870,6 +871,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => '', 'settings_coreDir' => '', 'settings_coreDir_desc' => '', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => '', 'settings_createdirectory' => '', 'settings_currentvalue' => '', @@ -1154,6 +1157,7 @@ URL: [url]', 'submit_receipt' => '', 'submit_review' => 'بدأ المراجعة', 'submit_userinfo' => 'ادخال بيانات', +'substitute_to_user' => '', 'substitute_user' => 'استبدال المستخدم', 'sunday' => 'الأحد', 'sunday_abbr' => 'ح', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index 516751ba0..c4bdd836d 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -586,6 +586,7 @@ $text = array( 'password_wrong' => 'Грешна парола', 'personal_default_keywords' => 'Личен списък с ключови думи', 'pl_PL' => '', +'possible_substitutes' => '', 'previous_state' => 'Предишно състояние', 'previous_versions' => 'Предишни версии', 'pt_BR' => '', @@ -735,6 +736,8 @@ $text = array( 'settings_cookieLifetime_desc' => 'Животът на бисквитките в секунди. Ако е =0 бисквитката ще бъде изтрита при затваряне на браузъра.', 'settings_coreDir' => 'Папка Core letoDMS', 'settings_coreDir_desc' => 'Път към SeedDMS_Core (не е задължително)', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => 'Създай таблици БД', 'settings_createdirectory' => 'Създаи папка', 'settings_currentvalue' => 'Текущо значение', @@ -1019,6 +1022,7 @@ $text = array( 'submit_receipt' => '', 'submit_review' => 'Рецензирай', 'submit_userinfo' => 'Изпрати информация за потребител', +'substitute_to_user' => '', 'substitute_user' => '', 'sunday' => 'неделя', 'sunday_abbr' => '', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index 18f1f0f43..3d537ab1c 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -591,6 +591,7 @@ URL: [url]', 'password_wrong' => '', 'personal_default_keywords' => 'Mots clau personals', 'pl_PL' => '', +'possible_substitutes' => '', 'previous_state' => '', 'previous_versions' => 'Versions anteriors', 'pt_BR' => '', @@ -740,6 +741,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => '', 'settings_coreDir' => 'Core letoDMS directory', 'settings_coreDir_desc' => 'Path to LetoDMS_Core (optional)', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => '', 'settings_createdirectory' => '', 'settings_currentvalue' => 'Current value', @@ -1024,6 +1027,7 @@ URL: [url]', 'submit_receipt' => '', 'submit_review' => 'Enviar revisiót', 'submit_userinfo' => '', +'substitute_to_user' => '', 'substitute_user' => '', 'sunday' => 'Diumenge', 'sunday_abbr' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index ce7f49d9b..afb954524 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -696,6 +696,7 @@ Pokud budete mít problém s přihlášením i po změně hesla, kontaktujte Adm 'password_wrong' => 'Špatné heslo', 'personal_default_keywords' => 'Osobní klíčová slova', 'pl_PL' => 'Polština', +'possible_substitutes' => '', 'previous_state' => 'Předchozí stav', 'previous_versions' => 'Předešlé verze', 'pt_BR' => 'Portugalština (BR)', @@ -879,6 +880,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => 'Životnost "cookie" v sekundách. Pokud je nula, bude "cookie" odstraněno po zavření prohlížeče.', 'settings_coreDir' => 'Core SeedDMS directory', 'settings_coreDir_desc' => 'Path to SeedDMS_Core (optional)', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => '', 'settings_createdirectory' => 'Create directory', 'settings_currentvalue' => 'Current value', @@ -1163,6 +1166,7 @@ URL: [url]', 'submit_receipt' => '', 'submit_review' => 'Poslat ke kontrole', 'submit_userinfo' => 'Odeslat info', +'substitute_to_user' => '', 'substitute_user' => 'Zaměnit uživatele', 'sunday' => 'Neděle', 'sunday_abbr' => 'Ne', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index 6c46d7d54..2aab93c74 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 (2045), dgrutsch (18) +// Translators: Admin (2049), dgrutsch (18) $text = array( 'accept' => 'Übernehmen', @@ -704,6 +704,7 @@ Sollen Sie danach immer noch Problem bei der Anmeldung haben, dann kontaktieren 'password_wrong' => 'Falsches Passwort', 'personal_default_keywords' => 'Persönliche Stichwortlisten', 'pl_PL' => 'Polnisch', +'possible_substitutes' => 'Vertreter', 'previous_state' => 'Voriger Status', 'previous_versions' => 'Vorhergehende Versionen', 'pt_BR' => 'Portugiesisch (BR)', @@ -899,6 +900,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => 'Die Lebensdauer des Cookies für die Sitzungsverwaltung. Wenn dieser Wert auf 0 gesetzt wird, dann wird der Cookie beim Schließen des Browsers gelöscht.', 'settings_coreDir' => 'Core SeedDMS Verzeichnis', 'settings_coreDir_desc' => 'Pfad zum PEAR-Paket SeedDMS_Core (optional). Lassen Sie diese Einstellung leer, wenn SeedDMS_Core ohnehin von PHP gefunden wird, weil es beispielweise im \'Extra PHP Include-Path\' installiert ist.', +'settings_createCheckOutDir' => 'Check out Verzeichnis', +'settings_createCheckOutDir_desc' => 'Dokumentenversionen werden hierhin kopiert, wenn ein Dokument ausgecheckt wird.', 'settings_createdatabase' => 'Datenbank erzeugen', 'settings_createdirectory' => 'Verzeichnis erzeugen', 'settings_currentvalue' => 'Aktueller Wert', @@ -1183,6 +1186,7 @@ URL: [url]', 'submit_receipt' => 'Empfang bestätigen', 'submit_review' => 'Überprüfung hinzufügen', 'submit_userinfo' => 'Daten setzen', +'substitute_to_user' => 'Wechsel zu \'[username]\'', 'substitute_user' => 'Benutzer wechseln', 'sunday' => 'Sonntag', 'sunday_abbr' => 'So', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index a27ea55b2..83b772dd8 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 (1174), dgrutsch (3), netixw (14) +// Translators: Admin (1178), dgrutsch (3), netixw (14) $text = array( 'accept' => 'Accept', @@ -704,6 +704,7 @@ If you have still problems to login, then please contact your administrator.', 'password_wrong' => 'Wrong password', 'personal_default_keywords' => 'Personal keywordlists', 'pl_PL' => 'Polish', +'possible_substitutes' => 'Substitutes', 'previous_state' => 'Previous state', 'previous_versions' => 'Previous versions', 'pt_BR' => 'Portugese (BR)', @@ -906,6 +907,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => 'The life time of a cookie in seconds. If set to 0 the cookie will be removed when the browser is closed.', 'settings_coreDir' => 'Core SeedDMS directory', 'settings_coreDir_desc' => 'Path to SeedDMS_Core (optional). Leave this empty if you have installed SeedDMS_Core at a place where it can be found by PHP, e.g. Extra PHP Include-Path', +'settings_createCheckOutDir' => 'Check out directory', +'settings_createCheckOutDir_desc' => 'Document version will be copied in this directory, when a document is checked out.', 'settings_createdatabase' => 'Create database tables', 'settings_createdirectory' => 'Create directory', 'settings_currentvalue' => 'Current value', @@ -1190,6 +1193,7 @@ URL: [url]', 'submit_receipt' => 'Submit receipt', 'submit_review' => 'Submit review', 'submit_userinfo' => 'Submit info', +'substitute_to_user' => 'Switch to \'[username]\'', 'substitute_user' => 'Substitute User', 'sunday' => 'Sunday', 'sunday_abbr' => 'Su', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index aaee4832d..43380c312 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -700,6 +700,7 @@ Si continua teniendo problemas de acceso, por favor contacte con el administrado 'password_wrong' => 'Contraseña incorrecta', 'personal_default_keywords' => 'Listas de palabras clave personales', 'pl_PL' => 'Polaco', +'possible_substitutes' => '', 'previous_state' => 'Estado anterior', 'previous_versions' => 'Versiones anteriores', 'pt_BR' => 'Portuges (BR)', @@ -885,6 +886,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => 'Tiempo de vida de las cookies en segundos. Si asigna 0 la cookie será eliminada cuando el navegador se cierre.', 'settings_coreDir' => 'Carpeta de SeedDMS Core', 'settings_coreDir_desc' => 'Ruta hacia SeedDMS_Core (opcional)', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => 'Crear tablas de base de datos', 'settings_createdirectory' => 'Crear carpeta', 'settings_currentvalue' => 'Valor actual', @@ -1169,6 +1172,7 @@ URL: [url]', 'submit_receipt' => '', 'submit_review' => 'Enviar revisión', 'submit_userinfo' => 'Enviar información', +'substitute_to_user' => '', 'substitute_user' => 'Cambiar de usuario', 'sunday' => 'Domingo', 'sunday_abbr' => 'D', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 25300a9c6..d1f8b1320 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -697,6 +697,7 @@ En cas de problème persistant, veuillez contacter votre administrateur.', 'password_wrong' => 'Mauvais mot de passe', 'personal_default_keywords' => 'Mots-clés personnels', 'pl_PL' => 'Polonais', +'possible_substitutes' => '', 'previous_state' => 'Previous state', 'previous_versions' => 'Versions précédentes', 'pt_BR' => 'Portuguais (BR)', @@ -861,6 +862,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => 'La durée de vie d\'un cooke en secondes. Si réglée à 0, le cookie sera supprimé à la fermeture du navigateur.', 'settings_coreDir' => 'Répertoire Core letoDMS', 'settings_coreDir_desc' => 'Chemin vers SeedDMS_Core (optionnel)', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => 'Créer tables de la base de données', 'settings_createdirectory' => 'Créer répertoire', 'settings_currentvalue' => 'Valeur courante', @@ -1145,6 +1148,7 @@ URL: [url]', 'submit_receipt' => '', 'submit_review' => 'Soumettre la correction', 'submit_userinfo' => 'Soumettre info', +'substitute_to_user' => '', 'substitute_user' => 'Utilisateur de substitution', 'sunday' => 'Dimanche', 'sunday_abbr' => 'Dim.', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index 94f91f5c9..a29f812a8 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -700,6 +700,7 @@ Amennyiben problémákba ütközik a bejelentkezés során, kérjük vegye fel a 'password_wrong' => 'Hibás jelszó', 'personal_default_keywords' => 'Személyes kulcsszó lista', 'pl_PL' => 'Lengyel', +'possible_substitutes' => '', 'previous_state' => 'Előző állapot', 'previous_versions' => 'Előző változatok', 'pt_BR' => 'Portugál (BR)', @@ -884,6 +885,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => 'A süti élettartama másodpercben. Ha az értéke 0 akkor a süti a böngésző bezárásakor lesz törölve.', 'settings_coreDir' => 'Alap SeedDMS könyvtár', 'settings_coreDir_desc' => 'Elérési útvonal a SeedDMS_Core (opcionális) programhoz. Hagyja üresen ha már telepítette a SeedDMS_Core alkalmazást arra a helyre, ahol a PHP meg tudja találni, pl.: az Extra PHP Include-Path alapján.', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => 'Adatbázis táblák létrehozása', 'settings_createdirectory' => 'Könyvtár létrehozása', 'settings_currentvalue' => 'Aktuális érték', @@ -1168,6 +1171,7 @@ URL: [url]', 'submit_receipt' => '', 'submit_review' => 'Felülvizsgálat küldése', 'submit_userinfo' => 'Információ küldése', +'substitute_to_user' => '', 'substitute_user' => 'Helyettesítő felhasználó', 'sunday' => 'Vasárnap', 'sunday_abbr' => 'Va', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index 6e7139dd3..6e7034714 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -705,6 +705,7 @@ Dovessero esserci ancora problemi al login, prego contatta l\'Amministratore di 'password_wrong' => 'Password errata', 'personal_default_keywords' => 'Parole-chiave personali', 'pl_PL' => 'Polacco', +'possible_substitutes' => '', 'previous_state' => 'Stato precedente', 'previous_versions' => 'Versioni precedenti', 'pt_BR' => 'Portoghese (BR)', @@ -907,6 +908,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => 'Tempo di vita del cookie in secondi: se impostato su 0 il cookie verrà rimosso alla chiusura del browser', 'settings_coreDir' => 'Cartella principale dell\'applicazione', 'settings_coreDir_desc' => 'Percorso del pacchetto principale dell\'applicazione', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => 'Crea database', 'settings_createdirectory' => 'Crea cartella', 'settings_currentvalue' => 'Valore corrente', @@ -1191,6 +1194,7 @@ URL: [url]', 'submit_receipt' => '', 'submit_review' => 'Invio revisione', 'submit_userinfo' => 'Invio info utente', +'substitute_to_user' => '', 'substitute_user' => 'Impersona utente', 'sunday' => 'Domenica', 'sunday_abbr' => 'Dom', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 400e620ac..b540759ce 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -693,6 +693,7 @@ Mocht u de komende minuten geen email ontvangen, probeer het dan nogmaals en con 'password_wrong' => 'Verkeerde wachtwoord', 'personal_default_keywords' => 'Persoonlijke sleutelwoorden', 'pl_PL' => 'Polen', +'possible_substitutes' => '', 'previous_state' => 'Vorige staat', 'previous_versions' => 'Vorige versies', 'pt_BR' => 'Portugees (BR)', @@ -876,6 +877,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => 'Hoe lang een cookie moet worden behouden. Indien ingesteld op 0 worden de cookies verwijderd bij het afsluiten van de browser.', 'settings_coreDir' => 'Core letoDMS map', 'settings_coreDir_desc' => 'Pad naar SeedDMS_Core (optioneel)', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => 'Maak database tabellen', 'settings_createdirectory' => 'Maak map', 'settings_currentvalue' => 'Huidige waarde', @@ -1160,6 +1163,7 @@ URL: [url]', 'submit_receipt' => '', 'submit_review' => 'Verzend [Controle]', 'submit_userinfo' => 'Wijzigingen opslaan', +'substitute_to_user' => '', 'substitute_user' => 'Invaller/ vervanger Gebruiker', 'sunday' => 'Zondag', 'sunday_abbr' => 'Su', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 1593d5794..30a40a9d8 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -693,6 +693,7 @@ Jeśli nadal będą problemy z zalogowaniem, prosimy o kontakt z administratorem 'password_wrong' => 'Złe hasło', 'personal_default_keywords' => 'Osobiste sława kluczowe', 'pl_PL' => 'Polski', +'possible_substitutes' => '', 'previous_state' => 'Poprzedni stan', 'previous_versions' => 'Poprzednie wersje', 'pt_BR' => 'Portugalski(BR)', @@ -864,6 +865,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => 'Czas życia pliku cookie w sekundach. Jeśli wartość zostanie ustawione na 0, plik cookie zostanie usunięte po zamknięciu przeglądarki.', 'settings_coreDir' => 'Katalog Core letoDMS', 'settings_coreDir_desc' => 'Ścieżka do LetoDMS_Core (opcjonalnie)', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => 'Utwórz tabele basy danych', 'settings_createdirectory' => 'Utwórz katalog', 'settings_currentvalue' => 'Bieżąca wartość', @@ -1148,6 +1151,7 @@ URL: [url]', 'submit_receipt' => '', 'submit_review' => 'Zatwierdź recenzję', 'submit_userinfo' => 'Zatwierdź dane', +'substitute_to_user' => '', 'substitute_user' => 'Zastępca użytkownika', 'sunday' => 'Niedziela', 'sunday_abbr' => 'Ni', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 2a9d7c1fe..37b2e8476 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -698,6 +698,7 @@ Se você ainda tiver problemas para fazer o login, por favor, contate o administ 'password_wrong' => 'Senha errada', 'personal_default_keywords' => 'palavras-chave pessoais', 'pl_PL' => 'Polonês', +'possible_substitutes' => '', 'previous_state' => 'Estado anterior', 'previous_versions' => 'Previous Versions', 'pt_BR' => 'Português (BR)', @@ -882,6 +883,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => 'O tempo de vida de um cookie em segundos. Se definido como 0, o cookie será removido quando o navegador é fechado.', 'settings_coreDir' => 'Diretório Núcleo do SeedDMS', 'settings_coreDir_desc' => 'Caminho para SeedDMS_Core (opcional). Deixe em branco se você tiver instalado SeedDMS_Core em um lugar onde ele pode ser encontrado por PHP, por exemplo, Extra PHP Include-Path', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => 'Criar tabelas de banco de dados', 'settings_createdirectory' => 'Criar diretório', 'settings_currentvalue' => 'Valor atual', @@ -1166,6 +1169,7 @@ URL: [url]', 'submit_receipt' => '', 'submit_review' => '', 'submit_userinfo' => 'Submeter informação', +'substitute_to_user' => '', 'substitute_user' => 'Substituto do usuário', 'sunday' => 'Sunday', 'sunday_abbr' => 'Su', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index e70f91d73..88911e0d8 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -705,6 +705,7 @@ Dacă aveți în continuare probleme la autentificare, vă rugăm să contactaț 'password_wrong' => 'Parolă greșită', 'personal_default_keywords' => 'Liste de cuvinte cheie personale', 'pl_PL' => 'Poloneză', +'possible_substitutes' => '', 'previous_state' => 'Stare precedentă', 'previous_versions' => 'Versiune precedentă', 'pt_BR' => 'Portugheză (BR)', @@ -907,6 +908,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => 'Durata de viață a unui cookie în secunde. Dacă este setat la 0 cookie-ul va fi eliminat atunci când browser-ul este închis.', 'settings_coreDir' => 'Director SeedDMS Core', 'settings_coreDir_desc' => 'Calea spre SeedDMS_Core (opțional). Lăsați acest SeedDMS_Core gol dacă ați instalat într-un loc unde poate fi găsit de PHP (de exemplu: Extra PHP Include-Path)', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => 'Creare tabele baza de date', 'settings_createdirectory' => 'Creare director', 'settings_currentvalue' => 'Valoare curentă', @@ -1191,6 +1194,7 @@ URL: [url]', 'submit_receipt' => '', 'submit_review' => 'Trimite revizuire', 'submit_userinfo' => 'Trimite informații', +'substitute_to_user' => '', 'substitute_user' => 'Substituie Utilizator', 'sunday' => 'Duminică', 'sunday_abbr' => 'Du', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index 087a39eeb..2abd1f24d 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -690,6 +690,7 @@ URL: [url]', 'password_wrong' => 'Неверный пароль', 'personal_default_keywords' => 'Личный список меток', 'pl_PL' => 'Polish', +'possible_substitutes' => '', 'previous_state' => 'Предыдущее состояние', 'previous_versions' => 'Предыдущие версии', 'pt_BR' => 'Portugese (BR)', @@ -875,6 +876,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => 'Время жизни куки в секундах. Если установлено 0, то куки будут удалены при закрытии браузера.', 'settings_coreDir' => 'Каталог Core SeedDMS', 'settings_coreDir_desc' => 'Путь к SeedDMS_Core (не обязательно).', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => 'Создать таблицы базы данных', 'settings_createdirectory' => 'Создать каталог', 'settings_currentvalue' => 'Текущее значение', @@ -1159,6 +1162,7 @@ URL: [url]', 'submit_receipt' => '', 'submit_review' => 'Рецензировать', 'submit_userinfo' => 'Отправить информацию', +'substitute_to_user' => '', 'substitute_user' => 'Переключиться', 'sunday' => 'Воскресенье', 'sunday_abbr' => 'Вс', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 289af439b..4baf8e810 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -586,6 +586,7 @@ $text = array( 'password_wrong' => '', 'personal_default_keywords' => 'Osobné kľúčové slová', 'pl_PL' => 'Polština', +'possible_substitutes' => '', 'previous_state' => '', 'previous_versions' => 'Predošlé verzie', 'pt_BR' => 'Portugalčina', @@ -735,6 +736,8 @@ $text = array( 'settings_cookieLifetime_desc' => '', 'settings_coreDir' => '', 'settings_coreDir_desc' => '', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => '', 'settings_createdirectory' => '', 'settings_currentvalue' => '', @@ -1019,6 +1022,7 @@ $text = array( 'submit_receipt' => '', 'submit_review' => 'Poslať kontrolu', 'submit_userinfo' => '', +'substitute_to_user' => '', 'substitute_user' => 'Nahradiť používateľa', 'sunday' => 'Nedeľa', 'sunday_abbr' => '', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 340c07e6c..57816dcfa 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -685,6 +685,7 @@ URL: [url]', 'password_wrong' => 'Fel lösenord', 'personal_default_keywords' => 'Personlig nyckelordslista', 'pl_PL' => 'polska', +'possible_substitutes' => '', 'previous_state' => 'Föregående status', 'previous_versions' => 'Tidigare versioner', 'pt_BR' => 'portugisiska (BR)', @@ -870,6 +871,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => 'Livslängd för en cookie i sekunder. Om värdet sätts till 0, kommer cookien att tas bort efter att webbläsaren har stängts ner.', 'settings_coreDir' => 'LetoDMS_Core-mapp', 'settings_coreDir_desc' => 'Sökväg till LetoDMS_Core (valfritt)', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => 'Skapa databastabeller', 'settings_createdirectory' => 'Skapa katalog', 'settings_currentvalue' => 'Aktuellt värde', @@ -1154,6 +1157,7 @@ URL: [url]', 'submit_receipt' => '', 'submit_review' => 'Skicka granskning', 'submit_userinfo' => 'Skicka info', +'substitute_to_user' => '', 'substitute_user' => 'Byt användare', 'sunday' => 'söndag', 'sunday_abbr' => 'sö', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 7f46b278f..bb5aceaf4 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -701,6 +701,7 @@ Giriş yaparken halen sorun yaşıyorsanız lütfen sistem yöneticinizle görü 'password_wrong' => 'Yanlış parola', 'personal_default_keywords' => 'Kişisel anahtar kelimeler', 'pl_PL' => 'Polonyaca', +'possible_substitutes' => '', 'previous_state' => 'Önceki durum', 'previous_versions' => 'Önceki versiyonlar', 'pt_BR' => 'Portekizce', @@ -886,6 +887,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => 'Çerezlerin saniye olarak geçerlilik süresi. 0 olarak ayarlanırsa tarayıcı kapatıldığında çerezler silinir.', 'settings_coreDir' => 'Çekirdek (core) SeedDMS klasörü', 'settings_coreDir_desc' => 'SeedDMS_Core yolu (isteğe bağlı). SeedDMS_Core PHP tarafından bulunabilecek bir yere (örneğin ekstra PHP Include-Path) kurulmuşsa burayı boş bırakın', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => 'Veritabanı tablolarını oluştur', 'settings_createdirectory' => 'Dizin oluştur', 'settings_currentvalue' => 'Mevcut değer', @@ -1170,6 +1173,7 @@ URL: [url]', 'submit_receipt' => '', 'submit_review' => 'Kabul et', 'submit_userinfo' => 'Bilgi gönder', +'substitute_to_user' => '', 'substitute_user' => 'Kullanıcının Yerine Geç', 'sunday' => 'Pazar', 'sunday_abbr' => 'Pa', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index c6aa37ce4..b5654a6fd 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -592,6 +592,7 @@ URL: [url]', 'password_wrong' => '', 'personal_default_keywords' => '用户关键字', 'pl_PL' => '波兰语', +'possible_substitutes' => '', 'previous_state' => '', 'previous_versions' => '先前版本', 'pt_BR' => '葡萄牙语', @@ -741,6 +742,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => '', 'settings_coreDir' => 'SeedDMS核心目录', 'settings_coreDir_desc' => '', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => '', 'settings_createdirectory' => '', 'settings_currentvalue' => '', @@ -1025,6 +1028,7 @@ URL: [url]', 'submit_receipt' => '', 'submit_review' => '提交校对', 'submit_userinfo' => '', +'substitute_to_user' => '', 'substitute_user' => '代理人', 'sunday' => 'Sunday', 'sunday_abbr' => '', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 5f9f110b7..4f90a2ef1 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -590,6 +590,7 @@ URL: [url]', 'password_wrong' => '', 'personal_default_keywords' => '用戶關鍵字', 'pl_PL' => '波蘭語', +'possible_substitutes' => '', 'previous_state' => '', 'previous_versions' => '先前版本', 'pt_BR' => '葡萄牙語', @@ -739,6 +740,8 @@ URL: [url]', 'settings_cookieLifetime_desc' => '', 'settings_coreDir' => 'KME文檔系統核心目錄', 'settings_coreDir_desc' => '', +'settings_createCheckOutDir' => '', +'settings_createCheckOutDir_desc' => '', 'settings_createdatabase' => '', 'settings_createdirectory' => '', 'settings_currentvalue' => '', @@ -1023,6 +1026,7 @@ URL: [url]', 'submit_receipt' => '', 'submit_review' => '提交校對', 'submit_userinfo' => '', +'substitute_to_user' => '', 'substitute_user' => '代理人', 'sunday' => 'Sunday', 'sunday_abbr' => '', From a80f4090afe9f6045816e3b6f5ab80205cabdcd8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 19 May 2015 19:41:40 +0200 Subject: [PATCH 0118/2006] add filter for documents in revision --- op/op.Search.php | 3 +++ views/bootstrap/class.Search.php | 1 + views/bootstrap/class.SearchForm.php | 1 + 3 files changed, 5 insertions(+) diff --git a/op/op.Search.php b/op/op.Search.php index c03cc4fdb..f3809faa3 100644 --- a/op/op.Search.php +++ b/op/op.Search.php @@ -329,6 +329,9 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) { if (isset($_GET["rejected"])){ $status[] = S_REJECTED; } + if (isset($_GET["inrevision"])){ + $status[] = S_IN_REVISION; + } if (isset($_GET["obsolete"])){ $status[] = S_OBSOLETE; } diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 49d41af5a..248e6d3a9 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -251,6 +251,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { + diff --git a/views/bootstrap/class.SearchForm.php b/views/bootstrap/class.SearchForm.php index a9ad210fb..fdb8110ea 100644 --- a/views/bootstrap/class.SearchForm.php +++ b/views/bootstrap/class.SearchForm.php @@ -139,6 +139,7 @@ function checkForm() + From 207f0b255f2f7004badb6af9bbdf2da56463e2e8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 19 May 2015 19:42:29 +0200 Subject: [PATCH 0119/2006] add method maySwitchToUser(), fix getReverseSubstitutes() --- SeedDMS_Core/Core/inc.ClassUser.php | 57 +++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 8 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassUser.php b/SeedDMS_Core/Core/inc.ClassUser.php index e654172fb..5b4ee1007 100644 --- a/SeedDMS_Core/Core/inc.ClassUser.php +++ b/SeedDMS_Core/Core/inc.ClassUser.php @@ -130,6 +130,13 @@ class SeedDMS_Core_User { /* {{{ */ */ var $_substitutes; + /** + * @var array reverse list of users this user can substitute + * + * @access protected + */ + var $_rev_substitutes; + /** * @var object reference to the dms instance this user belongs to * @@ -157,6 +164,8 @@ class SeedDMS_Core_User { /* {{{ */ $this->_loginFailures = $loginFailures; $this->_quota = $quota; $this->_homeFolder = $homeFolder; + $this->_substitutes = null; + $this->_rev_substitutes = null; $this->_dms = null; } @@ -1530,24 +1539,28 @@ class SeedDMS_Core_User { /* {{{ */ function getReverseSubstitutes() { /* {{{ */ $db = $this->_dms->getDB(); - if (!isset($this->_substitutes)) - { - $queryStr = "SELECT tblUsers`.* FROM `tblUserSubstitutes` ". - "LEFT JOIN `tblUsers` ON `tblUserSubstitutes`.`user` = `tblUsers`.`userID` ". + if (!isset($this->_rev_substitutes)) { + $queryStr = "SELECT `tblUsers`.* FROM `tblUserSubstitutes` ". + "LEFT JOIN `tblUsers` ON `tblUserSubstitutes`.`user` = `tblUsers`.`id` ". "WHERE `tblUserSubstitutes`.`substitute`='". $this->_id ."'"; + /* None admins can only be substitutes for regular users, otherwise + * regular users can become admin + */ + if(!$this->isAdmin()) + $queryStr .= " AND `tblUsers`.`role` = ".SeedDMS_Core_User::role_user; $resArr = $db->getResultArray($queryStr); if (is_bool($resArr) && $resArr == false) return false; - $this->_substitutes = array(); + $this->_rev_substitutes = array(); $classname = $this->_dms->getClassname('user'); foreach ($resArr as $row) { $user = new $classname($row["id"], $row["login"], $row["pwd"], $row["fullName"], $row["email"], $row["language"], $row["theme"], $row["comment"], $row["role"], $row["hidden"], $row["disabled"], $row["pwdExpiration"], $row["loginfailures"], $row["quota"], $row["homefolder"]); $user->setDMS($this->_dms); - array_push($this->_substitutes, $user); + array_push($this->_rev_substitutes, $user); } } - return $this->_substitutes; + return $this->_rev_substitutes; } /* }}} */ /** @@ -1596,7 +1609,7 @@ class SeedDMS_Core_User { /* {{{ */ $this->_substitutes = null; return true; - } + } /* }}} */ /** * Check if user is a substitute of the current user @@ -1617,5 +1630,33 @@ class SeedDMS_Core_User { /* {{{ */ return false; } /* }}} */ + /** + * Check if user may switch to the given user + * + * Switching to the given user is only allowed if the given user + * is a substitute for the current user. + * + * @return boolean true if successful otherwise false + */ + function maySwitchToUser($touser) { /* {{{ */ + $db = $this->_dms->getDB(); + + if(get_class($touser) != $this->_dms->getClassname('user')) + return false; + + /* switching to an admin account is always forbitten, unless the + * current user is admin itself + */ + if(!$this->isAdmin() && $touser->isAdmin()) + return false; + + $queryStr = "SELECT * FROM tblUserSubstitutes WHERE substitute=" . $this->_id . " AND user=".$touser->getID(); + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) return false; + if (count($resArr) == 1) return true; + + return false; + } /* }}} */ + } /* }}} */ ?> From 6c1ac6f038d7b6998d4c9fc4fdda867229f8d654 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 19 May 2015 19:43:57 +0200 Subject: [PATCH 0120/2006] set width of .chzn-select-deselect to 95% --- styles/bootstrap/application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index 7c595de3d..c4bf38648 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -22,7 +22,7 @@ $(document).ready( function() { }); $(".chzn-select").chosen({width: "95%"}); - $(".chzn-select-deselect").chosen({allow_single_deselect:true}); + $(".chzn-select-deselect").chosen({width: "95%", allow_single_deselect:true}); /* change the color and length of the bar graph showing the password * strength on each change to the passwod field. From 536ead64ac7b618b0cc771342b42b61ec36a8582 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 19 May 2015 19:44:18 +0200 Subject: [PATCH 0121/2006] allow to substitute user for regular users --- inc/inc.Authentication.php | 10 +++++++--- op/op.SubstituteUser.php | 20 ++++++++++++++++++-- out/out.SubstituteUser.php | 8 ++++---- views/bootstrap/class.Bootstrap.php | 14 +++++++++++--- views/bootstrap/class.SubstituteUser.php | 2 +- views/bootstrap/class.UsrMgr.php | 6 +++--- 6 files changed, 44 insertions(+), 16 deletions(-) diff --git a/inc/inc.Authentication.php b/inc/inc.Authentication.php index a7dd6af3d..86c7961e2 100644 --- a/inc/inc.Authentication.php +++ b/inc/inc.Authentication.php @@ -41,9 +41,13 @@ $session->updateAccess($dms_session); /* Load user data */ $user = $dms->getUser($resArr["userID"]); -if($user->isAdmin()) { - if($resArr["su"]) { - $user = $dms->getUser($resArr["su"]); +/* Check if user was substituted */ +if($resArr["su"] && $su = $dms->getUser($resArr["su"])) { + /* Admin may always substitute the user, but regular users are*/ + if($user->isAdmin() || $user->maySwitchToUser($su)) { + $user = $su; + } else { + $session->resetSu(); } } if (!is_object($user)) { diff --git a/op/op.SubstituteUser.php b/op/op.SubstituteUser.php index f67498b74..ad460c733 100644 --- a/op/op.SubstituteUser.php +++ b/op/op.SubstituteUser.php @@ -25,14 +25,30 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { - UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +/* Check if the form data comes for a trusted request */ +if(!checkFormKey('substituteuser', 'GET')) { + UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_request_token"))),getMLText("invalid_request_token")); } if (!isset($_GET["userid"])) { UI::exitError(getMLText("admin_tools"),getMLText("unknown_id")); } +/* Check if user is allowed to switch to a different user */ +if (!$user->isAdmin()) { + $substitutes = $user->getReverseSubstitutes(); + $found = false; + foreach($substitutes as $subsuser) { + /* Make sure a substitution is allowed and the substituted user + * is not an admin. + */ + if($subsuser->getID() == $_GET["userid"] && !$subsuser->isAdmin()) + $found = true; + } + if(!$found) + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + $session->setSu($_GET['userid']); $session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_substituted_user'))); diff --git a/out/out.SubstituteUser.php b/out/out.SubstituteUser.php index 159af1394..0fc7b74ab 100644 --- a/out/out.SubstituteUser.php +++ b/out/out.SubstituteUser.php @@ -26,12 +26,12 @@ include("../inc/inc.ClassUI.php"); include("../inc/inc.ClassAccessOperation.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { - UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +if ($user->isAdmin()) { + $allUsers = $dms->getAllUsers($settings->_sortUsersInList); +} else { + $allUsers = $user->getReverseSubstitutes(); } -$allUsers = $dms->getAllUsers($settings->_sortUsersInList); - $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1]); if($view) { diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 65279136f..26cac857b 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -280,9 +280,17 @@ $(document).ready(function () { echo " \n"; echo " \n"; } - if($this->params['user']->isAdmin()) { - $showdivider = true; - echo "
  • ".getMLText("substitute_user")."
  • \n"; + if(!$this->params['session']->getSu()) { + if($this->params['user']->isAdmin()) { + $showdivider = true; + echo "
  • ".getMLText("substitute_user")."
  • \n"; + } elseif($substitutes = $this->params['user']->getReverseSubstitutes()) { + if(count($substitutes) == 1) { + echo "
  • getID()."&formtoken=".createFormKey('substituteuser')."\">".getMLText("substitute_to_user", array('username'=>$substitutes[0]->getFullName()))."
  • \n"; + } else { + echo "
  • ".getMLText("substitute_user")."
  • \n"; + } + } } if($showdivider) echo "
  • \n"; diff --git a/views/bootstrap/class.SubstituteUser.php b/views/bootstrap/class.SubstituteUser.php index b94cbfedb..69657d666 100644 --- a/views/bootstrap/class.SubstituteUser.php +++ b/views/bootstrap/class.SubstituteUser.php @@ -68,7 +68,7 @@ class SeedDMS_View_SubstituteUser extends SeedDMS_Bootstrap_Style { echo ""; echo ""; if($currUser->getID() != $user->getID()) { - echo "getID()."\"> ".getMLText('substitute_user')." "; + echo "getID()."&formtoken=".createFormKey('substituteuser')."\"> ".getMLText('substitute_user')." "; } echo ""; echo ""; diff --git a/views/bootstrap/class.UsrMgr.php b/views/bootstrap/class.UsrMgr.php index 355831936..457ea5f78 100644 --- a/views/bootstrap/class.UsrMgr.php +++ b/views/bootstrap/class.UsrMgr.php @@ -193,10 +193,10 @@ class SeedDMS_View_UsrMgr extends SeedDMS_Bootstrap_Style { ?> -
    :
    +
    :
    - getSubstitutes(); @@ -204,7 +204,7 @@ class SeedDMS_View_UsrMgr extends SeedDMS_Bootstrap_Style { $substitutes = array(); } foreach ($users as $usr) { - if ($usr->isGuest() || ($currUser && $usr->getID() == $currUser->getID())) + if ($usr->isGuest() || ($currUser && !$usr->isAdmin() && $currUser->isAdmin()) || ($currUser && $usr->getID() == $currUser->getID())) continue; $checked=false; foreach ($substitutes as $r) if ($r->getID()==$usr->getID()) $checked=true; From f76536b0a482b8386467287c22bfa6fa6da5653c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 20 May 2015 13:21:05 +0200 Subject: [PATCH 0122/2006] set some new icons --- views/bootstrap/class.ViewDocument.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 671c0f1b8..8fd475107 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -541,10 +541,10 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "
  • ".getMLText("change_status")."
  • "; } if($accessop->maySetRecipients()) { - print "
  • ".getMLText("change_recipients")."
  • "; + print "
  • ".getMLText("change_recipients")."
  • "; } if($accessop->maySetRevisors()) { - print "
  • ".getMLText("change_revisors")."
  • "; + print "
  • ".getMLText("change_revisors")."
  • "; } if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { // Allow changing reviewers/approvals only if not reviewed @@ -564,7 +564,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } */ if($dms->getAllTransmittals($user)) { - print "
  • getVersion()."\">".getMLText("add_to_transmittal")."
  • "; + print "
  • getVersion()."\">".getMLText("add_to_transmittal")."
  • "; } if($accessop->mayEditComment()) { print "
  • getVersion()."\">".getMLText("edit_comment")."
  • "; From 5e846059f7e340fae35d4f89cf05617ee718b040 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 21 May 2015 15:58:10 +0200 Subject: [PATCH 0123/2006] replace '/' by ', ' for better line break in header --- views/bootstrap/class.ViewDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 8fd475107..27143b6a5 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -120,7 +120,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { ?> - + Date: Thu, 21 May 2015 22:09:33 +0200 Subject: [PATCH 0124/2006] add SeedDMS_Core_AddContentResultSet::setDMS(), fixed typo --- SeedDMS_Core/Core/inc.ClassDocument.php | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index e58dba462..dfccbab45 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -1497,6 +1497,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ if($workflow) $content->setWorkflow($workflow, $user); $docResultSet = new SeedDMS_Core_AddContentResultSet($content); + $docResultSet->setDMS($this->_dms); if($attributes) { foreach($attributes as $attrdefid=>$attribute) { @@ -1688,7 +1689,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $this->_content = array(); foreach ($resArr as $row) - array_push($this->_content, new SeedDMS_Core_DocumentContent($row["id"], $this, $row["version"], $row["comment"], $row["date"], $row["createdBy"], $row["dir"], $row["orgFileName"], $row["fileType"], $row["mimeType"], $row['fileSize'], $row['checksum'], $row['reviѕiondate'])); + array_push($this->_content, new SeedDMS_Core_DocumentContent($row["id"], $this, $row["version"], $row["comment"], $row["date"], $row["createdBy"], $row["dir"], $row["orgFileName"], $row["fileType"], $row["mimeType"], $row['fileSize'], $row['checksum'], $row['revisiondate'])); } return $this->_content; @@ -5136,6 +5137,11 @@ class SeedDMS_Core_AddContentResultSet { /* {{{ */ protected $_content; protected $_status; + /** + * @var object back reference to document management system + */ + protected $_dms; + function SeedDMS_Core_AddContentResultSet($content) { /* {{{ */ $this->_content = $content; $this->_indReviewers = null; @@ -5143,6 +5149,21 @@ class SeedDMS_Core_AddContentResultSet { /* {{{ */ $this->_indApprovers = null; $this->_grpApprovers = null; $this->_status = null; + $this->_dms = null; + } /* }}} */ + + /* + * Set dms this object belongs to. + * + * Each object needs a reference to the dms it belongs to. It will be + * set when the object is created. + * The dms has a references to the currently logged in user + * and the database connection. + * + * @param object $dms reference to dms + */ + function setDMS($dms) { /* {{{ */ + $this->_dms = $dms; } /* }}} */ function addReviewer($reviewer, $type, $status) { /* {{{ */ From 3bc72a46df5ae3c37f9b9b241983ca53cd1820ce Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 21 May 2015 22:10:06 +0200 Subject: [PATCH 0125/2006] do not include jquery-cookie/jquery.cookie.js it's currently not needed and not available --- views/bootstrap/class.Bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 26cac857b..941124760 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -71,7 +71,7 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common { echo ''."\n"; echo ''."\n"; echo ''."\n"; - echo ''."\n"; +// echo ''."\n"; echo ''."\n"; if($this->params['session'] && $this->params['session']->getSu()) { ?> From 38b7a7c6607dbfc39f01c94204a36513262c3cc6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 29 May 2015 20:41:52 +0200 Subject: [PATCH 0126/2006] callHook() returns null if no method was found --- inc/inc.ClassControllerCommon.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassControllerCommon.php b/inc/inc.ClassControllerCommon.php index d3a949dff..308872d43 100644 --- a/inc/inc.ClassControllerCommon.php +++ b/inc/inc.ClassControllerCommon.php @@ -115,6 +115,7 @@ class SeedDMS_Controller_Common { function callHook($hook) { /* {{{ */ $tmp = explode('_', get_class($this)); if(isset($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp[2])])) { + $result = null; foreach($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp[2])] as $hookObj) { if (method_exists($hookObj, $hook)) { switch(func_num_args()) { @@ -130,7 +131,7 @@ class SeedDMS_Controller_Common { } } } - return true; + return $result; } return null; } /* }}} */ From b8d06babeefdf9e37febe4d95dea0bc7ed30e416 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 29 May 2015 20:42:37 +0200 Subject: [PATCH 0127/2006] add setting for library folder --- inc/inc.ClassSettings.php | 4 ++++ op/op.Settings.php | 1 + views/bootstrap/class.Settings.php | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 15cb6060d..b770d8d9c 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -83,6 +83,8 @@ class Settings { /* {{{ */ var $_luceneDir = null; // Where the drop folders are located var $_dropFolderDir = null; + // Where the library folder is located + var $_libraryFolder = 1; // Where the checked out files are located var $_checkOutDir = null; // Create checkout dir if it doesn't exists @@ -358,6 +360,7 @@ class Settings { /* {{{ */ $this->_sortUsersInList = strval($tab["sortUsersInList"]); $this->_sortFoldersDefault = strval($tab["sortFoldersDefault"]); $this->_expandFolderTree = intval($tab["expandFolderTree"]); + $this->_libraryFolder = intval($tab["libraryFolder"]); // XML Path: /configuration/site/calendar $node = $xml->xpath('/configuration/site/calendar'); @@ -645,6 +648,7 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "stopWordsFile", $this->_stopWordsFile); $this->setXMLAttributValue($node, "sortUsersInList", $this->_sortUsersInList); $this->setXMLAttributValue($node, "sortFoldersDefault", $this->_sortFoldersDefault); + $this->setXMLAttributValue($node, "libraryFolder", $this->_libraryFolder); // XML Path: /configuration/site/calendar $node = $this->getXMLNode($xml, '/configuration/site', 'calendar'); diff --git a/op/op.Settings.php b/op/op.Settings.php index 6c7d3724c..8d6aa0695 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -80,6 +80,7 @@ if ($action == "saveSettings") $settings->_stopWordsFile = $_POST["stopWordsFile"]; $settings->_sortUsersInList = $_POST["sortUsersInList"]; $settings->_sortFoldersDefault = $_POST["sortFoldersDefault"]; + $settings->_libraryFolder = intval($_POST["libraryFolder"]); // SETTINGS - SITE - CALENDAR $settings->_enableCalendar = getBoolValue("enableCalendar"); diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 64c3df226..6fc9ace1e 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -220,6 +220,10 @@ if(!is_writeable($settings->_configFilePath)) { + "> + + + - - - - - -

    - -

    -

    - diff --git a/views/blue/class.Calendar.php b/views/blue/class.Calendar.php deleted file mode 100644 index 66828e391..000000000 --- a/views/blue/class.Calendar.php +++ /dev/null @@ -1,335 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for Calendar view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_Calendar extends SeedDMS_Blue_Style { - - function generateCalendarArrays() { /* {{{ */ - $this->monthNames = array( getMLText("january"), - getMLText("february"), - getMLText("march"), - getMLText("april"), - getMLText("may"), - getMLText("june"), - getMLText("july"), - getMLText("august"), - getMLText("september"), - getMLText("october"), - getMLText("november"), - getMLText("december") ); - - $this->dayNamesLong = array( getMLText("sunday"), - getMLText("monday"), - getMLText("tuesday"), - getMLText("wednesday"), - getMLText("thursday"), - getMLText("friday"), - getMLText("saturday") ); - - $this->dayNames = array(); - foreach ( $this->dayNamesLong as $dn ){ - $this->dayNames[] = substr($dn,0,3); - } - } /* }}} */ - - // Calculate the number of days in a month, taking into account leap years. - function getDaysInMonth($month, $year) { /* {{{ */ - if ($month < 1 || $month > 12) return 0; - - $daysInMonth = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); - $d = $daysInMonth[$month - 1]; - - if ($month == 2){ - - if ($year%4 == 0){ - - if ($year%100 == 0){ - - if ($year%400 == 0) $d = 29; - } - else $d = 29; - } - } - return $d; - } /* }}} */ - - // Adjust dates to allow months > 12 and < 0 and day<0 or day>days of the month - function adjustDate(&$day,&$month,&$year) { /* {{{ */ - $d=getDate(mktime(12,0,0, $month, $day, $year)); - $month=$d["mon"]; - $day=$d["mday"]; - $year=$d["year"]; - } /* }}} */ - - // Generate the HTML for a given month - function getMonthHTML($month, $year) { /* {{{ */ - if (!isset($this->monthNames)) $this->generateCalendarArrays(); - if (!isset($this->dayNames)) $this->generateCalendarArrays(); - - $startDay = $this->firstdayofweek; - - $day=1; - $this->adjustDate($day,$month,$year); - - $daysInMonth = $this->getDaysInMonth($month, $year); - $date = getdate(mktime(12, 0, 0, $month, 1, $year)); - - $first = $date["wday"]; - $monthName = $this->monthNames[$month - 1]; - - $s = "
    /
    ,
    :printFolderChooser("form1", M_READWRITE, -1, $dms->getFolder($settings->_libraryFolder), 'libraryFolder');?>
    \n"; - - $s .= "\n"; - $s .= "\n"; ; - $s .= "\n"; - - $s .= "\n"; - $s .= "\n"; - $s .= "\n"; - $s .= "\n"; - $s .= "\n"; - $s .= "\n"; - $s .= "\n"; - $s .= "\n"; - $s .= "\n"; - - // We need to work out what date to start at so that the first appears in the correct column - $d = $startDay + 1 - $first; - while ($d > 1) $d -= 7; - - // Make sure we know when today is, so that we can use a different CSS style - $today = getdate(time()); - - while ($d <= $daysInMonth) - { - $s .= "\n"; - - for ($i = 0; $i < 7; $i++){ - - $class = ($year == $today["year"] && $month == $today["mon"] && $d == $today["mday"]) ? "today" : ""; - $s .= "\n"; - $d++; - } - $s .= "\n"; - } - - $s .= "
    ".$monthName."
    " . $this->dayNames[($startDay)%7] . "" . $this->dayNames[($startDay+1)%7] . "" . $this->dayNames[($startDay+2)%7] . "" . $this->dayNames[($startDay+3)%7] . "" . $this->dayNames[($startDay+4)%7] . "" . $this->dayNames[($startDay+5)%7] . "" . $this->dayNames[($startDay+6)%7] . "
    "; - - if ($d > 0 && $d <= $daysInMonth){ - - $s .= "".$d.""; - } - else $s .= " "; - - $s .= "
    \n"; - - return $s; - } /* }}} */ - - function printYearTable($year) { /* {{{ */ - print "\n"; - print ""; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    " . $this->getMonthHTML(1 , $year) ."" . $this->getMonthHTML(2 , $year) ."" . $this->getMonthHTML(3 , $year) ."" . $this->getMonthHTML(4 , $year) ."
    " . $this->getMonthHTML(5 , $year) ."" . $this->getMonthHTML(6 , $year) ."" . $this->getMonthHTML(7 , $year) ."" . $this->getMonthHTML(8 , $year) ."
    " . $this->getMonthHTML(9 , $year) ."" . $this->getMonthHTML(10, $year) ."" . $this->getMonthHTML(11, $year) ."" . $this->getMonthHTML(12, $year) ."
    \n"; - } /* }}} */ - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $mode = $this->params['mode']; - $year = $this->params['year']; - $month = $this->params['month']; - $day = $this->params['day']; - $this->firstdayofweek = $this->params['firstdayofweek']; - - $this->adjustDate($day,$month,$year); - - $this->htmlStartPage(getMLText("calendar")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("calendar"), "calendar",array($day,$month,$year)); - - if ($mode=="y"){ - - $this->contentHeading(getMLText("year_view")." : ".$year); - $this->contentContainerStart(); - - print "getImgPath("m.png")."\" border=0> "; - print "getImgPath("c.png")."\" border=0> "; - print "getImgPath("p.png")."\" border=0> "; - - $this->printYearTable($year); - $this->contentContainerEnd(); - - }else if ($mode=="m"){ - - if (!isset($this->dayNamesLong)) $this->generateCalendarArrays(); - if (!isset($this->monthNames)) $this->generateCalendarArrays(); - - $this->contentHeading(getMLText("month_view")." : ".$this->monthNames[$month-1]. " ".$year); - $this->contentContainerStart(); - - print "getImgPath("m.png")."\" border=0> "; - print "getImgPath("c.png")."\" border=0> "; - print "getImgPath("p.png")."\" border=0> "; - - $days = $this->getDaysInMonth($month, $year); - $today = getdate(time()); - - $events = getEventsInInterval(mktime(0,0,0, $month, 1, $year), mktime(23,59,59, $month, $days, $year)); - - echo "\n"; - - for ($i=1; $i<=$days; $i++){ - - // separate weeks - $date = getdate(mktime(12, 0, 0, $month, $i, $year)); - if (($date["wday"]==$this->firstdayofweek) && ($i!=1)) - echo "\n"; - - // highlight today - $class = ($year == $today["year"] && $month == $today["mon"] && $i == $today["mday"]) ? "todayHeader" : "header"; - - echo ""; - echo ""; - echo ""; - - if ($class=="todayHeader") $class="today"; - else $class=""; - - $xdate=mktime(0, 0, 0, $month, $i, $year); - foreach ($events as $event){ - if (($event["start"]<=$xdate)&&($event["stop"]>=$xdate)){ - - if (strlen($event['name']) > 25) $event['name'] = substr($event['name'], 0, 22) . "..."; - print ""; - }else{ - print ""; - } - } - - echo "\n"; - } - echo "
     
    ".$i."".$this->dayNamesLong[$date["wday"]]."".htmlspecialchars($event['name'])." 
    \n"; - - $this->contentContainerEnd(); - - }else{ - - if (!isset($this->dayNamesLong)) $this->generateCalendarArrays(); - if (!isset($this->monthNames)) $this->generateCalendarArrays(); - - // get the week interval - TODO: $GET - $datestart=getdate(mktime(0,0,0,$month,$day,$year)); - while($datestart["wday"]!=$this->firstdayofweek){ - $datestart=getdate(mktime(0,0,0,$datestart["mon"],$datestart["mday"]-1,$datestart["year"])); - } - - $datestop=getdate(mktime(23,59,59,$month,$day,$year)); - if ($datestop["wday"]==$this->firstdayofweek){ - $datestop=getdate(mktime(23,59,59,$datestop["mon"],$datestop["mday"]+1,$datestop["year"])); - } - while($datestop["wday"]!=$this->firstdayofweek){ - $datestop=getdate(mktime(23,59,59,$datestop["mon"],$datestop["mday"]+1,$datestop["year"])); - } - $datestop=getdate(mktime(23,59,59,$datestop["mon"],$datestop["mday"]-1,$datestop["year"])); - - $starttime=mktime(0,0,0,$datestart["mon"],$datestart["mday"],$datestart["year"]); - $stoptime=mktime(23,59,59,$datestop["mon"],$datestop["mday"],$datestop["year"]); - - $today = getdate(time()); - $events = getEventsInInterval($starttime,$stoptime); - - $this->contentHeading(getMLText("week_view")." : ".getReadableDate(mktime(12, 0, 0, $month, $day, $year))); - $this->contentContainerStart(); - - print "getImgPath("m.png")."\" border=0> "; - print "getImgPath("c.png")."\" border=0> "; - print "getImgPath("p.png")."\" border=0> "; - - echo "\n"; - - for ($i=$starttime; $i<$stoptime; $i += 86400){ - - $date = getdate($i); - - // for daylight saving time TODO: could be better - if ( ($i!=$starttime) && ($prev_day==$date["mday"]) ){ - $i += 3600; - $date = getdate($i); - } - - // highlight today - $class = ($date["year"] == $today["year"] && $date["mon"] == $today["mon"] && $date["mday"] == $today["mday"]) ? "todayHeader" : "header"; - - echo ""; - echo ""; - echo ""; - - if ($class=="todayHeader") $class="today"; - else $class=""; - - foreach ($events as $event){ - if (($event["start"]<=$i)&&($event["stop"]>=$i)){ - print ""; - }else{ - print ""; - } - } - - echo "\n"; - - $prev_day=$date["mday"]; - } - echo "
    ".getReadableDate($i)."".$this->dayNamesLong[$date["wday"]]."".htmlspecialchars($event['name'])." 
    \n"; - - $this->contentContainerEnd(); - } - - $this->htmlEndPage(); - - } /* }}} */ -} -?> diff --git a/views/blue/class.Categories.php b/views/blue/class.Categories.php deleted file mode 100644 index caf638c6d..000000000 --- a/views/blue/class.Categories.php +++ /dev/null @@ -1,152 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for Categories view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_Categories extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $categories = $this->params['categories']; - - $this->htmlStartPage(getMLText("admin_tools")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); -?> - - -contentHeading(getMLText("global_document_categories")); - $this->contentContainerStart(); -?> - - - - - - - -getID()."\" style=\"display : none;\">"; -?> -
    : - -    -
    - - - - - - - - - - - -
    -isUsed()) { -?> -
    - - - - " type="submit"> -
    - -

    - -
    - contentSubHeading("");?> -
    : -
    - - - -   - "> -
    -
    - - - - - -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.CategoryChooser.php b/views/blue/class.CategoryChooser.php deleted file mode 100644 index fc9ea5d81..000000000 --- a/views/blue/class.CategoryChooser.php +++ /dev/null @@ -1,97 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for CategoryChooser view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_CategoryChooser extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $categories = $this->params['categories']; - $form = $this->params['form']; - $selcats = $this->params['selcats']; - - $this->htmlStartPage(getMLText("choose_target_category")); - $this->globalBanner(); - $this->pageNavigation(getMLText("choose_target_category")); -?> - - - -contentContainerStart(); - $selcatsarr = explode(',', $selcats); -?> - - - - - - - - - - -
    : - -
    - ">    -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.ChangePassword.php b/views/blue/class.ChangePassword.php deleted file mode 100644 index b3d2ae78e..000000000 --- a/views/blue/class.ChangePassword.php +++ /dev/null @@ -1,74 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for ChangePassword view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_ChangePassword extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $referuri = $this->params['referuri']; - $hash = $this->params['hash']; - - $this->htmlStartPage(getMLText("change_password"), "login"); - $this->globalBanner(); - $this->pageNavigation(getMLText("change_password")); - $this->contentContainerStart(); -?> -
    -"; - } - if ($hash) { - echo ""; - } -?> - - - - - - - - - - - - -
     
    ">
    -
    -contentContainerEnd(); ?> - -

    -htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.CreateIndex.php b/views/blue/class.CreateIndex.php deleted file mode 100644 index 28cde01c4..000000000 --- a/views/blue/class.CreateIndex.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for CreateIndex view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_CreateIndex extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $this->htmlStartPage(getMLText("admin_tools")); - $this->globalNavigation(); - $this->pageNavigation(getMLText('admin_tools'), 'admin_tools'); - $this->contentHeading(getMLText("create_fulltext_index")); - $this->contentContainerStart(); - - echo '

    '.getMLText('create_fulltext_index_warning').'

    '; - echo ''.getMLText('confirm_create_fulltext_index').''; - - $this->contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> - diff --git a/views/blue/class.DefaultKeywords.php b/views/blue/class.DefaultKeywords.php deleted file mode 100644 index f0288db04..000000000 --- a/views/blue/class.DefaultKeywords.php +++ /dev/null @@ -1,200 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for DefaultKeywords view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_DefaultKeywords extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $categories = $this->params['categories']; - $selcategoryid = $this->params['selcategoryid']; - -$this->htmlStartPage(getMLText("admin_tools")); -$this->globalNavigation(); -$this->pageNavigation(getMLText("admin_tools"), "admin_tools"); - -?> - -contentHeading(getMLText("global_default_keywords")); - $this->contentContainerStart(); -?> - - - - - - -getOwner(); - if ((!$user->isAdmin()) && ($owner->getID() != $user->getID())) continue; - - print " - -
    : - -    - getID()."\" style=\"display : none;\">"; -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - " type="submit" title=""> -
    -
    - contentSubHeading("");?> -
    : -
    - - - -   - "> -
    -
    - contentSubHeading("");?> -
    : - getKeywordLists(); - if (count($lists) == 0) - print getMLText("no_default_keywords"); - else - foreach ($lists as $list) { -?> -
    - - - "> - - "> - " style="border: 0px;"> - -
    -
    - - - "> - - " style="border: 0px;"> -
    -
    - -
    "> - - - -
    -
    - - - -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.DocumentAccess.php b/views/blue/class.DocumentAccess.php deleted file mode 100644 index 11977c24b..000000000 --- a/views/blue/class.DocumentAccess.php +++ /dev/null @@ -1,283 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for DocumentAccess view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_DocumentAccess extends SeedDMS_Blue_Style { - - function printAccessModeSelection($defMode) { /* {{{ */ - print "\n"; - } /* }}} */ - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $document = $this->params['document']; - $folder = $this->params['folder']; - $allUsers = $this->params['allusers']; - $allGroups = $this->params['allgroups']; - - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); - -?> - - - -contentHeading(getMLText("edit_document_access")); - $this->contentContainerStart(); - - if ($user->isAdmin()) { - - $this->contentSubHeading(getMLText("set_owner")); -?> -
    - - - - : - "> -
    -contentSubHeading(getMLText("access_inheritance")); - - if ($document->inheritsAccess()) { - printMLText("inherits_access_msg"); -?> -

    -

    - - - - - "> -
    -
    - - - - - "> -
    -

    -contentContainerEnd(); - $this->htmlEndPage(); - return; -} -?> -
    - - - - "> -
    -getAccessList(); - - $this->contentSubHeading(getMLText("default_access")); -?> -
    - - - - printAccessModeSelection($document->getDefaultAccess()); ?> - "> -
    - -contentSubHeading(getMLText("edit_existing_access")); - - /* memorїze users with access rights */ - $memusers = array(); - /* memorize groups with access rights */ - $memgroups = array(); - if (count($accessList["users"]) != 0 || count($accessList["groups"]) != 0) { - - print ""; - - foreach ($accessList["users"] as $userAccess) { - $userObj = $userAccess->getUser(); - $memusers[] = $userObj->getID(); - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - } - - foreach ($accessList["groups"] as $groupAccess) { - $groupObj = $groupAccess->getGroup(); - $memgroups[] = $groupObj->getID(); - $mode = $groupAccess->getMode(); - print ""; - print ""; - print ""; - print ""; - print "\n"; - print "\n"; - print ""; - print "\n"; - print "\n"; - } - - print "
    ". htmlspecialchars($userObj->getFullName()) . "
    \n"; - $this->printAccessModeSelection($userAccess->getMode()); - print "\n"; - echo createHiddenFieldWithKey('documentaccess')."\n"; - print "getId()."\">\n"; - print "\n"; - print "getID()."\">\n"; - print "".getMLText("save")." "; - print "
    \n"; - echo createHiddenFieldWithKey('documentaccess')."\n"; - print "getId()."\">\n"; - print "\n"; - print "getID()."\">\n"; - print "".getMLText("delete")." "; - print "
    ". htmlspecialchars($groupObj->getName()) . "
    "; - $this->printAccessModeSelection($groupAccess->getMode()); - print "\n"; - echo createHiddenFieldWithKey('documentaccess')."\n"; - print "getId()."\">"; - print ""; - print "getID()."\">"; - print "".getMLText("save")." "; - print "\n"; - print "
    \n"; - echo createHiddenFieldWithKey('documentaccess')."\n"; - print "getId()."\">\n"; - print "\n"; - print "getID()."\">\n"; - print "".getMLText("delete")." "; - print "
    "; - print "

    "; - } -?> -
    - - - - - - - - - - - - - - - - - - - -
    : - -
    : - -
    : -printAccessModeSelection(M_READ); -?> -
    ">
    -
    - -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.DocumentChooser.php b/views/blue/class.DocumentChooser.php deleted file mode 100644 index ee807dcdb..000000000 --- a/views/blue/class.DocumentChooser.php +++ /dev/null @@ -1,136 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for DocumentChooser view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_DocumentChooser extends SeedDMS_Blue_Style { - var $user; - var $form; - - function printTree($path, $level = 0) { /* {{{ */ - $folder = $path[$level]; - $subFolders = SeedDMS_Core_DMS::filterAccess($folder->getSubFolders(), $this->user, M_READ); - $documents = SeedDMS_Core_DMS::filterAccess($folder->getDocuments(), $this->user, M_READ); - - if ($level+1 < count($path)) - $nextFolderID = $path[$level+1]->getID(); - else - $nextFolderID = -1; - - if ($level == 0) { - print "
      \n"; - } - print "
    • \n"; - print "printImgPath("minus.png"); - else if (count($subFolders) + count($documents) > 0) $this->printImgPath("minus.png"); - else $this->printImgPath("blank.png"); - print "\" border=0>\n"; - if ($folder->getAccessMode($this->user) >= M_READ) { - print "getImgPath("folder_opened.gif")."\" border=0>".htmlspecialchars($folder->getName())."\n"; - } - else - print "getImgPath("folder_opened.gif")."\" width=18 height=18 border=0>".htmlspecialchars($folder->getName())."\n"; - print "
    • \n"; - - print "\n"; - if ($level == 0) { - print "
    \n"; - } - - } /* }}} */ - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $this->user = $this->params['user']; - $folder = $this->params['folder']; - $this->form = $this->params['form']; - - $this->htmlStartPage(getMLText("choose_target_document")); - $this->globalBanner(); - $this->pageNavigation(getMLText("choose_target_document")); -?> - - - -"; - $this->contentContainerStart(); - echo "
    "; - $this->contentContainerEnd(); - $this->contentContainerStart(); - $this->printTree($folder->getPath()); - $this->contentContainerEnd(); -?> - - - -htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.DocumentNotify.php b/views/blue/class.DocumentNotify.php deleted file mode 100644 index 004c67d47..000000000 --- a/views/blue/class.DocumentNotify.php +++ /dev/null @@ -1,154 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for DocumentNotify view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_DocumentNotify extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - $sortusersinlist = $this->params['sortusersinlist']; - - $notifyList = $document->getNotifyList(); - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); - -?> - - -contentHeading(getMLText("edit_existing_notify")); - $this->contentContainerStart(); - - $userNotifyIDs = array(); - $groupNotifyIDs = array(); - - print "\n"; - if ((count($notifyList["users"]) == 0) && (count($notifyList["groups"]) == 0)) { - print ""; - } - else { - foreach ($notifyList["users"] as $userNotify) { - print ""; - print ""; - print ""; - if ($user->isAdmin() || $user->getID() == $userNotify->getID()) { - print ""; - }else print ""; - print ""; - $userNotifyIDs[] = $userNotify->getID(); - } - foreach ($notifyList["groups"] as $groupNotify) { - print ""; - print ""; - print ""; - if ($user->isAdmin() || $groupNotify->isMember($user,true)) { - print ""; - }else print ""; - print ""; - $groupNotifyIDs[] = $groupNotify->getID(); - } - } - print "
    ".getMLText("empty_notify_list")."
    " . htmlspecialchars($userNotify->getLogin() . " - " . $userNotify->getFullName()) . "getID() . "&action=delnotify&userid=".$userNotify->getID()."\">".getMLText("delete")."
    " . htmlspecialchars($groupNotify->getName()) . "getID() . "&action=delnotify&groupid=".$groupNotify->getID()."\">".getMLText("delete")."
    \n"; - -?> -
    - -
    - - - - - - - - - - - - - - -
    : - -
    : - -
    ">
    -
    - -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.DocumentVersionDetail.php b/views/blue/class.DocumentVersionDetail.php deleted file mode 100644 index 64fef68c5..000000000 --- a/views/blue/class.DocumentVersionDetail.php +++ /dev/null @@ -1,260 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for DocumentVersionDetail view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - $version = $this->params['version']; - $viewonlinefiletypes = $this->params['viewonlinefiletypes']; - $enableversionmodification = $this->params['enableversionmodification']; - - $latestContent = $document->getLatestContent(); - $status = $version->getStatus(); - $reviewStatus = $version->getReviewStatus(); - $approvalStatus = $version->getApprovalStatus(); - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); - $this->contentHeading(getMLText("document_infos")); - $this->contentContainerStart(); - -?> - - - - - - - - - - - - - - - - - -isLocked()) { - $lockingUser = $document->getLockingUser(); -?> - - - - - - -
    : -getOwner(); - print "getEmail()."\">".htmlspecialchars($owner->getFullName()).""; -?> -
    :getComment());?>
    :getDate()); ?>
    :getKeywords());?>
    : $lockingUser->getEmail(), "username" => htmlspecialchars($lockingUser->getFullName())));?>
    -contentContainerEnd(); - - // verify if file exists - $file_exists=file_exists($dms->contentDir . $version->getPath()); - - $this->contentHeading(getMLText("details_version", array ("version" => $version->getVersion()))); - $this->contentContainerStart(); - print ""; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - print "\n"; - print "\n"; - print "\n"; - - print "\n"; - - print ""; - print ""; - print ""; - print "\n
    ".getMLText("version")."".getMLText("file")."".getMLText("comment")."".getMLText("status")."
    ".$version->getVersion()."
      \n"; - print "
    • ".$version->getOriginalFileName()."
    • \n"; - - if ($file_exists) print "
    • ". formatted_size(filesize($dms->contentDir . $version->getPath())) ." ".htmlspecialchars($version->getMimeType())."
    • "; - else print "
    • ".getMLText("document_deleted")."
    • "; - - $updatingUser = $version->getUser(); - print "
    • ".getMLText("uploaded_by")." getEmail()."\">".htmlspecialchars($updatingUser->getFullName())."
    • "; - print "
    • ".getLongReadableDate($version->getDate())."
    • "; - print "
    ".htmlspecialchars($version->getComment())."".getOverallStatusText($status["status"]).""; - - //if (($document->getAccessMode($user) >= M_READWRITE)) { - print ""; - } - else { - print " "; - } - - echo "
    \n"; - - - print "\n"; - - if (is_array($reviewStatus) && count($reviewStatus)>0) { - - print "\n"; - - print "\n"; - print "\n"; - print "\n"; - print ""; - print "\n"; - print "\n"; - - foreach ($reviewStatus as $r) { - $required = null; - switch ($r["type"]) { - case 0: // Reviewer is an individual. - $required = $dms->getUser($r["required"]); - if (!is_object($required)) { - $reqName = getMLText("unknown_user")." '".$r["required"]."'"; - } - else { - $reqName = htmlspecialchars($required->getFullName()); - } - break; - case 1: // Reviewer is a group. - $required = $dms->getGroup($r["required"]); - if (!is_object($required)) { - $reqName = getMLText("unknown_group")." '".$r["required"]."'"; - } - else { - $reqName = htmlspecialchars($required->getName()); - } - break; - } - print "\n"; - print "\n"; - print ""; - print "\n"; - print "\n"; - print "\n"; - } - } - - if (is_array($approvalStatus) && count($approvalStatus)>0) { - - print "\n"; - - print "\n"; - print "\n"; - print "\n"; - print ""; - print "\n"; - print "\n"; - - foreach ($approvalStatus as $a) { - $required = null; - switch ($a["type"]) { - case 0: // Approver is an individual. - $required = $dms->getUser($a["required"]); - if (!is_object($required)) { - $reqName = getMLText("unknown_user")." '".$r["required"]."'"; - } - else { - $reqName = htmlspecialchars($required->getFullName()); - } - break; - case 1: // Approver is a group. - $required = $dms->getGroup($a["required"]); - if (!is_object($required)) { - $reqName = getMLText("unknown_group")." '".$r["required"]."'"; - } - else { - $reqName = htmlspecialchars($required->getName()); - } - break; - } - print "\n"; - print "\n"; - print ""; - print "\n"; - print "\n"; - print "\n"; - } - } - - print "
    \n"; - $this->contentSubHeading(getMLText("reviewers")); - print "
    ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
    ".$reqName."
    • ".$r["date"]."
    • "; - $updateUser = $dms->getUser($r["userID"]); - print "
    • ".(is_object($updateUser) ? $updateUser->getFullName() : "unknown user id '".$r["userID"]."'")."
    ".$r["comment"]."".getReviewStatusText($r["status"])."
    \n"; - $this->contentSubHeading(getMLText("approvers")); - print "
    ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
    ".$reqName."
    • ".$a["date"]."
    • "; - $updateUser = $dms->getUser($a["userID"]); - print "
    • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()) : "unknown user id '".$a["userID"]."'")."
    ".$a["comment"]."".getApprovalStatusText($a["status"])."
    \n"; - - $this->contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.DropFolderChooser.php b/views/blue/class.DropFolderChooser.php deleted file mode 100644 index 295a10e14..000000000 --- a/views/blue/class.DropFolderChooser.php +++ /dev/null @@ -1,75 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for CategoryChooser view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_DropFolderChooser extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $dropfolderfile = $this->params['dropfolderfile']; - $form = $this->params['form']; - $dropfolderdir = $this->params['dropfolderdir']; - - $this->htmlStartPage(getMLText("choose_target_file")); - $this->globalBanner(); - $this->pageNavigation(getMLText("choose_target_file")); -?> - - -contentContainerStart(); - - $dir = $dropfolderdir.'/'.$user->getLogin(); - /* Check if we are still looking in the configured directory and - * not somewhere else, e.g. if the login was '../test' - */ - if(dirname($dir) == $dropfolderdir) { - if(is_dir($dir)) { - $d = dir($dir); - echo "\n"; - while (false !== ($entry = $d->read())) { - if($entry != '..' && $entry != '.') { - if(!is_dir($entry)) { - echo "\n"; - } - } - } - echo "
    ".$entry."".SeedDMS_Core_File::format_filesize(filesize($dir.'/'.$entry))."
    \n"; - } - } - - $this->contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.EditAttributes.php b/views/blue/class.EditAttributes.php deleted file mode 100644 index a2075bc69..000000000 --- a/views/blue/class.EditAttributes.php +++ /dev/null @@ -1,76 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for EditAttributes view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_EditAttributes extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - $version = $this->params['version']; - $attrdefs = $this->params['attrdefs']; - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); - - $this->contentHeading(getMLText("edit_attributes")); - $this->contentContainerStart(); -?> -
    - - - - - - - - - - - - - -
    getName()); ?>printAttributeEditField($attrdef, $version->getAttributeValue($attrdef)) ?>

    ">
    -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.EditComment.php b/views/blue/class.EditComment.php deleted file mode 100644 index 60a77f5ad..000000000 --- a/views/blue/class.EditComment.php +++ /dev/null @@ -1,90 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for EditComment view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_EditComment extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - $version = $this->params['version']; - $strictformcheck = $this->params['strictformcheck']; - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); - -?> - - -contentHeading(getMLText("edit_comment")); - $this->contentContainerStart(); -?> -
    - - - - - - - - - - - -
    :

    ">
    -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.EditDocument.php b/views/blue/class.EditDocument.php deleted file mode 100644 index c0058739b..000000000 --- a/views/blue/class.EditDocument.php +++ /dev/null @@ -1,132 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for EditDocument view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_EditDocument extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - $attrdefs = $this->params['attrdefs']; - $strictformcheck = $this->params['strictformcheck']; - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); - -?> - - -contentHeading(getMLText("edit_document_props")); - $this->contentContainerStart(); -?> -
    - - - - - - - - - - - - - - - - - - -getAccessMode($user) > M_READ) { - print ""; - print ""; - print ""; - } - if($attrdefs) { - foreach($attrdefs as $attrdef) { -?> - - - - - - - - -
    :
    :
    : -
    - - -
    :printCategoryChooser("form1", $document->getCategories());?>
    " . getMLText("sequence") . ":"; - $this->printSequenceChooser($folder->getDocuments(), $document->getID()); - print "
    getName()); ?>printAttributeEditField($attrdef, $document->getAttributeValue($attrdef)) ?>

    ">
    -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.EditEvent.php b/views/blue/class.EditEvent.php deleted file mode 100644 index a5b13c8a0..000000000 --- a/views/blue/class.EditEvent.php +++ /dev/null @@ -1,101 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for EditEvent view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_EditEvent extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $event = $this->params['event']; - $strictformcheck = $this->params['strictformcheck']; - - $this->htmlStartPage(getMLText("calendar")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("calendar"), "calendar"); - - $this->contentHeading(getMLText("edit_event")); - $this->contentContainerStart(); -?> - - -
    - - - "> - - - - - - - - - - - - - - - - - - - - - -
    :printDateChooser($event["start"], "from");?>
    :printDateChooser($event["stop"], "to");?>
    :" size="60">
    :

    ">
    -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.EditFolder.php b/views/blue/class.EditFolder.php deleted file mode 100644 index 142389903..000000000 --- a/views/blue/class.EditFolder.php +++ /dev/null @@ -1,116 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for EditFolder view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_EditFolder extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $attrdefs = $this->params['attrdefs']; - $rootfolderid = $this->params['rootfolderid']; - $strictformcheck = $this->params['strictformcheck']; - - $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true), "view_folder", $folder); -?> - - - -contentHeading(getMLText("edit_folder_props")); - $this->contentContainerStart(); -?> -
    - - - - - - - - - - - -getID() == $rootfolderid) ? false : $folder->getParent(); - if ($parent && $parent->getAccessMode($user) > M_READ) { - print ""; - print ""; - print "\n"; - } - - if($attrdefs) { - foreach($attrdefs as $attrdef) { -?> - - - - - - - - -
    :
    :
    " . getMLText("sequence") . ":"; - $this->printSequenceChooser($parent->getSubFolders(), $folder->getID()); - print "
    getName()); ?>printAttributeEditField($attrdef, $folder->getAttributeValue($attrdef)) ?>
    ">
    -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.EditUserData.php b/views/blue/class.EditUserData.php deleted file mode 100644 index 8118cdf45..000000000 --- a/views/blue/class.EditUserData.php +++ /dev/null @@ -1,153 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for EditUserData view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_EditUserData extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $enableuserimage = $this->params['enableuserimage']; - $passwordstrength = $this->params['passwordstrength']; - $httproot = $this->params['httproot']; - - $this->htmlStartPage(getMLText("edit_user_details")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("my_account"), "my_account"); - -?> - - - -contentHeading(getMLText("edit_user_details")); - $this->contentContainerStart(); -?> -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :
    :
     
    :
    :
    :
    :
    : -hasImage()) - print ""; - else printMLText("no_user_image"); -?> -
    :
    : - -
    : - -
    ">
    -
    - -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.ErrorDlg.php b/views/blue/class.ErrorDlg.php deleted file mode 100644 index 5956a3b9e..000000000 --- a/views/blue/class.ErrorDlg.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for ErrorDlg view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_ErrorDlg extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - - } /* }}} */ -} -?> diff --git a/views/blue/class.FolderAccess.php b/views/blue/class.FolderAccess.php deleted file mode 100644 index 92d746c52..000000000 --- a/views/blue/class.FolderAccess.php +++ /dev/null @@ -1,275 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for FolderAccess view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_FolderAccess extends SeedDMS_Blue_Style { - function printAccessModeSelection($defMode) { /* {{{ */ - print "\n"; - } /* }}} */ - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $allUsers = $this->params['allusers']; - $allGroups = $this->params['allgroups']; - $rootfolderid = $this->params['rootfolderid']; - - $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true), "view_folder", $folder); -?> - - - -contentHeading(getMLText("edit_folder_access")); - $this->contentContainerStart(); - - if ($user->isAdmin()) { - - $this->contentSubHeading(getMLText("set_owner")); -?> -
    - - - - : - "> -
    - getID() != $rootfolderid && $folder->getParent()){ - - $this->contentSubHeading(getMLText("access_inheritance")); - - if ($folder->inheritsAccess()) { - printMLText("inherits_access_msg"); -?> -

    -

    - - - - - "> -
    -
    - - - - - "> -
    -

    -contentContainerEnd(); - $this->htmlEndPage(); - return; - } -?> -
    - - - - "> -
    -getAccessList(); - - $this->contentSubHeading(getMLText("default_access")); -?> -
    - - - - printAccessModeSelection($folder->getDefaultAccess()); ?> - "> -
    - -contentSubHeading(getMLText("edit_existing_access")); - - if ((count($accessList["users"]) != 0) || (count($accessList["groups"]) != 0)) { - - print ""; - - foreach ($accessList["users"] as $userAccess) { - $userObj = $userAccess->getUser(); - print "\n"; - print "\n"; - print "\n"; - print "\n"; - echo createHiddenFieldWithKey('folderaccess')."\n"; - print "getID()."\">\n"; - print "\n"; - print "getID()."\">\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - } - - foreach ($accessList["groups"] as $groupAccess) { - $groupObj = $groupAccess->getGroup(); - $mode = $groupAccess->getMode(); - print ""; - print ""; - print ""; - print ""; - echo createHiddenFieldWithKey('folderaccess')."\n"; - print "getID()."\">"; - print ""; - print "getID()."\">"; - print "\n"; - print "\n"; - print ""; - print "\n"; - print "\n"; - print ""; - print "\n"; - } - - print "
    ". htmlspecialchars($userObj->getFullName()) . "
    \n"; - $this->printAccessModeSelection($userAccess->getMode()); - print "\n"; - print "".getMLText("save")." "; - print "\n"; - print "
    \n"; - echo createHiddenFieldWithKey('folderaccess')."\n"; - print "getID()."\">\n"; - print "\n"; - print "getID()."\">\n"; - print "".getMLText("delete")." "; - print "
    \n"; - print "
    ". htmlspecialchars($groupObj->getName()) . "
    "; - $this->printAccessModeSelection($groupAccess->getMode()); - print "\n"; - print "".getMLText("save")." "; - print "
    \n"; - echo createHiddenFieldWithKey('folderaccess')."\n"; - print "getID()."\">\n"; - print "\n"; - print "getID()."\">\n"; - print "".getMLText("delete")." "; - print "

    "; - } -?> -
    - - - - - - - - - - - - - - - - - - - -
    : - -
    : - -
    : -printAccessModeSelection(M_READ); -?> -
    ">
    -
    - -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.FolderChooser.php b/views/blue/class.FolderChooser.php deleted file mode 100644 index d37073368..000000000 --- a/views/blue/class.FolderChooser.php +++ /dev/null @@ -1,82 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for FolderChooser view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_FolderChooser extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $mode = $this->params['mode']; - $exclude = $this->params['exclude']; - $form = $this->params['form']; - $rootfolderid = $this->params['rootfolderid']; - - $this->htmlStartPage(getMLText("choose_target_folder")); - $this->globalBanner(); - $this->pageNavigation(getMLText("choose_target_folder")); -?> - - - - -contentContainerStart(); - $this->printFoldersTree($mode, $exclude, $rootfolderid); - $this->contentContainerEnd(); -?> - - - - -htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.FolderNotify.php b/views/blue/class.FolderNotify.php deleted file mode 100644 index 9ce2da441..000000000 --- a/views/blue/class.FolderNotify.php +++ /dev/null @@ -1,171 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for FolderNotify view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_FolderNotify extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $allUsers = $this->params['allusers']; - $allGroups = $this->params['allgroups']; - $strictformcheck = $this->params['strictformcheck']; - - $notifyList = $folder->getNotifyList(); - - $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true), "view_folder", $folder); - -?> - - - -contentHeading(getMLText("edit_existing_notify")); - $this->contentContainerStart(); - - $userNotifyIDs = array(); - $groupNotifyIDs = array(); - - print "\n"; - if (empty($notifyList["users"]) && empty($notifyList["groups"])) { - print ""; - } - else { - foreach ($notifyList["users"] as $userNotify) { - print ""; - print ""; - print ""; - if ($user->isAdmin() || $user->getID() == $userNotify->getID()) { - print ""; - }else print ""; - print ""; - $userNotifyIDs[] = $userNotify->getID(); - } - - foreach ($notifyList["groups"] as $groupNotify) { - print ""; - print ""; - print ""; - if ($user->isAdmin() || $groupNotify->isMember($user,true)) { - print ""; - }else print ""; - print ""; - $groupNotifyIDs[] = $groupNotify->getID(); - } - } - print "
    ".getMLText("empty_notify_list")."
    " . htmlspecialchars($userNotify->getFullName()) . ""; - print "
    \n"; - echo createHiddenFieldWithKey('foldernotify')."\n"; - print "getID()."\">\n"; - print "\n"; - print "getID()."\">\n"; - print "".getMLText("delete")." "; - print "
    \n"; - print "
    " . htmlspecialchars($groupNotify->getName()) . ""; - print "
    \n"; - echo createHiddenFieldWithKey('foldernotify')."\n"; - print "getID()."\">\n"; - print "\n"; - print "getID()."\">\n"; - print "".getMLText("delete")." "; - print "
    \n"; - print "
    \n"; - -?> -
    -
    - - - - - - - - - - - - - - - -
    : - -
    : - -
    ">
    -
    - -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.ForcePasswordChange.php b/views/blue/class.ForcePasswordChange.php deleted file mode 100644 index eefca407c..000000000 --- a/views/blue/class.ForcePasswordChange.php +++ /dev/null @@ -1,78 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for ForcePasswordChange view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_ForcePasswordChange extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $passwordstrength = $this->params['passwordstrength']; - - $this->htmlStartPage(getMLText("sign_in"), "login"); - $this->globalBanner(); - echo "

    ".getMLText('password_expiration')."

    "; - echo "

    ".getMLText('password_expiration_text')."

    "; - $this->contentContainerStart(); -?> -
    - - - - - - - - - - - - - - - - -
    :
    :
     
    :
    ">
    - - - -
    - -contentContainerEnd(); - $tmpfoot = array(); - $tmpfoot[] = "" . getMLText("logout") . "\n"; - print "

    "; - print implode(' | ', $tmpfoot); - print "

    \n"; - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.GroupMgr.php b/views/blue/class.GroupMgr.php deleted file mode 100644 index adcd7d287..000000000 --- a/views/blue/class.GroupMgr.php +++ /dev/null @@ -1,243 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for GroupMgr view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_GroupMgr extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $selgroup = $this->params['selgroup']; - $allUsers = $this->params['allusers']; - $allGroups = $this->params['allgroups']; - $strictformcheck = $this->params['strictformcheck']; - - $this->htmlStartPage(getMLText("admin_tools")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); - -?> - -contentHeading(getMLText("group_management")); - $this->contentContainerStart(); -?> - - - - - - - -getID()."\" style=\"display : none;\">"; - $this->contentSubHeading(getMLText("group")." : ".htmlspecialchars($group->getName())); -?> - - contentSubHeading(getMLText("edit_group"));?> - - - - -
    - -: -   -
    - - - - - - - - - - - -
    :
    :
    ">
    - -contentSubHeading(getMLText("group_members")); -?> - -getUsers(); - if (count($members) == 0) - print ""; - else { - - foreach ($members as $member) { - - print ""; - print ""; - print ""; - print ""; - print ""; - } - } -?> -
    ".getMLText("no_group_members")."
    " . htmlspecialchars($member->getFullName()) . "" . ($group->isMember($member,true)?getMLText("manager"):" ") . "
      "; - print "
    • getID()."\" />getID()."\" />".createHiddenFieldWithKey('rmmember')."
      "; - print "
    • getID()."\" />getID()."\" />".createHiddenFieldWithKey('tmanager')."
      "; - print "
    - -contentSubHeading(getMLText("add_member")); -?> - -
    - - - - - - - - - -
    - - - - - "> -
    -
    - - - - - - - - -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.GroupView.php b/views/blue/class.GroupView.php deleted file mode 100644 index ed3c3cd76..000000000 --- a/views/blue/class.GroupView.php +++ /dev/null @@ -1,103 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for GroupView view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_GroupView extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $allGroups = $this->params['allgroups']; - $allUsers = $this->params['allusers']; - - $this->htmlStartPage(getMLText("my_account")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("my_account"), "my_account"); - - $this->contentHeading(getMLText("groups")); - $this->contentContainerStart(); - - echo "
      \n"; - - foreach ($allGroups as $group){ - - $members = $group->getUsers(); - $managers = $group->getManagers(); - $ismanager = false; /* set to true if current user is manager */ - - echo "
    • ".htmlspecialchars($group->getName()); - if($group->getComment()) - echo " : ".htmlspecialchars($group->getComment()); - foreach($managers as $manager) - if($manager->getId() == $user->getId()) { - echo " : ".getMLText("manager_of_group"); - $ismanager = true; - } - echo "
    • "; - - echo "
        \n"; - $memberids = array(); - foreach ($members as $member) { - $memberids[] = $member->getId(); - - echo "
      • ".htmlspecialchars($member->getFullName()); - if ($member->getEmail()!="") - echo " (getEmail())."\">".htmlspecialchars($member->getEmail()).")"; - foreach($managers as $manager) - if($manager->getId() == $member->getId()) - echo ", ".getMLText("manager"); - if($ismanager) { - echo ' '.getMLText("rm_user").''; - } - echo "
      • "; - } - if($ismanager) { - echo "
      • ".getMLText("add_user_to_group").":"; - echo "
        "; - echo "getId()."\" />"; - echo ""; - echo "
        "; - echo "
      • "; - } - echo "
      \n"; - } - echo "
    \n"; - - $this->contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.Help.php b/views/blue/class.Help.php deleted file mode 100644 index 232607c57..000000000 --- a/views/blue/class.Help.php +++ /dev/null @@ -1,50 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for Help view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_Help extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - - $this->htmlStartPage(getMLText("help")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("help"), ""); - - $this->contentContainerStart(); - - readfile("../languages/".$user->getLanguage()."/help.htm"); - - $this->contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.IndexInfo.php b/views/blue/class.IndexInfo.php deleted file mode 100644 index 0350105a5..000000000 --- a/views/blue/class.IndexInfo.php +++ /dev/null @@ -1,68 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for IndexInfo view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_IndexInfo extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $luceneclassdir = $this->params['luceneclassdir']; - $lucenedir = $this->params['lucenedir']; - $index = $this->params['index']; - - $this->htmlStartPage(getMLText('fulltext_info')); - $this->globalNavigation(); - $this->pageNavigation(getMLText('fulltext_info')); - $this->contentContainerStart(); - - $numDocs = $index->count(); - echo "
    ";
    -		for ($id = 0; $id < $numDocs; $id++) {
    -			if (!$index->isDeleted($id)) {
    -				$hit = $index->getDocument($id);
    -				echo $hit->document_id.": ".htmlspecialchars($hit->title)."\n";
    -			}
    -		}
    -		echo "
    "; - - $terms = $index->terms(); - echo "

    ".count($terms)." Terms

    "; - echo "
    ";
    -		foreach($terms as $term) {
    -			echo htmlspecialchars($term->field).":".htmlspecialchars($term->text)."\n";
    -		}
    -		echo "
    "; - - $this->contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.Indexer.php b/views/blue/class.Indexer.php deleted file mode 100644 index f65836f16..000000000 --- a/views/blue/class.Indexer.php +++ /dev/null @@ -1,97 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for Indexer view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_Indexer extends SeedDMS_Blue_Style { - - function tree($dms, $index, $folder, $indent='') { /* {{{ */ - echo $indent."D ".htmlspecialchars($folder->getName())."\n"; - $subfolders = $folder->getSubFolders(); - foreach($subfolders as $subfolder) { - $this->tree($dms, $index, $subfolder, $indent.' '); - } - $documents = $folder->getDocuments(); - foreach($documents as $document) { - echo $indent." ".$document->getId().":".htmlspecialchars($document->getName())." "; - /* If the document wasn't indexed before then just add it */ - if(!($hits = $index->find('document_id:'.$document->getId()))) { - $index->addDocument(new SeedDMS_Lucene_IndexedDocument($dms, $document, $this->converters ? $this->converters : null)); - echo "(document added)"; - } else { - $hit = $hits[0]; - /* Check if the attribute created is set or has a value older - * than the lasted 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'); - } catch (Zend_Search_Lucene_Exception $e) { - $created = 0; - } - $content = $document->getLatestContent(); - if($created >= $content->getDate()) { - echo $indent."(document unchanged)"; - } else { - if($index->delete($hit->id)) { - $index->addDocument(new SeedDMS_Lucene_IndexedDocument($dms, $document, $this->converters ? $this->converters : null)); - } - echo $indent."(document updated)"; - } - } - echo "\n"; - } - } /* }}} */ - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $index = $this->params['index']; - $recreate = $this->params['recreate']; - $folder = $this->params['folder']; - $this->converters = $this->params['converters']; - - $this->htmlStartPage(getMLText("admin_tools")); - $this->globalNavigation(); - $this->pageNavigation(getMLText('admin_tools'), 'admin_tools'); - $this->contentHeading(getMLText("update_fulltext_index")); - $this->contentContainerStart(); - - echo "
    ";
    -		$this->tree($dms, $index, $folder);
    -		echo "
    "; - - $index->commit(); - - $this->contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.Info.php b/views/blue/class.Info.php deleted file mode 100644 index ee4150009..000000000 --- a/views/blue/class.Info.php +++ /dev/null @@ -1,45 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for Info view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_Info extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $version = $this->params['version']; - - $this->htmlStartPage($version->banner()); - $this->globalNavigation(); - $this->pageNavigation($version->banner()); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.KeywordChooser.php b/views/blue/class.KeywordChooser.php deleted file mode 100644 index 126e9d4b9..000000000 --- a/views/blue/class.KeywordChooser.php +++ /dev/null @@ -1,220 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for KeywordChooser view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_KeywordChooser extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $categories = $this->params['categories']; - $target = $this->params['form']; - - $this->htmlStartPage(getMLText("use_default_keywords")); -?> - - -
    -contentHeading(getMLText("use_default_keywords")); - $this->contentContainerStart(); -?> - - - - - - - - - - - - - - - - - -getOwner(); - if (!$owner->isAdmin()) - continue; -?> - - - - - - - - - - - - -getOwner(); - if ($owner->isAdmin()) - continue; -?> - - - - - - - - - - - -
    :

    : - -

    : - -

    -
    - ">    - "> -
    - -contentContainerEnd(); -?> - -htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.LogManagement.php b/views/blue/class.LogManagement.php deleted file mode 100644 index f22dcad5c..000000000 --- a/views/blue/class.LogManagement.php +++ /dev/null @@ -1,113 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for LogManagement view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_LogManagement extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $contentdir = $this->params['contentdir']; - $logname = $this->params['logname']; - - $this->htmlStartPage(getMLText("backup_tools")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); - - $this->contentHeading(getMLText("log_management")); - $this->contentContainerStart(); - - $print_header=true; - - $handle = opendir($contentdir); - $entries = array(); - while ($e = readdir($handle)){ - if (is_dir($contentdir.$e)) continue; - if (strpos($e,".log")==FALSE) continue; - if (strcmp($e,"current.log")==0) continue; - $entries[] = $e; - } - closedir($handle); - - sort($entries); - $entries = array_reverse($entries); - - foreach ($entries as $entry){ - - if ($print_header){ - print "\n"; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - $print_header=false; - } - - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - } - - if ($print_header) printMLText("empty_notify_list"); - else print "
    ".getMLText("name")."".getMLText("creation_date")."".getMLText("file_size")."
    ".$entry."".getLongReadableDate(filectime($contentdir.$entry))."".formatted_size(filesize($contentdir.$entry))."
    \n"; - - $this->contentContainerEnd(); - - if ($logname && file_exists($contentdir.$logname)){ - - $this->contentHeading(" "); - $this->contentContainerStart(); - - $this->contentSubHeading(sanitizeString($logname)); - - echo "
    "; - echo "
    \n";
    -			readfile($contentdir.$logname);
    -			echo "
    \n"; - echo "
    "; - - $this->contentContainerEnd(); - } - - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.Login.php b/views/blue/class.Login.php deleted file mode 100644 index 91527a986..000000000 --- a/views/blue/class.Login.php +++ /dev/null @@ -1,137 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for Login view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_Login extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $enableguestlogin = $this->params['enableguestlogin']; - $enablepasswordforgotten = $this->params['enablepasswordforgotten']; - $refer = $this->params['referrer']; - $themes = $this->params['themes']; - - $this->htmlStartPage(getMLText("sign_in"), "login"); - $this->globalBanner(); - $this->pageNavigation(getMLText("sign_in")); -?> - -contentContainerStart(); ?> -
    -"; - } -?> - - - - - - - - - - - - - - - - - - - - -
    -"; - print ""; - } - print ""; -?> -
    -"; - print "
    ">
    -
    -contentContainerEnd(); - $tmpfoot = array(); - if ($enableguestlogin) - $tmpfoot[] = "" . getMLText("guest_login") . "\n"; - if ($enablepasswordforgotten) - $tmpfoot[] = "" . getMLText("password_forgotten") . "\n"; - if($tmpfoot) { - print "

    "; - print implode(' | ', $tmpfoot); - print "

    \n"; - } -?> - -htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.ManageNotify.php b/views/blue/class.ManageNotify.php deleted file mode 100644 index d2dcc5ed5..000000000 --- a/views/blue/class.ManageNotify.php +++ /dev/null @@ -1,195 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for ManageNotify view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_ManageNotify extends SeedDMS_Blue_Style { - - // Get list of subscriptions for documents or folders for user or groups - function getNotificationList($as_group, $folders) { /* {{{ */ - - // First, get the list of groups of which the user is a member. - if ($as_group){ - - $groups = $this->user->getGroups(); - - if (count($groups)==0) return NULL; - - $grpList = ""; - foreach ($groups as $group) { - $grpList .= (strlen($grpList)==0 ? "" : ", ") . $group->getID(); - } - - $queryStr = "SELECT `tblNotify`.* FROM `tblNotify` ". - "WHERE `tblNotify`.`groupID` IN (". $grpList .")"; - - } else { - $queryStr = "SELECT `tblNotify`.* FROM `tblNotify` ". - "WHERE `tblNotify`.`userID` = '". $this->user->getID()."'" ; - } - - $resArr = $this->db->getResultArray($queryStr); - - $ret=array(); - - foreach ($resArr as $res){ - - if (($res["targetType"] == T_DOCUMENT)&&(!$folders)) $ret[]=$res["target"]; - if (($res["targetType"] == T_FOLDER)&&($folders)) $ret[]=$res["target"]; - } - - return $ret; - } /* }}} */ - - function printFolderNotificationList($ret,$deleteaction=true) { /* {{{ */ - if (count($ret)==0) { - printMLText("empty_notify_list"); - } - else { - - print ""; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n"; - foreach($ret as $ID) { - $fld = $this->dms->getFolder($ID); - if (is_object($fld)) { - $owner = $fld->getOwner(); - print ""; - print ""; - print "\n"; - print ""; - print ""; - } - } - print "
    ".getMLText("name")."".getMLText("owner")."".getMLText("actions")."
    " . htmlspecialchars($fld->getName()) . "".htmlspecialchars($owner->getFullName())."
    "; - } - } /* }}} */ - - function printDocumentNotificationList($ret,$deleteaction=true) { /* {{{ */ - - if (count($ret)==0) { - printMLText("empty_notify_list"); - } - else { - print ""; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n"; - foreach ($ret as $ID) { - $doc = $this->dms->getDocument($ID); - if (is_object($doc)) { - $owner = $doc->getOwner(); - $latest = $doc->getLatestContent(); - $status = $latest->getStatus(); - print "\n"; - print ""; - print "\n"; - print ""; - print ""; - print ""; - print "\n"; - } - } - print "
    ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("actions")."
    " . htmlspecialchars($doc->getName()) . "".htmlspecialchars($owner->getFullName())."".getOverallStatusText($status["status"])."".$latest->getVersion()."
    "; - } - } /* }}} */ - - function show() { /* {{{ */ - $this->dms = $this->params['dms']; - $this->user = $this->params['user']; - $this->db = $this->dms->getDB(); - - $this->htmlStartPage(getMLText("my_account")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("my_account"), "my_account"); - - $this->contentHeading(getMLText("edit_existing_notify")); - $this->contentContainerStart(); - - print "
    "; - $this->contentSubHeading(getMLText("choose_target_folder")); - $this->printFolderChooser("form1",M_READ); - print ""; - print getMLText("include_subdirectories"); - print ""; - print getMLText("include_documents"); - print "  "; - print "
    "; - - print "
    "; - $this->contentSubHeading(getMLText("choose_target_document")); - $this->printDocumentChooser("form2"); - print "  "; - print "
    "; - - $this->contentContainerEnd(); - - - // - // Display the results. - // - $this->contentHeading(getMLText("edit_folder_notify")); - $this->contentContainerStart(); - $this->contentSubHeading(getMLText("user")); - $ret=$this->getNotificationList(false,true); - $this->printFolderNotificationList($ret); - $this->contentSubHeading(getMLText("group")); - $ret=$this->getNotificationList(true,true); - $this->printFolderNotificationList($ret,false); - $this->contentContainerEnd(); - - $this->contentHeading(getMLText("edit_document_notify")); - $this->contentContainerStart(); - $this->contentSubHeading(getMLText("user")); - $ret=$this->getNotificationList(false,false); - $this->printDocumentNotificationList($ret); - $this->contentSubHeading(getMLText("group")); - $ret=$this->getNotificationList(true,false); - $this->printDocumentNotificationList($ret,false); - $this->contentContainerEnd(); - - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.MoveDocument.php b/views/blue/class.MoveDocument.php deleted file mode 100644 index b3bcb5124..000000000 --- a/views/blue/class.MoveDocument.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for MoveDocument view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_MoveDocument extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); - $this->contentHeading(getMLText("move_document")); - $this->contentContainerStart(); -?> -
    - - - - - - - - - -
    :printFolderChooser("form1", M_READWRITE);?>

    ">
    -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.MoveFolder.php b/views/blue/class.MoveFolder.php deleted file mode 100644 index b71521875..000000000 --- a/views/blue/class.MoveFolder.php +++ /dev/null @@ -1,66 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for MoveFolder view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_MoveFolder extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - - $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true), "view_folder", $folder); - $this->contentHeading(getMLText("move_folder")); - $this->contentContainerStart(); - -?> -
    - - - - - - - - - - -
    :printFolderChooser("form1", M_READWRITE, $folder->getID());?>
    ">
    -
    - - -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.MyAccount.php b/views/blue/class.MyAccount.php deleted file mode 100644 index f49ebdb4b..000000000 --- a/views/blue/class.MyAccount.php +++ /dev/null @@ -1,89 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for MyAccount view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_MyAccount extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $enableuserimage = $this->params['enableuserimage']; - $passwordexpiration = $this->params['passwordexpiration']; - $httproot = $this->params['httproot']; - - $this->htmlStartPage(getMLText("my_account")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("my_account"), "my_account"); - - $this->contentHeading(getMLText("user_info")); - $this->contentContainerStart(); - - print "\n"; - - if ($enableuserimage){ - print "\n"; - print "\n"; - print "\n"; - } - - print "\n"; - print "\n"; - print "\n"; - print "\n\n"; - print "\n"; - print "\n"; - print "\n\n"; - print "\n"; - print "\n"; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - if($passwordexpiration > 0) { - print "\n"; - print "\n"; - print "\n"; - print "\n"; - } - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
    ".($user->hasImage() ? "" : getMLText("no_user_image"))."
    ".getMLText("name")." : ".htmlspecialchars($user->getFullName()).($user->isAdmin() ? " (".getMLText("admin").")" : "")."
    ".getMLText("user_login")." : ".$user->getLogin()."
    ".getMLText("email")." : ".htmlspecialchars($user->getEmail())."
    ".getMLText("comment")." : ".htmlspecialchars($user->getComment())."
    ".getMLText("password_expiration")." : ".htmlspecialchars($user->getPwdExpiration())."
    ".getMLText("quota")." : ".SeedDMS_Core_File::format_filesize($user->getQuota())."
    ".getMLText("used_discspace")." : ".SeedDMS_Core_File::format_filesize($user->getUsedDiskSpace())."
    \n"; - - $this->contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.MyDocuments.php b/views/blue/class.MyDocuments.php deleted file mode 100644 index 2cb06a3ac..000000000 --- a/views/blue/class.MyDocuments.php +++ /dev/null @@ -1,489 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for MyDocuments view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_MyDocuments extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $orderby = $this->params['orderby']; - $showInProcess = $this->params['showinprocess']; - - $db = $dms->getDB(); - - $this->htmlStartPage(getMLText("my_documents")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("my_documents"), "my_documents"); - - if ($showInProcess){ - - if (!$db->createTemporaryTable("ttstatid") || !$db->createTemporaryTable("ttcontentid")) { - $this->contentHeading(getMLText("warning")); - $this->contentContainer(getMLText("internal_error_exit")); - $this->htmlEndPage(); - exit; - } - - // Get document list for the current user. - $reviewStatus = $user->getReviewStatus(); - $approvalStatus = $user->getApprovalStatus(); - - // Create a comma separated list of all the documentIDs whose information is - // required. - $dList = array(); - foreach ($reviewStatus["indstatus"] as $st) { - if (!in_array($st["documentID"], $dList)) { - $dList[] = $st["documentID"]; - } - } - foreach ($reviewStatus["grpstatus"] as $st) { - if (!in_array($st["documentID"], $dList)) { - $dList[] = $st["documentID"]; - } - } - foreach ($approvalStatus["indstatus"] as $st) { - if (!in_array($st["documentID"], $dList)) { - $dList[] = $st["documentID"]; - } - } - foreach ($approvalStatus["grpstatus"] as $st) { - if (!in_array($st["documentID"], $dList)) { - $dList[] = $st["documentID"]; - } - } - $docCSV = ""; - foreach ($dList as $d) { - $docCSV .= (strlen($docCSV)==0 ? "" : ", ")."'".$d."'"; - } - - if (strlen($docCSV)>0) { - // Get the document information. - $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". - "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". - "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". - "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". - "FROM `tblDocumentContent` ". - "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". - "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". - "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". - "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". - "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". - "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". - "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". - "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". - "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". - "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` ". - "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.", ".S_EXPIRED.") ". - "AND `tblDocuments`.`id` IN (" . $docCSV . ") ". - "ORDER BY `statusDate` DESC"; - - $resArr = $db->getResultArray($queryStr); - if (is_bool($resArr) && !$resArr) { - $this->contentHeading(getMLText("warning")); - $this->contentContainer(getMLText("internal_error_exit")); - $this->htmlEndPage(); - exit; - } - - // Create an array to hold all of these results, and index the array by - // document id. This makes it easier to retrieve document ID information - // later on and saves us having to repeatedly poll the database every time - // new document information is required. - $docIdx = array(); - foreach ($resArr as $res) { - - // verify expiry - if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ - if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ - $res["status"]=S_EXPIRED; - } - } - - $docIdx[$res["id"]][$res["version"]] = $res; - } - - // List the documents where a review has been requested. - $this->contentHeading(getMLText("documents_to_review")); - $this->contentContainerStart(); - $printheader=true; - $iRev = array(); - $dList = array(); - foreach ($reviewStatus["indstatus"] as $st) { - - if ( $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && !in_array($st["documentID"], $dList) ) { - $dList[] = $st["documentID"]; - - if ($printheader){ - print ""; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - $printheader=false; - } - - print "\n"; - print ""; - print ""; - print ""; - print ""; - print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; - print "\n"; - } - } - foreach ($reviewStatus["grpstatus"] as $st) { - - if (!in_array($st["documentID"], $iRev) && $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && !in_array($st["documentID"], $dList) && $docIdx[$st["documentID"]][$st["version"]]['owner'] != $user->getId()) { - $dList[] = $st["documentID"]; - - if ($printheader){ - print "
    ".getMLText("name")."".getMLText("owner")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    ".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) ."
    "; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - $printheader=false; - } - - print "\n"; - print ""; - print ""; - print ""; - print ""; - print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; - print "\n"; - } - } - if (!$printheader){ - echo "\n
    ".getMLText("name")."".getMLText("owner")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    ".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."
    "; - }else{ - printMLText("no_docs_to_review"); - } - $this->contentContainerEnd(); - - // List the documents where an approval has been requested. - $this->contentHeading(getMLText("documents_to_approve")); - $this->contentContainerStart(); - $printheader=true; - - foreach ($approvalStatus["indstatus"] as $st) { - - if ( $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]])) { - - if ($printheader){ - print ""; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - $printheader=false; - } - print "\n"; - print ""; - print ""; - print ""; - print ""; - print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; - print "\n"; - } - } - foreach ($approvalStatus["grpstatus"] as $st) { - - if (!in_array($st["documentID"], $iRev) && $st["status"]==0 && isset($docIdx[$st["documentID"]][$st["version"]]) && $docIdx[$st["documentID"]][$st["version"]]['owner'] != $user->getId()) { - if ($printheader){ - print "
    ".getMLText("name")."".getMLText("owner")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    ".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."
    "; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - $printheader=false; - } - print "\n"; - print ""; - print ""; - print ""; - print ""; - print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; - print "\n"; - } - } - if (!$printheader){ - echo "\n
    ".getMLText("name")."".getMLText("owner")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    ".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."
    \n"; - }else{ - printMLText("no_docs_to_approve"); - } - $this->contentContainerEnd(); - } - else { - - $this->contentHeading(getMLText("documents_to_review")); - $this->contentContainerStart(); - printMLText("no_review_needed"); - $this->contentContainerEnd(); - $this->contentHeading(getMLText("documents_to_approve")); - $this->contentContainerStart(); - printMLText("no_approval_needed"); - $this->contentContainerEnd(); - } - - // Get list of documents owned by current user that are pending review or - // pending approval. - $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". - "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". - "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". - "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". - "FROM `tblDocumentContent` ". - "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". - "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". - "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". - "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". - "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". - "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". - "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". - "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". - "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". - "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` ". - "AND `tblDocuments`.`owner` = '".$user->getID()."' ". - "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.") ". - "ORDER BY `statusDate` DESC"; - - $resArr = $db->getResultArray($queryStr); - if (is_bool($resArr) && !$resArr) { - $this->contentHeading(getMLText("warning")); - $this->contentContainer("Internal error. Unable to complete request. Exiting."); - $this->htmlEndPage(); - exit; - } - - $this->contentHeading(getMLText("documents_user_requiring_attention")); - $this->contentContainerStart(); - if (count($resArr)>0) { - - print ""; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - - foreach ($resArr as $res) { - - // verify expiry - if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ - if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ - $res["status"]=S_EXPIRED; - } - } - - print "\n"; - print "\n"; - print ""; - print ""; - print ""; - print ""; - print "\n"; - } - print "
    ".getMLText("name")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    " . htmlspecialchars($res["name"]) . "".getOverallStatusText($res["status"])."".$res["version"]."".$res["statusDate"]." ".htmlspecialchars($res["statusName"])."".(!$res["expires"] ? "-":getReadableDate($res["expires"]))."
    "; - - } - else printMLText("no_docs_to_look_at"); - - $this->contentContainerEnd(); - - - // Get list of documents locked by current user - $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". - "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". - "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". - "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". - "FROM `tblDocumentContent` ". - "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". - "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". - "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". - "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". - "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". - "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". - "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". - "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". - "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". - "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` ". - "AND `tblDocumentLocks`.`userID` = '".$user->getID()."' ". - "ORDER BY `statusDate` DESC"; - - $resArr = $db->getResultArray($queryStr); - if (is_bool($resArr) && !$resArr) { - $this->contentHeading(getMLText("warning")); - $this->contentContainer("Internal error. Unable to complete request. Exiting."); - $this->htmlEndPage(); - exit; - } - - $this->contentHeading(getMLText("documents_locked_by_you")); - $this->contentContainerStart(); - if (count($resArr)>0) { - - print ""; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - - foreach ($resArr as $res) { - - // verify expiry - if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ - if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ - $res["status"]=S_EXPIRED; - } - } - - print "\n"; - print "\n"; - print ""; - print ""; - print ""; - print ""; - print "\n"; - } - print "
    ".getMLText("name")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    " . htmlspecialchars($res["name"]) . "".getOverallStatusText($res["status"])."".$res["version"]."".$res["statusDate"]." ".htmlspecialchars($res["statusName"])."".(!$res["expires"] ? "-":getReadableDate($res["expires"]))."
    "; - - } - else printMLText("no_docs_locked"); - - $this->contentContainerEnd(); - - } - else { - - // Get list of documents owned by current user - if (!$db->createTemporaryTable("ttstatid")) { - $this->contentHeading(getMLText("warning")); - $this->contentContainer(getMLText("internal_error_exit")); - $this->htmlEndPage(); - exit; - } - - if (!$db->createTemporaryTable("ttcontentid")) { - $this->contentHeading(getMLText("warning")); - $this->contentContainer(getMLText("internal_error_exit")); - $this->htmlEndPage(); - exit; - } - $queryStr = "SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`, ". - "`tblDocumentContent`.`version`, `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". - "`tblDocumentStatusLog`.`comment` AS `statusComment`, `tblDocumentStatusLog`.`date` as `statusDate`, ". - "`tblDocumentStatusLog`.`userID`, `oTbl`.`fullName` AS `ownerName`, `sTbl`.`fullName` AS `statusName` ". - "FROM `tblDocumentContent` ". - "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". - "LEFT JOIN `tblDocumentStatus` ON `tblDocumentStatus`.`documentID` = `tblDocumentContent`.`document` ". - "LEFT JOIN `tblDocumentStatusLog` ON `tblDocumentStatusLog`.`statusID` = `tblDocumentStatus`.`statusID` ". - "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". - "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". - "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". - "LEFT JOIN `tblUsers` AS `oTbl` on `oTbl`.`id` = `tblDocuments`.`owner` ". - "LEFT JOIN `tblUsers` AS `sTbl` on `sTbl`.`id` = `tblDocumentStatusLog`.`userID` ". - "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". - "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version` ". - "AND `tblDocuments`.`owner` = '".$user->getID()."' "; - - if ($orderby=='e') $queryStr .= "ORDER BY `expires`"; - else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`"; - else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; - else $queryStr .= "ORDER BY `name`"; - - $resArr = $db->getResultArray($queryStr); - if (is_bool($resArr) && !$resArr) { - $this->contentHeading(getMLText("warning")); - $this->contentContainer(getMLText("internal_error_exit")); - $this->htmlEndPage(); - exit; - } - - $this->contentHeading(getMLText("all_documents")); - $this->contentContainerStart(); - - if (count($resArr)>0) { - - print ""; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - - foreach ($resArr as $res) { - - // verify expiry - if ( $res["expires"] && time()>$res["expires"]+24*60*60 ){ - if ( $res["status"]==S_DRAFT_APP || $res["status"]==S_DRAFT_REV ){ - $res["status"]=S_EXPIRED; - } - } - - print "\n"; - print "\n"; - print ""; - print ""; - print ""; - //print ""; - print ""; - print "\n"; - } - print "
    ".getMLText("name")."".getMLText("status")."".getMLText("version")."".getMLText("last_update")."".getMLText("expires")."
    " . htmlspecialchars($res["name"]) . "".getOverallStatusText($res["status"])."".$res["version"]."".$res["statusDate"]." ". htmlspecialchars($res["statusName"])."".(!$res["expires"] ? getMLText("does_not_expire"):getReadableDate($res["expires"]))."".(!$res["expires"] ? "-":getReadableDate($res["expires"]))."
    "; - } - else printMLText("empty_notify_list"); - - $this->contentContainerEnd(); - } - - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.ObjectCheck.php b/views/blue/class.ObjectCheck.php deleted file mode 100644 index 6a9eb098e..000000000 --- a/views/blue/class.ObjectCheck.php +++ /dev/null @@ -1,216 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for ObjectCheck view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_ObjectCheck extends SeedDMS_Blue_Style { - - function tree($dms, $folder, $repair, $path=':', $indent='') { /* {{{ */ - - /* Don't do folderlist check for root folder */ - if($path != ':') { - $folderList = $folder->getFolderList(); - /* Check the folder */ - if($folderList != $path) { - print "\n"; - $this->needsrepair = true; - print "getID()."\">"; - print "getID()."\">"; - $tmppath = $folder->getPath(); - for ($i = 1; $i < count($tmppath); $i++) { - print "/".htmlspecialchars($tmppath[$i]->getName()); - } - print $folder->getName(); - print ""; - - $owner = $folder->getOwner(); - print "".htmlspecialchars($owner->getFullName()).""; - print "Folderlist is '".$folderList."', should be '".$path."'"; - if($repair) { - $folder->repair(); - print "Repaired\n"; - } else { - print "\n"; - } - print "\n"; - } - } - - $subfolders = $folder->getSubFolders(); - foreach($subfolders as $subfolder) { - $this->tree($dms, $subfolder, $repair, $path.$folder->getId().':', $indent.' '); - } - $path .= $folder->getId().':'; - $documents = $folder->getDocuments(); - foreach($documents as $document) { - /* Check the folder list of the document */ - $folderList = $document->getFolderList(); - if($folderList != $path) { - print "\n"; - $this->needsrepair = true; - $lc = $document->getLatestContent(); - print "getID()."\">getFileType())."\" title=\"".$lc->getMimeType()."\">"; - print "getID()."\">/"; - $folder = $document->getFolder(); - $tmppath = $folder->getPath(); - for ($i = 1; $i < count($tmppath); $i++) { - print htmlspecialchars($tmppath[$i]->getName())."/"; - } - print htmlspecialchars($document->getName()); - print ""; - $owner = $document->getOwner(); - print "".htmlspecialchars($owner->getFullName()).""; - print "Folderlist is '".$folderList."', should be '".$path."'"; - if($repair) { - $document->repair(); - print "Repaired\n"; - } else { - print "\n"; - } - print "\n"; - } - - /* Check if the content is available */ - $versions = $document->getContent(); - if($versions) { - foreach($versions as $version) { - $filepath = $dms->contentDir . $version->getPath(); - if(!file_exists($filepath)) { - print "\n"; - print "getID()."\">getFileType())."\" title=\"".$version->getMimeType()."\">"; - print "getID()."\">/"; - $folder = $document->getFolder(); - $tmppath = $folder->getPath(); - for ($i = 1; $i < count($tmppath); $i++) { - print htmlspecialchars($tmppath[$i]->getName())."/"; - } - print htmlspecialchars($document->getName()); - print ""; - $owner = $document->getOwner(); - print "".htmlspecialchars($owner->getFullName()).""; - print "Document content of version ".$version->getVersion()." is missing ('".$path."')"; - if($repair) { - print "Cannot repaired\n"; - } else { - print "\n"; - } - print "\n"; - } - } - } else { - print "\n"; - print "\n"; - print "getID()."\">/"; - $folder = $document->getFolder(); - $tmppath = $folder->getPath(); - for ($i = 1; $i < count($tmppath); $i++) { - print htmlspecialchars($tmppath[$i]->getName())."/"; - } - print htmlspecialchars($document->getName()); - print ""; - $owner = $document->getOwner(); - print "".htmlspecialchars($owner->getFullName()).""; - print "Document has no content! Delete the document manually."; - print "\n"; - } - } - } /* }}} */ - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $unlinkedversions = $this->params['unlinkedcontent']; - $nofilesizeversions = $this->params['nofilesizeversions']; - $nochecksumversions = $this->params['nochecksumversions']; - $repair = $this->params['repair']; - $unlink = $this->params['unlink']; - $setfilesize = $this->params['setfilesize']; - $setchecksum = $this->params['setchecksum']; - - $this->htmlStartPage(getMLText("admin_tools")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); - $this->contentHeading(getMLText("objectcheck")); - $this->contentContainerStart(); - - if($repair) { - echo "

    ".getMLText('repairing_objects')."

    "; - } - print ""; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - $this->needsrepair = false; - $this->tree($dms, $folder, $repair); - print "
    ".getMLText("name")."".getMLText("owner")."".getMLText("error")."
    \n"; - - if($this->needsrepair && $repair == 0) { - echo '

    '.getMLText('do_object_repair').'

    '; - } - $this->contentContainerEnd(); - - $this->contentHeading(getMLText("unlinked_content")); - $this->contentContainerStart(); - if($unlink) { - echo "

    ".getMLText('unlinking_objects')."

    "; - } - - if($unlinkedversions) { - print ""; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - foreach($unlinkedversions as $version) { - $doc = $version->getDocument(); - print ""; - if($unlink) { - $doc->removeContent($version); - } - print "\n"; - } - print "
    ".getMLText("document")."".getMLText("version")."".getMLText("original_filename")."".getMLText("mimetype")."
    ".$doc->getId()."".$version->getVersion()."".$version->getOriginalFileName()."".$version->getMimeType()."
    \n"; - if($unlink == 0) { - echo '

    '.getMLText('do_object_unlink').'

    '; - } - } - - $this->contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.OverrideContentStatus.php b/views/blue/class.OverrideContentStatus.php deleted file mode 100644 index 3259da4f4..000000000 --- a/views/blue/class.OverrideContentStatus.php +++ /dev/null @@ -1,99 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for OverrideContentStatus view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_OverrideContentStatus extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - $content = $this->params['version']; - - $overallStatus = $content->getStatus(); - $reviewStatus = $content->getReviewStatus(); - $approvalStatus = $content->getApprovalStatus(); - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); - - $this->contentHeading(getMLText("change_status")); - -?> - -contentContainerStart(); - -// Display the Review form. -?> -
    - - - - -
    : -
    : -
    - - - -
    -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.PasswordForgotten.php b/views/blue/class.PasswordForgotten.php deleted file mode 100644 index d9e9ffd99..000000000 --- a/views/blue/class.PasswordForgotten.php +++ /dev/null @@ -1,71 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for PasswordForgotten view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_PasswordForgotten extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $referrer = $this->params['referrer']; - - $this->htmlStartPage(getMLText("password_forgotten"), "login"); - $this->globalBanner(); - $this->pageNavigation(getMLText("password_forgotten")); -?> - -contentContainerStart(); ?> -
    -"; - } -?> -

    - - - - - - - - - - - - -
    :
    :
    ">
    -
    -contentContainerEnd(); ?> - -

    -htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.RemoveArchive.php b/views/blue/class.RemoveArchive.php deleted file mode 100644 index 5e990a5c7..000000000 --- a/views/blue/class.RemoveArchive.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for RemoveArchive view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_RemoveArchive extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $arkname = $this->params['archive']; - - $this->htmlStartPage(getMLText("backup_tools")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); - $this->contentHeading(getMLText("backup_remove")); - $this->contentContainerStart(); - -?> -
    - - -

    htmlspecialchars($arkname)));?>

    - "> -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.RemoveDocument.php b/views/blue/class.RemoveDocument.php deleted file mode 100644 index 5df57bdb2..000000000 --- a/views/blue/class.RemoveDocument.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for RemoveDocument view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_RemoveDocument extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); - $this->contentHeading(getMLText("rm_document")); - $this->contentContainerStart(); - -?> -
    - - -

    - htmlspecialchars($document->getName())));?> -

    -

    ">

    -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.RemoveDocumentFile.php b/views/blue/class.RemoveDocumentFile.php deleted file mode 100644 index f194d1a9d..000000000 --- a/views/blue/class.RemoveDocumentFile.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for RemoveDocumentFile view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_RemoveDocumentFile extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - $file = $this->params['file']; - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document"); - $this->contentHeading(getMLText("rm_file")); - $this->contentContainerStart(); - -?> -
    - - - -

    htmlspecialchars($document->getName()), "name" => htmlspecialchars($file->getName())));?>

    - "> -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.RemoveDump.php b/views/blue/class.RemoveDump.php deleted file mode 100644 index e0ce18ae1..000000000 --- a/views/blue/class.RemoveDump.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for RemoveDump view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_RemoveDump extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $dumpname = $this->params['dumpfile']; - - $this->htmlStartPage(getMLText("backup_tools")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); - $this->contentHeading(getMLText("dump_remove")); - $this->contentContainerStart(); -?> -
    - - -

    htmlspecialchars($dumpname)));?>

    - "> -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.RemoveEvent.php b/views/blue/class.RemoveEvent.php deleted file mode 100644 index 3d0092afd..000000000 --- a/views/blue/class.RemoveEvent.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for RemoveEvent view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_RemoveEvent extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $event = $this->params['event']; - - $this->htmlStartPage(getMLText("calendar")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("calendar"), "calendar"); - - $this->contentHeading(getMLText("edit_event")); - $this->contentContainerStart(); - -?> -
    - - "> -

    htmlspecialchars($event["name"])));?>

    - "> -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.RemoveFolder.php b/views/blue/class.RemoveFolder.php deleted file mode 100644 index 4cb631940..000000000 --- a/views/blue/class.RemoveFolder.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for RemoveFolder view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_RemoveFolder extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - - $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true), "view_folder", $folder); - $this->contentHeading(getMLText("rm_folder")); - $this->contentContainerStart(); -?> -
    - - - -

    - htmlspecialchars($folder->getName())));?> -

    -

    ">

    -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.RemoveFolderFiles.php b/views/blue/class.RemoveFolderFiles.php deleted file mode 100644 index b70aa8409..000000000 --- a/views/blue/class.RemoveFolderFiles.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for RemoveFolderFiles view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_RemoveFolderFiles extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - - $this->htmlStartPage(getMLText("files_deletion")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); - - $this->contentHeading(getMLText("files_deletion")); - $this->contentContainerStart(); -?> -
    - - -

    htmlspecialchars($folder->getName())));?>

    - "> -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.RemoveGroup.php b/views/blue/class.RemoveGroup.php deleted file mode 100644 index 165cc44ba..000000000 --- a/views/blue/class.RemoveGroup.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for RemoveGroup view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_RemoveGroup extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $group = $this->params['group']; - - $this->htmlStartPage(getMLText("admin_tools")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); - $this->contentHeading(getMLText("rm_group")); - $this->contentContainerStart(); - -?> -
    - - - -

    - htmlspecialchars($group->getName())));?> -

    -

    ">

    -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.RemoveLog.php b/views/blue/class.RemoveLog.php deleted file mode 100644 index 650b93af1..000000000 --- a/views/blue/class.RemoveLog.php +++ /dev/null @@ -1,61 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for RemoveLog view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_RemoveLog extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $lognames = $this->params['lognames']; - - $this->htmlStartPage(getMLText("backup_tools")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); - $this->contentHeading(getMLText("rm_file")); - $this->contentContainerStart(); -?> -
    - -\n"; - - } -?> -

    implode(', ', $lognames)));?>

    - "> -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.RemoveUser.php b/views/blue/class.RemoveUser.php deleted file mode 100644 index 46dc42105..000000000 --- a/views/blue/class.RemoveUser.php +++ /dev/null @@ -1,78 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for RemoveUser view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_RemoveUser extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $rmuser = $this->params['rmuser']; - $allusers = $this->params['allusers']; - - $this->htmlStartPage(getMLText("admin_tools")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); - $this->contentHeading(getMLText("rm_user")); - $this->contentContainerStart(); - -?> -
    - - - -

    - htmlspecialchars($rmuser->getFullName())));?> -

    - -

    -: - -

    - -

    ">

    - -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.RemoveVersion.php b/views/blue/class.RemoveVersion.php deleted file mode 100644 index 016759e3d..000000000 --- a/views/blue/class.RemoveVersion.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for RemoveVersion view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_RemoveVersion extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - $version = $this->params['version']; - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); - $this->contentHeading(getMLText("rm_version")); - $this->contentContainerStart(); -?> -
    - - - -

    htmlspecialchars($document->getName()), "version" => $version->getVersion()));?>

    - "> -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.ReviewDocument.php b/views/blue/class.ReviewDocument.php deleted file mode 100644 index 546d3003f..000000000 --- a/views/blue/class.ReviewDocument.php +++ /dev/null @@ -1,178 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for ReviewDocument view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_ReviewDocument extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - $content = $this->params['version']; - - $reviews = $content->getReviewStatus(); - foreach($reviews as $review) { - if($review['reviewID'] == $_GET['reviewid']) { - $reviewStatus = $review; - break; - } - } - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); - $this->contentHeading(getMLText("submit_review")); -?> - - -contentContainerStart(); - - // Display the Review form. - if ($reviewStatus['type'] == 0) { - if($reviewStatus["status"]!=0) { - - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - $indUser = $dms->getUser($reviewStatus["userID"]); - print ""; - print "
    ".getMLText("status")."".getMLText("comment")."".getMLText("last_update")."
    "; - printReviewStatusText($reviewStatus["status"]); - print "".htmlspecialchars($reviewStatus["comment"])."".$reviewStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ."

    "; - } -?> -
    - - - - - -
    : -
    -
    - - - - -
    -
    -"; - print "".getMLText("status").""; - print "".getMLText("comment").""; - print "".getMLText("last_update").""; - print ""; - print ""; - printReviewStatusText($reviewStatus["status"]); - print ""; - print "".htmlspecialchars($reviewStatus["comment"]).""; - $indUser = $dms->getUser($reviewStatus["userID"]); - print "".$reviewStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) .""; - print "
    \n"; - } - -?> -
    - - - - - - -
    : -
    : - -
    - - '/> - - -
    -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.ReviewSummary.php b/views/blue/class.ReviewSummary.php deleted file mode 100644 index e11165793..000000000 --- a/views/blue/class.ReviewSummary.php +++ /dev/null @@ -1,44 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for ReviewSummary view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_ReviewSummary extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - - if (!$db->createTemporaryTable("ttstatid")) { - UI::exitError(getMLText("review_summary"),getMLText("internal_error_exit")); - } - - } /* }}} */ -} -?> diff --git a/views/blue/class.Search.php b/views/blue/class.Search.php deleted file mode 100644 index cd1a3296e..000000000 --- a/views/blue/class.Search.php +++ /dev/null @@ -1,173 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for Search result view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_Search extends SeedDMS_Blue_Style { - - function markQuery($str, $tag = "b") { - $querywords = preg_split("/ /", $this->query); - - foreach ($querywords as $queryword) - $str = str_ireplace("($queryword)", "<" . $tag . ">\\1", $str); - - return $str; - } - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $this->query = $this->params['query']; - $entries = $this->params['searchhits']; - $totalpages = $this->params['totalpages']; - $pageNumber = $this->params['pagenumber']; - $searchTime = $this->params['searchtime']; - $urlparams = $this->params['urlparams']; - $searchin = $this->params['searchin']; - - $this->htmlStartPage(getMLText("search_results")); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true), ""); - $this->contentHeading(getMLText("search_results")); - $this->contentContainerStart(); - $this->pageList($pageNumber, $totalpages, "../op/op.Search.php", $urlparams); - - print ""; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - //print "\n"; - //print "\n"; - print "\n\n\n"; - - $resultsFilteredByAccess = false; - $foldercount = $doccount = 0; - foreach ($entries as $entry) { - if(get_class($entry) == 'SeedDMS_Core_Document') { - $document = $entry; - $doccount++; - $lc = $document->getLatestContent(); - print ""; - //print ""; - if (in_array(2, $searchin)) { - $docName = $this->markQuery(htmlspecialchars($document->getName()), "i"); - } else { - $docName = htmlspecialchars($document->getName()); - } - print ""; - print ""; - - $attributes = $lc->getAttributes(); - print ""; - - $owner = $document->getOwner(); - print ""; - $display_status=$lc->getStatus(); - print ""; - - print ""; - - if (in_array(3, $searchin)) $comment = $this->markQuery(htmlspecialchars($document->getComment())); - else $comment = htmlspecialchars($document->getComment()); - if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; - print ""; - print "\n"; - } elseif(get_class($entry) == 'SeedDMS_Core_Folder') { - $folder = $entry; - $foldercount++; - if (in_array(2, $searchin)) { - $folderName = $this->markQuery(htmlspecialchars($folder->getName()), "i"); - } else { - $folderName = htmlspecialchars($folder->getName()); - } - print ""; - print ""; - print ""; - - $owner = $folder->getOwner(); - print ""; - print ""; - print ""; - if (in_array(3, $searchin)) $comment = $this->markQuery(htmlspecialchars($folder->getComment())); - else $comment = htmlspecialchars($folder->getComment()); - if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; - print ""; - print "\n"; - } - } - if (0 && $resultsFilteredByAccess) { - print ""; - } - - print "
    ".getMLText("name")."".getMLText("attributes")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("comment")."".getMLText("reviewers")."".getMLText("approvers")."
    getID()."\">getMimeIcon($lc->getFileType())."\" title=\"".$lc->getMimeType()."\">getID()."\">/"; - $folder = $document->getFolder(); - $path = $folder->getPath(); - for ($i = 1; $i < count($path); $i++) { - print htmlspecialchars($path[$i]->getName())."/"; - } - print $docName; - print ""; - print "
      \n"; - $attributes = $lc->getAttributes(); - if($attributes) { - foreach($attributes as $attribute) { - $attrdef = $attribute->getAttributeDefinition(); - print "
    • ".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($attribute->getValue())."
    • \n"; - } - } - print "
    \n"; - print "
    ".htmlspecialchars($owner->getFullName())."".getOverallStatusText($display_status["status"]). "".$lc->getVersion()."".$comment."
    getID()."\">getID()."\">"; - $path = $folder->getPath(); - print "/"; - for ($i = 1; $i < count($path)-1; $i++) { - print htmlspecialchars($path[$i]->getName())."/"; - } - print $folderName; - print "".htmlspecialchars($owner->getFullName())."".$comment."
    ". getMLText("search_results_access_filtered") . "
    \n"; - $numResults = $doccount + $foldercount; - if ($numResults == 0) { - print "

    ".getMLText("search_no_results")."

    "; - } else { - // print "

    ".getMLText("search_report", array("doccount" => $doccount, "foldercount" => $foldercount, 'searchtime'=>$searchTime))."

    "; - } - - $this->pageList($pageNumber, $totalpages, "../op/op.Search.php", $_GET); - - $this->contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> - diff --git a/views/blue/class.SearchForm.php b/views/blue/class.SearchForm.php deleted file mode 100644 index 6285c3fe7..000000000 --- a/views/blue/class.SearchForm.php +++ /dev/null @@ -1,271 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for SearchForm view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_SearchForm extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $attrdefs = $this->params['attrdefs']; - $allCats = $this->params['allcategories']; - $allUsers = $this->params['allusers']; - $enablefullsearch = $this->params['enablefullsearch']; - - $this->htmlStartPage(getMLText("search")); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true), "", $folder); -?> - -contentHeading(getMLText("search")); - $this->contentContainerStart(); -?> - -
    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\n"; -echo "\n\n"; -*/ -?> - - - - -
    : - - -
    - - -
    :
      -
    • ()
    • -
    • -
    • -
    • -
    -
    getName()); ?>printAttributeEditField($attrdef, '') ?>
    :
    ()
    - -
    :
    ()
    -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    -
    : - -
    :printFolderChooser("form1", M_READ, -1, $folder);?>
    : - -printDateChooser(-1, "createstart"); - print "  "; - printMLText("and"); - print "  "; - $this->printDateChooser(-1, "createend"); -?> -
    ".getMLText("last_update").":"; -printMLText("between"); -print "  "; -$this->printDateChooser(-1, "updatestart"); -print "  "; -printMLText("and"); -print "  "; -$this->printDateChooser(-1, "updateend"); -echo "
    ">
    - -
    - -
    -
    -
    - -

    - - - - - - - - - - - - - - - -
    : - - -
    : - -
    : - -
    ">
    - -
    -
    -
    - - -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.SearchFulltext.php b/views/blue/class.SearchFulltext.php deleted file mode 100644 index e9ec22407..000000000 --- a/views/blue/class.SearchFulltext.php +++ /dev/null @@ -1,133 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for Search result view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_SearchFulltext extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $entries = $this->params['searchhits']; - $totalpages = $this->params['totalpages']; - $totaldocs = $this->params['totaldocs']; - $pageNumber = $this->params['pagenumber']; - $urlparams = $this->params['urlparams']; - $searchTime = $this->params['searchtime']; - - $this->htmlStartPage(getMLText("search_results")); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true), "", $folder); - $this->contentHeading(getMLText("search_results")); - - $this->contentContainerStart(); -?> - - - - - -
    - $totaldocs)); - } -?> - $searchTime));?>
    - -contentContainerEnd(); - $this->htmlEndPage(); - exit; - } - - $this->pageList($pageNumber, $totalpages, "../op/op.SearchFulltext.php", $_GET); - - print ""; - print "\n\n"; - //print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - //print "\n"; - //print "\n"; - print "\n\n\n"; - - $resultsFilteredByAccess = false; - foreach ($entries as $document) { - if ($document->getAccessMode($user) < M_READ) { - $resultsFilteredByAccess = true; - } - else { - $lc = $document->getLatestContent(); - print ""; - $docName = htmlspecialchars($document->getName()); - print ""; - - $owner = $document->getOwner(); - print ""; - $display_status=$lc->getStatus(); - print ""; - - print ""; - - $comment = htmlspecialchars($document->getComment()); - if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; - print ""; - print "\n"; - } - } - if ($resultsFilteredByAccess) { - print ""; - } - print "
    ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("comment")."".getMLText("reviewers")."".getMLText("approvers")."
    getID()."\">/"; - $folder = $document->getFolder(); - $path = $folder->getPath(); - for ($i = 1; $i < count($path); $i++) { - print htmlspecialchars($path[$i]->getName())."/"; - } - print $docName; - print "".htmlspecialchars($owner->getFullName())."".getOverallStatusText($display_status["status"]). "".$lc->getVersion()."".$comment."
    ". getMLText("search_results_access_filtered") . "
    \n"; - - $this->pageList($pageNumber, $totalpages, "../op/op.Search.php", $_GET); - - $this->contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> - diff --git a/views/blue/class.SetExpires.php b/views/blue/class.SetExpires.php deleted file mode 100644 index d93773309..000000000 --- a/views/blue/class.SetExpires.php +++ /dev/null @@ -1,70 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for SetExpires view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_SetExpires extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); - $this->contentHeading(getMLText("set_expiry")); - $this->contentContainerStart(); -?> - -
    - - - - - - - -
    : - expires()?"":"checked") ?> >
    - expires()?"checked":"") ?> >printDateChooser(($document->expires()?$document->getExpires():-1), "exp");?> -
    - -

    -"> -

    - -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.SetReviewersApprovers.php b/views/blue/class.SetReviewersApprovers.php deleted file mode 100644 index c7e64274a..000000000 --- a/views/blue/class.SetReviewersApprovers.php +++ /dev/null @@ -1,245 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for SetReviewersApprovers view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - $content = $this->params['version']; - $enableadminrevapp = $this->params['enableadminrevapp']; - $enableownerrevapp = $this->params['enableownerrevapp']; - $enableselfrevapp = $this->params['enableselfrevapp']; - - $overallStatus = $content->getStatus(); - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); - $this->contentHeading(getMLText("change_assignments")); - - // Retrieve a list of all users and groups that have review / approve privileges. - $docAccess = $folder->getReadAccessList($enableadminrevapp, $enableownerrevapp); - - // Retrieve list of currently assigned reviewers and approvers, along with - // their latest status. - $reviewStatus = $content->getReviewStatus(); - $approvalStatus = $content->getApprovalStatus(); - - // Index the review results for easy cross-reference with the Approvers List. - $reviewIndex = array("i"=>array(), "g"=>array()); - foreach ($reviewStatus as $i=>$rs) { - if ($rs["type"]==0) { - $reviewIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); - } elseif ($rs["type"]==1) { - $reviewIndex["g"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); - } - } - - // Index the approval results for easy cross-reference with the Approvers List. - $approvalIndex = array("i"=>array(), "g"=>array()); - foreach ($approvalStatus as $i=>$rs) { - if ($rs["type"]==0) { - $approvalIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); - } elseif ($rs["type"]==1) { - $approvalIndex["g"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); - } - } -?> - -contentContainerStart(); ?> - -
    - -contentSubHeading(getMLText("update_reviewers"));?> - -
    :
    -
    -
      -getMandatoryReviewers(); - foreach ($docAccess["users"] as $usr) { - $mandatory=false; - foreach ($res as $r) if ($r['reviewerUserID']==$usr->getID()) $mandatory=true; - - if ($mandatory){ - - print "
    • ". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())." <".$usr->getEmail().">"; - print ""; - - } elseif (isset($reviewIndex["i"][$usr->getID()])) { - - switch ($reviewIndex["i"][$usr->getID()]["status"]) { - case 0: - print "
    • ".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); - break; - case -2: - print "
    • ".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); - break; - default: - print "
    • ".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); - break; - } - } else { - if (!$enableselfrevapp && $usr->getID()==$user->getID()) continue; - print "
    • ". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); - } - } -?> -
    -
    -
    :
    -
    -
      -getID()) $mandatory=true; - - if ($mandatory){ - - print "
    • ".htmlspecialchars($group->getName()); - print ""; - - } elseif (isset($reviewIndex["g"][$group->getID()])) { - - switch ($reviewIndex["g"][$group->getID()]["status"]) { - case 0: - print "
    • ".htmlspecialchars($group->getName()); - break; - case -2: - print "
    • ".htmlspecialchars($group->getName()); - break; - default: - print "
    • ".htmlspecialchars($group->getName()); - break; - } - } - else { - print "
    • ".htmlspecialchars($group->getName()); - } - } -?> -
    -
    - -contentSubHeading(getMLText("update_approvers"));?> - -
    :
    -
    -
      -getMandatoryApprovers(); - - foreach ($docAccess["users"] as $usr) { - - $mandatory=false; - foreach ($res as $r) if ($r['approverUserID']==$usr->getID()) $mandatory=true; - - if ($mandatory){ - - print "
    • ". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())." <".$usr->getEmail().">"; - print ""; - - } elseif (isset($approvalIndex["i"][$usr->getID()])) { - - switch ($approvalIndex["i"][$usr->getID()]["status"]) { - case 0: - print "
    • ".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); - break; - case -2: - print "
    • ".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); - break; - default: - print "
    • ".htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); - break; - } - } else { - if (!$enableselfrevapp && $usr->getID()==$user->getID()) continue; - print "
    • ". htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()); - } - } -?> -
    -
    -
    :
    -
    -
      -getID()) $mandatory=true; - - if ($mandatory){ - - print "
    • ".htmlspecialchars($group->getName()); - print ""; - - } elseif (isset($approvalIndex["g"][$group->getID()])) { - - switch ($approvalIndex["g"][$group->getID()]["status"]) { - case 0: - print "
    • ".htmlspecialchars($group->getName()); - break; - case -2: - print "
    • ".htmlspecialchars($group->getName()); - break; - default: - print "
    • ".htmlspecialchars($group->getName()); - break; - } - } - else { - print "
    • ".htmlspecialchars($group->getName()); - } - } -?> -
    -
    - -

    - - -"> -

    -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.Settings.php b/views/blue/class.Settings.php deleted file mode 100644 index d88861404..000000000 --- a/views/blue/class.Settings.php +++ /dev/null @@ -1,523 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for Settings view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_Settings extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $settings = $this->params['settings']; - - $this->htmlStartPage(getMLText("admin_tools")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); - $this->contentHeading(getMLText("settings")); - $this->contentContainerStart(); - -?> - - - -
    - -_configFilePath)) { - echo "

    ".getMLText("settings_notwritable")."

    "; -} else { -?> - " /> - - - -
    +
    -
    - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - "> - - - - - - "> - - - - "> - - - "> - - -
    :
    :
    :_printDisclaimer) echo "checked" ?> />
    : - -
    : - -
    :_strictFormCheck) echo "checked" ?> />
    :
    :_enableConverting) echo "checked" ?> />
    :_enableEmail) echo "checked" ?> />
    :_enableUsersView) echo "checked" ?> />
    :_enableFullSearch) echo "checked" ?> />
    :
    :_enableFolderTree) echo "checked" ?> />
    : - -
    : - -
    :_enableCalendar) echo "checked" ?> />
    : - -
    : - -
    -
    -
    -
    +
    -
    - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - "> - - - - "> - - - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - - - - - - "> - - - - "> - - - - "> - - - - "> - - - - "> - - - - - - - "> - - - - "> - - - - "> - - - - -
    :
    :
    :
    :
    :
    :
    :
    :_logFileEnable) echo "checked" ?> />
    : - -
    :_enableLargeFileUpload) echo "checked" ?> />
    :
    :_enableGuestLogin) echo "checked" ?> />
    :_restricted) echo "checked" ?> />
    :_enableUserImage) echo "checked" ?> />
    :_disableSelfEdit) echo "checked" ?> />
    :_enablePasswordForgotten) echo "checked" ?> />
    :
    : - -
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    -
    - -
    -
    +
    - - -
    - - -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.Statistic.php b/views/blue/class.Statistic.php deleted file mode 100644 index d9596f937..000000000 --- a/views/blue/class.Statistic.php +++ /dev/null @@ -1,232 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for Statistic view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_Statistic extends SeedDMS_Blue_Style { - var $dms; - var $folder_count; - var $document_count; - var $file_count; - var $storage_size; - - function getAccessColor($mode) { /* {{{ */ - if ($mode == M_NONE) - return "gray"; - else if ($mode == M_READ) - return "green"; - else if ($mode == M_READWRITE) - return "blue"; - else // if ($mode == M_ALL) - return "red"; - } /* }}} */ - - function printFolder($folder) { /* {{{ */ - $this->folder_count++; - $folder_size=0; - $doc_count=0; - - $color = $folder->inheritsAccess() ? "black" : $this->getAccessColor($folder->getDefaultAccess()); - - print "
  • "; - print "getID()."\">".htmlspecialchars($folder->getName()) .""; - - $owner = $folder->getOwner(); - $color = $this->getAccessColor(M_ALL); - print " [".htmlspecialchars($owner->getFullName())."] "; - - if (! $folder->inheritsAccess()) - $this->printAccessList($folder); - - $subFolders = $folder->getSubFolders(); - $documents = $folder->getDocuments(); - - print "
      "; - - foreach ($subFolders as $sub) $folder_size += $this->printFolder($sub); - foreach ($documents as $document){ - $doc_count++; - $folder_size += $this->printDocument($document); - } - - print "
    "; - - print "".SeedDMS_Core_File::format_filesize($folder_size).", ".$doc_count." ".getMLText("documents")."\n"; - - print "
  • "; - - return $folder_size; - } /* }}} */ - - function printDocument($document) { /* {{{ */ - $this->document_count++; - - $local_file_count=0; - $folder_size=0; - - if (file_exists($this->dms->contentDir.$document->getDir())) { - $handle = opendir($this->dms->contentDir.$document->getDir()); - while ($entry = readdir($handle) ) { - if (is_dir($this->dms->contentDir.$document->getDir().$entry)) continue; - else{ - $local_file_count++; - $folder_size += filesize($this->dms->contentDir.$document->getDir().$entry); - } - - } - closedir($handle); - } - $this->storage_size += $folder_size; - - $color = $document->inheritsAccess() ? "black" : $this->getAccessColor($document->getDefaultAccess()); - print "
  • "; - print "getID()."\">".htmlspecialchars($document->getName()).""; - - $owner = $document->getOwner(); - $color = $this->getAccessColor(M_ALL); - print " [".htmlspecialchars($owner->getFullName())."] "; - - if (! $document->inheritsAccess()) $this->printAccessList($document); - - print "".SeedDMS_Core_File::format_filesize($folder_size).", ".$local_file_count." ".getMLText("files")."\n"; - - print "
  • "; - - $this->file_count += $local_file_count; - return $folder_size; - } /* }}} */ - - function printAccessList($obj) { /* {{{ */ - $accessList = $obj->getAccessList(); - if (count($accessList["users"]) == 0 && count($accessList["groups"]) == 0) - return; - - print " ("; - - for ($i = 0; $i < count($accessList["groups"]); $i++) - { - $group = $accessList["groups"][$i]->getGroup(); - $color = $this->getAccessColor($accessList["groups"][$i]->getMode()); - print "".htmlspecialchars($group->getName()).""; - if ($i+1 < count($accessList["groups"]) || count($accessList["users"]) > 0) - print ", "; - } - for ($i = 0; $i < count($accessList["users"]); $i++) - { - $user = $accessList["users"][$i]->getUser(); - $color = $this->getAccessColor($accessList["users"][$i]->getMode()); - print "".htmlspecialchars($user->getFullName()).""; - if ($i+1 < count($accessList["users"])) - print ", "; - } - print ")"; - } /* }}} */ - - function show() { /* {{{ */ - $this->dms = $this->params['dms']; - $user = $this->params['user']; - $rootfolder = $this->params['rootfolder']; - - $this->htmlStartPage(getMLText("folders_and_documents_statistic")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); - - $this->folder_count=0; - $this->document_count=0; - $this->file_count=0; - $this->storage_size=0; -?> - - - - -contentHeading(getMLText("folders_and_documents_statistic")); -$this->contentContainerStart(); - -print ""; - -print ""; - -print "
    \n"; - -print "
      \n"; -print "
    • ".getMLText("access_inheritance")."
    • "; -print "
    • getAccessColor(M_ALL)."\">".getMLText("access_mode_all")."
    • "; -print "
    • getAccessColor(M_READWRITE)."\">".getMLText("access_mode_readwrite")."
    • "; -print "
    • getAccessColor(M_READ)."\">".getMLText("access_mode_read")."
    • "; -print "
    • getAccessColor(M_NONE)."\">".getMLText("access_mode_none")."
    • "; -print "
    \n"; - -print "
    \n"; - -print "
      \n"; -$this->printFolder($rootfolder); -print "
    \n"; - -print "
    "; - -print "
      \n"; -print "
    • ".getMLText("folders").": ".$this->folder_count."
    • \n"; -print "
    • ".getMLText("documents").": ".$this->document_count."
    • \n"; -print "
    • ".getMLText("files").": ".$this->file_count."
    • \n"; -print "
    • ".getMLText("storage_size").": ".formatted_size($this->storage_size)."
    • \n"; - -print "
    \n"; - -print "
    \n"; - -$this->contentContainerEnd(); -$this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.UpdateDocument.php b/views/blue/class.UpdateDocument.php deleted file mode 100644 index a1ed9f22b..000000000 --- a/views/blue/class.UpdateDocument.php +++ /dev/null @@ -1,251 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for UpdateDocument view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_UpdateDocument extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - $strictformcheck = $this->params['strictformcheck']; - $enablelargefileupload = $this->params['enablelargefileupload']; - $dropfolderdir = $this->params['dropfolderdir']; - $documentid = $document->getId(); - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); -?> - - - -contentHeading(getMLText("update_document")); - $this->contentContainerStart(); - - if ($document->isLocked()) { - - $lockingUser = $document->getLockingUser(); - - print "
    "; - - printMLText("update_locked_msg", array("username" => htmlspecialchars($lockingUser->getFullName()), "email" => $lockingUser->getEmail())); - - if ($lockingUser->getID() == $user->getID()) - printMLText("unlock_cause_locking_user"); - else if ($document->getAccessMode($user) == M_ALL) - printMLText("unlock_cause_access_mode_all"); - else - { - printMLText("no_update_cause_locked"); - print "
    "; - $this->contentContainerEnd(); - $this->htmlEndPage(); - exit; - } - - print "
    "; - } - - // Retrieve a list of all users and groups that have review / approve - // privileges. - $docAccess = $document->getApproversList(); -?> - - - - - - - - - - -
    getID()); ?>

    - - -
    - - - - - - - - - - - - - - - - - - - - - -getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_all)); - if($attrdefs) { - foreach($attrdefs as $attrdef) { -?> - - - - - - - - - - - - - - -
    :
    :printDropFolderChooser("form1");?>
    : - -
    : - expires()) print " checked";?>>
    - expires()) print " checked";?>>printDateChooser(-1, "exp");?> -
    getName()); ?>:printAttributeEditField($attrdef, '') ?>
    - contentSubHeading(getMLText("assign_reviewers")); ?> - -
    :
    -
    -
      -getMandatoryReviewers(); - foreach ($docAccess["users"] as $usr) { - if ($usr->getID()==$user->getID()) continue; - $mandatory=false; - foreach ($res as $r) if ($r['reviewerUserID']==$usr->getID()) $mandatory=true; - - if ($mandatory) print "
    • ". htmlspecialchars($usr->getFullName())."
    • "; - else print "
    • ". htmlspecialchars($usr->getFullName())."
    • "; - } -?> -
    -
    -
    :
    -
    -
      -getID()) $mandatory=true; - - if ($mandatory) print "
    • ".htmlspecialchars($grp->getName())."
    • "; - else print "
    • ".htmlspecialchars($grp->getName())."
    • "; - } -?> -
    -
    - - contentSubHeading(getMLText("assign_approvers")); ?> - -
    :
    -
    -
      -getMandatoryApprovers(); - foreach ($docAccess["users"] as $usr) { - if ($usr->getID()==$user->getID()) continue; - - $mandatory=false; - foreach ($res as $r) if ($r['approverUserID']==$usr->getID()) $mandatory=true; - - if ($mandatory) print "
    • ". htmlspecialchars($usr->getFullName())."
    • "; - else print "
    • ". htmlspecialchars($usr->getFullName())."
    • "; - } -?> -
    -
    -
    :
    -
    -
      -getID()) $mandatory=true; - - if ($mandatory) print "
    • ".htmlspecialchars($grp->getName()); - else print "
    • ".htmlspecialchars($grp->getName()); - - } -?> -
    -
    -
    ">
    -
    - -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.UpdateDocument2.php b/views/blue/class.UpdateDocument2.php deleted file mode 100644 index 375edee86..000000000 --- a/views/blue/class.UpdateDocument2.php +++ /dev/null @@ -1,81 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for UpdateDocument2 view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_UpdateDocument2 extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); - - $this->contentHeading(getMLText("update_document") . ": " . htmlspecialchars($document->getName())); - $this->contentContainerStart(); - - if ($document->isLocked()) { - - $lockingUser = $document->getLockingUser(); - - print "
    "; - - printMLText("update_locked_msg", array("username" => htmlspecialchars($lockingUser->getFullName()), "email" => htmlspecialchars($lockingUser->getEmail()))); - - if ($lockingUser->getID() == $user->getID()) - printMLText("unlock_cause_locking_user"); - else if ($document->getAccessMode($user) == M_ALL) - printMLText("unlock_cause_access_mode_all"); - else - { - printMLText("no_update_cause_locked"); - print "
    "; - $this->contentContainerEnd(); - $this->htmlEndPage(); - exit; - } - - print "
    "; - } - - // Retrieve a list of all users and groups that have review / approve - // privileges. - $docAccess = $document->getApproversList(); - - $this->printUploadApplet('../op/op.UpdateDocument2.php', array('folderid'=>$folder->getId(), 'documentid'=>$document->getId()), 1, array('version_comment'=>1)); - - $this->contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.UserDefaultKeywords.php b/views/blue/class.UserDefaultKeywords.php deleted file mode 100644 index 3024ad4fb..000000000 --- a/views/blue/class.UserDefaultKeywords.php +++ /dev/null @@ -1,178 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for UserDefaultKeywords view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_UserDefaultKeywords extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $categories = $this->params['categories']; - - $this->htmlStartPage(getMLText("edit_default_keywords")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("my_account"), "my_account"); -?> - -contentHeading(getMLText("edit_default_keywords")); - $this->contentContainerStart(); -?> - - - - - - -getOwner(); - if ($owner->getID() != $user->getID()) continue; - - print " - -
    : - -    - getID()."\" style=\"display : none;\">"; -?> - - - - - - - - - - - - - - - - - - - - "> - - - - -
    - -
    - contentSubHeading("");?> -
    : -
    getID()?>"> - - - - "> -
    -
    - contentSubHeading("");?> -
    : - getKeywordLists(); - if (count($lists) == 0) - print getMLText("no_default_keywords"); - else - foreach ($lists as $list) { -?> -
    getID().".".$list["id"]?>"> - - "> - - "> - " border="0"> - - &action=removekeywords">" border=0> -
    -
    - -
    "> - - - -
    -
    - - - -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.UserImage.php b/views/blue/class.UserImage.php deleted file mode 100644 index a00be75f6..000000000 --- a/views/blue/class.UserImage.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for UserImage view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_UserImage extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - - } /* }}} */ -} -?> diff --git a/views/blue/class.UserList.php b/views/blue/class.UserList.php deleted file mode 100644 index 688bd5f63..000000000 --- a/views/blue/class.UserList.php +++ /dev/null @@ -1,106 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for UserList view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_UserList extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $allUsers = $this->params['allusers']; - $httproot = $this->params['httproot']; - - $this->htmlStartPage(getMLText("admin_tools")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); - $this->contentHeading(getMLText("user_list")); - $this->contentContainerStart(); - - foreach ($allUsers as $currUser) { - if ($currUser->isGuest()) - continue; - - $this->contentSubHeading(getMLText("user") . ": \"" . $currUser->getFullName() . "\""); -?> - - - - - - - - - - - - - - - - - - - - - - - - - -
    :getLogin();?>
    :getFullName();?>
    :getEmail();?>
    :getComment();?>
    : - getGroups(); - if (count($groups) == 0) { - printMLText("no_groups"); - } - else { - for ($j = 0; $j < count($groups); $j++) { - print $groups[$j]->getName(); - if ($j +1 < count($groups)) - print ", "; - } - } - ?> -
    : - hasImage()) - print ""; - else - printMLText("no_user_image"); - ?> -
    -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.UsrMgr.php b/views/blue/class.UsrMgr.php deleted file mode 100644 index dbb94e533..000000000 --- a/views/blue/class.UsrMgr.php +++ /dev/null @@ -1,423 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for UsrMgr view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_UsrMgr extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $seluser = $this->params['seluser']; - $users = $this->params['allusers']; - $groups = $this->params['allgroups']; - $passwordstrength = $this->params['passwordstrength']; - $passwordexpiration = $this->params['passwordexpiration']; - $httproot = $this->params['httproot']; - $enableuserimage = $this->params['enableuserimage']; - - $this->htmlStartPage(getMLText("admin_tools")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); - -?> - -contentHeading(getMLText("user_management")); - $this->contentContainerStart(); -?> - - - - - - - -getID()."\" style=\"display : none;\">"; - - $this->contentSubHeading(getMLText("user")." : ".htmlspecialchars($currUser->getLogin())); -?> - - - - contentSubHeading(getMLText("edit_user"));?> - - - - - -
    : - -   -
    - - - - - - - - - - - - - 0) { -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :
    :
     
    :
    : getPwdExpiration(); ?>
    :
    :
    :
    :
    :isHidden() ? " checked='checked'" : "");?>>
    :isDisabled() ? " checked='checked'" : "");?>>
    : -hasImage()) - print ""; - else - printMLText("no_user_image"); -?> -
    :
    : -
    :
    -
    -
      - getMandatoryReviewers(); - - foreach ($users as $usr) { - - if ($usr->isGuest() || ($usr->getID() == $currUser->getID())) - continue; - - $checked=false; - foreach ($res as $r) if ($r['reviewerUserID']==$usr->getID()) $checked=true; - - print "
    • ".htmlspecialchars($usr->getLogin())."
    • \n"; - } -?> -
    -
    -
    :
    -
    -
      - getID()) $checked=true; - - print "
    • ".htmlspecialchars($grp->getName())."
    • \n"; - } -?> -
    -
    -
    : -
    :
    -
    -
      -getMandatoryApprovers(); - foreach ($users as $usr) { - if ($usr->isGuest() || ($usr->getID() == $currUser->getID())) - continue; - - $checked=false; - foreach ($res as $r) if ($r['approverUserID']==$usr->getID()) $checked=true; - - print "
    • ".htmlspecialchars($usr->getLogin())."
    • \n"; - } -?> -
    -
    -
    :
    -
    -
      -getID()) $checked=true; - - print "
    • ".htmlspecialchars($grp->getName())."
    • \n"; - } -?> -
    -
    -
    ">
    - - - - - - - - -contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.UsrView.php b/views/blue/class.UsrView.php deleted file mode 100644 index 6f554e9c7..000000000 --- a/views/blue/class.UsrView.php +++ /dev/null @@ -1,86 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for UsrView view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_UsrView extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $users = $this->params['allusers']; - $enableuserimage = $this->params['enableuserimage']; - $httproot = $this->params['httproot']; - - $this->htmlStartPage(getMLText("my_account")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("my_account"), "my_account"); - - $this->contentHeading(getMLText("users")); - $this->contentContainerStart(); - - echo "\n"; - echo "\n\n"; - echo "\n"; - echo "\n"; - echo "\n"; - if ($enableuserimage) echo "\n"; - echo "\n\n"; - - foreach ($users as $currUser) { - - if ($currUser->isGuest()) - continue; - - if ($currUser->isHidden()=="1") continue; - - echo "\n"; - - print ""; - - print ""; - print ""; - - if ($enableuserimage){ - print ""; - } - - echo "\n"; - } - - echo "
    ".getMLText("name")."".getMLText("email")."".getMLText("comment")."".getMLText("user_image")."
    ".htmlspecialchars($currUser->getFullName())."getEmail())."\">".htmlspecialchars($currUser->getEmail())."".htmlspecialchars($currUser->getComment()).""; - if ($currUser->hasImage()) print ""; - else printMLText("no_user_image"); - print "
    \n"; - - $this->contentContainerEnd(); - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.ViewDocument.php b/views/blue/class.ViewDocument.php deleted file mode 100644 index 5f98e5951..000000000 --- a/views/blue/class.ViewDocument.php +++ /dev/null @@ -1,547 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for ViewDocument view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_ViewDocument extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - $accessop = $this->params['accessobject']; - $viewonlinefiletypes = $this->params['viewonlinefiletypes']; - $documentid = $document->getId(); - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->contentStart(); - $this->pageNavigation(getFolderPathHTML($folder, true, $document), "view_document"); - $this->contentHeading(getMLText("document_infos")); - $this->contentContainerStart(); - - ?> - - isLocked()) { - $lockingUser = $document->getLockingUser(); - ?> - - - - - - - - - - - - - - - - - - - - - - - - - getAttributes(); - if($attributes) { - foreach($attributes as $attribute) { - $attrdef = $attribute->getAttributeDefinition(); - ?> - - - - - -
    $lockingUser->getEmail(), "username" => htmlspecialchars($lockingUser->getFullName())));?>
    : - getOwner(); - print "getEmail()."\">".htmlspecialchars($owner->getFullName()).""; - ?> -
    :getComment());?>
    :getDate()); ?>
    :getKeywords());?>
    : - getCategories(); - $ct = array(); - foreach($cats as $cat) - $ct[] = htmlspecialchars($cat->getName()); - echo implode(', ', $ct); - ?> -
    getName()); ?>:getValue()); ?>
    - contentContainerEnd(); - - $versions = $document->getContent(); - if(!$latestContent = $document->getLatestContent()) { - $this->contentHeading(getMLText("current_version")); - $this->contentContainerStart(); - print getMLText('document_content_missing'); - $this->contentContainerEnd(); - $this->htmlEndPage(); - exit; - } - - $status = $latestContent->getStatus(); - $reviewStatus = $latestContent->getReviewStatus(); - $approvalStatus = $latestContent->getApprovalStatus(); - - // verify if file exists - $file_exists=file_exists($dms->contentDir . $latestContent->getPath()); - - $this->contentHeading(getMLText("current_version")); - $this->contentContainerStart(); - print ""; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - - print ""; - - print ""; - - print ""; - print "\n
    ".getMLText("version")."".getMLText("file")."".getMLText("comment")."".getMLText("status")."
    ".$latestContent->getVersion()."
      \n"; - print "
    • ".$latestContent->getOriginalFileName() ."
    • \n"; - - if ($file_exists) - print "
    • ". formatted_size(filesize($dms->contentDir . $latestContent->getPath())) ." ".htmlspecialchars($latestContent->getMimeType())."
    • "; - else print "
    • ".getMLText("document_deleted")."
    • "; - - $updatingUser = $latestContent->getUser(); - print "
    • ".getMLText("uploaded_by")." getEmail()."\">".htmlspecialchars($updatingUser->getFullName())."
    • "; - print "
    • ".getLongReadableDate($latestContent->getDate())."
    • "; - - print "
    \n"; - print "
      \n"; - $attributes = $latestContent->getAttributes(); - if($attributes) { - foreach($attributes as $attribute) { - $attrdef = $attribute->getAttributeDefinition(); - print "
    • ".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($attribute->getValue())."
    • \n"; - } - } - print "
    \n"; - - print "
    ".htmlspecialchars($latestContent->getComment())."".getOverallStatusText($status["status"]); - if ( $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP || $status["status"]==S_EXPIRED ){ - print "
    hasExpired()?" class=\"warning\" ":"").">".(!$document->getExpires() ? getMLText("does_not_expire") : getMLText("expires").": ".getReadableDate($document->getExpires())).""; - } - print "
    "; - - print ""; - echo "
    \n"; - - print "\n"; - - if (is_array($reviewStatus) && count($reviewStatus)>0) { - - print ""; - - print "\n"; - print "\n"; - print "\n"; - print ""; - print "\n"; - print "\n"; - print "\n"; - - foreach ($reviewStatus as $r) { - $required = null; - $is_reviewer = false; - switch ($r["type"]) { - case 0: // Reviewer is an individual. - $required = $dms->getUser($r["required"]); - if (!is_object($required)) { - $reqName = getMLText("unknown_user")." '".$r["required"]."'"; - } - else { - $reqName = htmlspecialchars($required->getFullName()); - } - if($r["required"] == $user->getId()) - $is_reviewer = true; - break; - case 1: // Reviewer is a group. - $required = $dms->getGroup($r["required"]); - if (!is_object($required)) { - $reqName = getMLText("unknown_group")." '".$r["required"]."'"; - } - else { - $reqName = "".htmlspecialchars($required->getName()).""; - if($required->isMember($user) && ($user->getId() != $owner->getId())) - $is_reviewer = true; - } - break; - } - print "\n"; - print "\n"; - print ""; - print "\n"; - print "\n"; - print "\n"; - print "\n\n"; - } - } - - if (is_array($approvalStatus) && count($approvalStatus)>0) { - - print ""; - - print "\n"; - print "\n"; - print "\n"; - print ""; - print "\n"; - print "\n"; - print "\n"; - - foreach ($approvalStatus as $a) { - $required = null; - $is_approver = false; - switch ($a["type"]) { - case 0: // Approver is an individual. - $required = $dms->getUser($a["required"]); - if (!is_object($required)) { - $reqName = getMLText("unknown_user")." '".$a["required"]."'"; - } - else { - $reqName = htmlspecialchars($required->getFullName()); - } - if($a["required"] == $user->getId()) - $is_approver = true; - break; - case 1: // Approver is a group. - $required = $dms->getGroup($a["required"]); - if (!is_object($required)) { - $reqName = getMLText("unknown_group")." '".$a["required"]."'"; - } - else { - $reqName = "".htmlspecialchars($required->getName()).""; - } - if($required->isMember($user) && ($user->getId() != $owner->getId())) - $is_approver = true; - break; - } - print "\n"; - print "\n"; - print ""; - print "\n"; - print "\n"; - print "\n"; - print "\n\n"; - } - } - - print "
    \n"; - $this->contentSubHeading(getMLText("reviewers")); - print "
    ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
    ".$reqName."
    • ".$r["date"]."
    • "; - /* $updateUser is the user who has done the review */ - $updateUser = $dms->getUser($r["userID"]); - print "
    • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()) : "unknown user id '".$r["userID"]."'")."
    ".htmlspecialchars($r["comment"])."".getReviewStatusText($r["status"])."
    \n"; - $this->contentSubHeading(getMLText("approvers")); - print "
    ".getMLText("name")."".getMLText("last_update")."".getMLText("comment")."".getMLText("status")."
    ".$reqName."
    • ".$a["date"]."
    • "; - /* $updateUser is the user who has done the approval */ - $updateUser = $dms->getUser($a["userID"]); - print "
    • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()) : "unknown user id '".$a["userID"]."'")."
    ".htmlspecialchars($a["comment"])."".getApprovalStatusText($a["status"])."
    \n"; - - $this->contentContainerEnd(); - - $this->contentHeading(getMLText("previous_versions")); - $this->contentContainerStart(); - - if (count($versions)>1) { - - print ""; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - - for ($i = count($versions)-2; $i >= 0; $i--) { - $version = $versions[$i]; - $vstat = $version->getStatus(); - - // verify if file exists - $file_exists=file_exists($dms->contentDir . $version->getPath()); - - print "\n"; - print "\n"; - print "\n"; - print ""; - print ""; - print "\n\n"; - } - print "\n
    ".getMLText("version")."".getMLText("file")."".getMLText("comment")."".getMLText("status")."
    ".$version->getVersion()."
      \n"; - print "
    • ".$version->getOriginalFileName()."
    • \n"; - if ($file_exists) print "
    • ". formatted_size(filesize($dms->contentDir . $version->getPath())) ." ".htmlspecialchars($version->getMimeType())."
    • "; - else print "
    • ".getMLText("document_deleted")."
    • "; - $updatingUser = $version->getUser(); - print "
    • ".getMLText("uploaded_by")." getEmail()."\">".htmlspecialchars($updatingUser->getFullName())."
    • "; - print "
    • ".getLongReadableDate($version->getDate())."
    • "; - print "
    \n"; - print "
      \n"; - $attributes = $version->getAttributes(); - if($attributes) { - foreach($attributes as $attribute) { - $attrdef = $attribute->getAttributeDefinition(); - print "
    • ".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($attribute->getValue())."
    • \n"; - } - } - print "
    \n"; - print "
    ".htmlspecialchars($version->getComment())."".getOverallStatusText($vstat["status"]).""; - print ""; - print "
    \n"; - } - else printMLText("no_previous_versions"); - - $this->contentContainerEnd(); - - $this->contentHeading(getMLText("linked_files")); - $this->contentContainerStart(); - - $files = $document->getDocumentFiles(); - - if (count($files) > 0) { - - print ""; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - - foreach($files as $file) { - - $file_exists=file_exists($dms->contentDir . $file->getPath()); - - $responsibleUser = $file->getUser(); - - print ""; - print ""; - - print ""; - - print ""; - - print ""; - } - print "\n
    ".getMLText("file")."".getMLText("comment")."
      \n"; - print "
    • ".$file->getOriginalFileName() ."
    • \n"; - if ($file_exists) - print "
    • ". filesize($dms->contentDir . $file->getPath()) ." bytes ".htmlspecialchars($file->getMimeType())."
    • "; - else print "
    • ".htmlspecialchars($file->getMimeType())." - ".getMLText("document_deleted")."
    • "; - - print "
    • ".getMLText("uploaded_by")." getEmail()."\">".htmlspecialchars($responsibleUser->getFullName())."
    • "; - print "
    • ".getLongReadableDate($file->getDate())."
    • "; - - print "
    ".htmlspecialchars($file->getComment()).""; - if (($document->getAccessMode($user) == M_ALL)||($file->getUserID()==$user->getID())) - print "
    getID()."\" />
    "; - print "
    \n"; - - } - else printMLText("no_attached_files"); - - if ($document->getAccessMode($user) >= M_READWRITE){ - print "
    "; - print "\n"; - } - $this->contentContainerEnd(); - - - $this->contentHeading(getMLText("linked_documents")); - $this->contentContainerStart(); - $links = $document->getDocumentLinks(); - $links = SeedDMS_Core_DMS::filterDocumentLinks($user, $links); - - if (count($links) > 0) { - - print ""; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - - foreach($links as $link) { - $responsibleUser = $link->getUser(); - $targetDoc = $link->getTarget(); - - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - } - print "\n
    ".getMLText("comment")."".getMLText("document_link_by")."
    getID()."\" class=\"linklist\">".htmlspecialchars($targetDoc->getName())."".htmlspecialchars($targetDoc->getComment())."".htmlspecialchars($responsibleUser->getFullName()); - if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL )) - print "
    ".getMLText("document_link_public").":".(($link->isPublic()) ? getMLText("yes") : getMLText("no")); - print "
    "; - if (($user->getID() == $responsibleUser->getID()) || ($document->getAccessMode($user) == M_ALL )) - print "
    ".createHiddenFieldWithKey('removedocumentlink')."getID()."\" />
    "; - print "
    \n"; - } - else printMLText("no_linked_files"); - - if (!$user->isGuest()){ - ?> -
    -
    - - - - - - - getAccessMode($user) >= M_READWRITE) { - print ""; - print ""; - } - ?> - - - -
    :printDocumentChooser("form1");?>
    ".getMLText("document_link_public")."
      "; - print "
    • " . getMLText("yes")."
    • "; - print "
    • " . getMLText("no")."
    • "; - print "
    ">
    -
    - contentContainerEnd(); - - $this->contentEnd(); - $this->htmlEndPage(); - - } /* }}} */ -} -?> diff --git a/views/blue/class.ViewEvent.php b/views/blue/class.ViewEvent.php deleted file mode 100644 index 87d048a25..000000000 --- a/views/blue/class.ViewEvent.php +++ /dev/null @@ -1,100 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for ViewEvent view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_ViewEvent extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $event = $this->params['event']; - - $this->htmlStartPage(getMLText("calendar")); - $this->globalNavigation(); - $this->pageNavigation(getMLText("calendar"), "calendar"); - - $this->contentHeading(getMLText("event_details")); - $this->contentContainerStart(); - - $u=$dms->getUser($event["userID"]); - - echo ""; - - echo ""; - echo ""; - echo ""; - echo ""; - - echo ""; - echo ""; - echo ""; - echo ""; - - echo ""; - echo ""; - echo ""; - echo ""; - - echo ""; - echo ""; - echo ""; - echo ""; - - echo ""; - echo ""; - echo ""; - echo ""; - - echo ""; - echo ""; - echo ""; - echo ""; - - echo "
    ".getMLText("name").": ".htmlspecialchars($event["name"])."
    ".getMLText("comment").": ".htmlspecialchars($event["comment"])."
    ".getMLText("from").": ".getReadableDate($event["start"])."
    ".getMLText("to").": ".getReadableDate($event["stop"])."
    ".getMLText("last_update").": ".getLongReadableDate($event["date"])."
    ".getMLText("user").": ".(is_object($u)?htmlspecialchars($u->getFullName()):getMLText("unknown_user"))."
    "; - - $this->contentContainerEnd(); - - if (($user->getID()==$event["userID"])||($user->isAdmin())){ - - $this->contentHeading(getMLText("edit")); - $this->contentContainerStart(); - - print ""; - - $this->contentContainerEnd(); - } - - $this->htmlEndPage(); - } /* }}} */ -} -?> diff --git a/views/blue/class.ViewFolder.php b/views/blue/class.ViewFolder.php deleted file mode 100644 index 19f2c9a97..000000000 --- a/views/blue/class.ViewFolder.php +++ /dev/null @@ -1,161 +0,0 @@ - - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ - -/** - * Include parent class - */ -require_once("class.BlueStyle.php"); - -/** - * Class which outputs the html page for ViewFolder view - * - * @category DMS - * @package SeedDMS - * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann - * @copyright Copyright (C) 2002-2005 Markus Westphal, - * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, - * 2010-2012 Uwe Steinmann - * @version Release: @package_version@ - */ -class SeedDMS_View_ViewFolder extends SeedDMS_Blue_Style { - - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $orderby = $this->params['orderby']; - $enableFolderTree = $this->params['enableFolderTree']; - $showtree = $this->params['showtree']; - - $folderid = $folder->getId(); - - $this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName())))); - - $this->globalNavigation($folder); - $this->contentStart(); - $this->pageNavigation(getFolderPathHTML($folder), "view_folder", $folder); - - if ($enableFolderTree) $this->printTreeNavigation($folderid,$showtree); - - $this->contentHeading(getMLText("folder_infos")); - - $owner = $folder->getOwner(); - $this->contentContainerStart(); - print "\n\n". - "\n". - "\n\n\n". - "\n". - "\n\n"; - $attributes = $folder->getAttributes(); - if($attributes) { - foreach($attributes as $attribute) { - $attrdef = $attribute->getAttributeDefinition(); - ?> - - - - - \n"; - $this->contentContainerEnd(); - - $this->contentHeading(getMLText("folder_contents")); - $this->contentContainerStart(); - - $subFolders = $folder->getSubFolders($orderby); - $subFolders = SeedDMS_Core_DMS::filterAccess($subFolders, $user, M_READ); - $documents = $folder->getDocuments($orderby); - $documents = SeedDMS_Core_DMS::filterAccess($documents, $user, M_READ); - - if ((count($subFolders) > 0)||(count($documents) > 0)){ - print "
    ".getMLText("owner").":getEmail())."\">".htmlspecialchars($owner->getFullName())."". - "
    ".getMLText("comment").":".htmlspecialchars($folder->getComment())."
    getName()); ?>:getValue()); ?>
    "; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - } - else printMLText("empty_notify_list"); - - - foreach($subFolders as $subFolder) { - - $owner = $subFolder->getOwner(); - $comment = $subFolder->getComment(); - if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; - $subsub = $subFolder->getSubFolders(); - $subsub = SeedDMS_Core_DMS::filterAccess($subsub, $user, M_READ); - $subdoc = $subFolder->getDocuments(); - $subdoc = SeedDMS_Core_DMS::filterAccess($subdoc, $user, M_READ); - - print ""; - // print ""; - print "\n"; - print "\n"; - print ""; - print ""; - print ""; - print ""; - print "\n"; - } - - foreach($documents as $document) { - - $owner = $document->getOwner(); - $comment = $document->getComment(); - if (strlen($comment) > 50) $comment = substr($comment, 0, 47) . "..."; - $docID = $document->getID(); - if($latestContent = $document->getLatestContent()) { - $version = $latestContent->getVersion(); - $status = $latestContent->getStatus(); - - print ""; - - if (file_exists($dms->contentDir . $latestContent->getPath())) - print ""; - else print ""; - - print "\n"; - print ""; - print ""; - print ""; - print ""; - print "\n"; - } - } - - if ((count($subFolders) > 0)||(count($documents) > 0)) echo "\n
    ".getMLText("name")."".getMLText("owner")."".getMLText("status")."".getMLText("version")."".getMLText("comment")."
    getID()."&showtree=".$showtree."\">getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . "".htmlspecialchars($owner->getFullName())."".count($subsub)." ".getMLText("folders").", ".count($subdoc)." ".getMLText("documents")."".htmlspecialchars($comment)."
    getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">" . htmlspecialchars($document->getName()) . "".htmlspecialchars($owner->getFullName()).""; - if ( $document->isLocked() ) { - print "getImgPath("lock.png")."\" title=\"". getMLText("locked_by").": ".htmlspecialchars($document->getLockingUser()->getFullName())."\"> "; - } - print getOverallStatusText($status["status"])."".$version."".htmlspecialchars($comment)."
    \n"; - - $this->contentContainerEnd(); - - if ($enableFolderTree) print ""; - - $this->contentEnd(); - - $this->htmlEndPage(); - } /* }}} */ -} - -?> From 87eb1e0dc9eec83be60df2b0c94d61acc5af91f2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 1 Jun 2015 08:39:44 +0200 Subject: [PATCH 0145/2006] turn off by default --- ext/example/conf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/example/conf.php b/ext/example/conf.php index 6f9f09827..c6fd2ce56 100644 --- a/ext/example/conf.php +++ b/ext/example/conf.php @@ -2,7 +2,7 @@ $EXT_CONF['example'] = array( 'title' => 'Example Extension', 'description' => 'This sample extension demonstrate the use of various hooks', - 'disable' => false, + 'disable' => true, 'version' => '1.0.0', 'releasedate' => '2013-05-03', 'author' => array('name'=>'Uwe Steinmann', 'email'=>'uwe@steinmann.cx', 'company'=>'MMK GmbH'), From 68e3045da2dae5efcde17e0bb1c91821d6c541de Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 1 Jun 2015 08:40:03 +0200 Subject: [PATCH 0146/2006] make table condensed to save some space --- 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 feed7f3bd..d54c58a76 100644 --- a/views/bootstrap/class.ViewFolder.php +++ b/views/bootstrap/class.ViewFolder.php @@ -248,7 +248,7 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style { if(is_string($txt)) echo $txt; else { - print ""; + print "
    "; print "\n\n"; print "\n"; print "\n"; From 4e15fee3fb5e70ec12624f8148809b2805f51084 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 1 Jun 2015 14:01:02 +0200 Subject: [PATCH 0147/2006] set url for notifaction mail --- op/op.ReviewDocument.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/op/op.ReviewDocument.php b/op/op.ReviewDocument.php index 84054723e..082ea758f 100644 --- a/op/op.ReviewDocument.php +++ b/op/op.ReviewDocument.php @@ -110,6 +110,7 @@ if ($_POST["reviewType"] == "ind" || $_POST["reviewType"] == "grp") { $params['status'] = getReviewStatusText($_POST["reviewStatus"]); $params['comment'] = strip_tags($_POST['comment']); $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $settings->_siteName; $params['http_root'] = $settings->_httpRoot; $notifier->toList($user, $nl["users"], $subject, $message, $params); @@ -133,6 +134,7 @@ if($olddocstatus['status'] != $newdocstatus['status']) { $params['folder_path'] = $folder->getFolderPathPlain(); $params['status'] = getReviewStatusText(S_REJECTED); $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $settings->_siteName; $params['http_root'] = $settings->_httpRoot; $notifier->toList($user, $nl["users"], $subject, $message, $params); From ed5a5bb069d6ac67c0ed3798ed7871730cf09daf Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 1 Jun 2015 14:01:23 +0200 Subject: [PATCH 0148/2006] fix typo in variable name --- 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 07a608ef6..8bb5863b6 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -3820,7 +3820,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ $indstatus = array_pop($revisionStatus[$field]); /* check if revision workflow has been started already */ - if($indstatusi['status'] == S_LOG_SLEEPING && ($status == S_LOG_REJECTED || $status == S_LOG_ACCEPTED)) + if($indstatus['status'] == S_LOG_SLEEPING && ($status == S_LOG_REJECTED || $status == S_LOG_ACCEPTED)) return -5; if ($indstatus["status"] == -2) { From 34bd22f40eebe462f318fe86d711cea785e6c542 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 1 Jun 2015 14:01:56 +0200 Subject: [PATCH 0149/2006] separate busines logic into controller --- controllers/class.ReviseDocument.php | 112 ++++++++++++++++++++ op/op.ReviseDocument.php | 149 ++++++++------------------- 2 files changed, 153 insertions(+), 108 deletions(-) create mode 100644 controllers/class.ReviseDocument.php diff --git a/controllers/class.ReviseDocument.php b/controllers/class.ReviseDocument.php new file mode 100644 index 000000000..a064db329 --- /dev/null +++ b/controllers/class.ReviseDocument.php @@ -0,0 +1,112 @@ + + * @copyright Copyright (C) 2010-2013 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Class which does the busines logic for downloading a document + * + * @category DMS + * @package SeedDMS + * @author Uwe Steinmann + * @copyright Copyright (C) 2010-2013 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_Controller_ReviseDocument extends SeedDMS_Controller_Common { + + public function run() { + $dms = $this->params['dms']; + $user = $this->params['user']; + $settings = $this->params['settings']; + $document = $this->params['document']; + $content = $this->params['content']; + $revisionstatus = $this->params['revisionstatus']; + $revisiontype = $this->params['revisiontype']; + $group = $this->params['group']; + $comment = $this->params['comment']; + + /* Get the document id and name before removing the document */ + $docname = $document->getName(); + $documentid = $document->getID(); + + if(!$this->callHook('preReviseDocument', $document)) { + } + + $result = $this->callHook('reviseDocument', $document); + if($result === null) { + + if ($revisiontype == "ind") { + if(0 > $content->setRevision($user, $user, $revisionstatus, $comment)) { + $this->error = 1; + $this->errormsg = "revision_update_failed"; + return false; + } + } elseif ($revisiontype == "grp") { + if(0 > $content->setRevision($group, $user, $revisionstatus, $comment)) { + $this->error = 1; + $this->errormsg = "revision_update_failed"; + return false; + } + } + } + + /* Check to see if the overall status for the document version needs to be + * updated. + */ + $result = $this->callHook('reviseUpdateDocumentStatus', $document); + if($result === null) { + if ($revisionstatus == -1){ + if($content->setStatus(S_REJECTED,$comment,$user)) { + $this->error = 1; + $this->errormsg = "revision_update_failed"; + return false; + } + } else { + $docRevisionStatus = $content->getRevisionStatus(); + if (is_bool($docRevisionStatus) && !$docRevisionStatus) { + $this->error = 1; + $this->errormsg = "cannot_retrieve_revision_snapshot"; + return false; + } + $revisionCT = 0; + $revisionTotal = 0; + foreach ($docRevisionStatus as $drstat) { + if ($drstat["status"] == 1) { + $revisionCT++; + } + if ($drstat["status"] != -2) { + $revisionTotal++; + } + } + // If all revisions have been received and there are no rejections, + // then release the document otherwise put it back into revision workflow + if ($revisionCT == $revisionTotal) { + $newStatus=S_RELEASED; + if ($content->finishRevision($user, $newStatus, '', getMLText("automatic_status_update"))) { + } + } else { + $newStatus=S_IN_REVISION; + if($content->setStatus($newStatus,$comment,$user)) { + $this->error = 1; + $this->errormsg = "revision_update_failed"; + return false; + } + } + } + } + + if(!$this->callHook('postReviseDocument', $document)) { + } + + return true; + } +} + diff --git a/op/op.ReviseDocument.php b/op/op.ReviseDocument.php index ec035177a..2ef633378 100644 --- a/op/op.ReviseDocument.php +++ b/op/op.ReviseDocument.php @@ -28,6 +28,10 @@ include("../inc/inc.ClassEmail.php"); include("../inc/inc.DBInit.php"); include("../inc/inc.Authentication.php"); include("../inc/inc.ClassUI.php"); +include("../inc/inc.ClassController.php"); + +$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); +$controller = Controller::factory($tmp[1]); /* Check if the form data comes for a trusted request */ if(!checkFormKey('revisedocument')) { @@ -45,6 +49,8 @@ if (!is_object($document)) { UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); } +$folder = $document->getFolder(); + if ($document->getAccessMode($user) < M_READ) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); } @@ -66,6 +72,7 @@ if ($latestContent->getVersion()!=$version) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); } +$olddocstatus = $content->getStatus(); // verify if document has expired if ($document->hasExpired()){ UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); @@ -76,23 +83,24 @@ if (!isset($_POST["revisionStatus"]) || !is_numeric($_POST["revisionStatus"]) || UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_revision_status")); } -if ($_POST["revisionType"] == "ind") { - $comment = $_POST["comment"]; - $revisionLogID = $latestContent->setRevision($user, $user, $_POST["revisionStatus"], $comment); -} elseif ($_POST["revisionType"] == "grp") { - $comment = $_POST["comment"]; +$controller->setParam('document', $document); +$controller->setParam('content', $latestContent); +$controller->setParam('revisionstatus', $_POST["revisionStatus"]); +$controller->setParam('revisiontype', $_POST["revisionType"]); +if ($_POST["revisionType"] == "grp") { $group = $dms->getGroup($_POST['revisionGroup']); - $revisionLogID = $latestContent->setRevision($group, $user, $_POST["revisionStatus"], $comment); +} else { + $group = null; +} +$controller->setParam('group', $group); +$controller->setParam('comment', $_POST["comment"]); +if(!$controller->run()) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText($controller->getErrorMsg())); } -if(0 > $revisionLogID) { - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("revision_update_failed")); -} else { - // Send an email notification to the document updater. +if ($_POST["revisionType"] == "ind" || $_POST["revisionType"] == "grp") { if($notifier) { $nl=$document->getNotifyList(); - $folder = $document->getFolder(); - $subject = "revision_submit_email_subject"; $message = "revision_submit_email_body"; $params = array(); @@ -100,7 +108,7 @@ if(0 > $revisionLogID) { $params['version'] = $version; $params['folder_path'] = $folder->getFolderPathPlain(); $params['status'] = getRevisionStatusText($_POST["revisionStatus"]); - $params['comment'] = $comment; + $params['comment'] = strip_tags($_POST['comment']); $params['username'] = $user->getFullName(); $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $settings->_siteName; @@ -113,102 +121,27 @@ if(0 > $revisionLogID) { } } -/* Check to see if the overall status for the document version needs - * to be updated. - */ -if ($_POST["revisionStatus"] == -1){ - - if($content->setStatus(S_REJECTED,$comment,$user)) { - // Send notification to subscribers. - if($notifier) { - $nl=$document->getNotifyList(); - $folder = $document->getFolder(); - $subject = "document_status_changed_email_subject"; - $message = "document_status_changed_email_body"; - $params = array(); - $params['name'] = $document->getName(); - $params['folder_path'] = $folder->getFolderPathPlain(); - $params['status'] = getRevisionStatusText(S_REJECTED); - $params['username'] = $user->getFullName(); - $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); - $params['sitename'] = $settings->_siteName; - $params['http_root'] = $settings->_httpRoot; - $notifier->toList($user, $nl["users"], $subject, $message, $params); - foreach ($nl["groups"] as $grp) { - $notifier->toGroup($user, $grp, $subject, $message, $params); - } - $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params); - } - } - -} else { - - $docRevisionStatus = $content->getRevisionStatus(); - if (is_bool($docRevisionStatus) && !$docRevisionStatus) { - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("cannot_retrieve_revision_snapshot")); - } - $revisionCT = 0; - $revisionTotal = 0; - foreach ($docRevisionStatus as $drstat) { - if ($drstat["status"] == 1) { - $revisionCT++; - } - if ($drstat["status"] != -2) { - $revisionTotal++; - } - } - // If all revisions have been received and there are no rejections, - // then release the document otherwise put it back into revision workflow - if ($revisionCT == $revisionTotal) { - $newStatus=S_RELEASED; - if ($content->finishRevision($user, $newStatus, '', getMLText("automatic_status_update"))) { - // Send notification to subscribers. - if($notifier) { - $nl=$document->getNotifyList(); - $folder = $document->getFolder(); - $subject = "document_status_changed_email_subject"; - $message = "document_status_changed_email_body"; - $params = array(); - $params['name'] = $document->getName(); - $params['folder_path'] = $folder->getFolderPathPlain(); - $params['status'] = getRevisionStatusText($newStatus); - $params['username'] = $user->getFullName(); - $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); - $params['sitename'] = $settings->_siteName; - $params['http_root'] = $settings->_httpRoot; - $notifier->toList($user, $nl["users"], $subject, $message, $params); - foreach ($nl["groups"] as $grp) { - $notifier->toGroup($user, $grp, $subject, $message, $params); - } - } - } - } else { - /* Setting the status to S_IN_REVISION though it is already in that - * status doesn't harm, as setStatus() will catch it. - */ - $newStatus=S_IN_REVISION; - if($content->setStatus($newStatus,$comment,$user)) { - // Send notification to subscribers. - if($notifier) { - $nl=$document->getNotifyList(); - $folder = $document->getFolder(); - $subject = "document_status_changed_email_subject"; - $message = "document_status_changed_email_body"; - $params = array(); - $params['name'] = $document->getName(); - $params['folder_path'] = $folder->getFolderPathPlain(); - $params['status'] = getRevisionStatusText($newStatus); - $params['username'] = $user->getFullName(); - $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); - $params['sitename'] = $settings->_siteName; - $params['http_root'] = $settings->_httpRoot; - $notifier->toList($user, $nl["users"], $subject, $message, $params); - foreach ($nl["groups"] as $grp) { - $notifier->toGroup($user, $grp, $subject, $message, $params); - } - $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params); - } +/* Send notification about status change only if status has actually changed */ +$newdocstatus = $content->getStatus(); +if($olddocstatus['status'] != $newdocstatus['status']) { + // Send notification to subscribers. + if($notifier) { + $nl=$document->getNotifyList(); + $subject = "document_status_changed_email_subject"; + $message = "document_status_changed_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['status'] = getRevisionStatusText(S_REJECTED); + $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); + $params['sitename'] = $settings->_siteName; + $params['http_root'] = $settings->_httpRoot; + $notifier->toList($user, $nl["users"], $subject, $message, $params); + foreach ($nl["groups"] as $grp) { + $notifier->toGroup($user, $grp, $subject, $message, $params); } + $notifier->toIndividual($user, $content->getUser(), $subject, $message, $params); } } From 45d3ebab3d745e448374511d082cc3e82957a5c1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 1 Jun 2015 16:05:03 +0200 Subject: [PATCH 0150/2006] place business login into controller class --- controllers/class.ReceiptDocument.php | 67 +++++++++++++++++++++++++++ op/op.ReceiptDocument.php | 31 +++++++------ 2 files changed, 85 insertions(+), 13 deletions(-) create mode 100644 controllers/class.ReceiptDocument.php diff --git a/controllers/class.ReceiptDocument.php b/controllers/class.ReceiptDocument.php new file mode 100644 index 000000000..60b4d5c34 --- /dev/null +++ b/controllers/class.ReceiptDocument.php @@ -0,0 +1,67 @@ + + * @copyright Copyright (C) 2010-2013 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Class which does the busines logic for downloading a document + * + * @category DMS + * @package SeedDMS + * @author Uwe Steinmann + * @copyright Copyright (C) 2010-2013 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_Controller_ReceiptDocument extends SeedDMS_Controller_Common { + + public function run() { + $dms = $this->params['dms']; + $user = $this->params['user']; + $settings = $this->params['settings']; + $document = $this->params['document']; + $content = $this->params['content']; + $receiptstatus = $this->params['receiptstatus']; + $receipttype = $this->params['receipttype']; + $group = $this->params['group']; + $comment = $this->params['comment']; + + /* Get the document id and name before removing the document */ + $docname = $document->getName(); + $documentid = $document->getID(); + + if(!$this->callHook('preReceiptDocument', $document)) { + } + + $result = $this->callHook('receiptDocument', $document); + if($result === null) { + + if ($receipttype == "ind") { + if(0 > $content->setReceiptByInd($user, $user, $receiptstatus, $comment)) { + $this->error = 1; + $this->errormsg = "receipt_update_failed"; + return false; + } + } elseif ($receipttype == "grp") { + if(0 > $content->setReceiptByGrp($group, $user, $receiptstatus, $comment)) { + $this->error = 1; + $this->errormsg = "receipt_update_failed"; + return false; + } + } + } + + if(!$this->callHook('postReceiptDocument', $document)) { + } + + return true; + } +} + diff --git a/op/op.ReceiptDocument.php b/op/op.ReceiptDocument.php index 7b408bf94..509e3938c 100644 --- a/op/op.ReceiptDocument.php +++ b/op/op.ReceiptDocument.php @@ -28,6 +28,10 @@ include("../inc/inc.ClassEmail.php"); include("../inc/inc.DBInit.php"); include("../inc/inc.Authentication.php"); include("../inc/inc.ClassUI.php"); +include("../inc/inc.ClassController.php"); + +$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); +$controller = Controller::factory($tmp[1]); /* Check if the form data comes for a trusted request */ if(!checkFormKey('receiptdocument')) { @@ -45,6 +49,8 @@ if (!is_object($document)) { UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); } +$folder = $document->getFolder(); + if ($document->getAccessMode($user) < M_READ) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); } @@ -76,20 +82,19 @@ if (!isset($_POST["receiptStatus"]) || !is_numeric($_POST["receiptStatus"]) || UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_receipt_status")); } -if ($_POST["receiptType"] == "ind") { - - $comment = $_POST["comment"]; - $receiptLogID = $latestContent->setReceiptByInd($user, $user, $_POST["receiptStatus"], $comment); - if(0 > $receiptLogID) { - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("receipt_update_failed")); - } -} elseif ($_POST["receiptType"] == "grp") { - $comment = $_POST["comment"]; +$controller->setParam('document', $document); +$controller->setParam('content', $latestContent); +$controller->setParam('receiptstatus', $_POST["receiptStatus"]); +$controller->setParam('receipttype', $_POST["receiptType"]); +if ($_POST["receiptType"] == "grp") { $group = $dms->getGroup($_POST['receiptGroup']); - $receiptLogID = $latestContent->setReceiptByGrp($group, $user, $_POST["receiptStatus"], $comment); - if(0 > $receiptLogID) { - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("receipt_update_failed")); - } +} else { + $group = null; +} +$controller->setParam('group', $group); +$controller->setParam('comment', $_POST["comment"]); +if(!$controller->run()) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText($controller->getErrorMsg())); } header("Location:../out/out.ViewDocument.php?documentid=".$documentid); From 312e619fa6d43c2aa487feeda6a01bf667e5486b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 1 Jun 2015 17:33:12 +0200 Subject: [PATCH 0151/2006] take out echo, remove $limit parameter from getStatus() The $limit parameter has not been used and if if was used, the method would have returned false in many cases because the number records would have been > 1 --- SeedDMS_Core/Core/inc.ClassDocument.php | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 8bb5863b6..17ab05cec 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -2514,7 +2514,6 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ $queryStr = "UPDATE tblDocumentContent SET revisiondate = CURRENT_TIMESTAMP WHERE `document` = " . $this->_document->getID() . " AND `version` = " . $this->_version; else $queryStr = "UPDATE tblDocumentContent SET revisiondate = ".$db->qstr($date)." WHERE `document` = " . $this->_document->getID() . " AND `version` = " . $this->_version; - echo $queryStr; if (!$db->getResult($queryStr)) return false; @@ -2675,8 +2674,10 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ * then its status is set to S_RELEASED immediately. Any change of * the status is monitored in the table tblDocumentStatusLog. This * function will always return the latest entry for the content. + * + * @return array latest record from tblDocumentStatusLog */ - function getStatus($limit=1) { /* {{{ */ + function getStatus() { /* {{{ */ $db = $this->_document->_dms->getDB(); if (!is_numeric($limit)) return false; @@ -2684,20 +2685,6 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ // Retrieve the current overall status of the content represented by // this object. if (!isset($this->_status)) { - /* - if (!$db->createTemporaryTable("ttstatid", $forceTemporaryTable)) { - return false; - } - $queryStr="SELECT `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". - "`tblDocumentStatusLog`.`comment`, `tblDocumentStatusLog`.`date`, ". - "`tblDocumentStatusLog`.`userID` ". - "FROM `tblDocumentStatus` ". - "LEFT JOIN `tblDocumentStatusLog` USING (`statusID`) ". - "LEFT JOIN `ttstatid` ON `ttstatid`.`maxLogID` = `tblDocumentStatusLog`.`statusLogID` ". - "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". - "AND `tblDocumentStatus`.`documentID` = '". $this->_document->getID() ."' ". - "AND `tblDocumentStatus`.`version` = '". $this->_version ."' "; - */ $queryStr= "SELECT `tblDocumentStatus`.*, `tblDocumentStatusLog`.`status`, ". "`tblDocumentStatusLog`.`comment`, `tblDocumentStatusLog`.`date`, ". @@ -2706,7 +2693,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ "LEFT JOIN `tblDocumentStatusLog` USING (`statusID`) ". "WHERE `tblDocumentStatus`.`documentID` = '". $this->_document->getID() ."' ". "AND `tblDocumentStatus`.`version` = '". $this->_version ."' ". - "ORDER BY `tblDocumentStatusLog`.`statusLogID` DESC LIMIT ".(int) $limit; + "ORDER BY `tblDocumentStatusLog`.`statusLogID` DESC LIMIT 1"; $res = $db->getResultArray($queryStr); if (is_bool($res) && !$res) From c460c9e6742b082f9bab3f2316ec63515ab9c39c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 1 Jun 2015 17:34:52 +0200 Subject: [PATCH 0152/2006] pass content not document to hooks --- controllers/class.ApproveDocument.php | 8 ++++---- controllers/class.ReceiptDocument.php | 6 +++--- controllers/class.ReviewDocument.php | 8 ++++---- controllers/class.ReviseDocument.php | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/controllers/class.ApproveDocument.php b/controllers/class.ApproveDocument.php index c101ba9c6..5296b6d5f 100644 --- a/controllers/class.ApproveDocument.php +++ b/controllers/class.ApproveDocument.php @@ -37,10 +37,10 @@ class SeedDMS_Controller_ApproveDocument extends SeedDMS_Controller_Common { $docname = $document->getName(); $documentid = $document->getID(); - if(!$this->callHook('preApproveDocument', $document)) { + if(!$this->callHook('preApproveDocument', $content)) { } - $result = $this->callHook('approveDocument', $document); + $result = $this->callHook('approveDocument', $content); if($result === null) { if ($approvaltype == "ind") { if(0 > $content->setApprovalByInd($user, $user, $approvalstatus, $comment)) { @@ -60,7 +60,7 @@ class SeedDMS_Controller_ApproveDocument extends SeedDMS_Controller_Common { /* Check to see if the overall status for the document version needs to be * updated. */ - $result = $this->callHook('approveUpdateDocumentStatus', $document); + $result = $this->callHook('approveUpdateDocumentStatus', $content); if($result === null) { /* If document was rejected, set the document status to S_REJECTED right away */ if ($approvalstatus == -1){ @@ -94,7 +94,7 @@ class SeedDMS_Controller_ApproveDocument extends SeedDMS_Controller_Common { } } - if(!$this->callHook('postApproveDocument', $document)) { + if(!$this->callHook('postApproveDocument', $content)) { } return true; diff --git a/controllers/class.ReceiptDocument.php b/controllers/class.ReceiptDocument.php index 60b4d5c34..83cc8deea 100644 --- a/controllers/class.ReceiptDocument.php +++ b/controllers/class.ReceiptDocument.php @@ -37,10 +37,10 @@ class SeedDMS_Controller_ReceiptDocument extends SeedDMS_Controller_Common { $docname = $document->getName(); $documentid = $document->getID(); - if(!$this->callHook('preReceiptDocument', $document)) { + if(!$this->callHook('preReceiptDocument', $content)) { } - $result = $this->callHook('receiptDocument', $document); + $result = $this->callHook('receiptDocument', $content); if($result === null) { if ($receipttype == "ind") { @@ -58,7 +58,7 @@ class SeedDMS_Controller_ReceiptDocument extends SeedDMS_Controller_Common { } } - if(!$this->callHook('postReceiptDocument', $document)) { + if(!$this->callHook('postReceiptDocument', $content)) { } return true; diff --git a/controllers/class.ReviewDocument.php b/controllers/class.ReviewDocument.php index aec1e7667..936503679 100644 --- a/controllers/class.ReviewDocument.php +++ b/controllers/class.ReviewDocument.php @@ -37,10 +37,10 @@ class SeedDMS_Controller_ReviewDocument extends SeedDMS_Controller_Common { $docname = $document->getName(); $documentid = $document->getID(); - if(!$this->callHook('preReviewDocument', $document)) { + if(!$this->callHook('preReviewDocument', $content)) { } - $result = $this->callHook('reviewDocument', $document); + $result = $this->callHook('reviewDocument', $content); if($result === null) { if ($reviewtype == "ind") { @@ -61,7 +61,7 @@ class SeedDMS_Controller_ReviewDocument extends SeedDMS_Controller_Common { /* Check to see if the overall status for the document version needs to be * updated. */ - $result = $this->callHook('reviewUpdateDocumentStatus', $document); + $result = $this->callHook('reviewUpdateDocumentStatus', $content); if($result === null) { if ($reviewstatus == -1){ if($content->setStatus(S_REJECTED,$comment,$user)) { @@ -119,7 +119,7 @@ class SeedDMS_Controller_ReviewDocument extends SeedDMS_Controller_Common { } } - if(!$this->callHook('postReviewDocument', $document)) { + if(!$this->callHook('postReviewDocument', $content)) { } return true; diff --git a/controllers/class.ReviseDocument.php b/controllers/class.ReviseDocument.php index a064db329..1720b270f 100644 --- a/controllers/class.ReviseDocument.php +++ b/controllers/class.ReviseDocument.php @@ -37,10 +37,10 @@ class SeedDMS_Controller_ReviseDocument extends SeedDMS_Controller_Common { $docname = $document->getName(); $documentid = $document->getID(); - if(!$this->callHook('preReviseDocument', $document)) { + if(!$this->callHook('preReviseDocument', $content)) { } - $result = $this->callHook('reviseDocument', $document); + $result = $this->callHook('reviseDocument', $content); if($result === null) { if ($revisiontype == "ind") { @@ -61,7 +61,7 @@ class SeedDMS_Controller_ReviseDocument extends SeedDMS_Controller_Common { /* Check to see if the overall status for the document version needs to be * updated. */ - $result = $this->callHook('reviseUpdateDocumentStatus', $document); + $result = $this->callHook('reviseUpdateDocumentStatus', $content); if($result === null) { if ($revisionstatus == -1){ if($content->setStatus(S_REJECTED,$comment,$user)) { @@ -103,7 +103,7 @@ class SeedDMS_Controller_ReviseDocument extends SeedDMS_Controller_Common { } } - if(!$this->callHook('postReviseDocument', $document)) { + if(!$this->callHook('postReviseDocument', $content)) { } return true; From 596a577529779b5758e97179ff3d6e2d130b2095 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 1 Jun 2015 17:35:25 +0200 Subject: [PATCH 0153/2006] show link to revise document even if still in workflow --- inc/inc.ClassAccessOperation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index 08174df6c..ed550e6d9 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -138,7 +138,7 @@ class SeedDMS_AccessOperation { if(get_class($this->obj) == 'SeedDMS_Core_Document') { $latestContent = $this->obj->getLatestContent(); $status = $latestContent->getStatus(); - if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]==S_RELEASED || $status["status"]==S_EXPIRED)) { + if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]!=S_OBSOLETE)) { return true; } } From 142af5c218755ba018b5c378ba4e598c63d8e2ee Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 1 Jun 2015 22:32:15 +0200 Subject: [PATCH 0154/2006] add several new phrases, some cleanup --- languages/ar_EG/lang.inc | 11 +++++++++-- languages/bg_BG/lang.inc | 11 +++++++++-- languages/ca_ES/lang.inc | 11 +++++++++-- languages/cs_CZ/lang.inc | 15 +++++++++++---- languages/de_DE/lang.inc | 27 +++++++++++++++++---------- languages/en_GB/lang.inc | 27 +++++++++++++++++---------- languages/es_ES/lang.inc | 17 ++++++++++++----- languages/fr_FR/lang.inc | 11 +++++++++-- languages/hu_HU/lang.inc | 11 +++++++++-- languages/it_IT/lang.inc | 11 +++++++++-- languages/nl_NL/lang.inc | 11 +++++++++-- languages/pl_PL/lang.inc | 11 +++++++++-- languages/pt_BR/lang.inc | 11 +++++++++-- languages/ro_RO/lang.inc | 11 +++++++++-- languages/ru_RU/lang.inc | 11 +++++++++-- languages/sk_SK/lang.inc | 11 +++++++++-- languages/sv_SE/lang.inc | 11 +++++++++-- languages/tr_TR/lang.inc | 11 +++++++++-- languages/zh_CN/lang.inc | 11 +++++++++-- languages/zh_TW/lang.inc | 11 +++++++++-- 20 files changed, 201 insertions(+), 61 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index a925d277c..96b389225 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -524,6 +524,7 @@ URL: [url]', 'lastaccess' => '', 'last_update' => 'اخر تحديث', 'legend' => 'دليل', +'librarydoc' => '', 'linked_documents' => 'مستندات متعلقة', 'linked_files' => 'ملحقات', 'link_alt_updatedocument' => 'اذا كنت تود تحميل ملفات اكبر من حجم الملفات المتاحة حاليا, من فضلك استخدم البديل صفحة التحميل.', @@ -645,6 +646,7 @@ URL: [url]', 'no_linked_files' => 'لايوجد ملفات مرتبطة', 'no_previous_versions' => 'لايوجد اصدارات سابقة', 'no_review_needed' => 'لايوجد مراجعات في الانتظار', +'no_revision_planed' => '', 'no_update_cause_locked' => 'لايمكنك تعديل المستند. قم بمخاطبة المستخدم الذي قام بحمايته من التعديل', 'no_user_image' => 'لا يوجد صورة متاحة', 'no_version_check' => '', @@ -762,6 +764,7 @@ URL: [url]', 'review_update_failed' => 'خطأ في تحديث حالة المراجعة. التحديث فشل.', 'revise_document' => '', 'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -851,8 +854,6 @@ URL: [url]', 'settings_activate_php_extension' => 'Activate PHP extension', 'settings_adminIP' => 'Admin IP', 'settings_adminIP_desc' => '', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => 'متقدم', 'settings_apache_mod_rewrite' => 'Apache - Module Rewrite', 'settings_Authentication' => '', @@ -897,6 +898,8 @@ URL: [url]', 'settings_dropFolderDir' => '', 'settings_dropFolderDir_desc' => '', 'settings_Edition' => 'اعدادات التحرير', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => '', 'settings_enableAdminRevApp_desc' => '', 'settings_enableCalendar' => '', @@ -933,6 +936,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => '', 'settings_enableRecursiveCount' => '', 'settings_enableRecursiveCount_desc' => '', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => '', 'settings_enableSelfRevApp_desc' => '', 'settings_enableThemeSelector' => '', @@ -974,6 +979,8 @@ URL: [url]', 'settings_install_zendframework' => '', 'settings_language' => '', 'settings_language_desc' => '', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => '', 'settings_logFileEnable_desc' => '', 'settings_logFileRotation' => '', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index f2dcbe896..fcfab086a 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -455,6 +455,7 @@ $text = array( 'lastaccess' => '', 'last_update' => 'Последно обновление', 'legend' => 'легенда', +'librarydoc' => '', 'linked_documents' => 'Свързани документи', 'linked_files' => 'Приложения', 'link_alt_updatedocument' => 'Ако искате да качите файлове над текущия лимит, използвайте друг начин.', @@ -552,6 +553,7 @@ $text = array( 'no_linked_files' => 'Няма свързани файлове', 'no_previous_versions' => 'Няма други версии', 'no_review_needed' => 'Рецензия не е нужна', +'no_revision_planed' => '', 'no_update_cause_locked' => 'Вие не можете да обновите документа. Свържете се с блокирщия го потребител.', 'no_user_image' => 'Изображение не е намерено', 'no_version_check' => '', @@ -640,6 +642,7 @@ $text = array( 'review_update_failed' => 'грешка при обновяване статуса на рецензията', 'revise_document' => '', 'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -716,8 +719,6 @@ $text = array( 'settings_activate_php_extension' => 'Активирай разширение на PHP', 'settings_adminIP' => 'Админско IP', 'settings_adminIP_desc' => 'Ако е сложено, то админа ще може да влиза само от това IP. Оставете празно за да избегнем апокалипсиса. Не работи с LDAP', -'settings_ADOdbPath' => 'Път към ADOdb', -'settings_ADOdbPath_desc' => 'Папка съдържаща ПАПКА ADOdb', 'settings_Advanced' => 'Допълнително', 'settings_apache_mod_rewrite' => 'Apache - Module Rewrite', 'settings_Authentication' => 'Настройки на автентификацията', @@ -762,6 +763,8 @@ $text = array( 'settings_dropFolderDir' => 'Директория за папката -пускане-', 'settings_dropFolderDir_desc' => 'Тази папка може да се ползва за -пускане- на файлове във файловата система на сървъра и импортиране от там вместо качване през браузър. Папката трябва да съдържа под-паки за всеки потребител който има права да работи по този начин.', 'settings_Edition' => 'Настройки редакция', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => 'Разреши Admin Rev App', 'settings_enableAdminRevApp_desc' => 'Изключи, за да скрия админа от списъка с рецензиращи/утвърждаващи', 'settings_enableCalendar' => 'Включи календаря', @@ -798,6 +801,8 @@ $text = array( 'settings_enablePasswordForgotten_desc' => 'Ако е включено, разрешава на потребителите да си възстанавяват паролата на email.', 'settings_enableRecursiveCount' => '', 'settings_enableRecursiveCount_desc' => '', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => '', 'settings_enableSelfRevApp_desc' => '', 'settings_enableThemeSelector' => '', @@ -839,6 +844,8 @@ $text = array( 'settings_install_zendframework' => 'Инсталирайте Zend Framework, ако ще използвате пълнотекстово търсене', 'settings_language' => 'Език по подразбиране', 'settings_language_desc' => 'Език по подразбиране (име на подпапката в папка "languages")', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => 'Включи лог-файл', 'settings_logFileEnable_desc' => 'Включи/изключи лог', 'settings_logFileRotation' => 'Превъртане на лога', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index 9a59ab64f..c387b51f2 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -460,6 +460,7 @@ URL: [url]', 'lastaccess' => '', 'last_update' => 'Última modificació', 'legend' => '', +'librarydoc' => '', 'linked_documents' => 'Documents relacionats', 'linked_files' => 'Adjunts', 'link_alt_updatedocument' => '', @@ -557,6 +558,7 @@ URL: [url]', 'no_linked_files' => 'No hi ha fitxers enllaçats', 'no_previous_versions' => 'No s\'han trobat altres versions', 'no_review_needed' => 'No hi ha revisions pendents.', +'no_revision_planed' => '', 'no_update_cause_locked' => 'Aquest document no es pot actualitzar. Si us plau, contacteu amb l\'usuari que l\'ha bloquejat.', 'no_user_image' => 'No es troba la imatge', 'no_version_check' => '', @@ -645,6 +647,7 @@ URL: [url]', 'review_update_failed' => 'Error actualitzant l\'estat de la revisió. L\'actualizació ha fallat.', 'revise_document' => '', 'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -721,8 +724,6 @@ URL: [url]', 'settings_activate_php_extension' => 'Activate PHP extension', 'settings_adminIP' => 'Admin IP', 'settings_adminIP_desc' => '', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => '', 'settings_apache_mod_rewrite' => 'Apache - Module Rewrite', 'settings_Authentication' => '', @@ -767,6 +768,8 @@ URL: [url]', 'settings_dropFolderDir' => '', 'settings_dropFolderDir_desc' => '', 'settings_Edition' => 'Edition settings', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => '', 'settings_enableAdminRevApp_desc' => '', 'settings_enableCalendar' => '', @@ -803,6 +806,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => '', 'settings_enableRecursiveCount' => '', 'settings_enableRecursiveCount_desc' => '', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => '', 'settings_enableSelfRevApp_desc' => '', 'settings_enableThemeSelector' => '', @@ -844,6 +849,8 @@ URL: [url]', 'settings_install_zendframework' => '', 'settings_language' => '', 'settings_language_desc' => '', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => '', 'settings_logFileEnable_desc' => 'Enable/disable log file', 'settings_logFileRotation' => 'Log File Rotation', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index 84b3cc6d0..6f03b9096 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/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 (682), kreml (455) +// Translators: Admin (683), kreml (455) $text = array( 'accept' => 'Přijmout', @@ -531,6 +531,7 @@ URL: [url]', 'lastaccess' => 'Poslední přístup', 'last_update' => 'Naposledy aktualizoval', 'legend' => 'Popisek', +'librarydoc' => '', 'linked_documents' => 'Související dokumenty', 'linked_files' => 'Přílohy', 'link_alt_updatedocument' => 'Hodláte-li nahrát soubory větší než je maximální velikost pro nahrávání, použijte prosím alternativní stránku.', @@ -652,6 +653,7 @@ URL: [url]', 'no_linked_files' => 'Žádné propojené soubory', 'no_previous_versions' => 'Nebyly nalezeny žádné jiné verze', 'no_review_needed' => 'Nic nečeká k revizi.', +'no_revision_planed' => '', 'no_update_cause_locked' => 'Proto nemůžete aktualizovat tento dokument. Prosím, kontaktujte uživatele, který ho zamknul.', 'no_user_image' => 'nebyl nalezen žádný obrázek', 'no_version_check' => 'Chyba při kontrole nové verze SeedDMS. Může to být způsobeno nastavením allow_url_fopen na 0 ve vaší php konfiguraci.', @@ -771,6 +773,7 @@ URL: [url]', 'review_update_failed' => 'Chyba při aktualizaci stavu kontroly. Aktualizace selhala.', 'revise_document' => '', 'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -860,8 +863,6 @@ URL: [url]', 'settings_activate_php_extension' => 'Activate PHP extension', 'settings_adminIP' => 'Admin IP', 'settings_adminIP_desc' => 'Pokud je nastaveno, admin se může přihlásit pouze z uvedené IP adresy. Ponechejte prázdné k udržení přístupu. Pozn: pracuje pouze s lokálním ověřováním (ne LDAP)', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => 'Advanced', 'settings_apache_mod_rewrite' => 'Apache - Module Rewrite', 'settings_Authentication' => 'Authentication settings', @@ -906,6 +907,8 @@ URL: [url]', 'settings_dropFolderDir' => 'Adresář pro přetažení složky', 'settings_dropFolderDir_desc' => 'Tento adresář může být použit k ukládání souborů do souborového systému serveru a jejich importování odtud, místo natahování přes prohlížeč. Adresář musí obsahovat podadresář pro každého uživatele, kterému je povoleno importovat soubory touto cestou.', 'settings_Edition' => '', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => '', 'settings_enableAdminRevApp_desc' => '', 'settings_enableCalendar' => '', @@ -942,6 +945,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => '', 'settings_enableRecursiveCount' => 'Povolit rekurzivní počítání dokumentů/složek', 'settings_enableRecursiveCount_desc' => 'Při zapnutí je počet dokumentů a složek v zobrazení složek určen počítáním všech objektů při rekurzivním zpracování složek a počítáním těch dokumentů a složek, ke kterým má uživatel přístup.', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => 'Povolit posouzení/schválení pro přihlášeného uživatele', 'settings_enableSelfRevApp_desc' => 'Povolte, pokud chcete aktuálně přihlášeného uvést jako posuzovatele/schvalovatele a pro přechody pracovního postupu', 'settings_enableThemeSelector' => 'Volba tématu', @@ -983,6 +988,8 @@ URL: [url]', 'settings_install_zendframework' => '', 'settings_language' => 'Default language', 'settings_language_desc' => '', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => '', 'settings_logFileEnable_desc' => '', 'settings_logFileRotation' => '', @@ -1230,7 +1237,7 @@ URL: [url]', 'update_fulltext_index' => 'Aktualizovat fulltext index', 'update_info' => 'Aktualizovat informace', 'update_locked_msg' => 'Tento dokument je zamčený.', -'update_recipients' => 'Update list of recipients', +'update_recipients' => '', 'update_reviewers' => 'Aktualizovat seznam kontrolorů', 'update_revisors' => '', 'update_transmittalitem' => '', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index b678144ea..4909a2539 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 (2051), dgrutsch (18) +// Translators: Admin (2067), dgrutsch (18) $text = array( 'accept' => 'Übernehmen', @@ -536,6 +536,7 @@ URL: [url]', 'lastaccess' => 'Letzter Zugriff', 'last_update' => 'Letzte Aktualisierung', 'legend' => 'Legende', +'librarydoc' => 'Dokument aus Bibliothek', 'linked_documents' => 'verknüpfte Dokumente', 'linked_files' => 'Anhänge', 'link_alt_updatedocument' => 'Wenn Sie ein Dokument hochladen möchten, das größer als die maximale Dateigröße ist, dann benutzen Sie bitte die alternative Upload-Seite.', @@ -646,7 +647,7 @@ URL: [url]', 'no_docs_locked' => 'Keine Dokumente gesperrt.', 'no_docs_to_approve' => 'Es gibt zur Zeit keine Dokumente, die eine Freigabe erfordern.', 'no_docs_to_look_at' => 'Keine Dokumente, nach denen geschaut werden müsste.', -'no_docs_to_receipt' => '', +'no_docs_to_receipt' => 'Keine Dokumentenempfangsbestätigung erforderlich', 'no_docs_to_review' => 'Es gibt zur Zeit keine Dokumente, die eine Prüfung erfordern.', 'no_docs_to_revise' => 'Es gibt zur Zeit keine Dokumente, die erneut geprüft werden müssen.', 'no_email_or_login' => 'Login und E-Mail müssen eingegeben werden', @@ -656,6 +657,7 @@ URL: [url]', 'no_linked_files' => 'Keine verknüpften Dokumente', 'no_previous_versions' => 'Keine anderen Versionen gefunden', 'no_review_needed' => 'Keine offenen Prüfungen.', +'no_revision_planed' => 'Keine Wiederholungsprüfung des Dokuments eingeplant.', 'no_update_cause_locked' => 'Sie können daher im Moment diese Datei nicht aktualisieren. Wenden Sie sich an den Benutzer, der die Sperrung eingerichtet hat', 'no_user_image' => 'Kein Bild vorhanden', 'no_version_check' => 'Ein Check auf neuere Versionen von SeedDMS ist fehlgeschlagen. Dies könnte daran liegen, dass allow_url_fopen in der PHP-Konfiguration auf 0 gesetzt ist.', @@ -790,11 +792,12 @@ URL: [url]', 'review_summary' => 'Übersicht Prüfungen', 'review_update_failed' => 'Störung bei Aktualisierung des Prüfstatus. Aktualisierung gescheitert.', 'revise_document' => 'Dokument überprüfen', -'revise_document_on' => '', +'revise_document_on' => 'Nächste Überprüfung des Dokuments am [date]', +'revision_date' => 'Datum der Wiederholungsprüfung', 'revision_log' => 'Protokoll der erneuten Prüfung', 'revisors' => 'Überprüfer', -'revisor_already_assigned' => '', -'revisor_already_removed' => '', +'revisor_already_assigned' => 'Benutzer bereits als Wiederholungsprüfer eingetragen.', +'revisor_already_removed' => 'Wiederholungsprüfer wurde bereits vom Prozess ausgeschlossen oder hat das Dokument bereits geprüft.', 'rewind_workflow' => 'Zurück zum Anfangszustand', 'rewind_workflow_email_body' => 'Workflow wurde zurückgestellt Dokument: [name] @@ -860,12 +863,12 @@ URL: [url]', 'select_grp_notification' => 'Klicken zur Auswahl einer Beobachtergruppe', 'select_grp_recipients' => 'Klicken zur Auswahl einer Empfängergruppe', 'select_grp_reviewers' => 'Klicken zur Auswahl einer Prüfgruppe', -'select_grp_revisors' => '', +'select_grp_revisors' => 'Klicken, um Wiederholungsprüfgruppen auszuwählen', 'select_ind_approvers' => 'Klicken zur Auswahl eines Freigebers', 'select_ind_notification' => 'Klicken zur Auswahl eines Beobachters', -'select_ind_recipients' => 'Click to select individual recipients', +'select_ind_recipients' => 'Klicken, um Empfänger auszuwählen', 'select_ind_reviewers' => 'Klicken zur Auswahl eines Prüfers', -'select_ind_revisors' => '', +'select_ind_revisors' => 'Klicken, um Wiederholungsprüfer auszuwählen', 'select_one' => 'Bitte wählen', 'select_users' => 'Klicken zur Auswahl eines Benutzers', 'select_workflow' => 'Workflow auswählen', @@ -880,8 +883,6 @@ URL: [url]', 'settings_activate_php_extension' => 'PHP-Erweiterung aktivieren', 'settings_adminIP' => 'Admin IP', 'settings_adminIP_desc' => 'Wenn hier eine IP-Nummer eingetragen wird, kann eine Anmeldung als Administrator nur von dieser Adresse erfolgen. Funktioniert nur mit Anmeldung über die Datenbank (nicht LDAP)', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => 'Erweitert', 'settings_apache_mod_rewrite' => 'Apache - Module Rewrite', 'settings_Authentication' => 'Authentifikations-Einstellungen', @@ -926,6 +927,8 @@ URL: [url]', 'settings_dropFolderDir' => 'Verzeichnis für Ablageordner', 'settings_dropFolderDir_desc' => 'Dieses Verzeichnis kann dazu benutzt werden Dokumente auf dem Server abzulegen und von dort zu importieren anstatt sie über den Browser hochzuladen. Das Verzeichnis muss ein Unterverzeichnis mit dem Login-Namen des angemeldeten Benutzers beinhalten.', 'settings_Edition' => 'Funktions-Einstellungen', +'settings_enableAcknowledgeWorkflow' => 'Ermögliche Bestätigung des Dokumentenempfang', +'settings_enableAcknowledgeWorkflow_desc' => 'Anwählen, um den Workflow zur Kenntnisnahme von Dokumenten einzuschalten', 'settings_enableAdminRevApp' => 'Admin darf freigeben/prüfen', 'settings_enableAdminRevApp_desc' => 'Anwählen, um Administratoren in der Liste der Prüfer und Freigeber auszugeben', 'settings_enableCalendar' => 'Kalender einschalten', @@ -962,6 +965,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => 'Setzen Sie diese Option, wenn Benutzer ein neues Password per E-Mail anfordern dürfen.', 'settings_enableRecursiveCount' => 'Rekursive Dokumenten-/Ordner-Zählung', 'settings_enableRecursiveCount_desc' => 'Wenn diese Option eingeschaltet ist, wird die Anzahl der Dokumente und Ordner in der Ordner-Ansicht rekursiv, unter Berücksichtigung der Zugriffsrechte ermittelt.', +'settings_enableRevisionWorkflow' => 'Ermögliche Wiederholungsprüfung von Dokumenten', +'settings_enableRevisionWorkflow_desc' => 'Anwählen, um den Workflow der Wiederholungsprüfung von Dokumenten nach einer einstellbaren Zeit zu ermöglichen.', 'settings_enableSelfRevApp' => 'Erlaube Prüfung/Freigabe durch angemeldeten Benutzer', 'settings_enableSelfRevApp_desc' => 'Anwählen, um den aktuell angemeldeten Benutzer in der Liste der Prüfer/Freigeber und für Workflow-Aktionen auswählbar zu machen.', 'settings_enableThemeSelector' => 'Auswahl des Themas', @@ -1003,6 +1008,8 @@ URL: [url]', 'settings_install_zendframework' => 'Installiere Zend Framework, wenn Sie die Volltextsuche einsetzen möchten.', 'settings_language' => 'Voreingestellte Sprache', 'settings_language_desc' => 'Voreingestellte Sprache (entspricht dem Unterverzeichnis im Verzeichnis \'languages\')', +'settings_libraryFolder' => 'Bibliotheksordner', +'settings_libraryFolder_desc' => 'Ordner aus dem Dokumente für neue Dokumente kopiert werden können.', 'settings_logFileEnable' => 'Log-Datei ein-/ausschalten', 'settings_logFileEnable_desc' => 'Anwählen, um alle Aktionen in einer Log-Datei im Datenverzeichnis zu speichern.', 'settings_logFileRotation' => 'Rotation der Log-Datei', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index 2fdf94747..01d01ff8e 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 (1179), dgrutsch (3), netixw (14) +// Translators: Admin (1195), dgrutsch (3), netixw (14) $text = array( 'accept' => 'Accept', @@ -536,6 +536,7 @@ URL: [url]', 'lastaccess' => 'Last access', 'last_update' => 'Last Update', 'legend' => 'Legend', +'librarydoc' => 'Document from library', 'linked_documents' => 'Related Documents', 'linked_files' => 'Attachments', 'link_alt_updatedocument' => 'If you would like to upload files bigger than the current maximum upload size, please use the alternative upload page.', @@ -656,6 +657,7 @@ URL: [url]', 'no_linked_files' => 'No linked files', 'no_previous_versions' => 'No other versions found', 'no_review_needed' => 'No review pending.', +'no_revision_planed' => 'No revision of document scheduled', 'no_update_cause_locked' => 'You can therefore not update this document. Please contact the locking user.', 'no_user_image' => 'No image found', 'no_version_check' => 'Checking for a new version of SeedDMS has failed! This could be caused by allow_url_fopen being set to 0 in your php configuration.', @@ -728,7 +730,7 @@ URL: [url]', 'removed_file_email_subject' => '[sitename]: [document] - Removed attachment', 'removed_recipient' => 'has been removed from the list of recipients.', 'removed_reviewer' => 'has been removed from the list of reviewers.', -'removed_revispr' => 'has been removed from the list of resubmitter.', +'removed_revispr' => 'has been removed from the list of revisors.', 'removed_workflow_email_body' => 'Removed workflow from document version Document: [name] Version: [version] @@ -798,10 +800,11 @@ URL: [url]', 'review_update_failed' => 'Error updating review status. Update failed.', 'revise_document' => 'Revise document', 'revise_document_on' => 'Next revision of document version on [date]', +'revision_date' => 'Date of revision', 'revision_log' => 'Revision log', 'revisors' => 'Revisors', -'revisor_already_assigned' => 'User is already assigned as an resubmitter.', -'revisor_already_removed' => 'Resubmitter has already been removed from revision process or has already revised the document.', +'revisor_already_assigned' => 'User is already assigned as an revisor.', +'revisor_already_removed' => 'Revisor has already been removed from revision process or has already revised the document.', 'rewind_workflow' => 'Rewind workflow', 'rewind_workflow_email_body' => 'Workflow was rewinded Document: [name] @@ -867,12 +870,12 @@ URL: [url]', 'select_grp_notification' => 'Click to select group notification', 'select_grp_recipients' => 'Click to select group of recipients', 'select_grp_reviewers' => 'Click to select group reviewer', -'select_grp_revisors' => 'Click to select group of resubmitters', +'select_grp_revisors' => 'Click to select group of revisors', 'select_ind_approvers' => 'Click to select individual approver', 'select_ind_notification' => 'Click to select individual notification', -'select_ind_recipients' => '', +'select_ind_recipients' => 'Click to select individual recipients', 'select_ind_reviewers' => 'Click to select individual reviewer', -'select_ind_revisors' => 'Click to select individual resubmitters', +'select_ind_revisors' => 'Click to select individual revisors', 'select_one' => 'Select one', 'select_users' => 'Click to select users', 'select_workflow' => 'Select workflow', @@ -887,8 +890,6 @@ URL: [url]', 'settings_activate_php_extension' => 'Activate PHP extension', 'settings_adminIP' => 'Admin IP', 'settings_adminIP_desc' => 'If set, admin can login only by specified IP address. Leave empty to avoid lose of access. NOTE: works only with local autentication (no LDAP)', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => 'Advanced', 'settings_apache_mod_rewrite' => 'Apache - Module Rewrite', 'settings_Authentication' => 'Authentication settings', @@ -933,6 +934,8 @@ URL: [url]', 'settings_dropFolderDir' => 'Directory for drop folder', 'settings_dropFolderDir_desc' => 'This directory can be used for dropping files on the server\'s file system and importing them from there instead of uploading via the browser. The directory must contain a sub directory for each user who is allowed to import files this way.', 'settings_Edition' => 'Edition settings', +'settings_enableAcknowledgeWorkflow' => 'Enable acknowledge of document reception', +'settings_enableAcknowledgeWorkflow_desc' => 'Enable, to turn on the workflow to acknowledge document reception.', 'settings_enableAdminRevApp' => 'Allow review/approval for admins', 'settings_enableAdminRevApp_desc' => 'Enable this if you want administrators to be listed as reviewers/approvers and for workflow transitions.', 'settings_enableCalendar' => 'Enable Calendar', @@ -969,6 +972,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => 'If you want to allow user to set a new password and send it by mail, check this option.', 'settings_enableRecursiveCount' => 'Enable recursive document/folder count', 'settings_enableRecursiveCount_desc' => 'If turned on, the number of documents and folders in the folder view will be determined by counting all objects by recursively processing the folders and counting those documents and folders the user is allowed to access.', +'settings_enableRevisionWorkflow' => 'Enable revision of documents', +'settings_enableRevisionWorkflow_desc' => 'Enable, to be able to run the workflow for revising a document after a given period of time.', 'settings_enableSelfRevApp' => 'Allow review/approval for logged in user', 'settings_enableSelfRevApp_desc' => 'Enable this if you want the currently logged in user to be listed as reviewers/approvers and for workflow transitions.', 'settings_enableThemeSelector' => 'Theme selection', @@ -1010,6 +1015,8 @@ URL: [url]', 'settings_install_zendframework' => 'Install Zend Framework, if you intend to use the full text search engine', 'settings_language' => 'Default language', 'settings_language_desc' => 'Default language (name of a subfolder in folder "languages")', +'settings_libraryFolder' => 'Library folder', +'settings_libraryFolder_desc' => 'Folder where documents can be copied to create new documents.', 'settings_logFileEnable' => 'Log File Enable', 'settings_logFileEnable_desc' => 'Enable/disable log file', 'settings_logFileRotation' => 'Log File Rotation', @@ -1257,7 +1264,7 @@ URL: [url]', 'update_fulltext_index' => 'Update fulltext index', 'update_info' => 'Update Information', 'update_locked_msg' => 'This document is locked.', -'update_recipients' => '', +'update_recipients' => 'Update list of recipients', 'update_reviewers' => 'Update List of Reviewers', 'update_revisors' => 'Update list of resubmitters', 'update_transmittalitem' => 'Update to latest document version', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index 70a567149..045f2fb88 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/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: acabello (20), Admin (938), angel (123), francisco (2), jaimem (14) +// Translators: acabello (20), Admin (940), angel (123), francisco (2), jaimem (14) $text = array( 'accept' => 'Aceptar', @@ -531,6 +531,7 @@ URL: [url]', 'lastaccess' => 'Último acceso', 'last_update' => 'Última modificación', 'legend' => 'Leyenda', +'librarydoc' => '', 'linked_documents' => 'Documentos relacionados', 'linked_files' => 'Adjuntos', 'link_alt_updatedocument' => 'Si desea subir archivos mayores que el tamaño máximo actualmente permitido, por favor, utilice la página de subida alternativa.', @@ -642,7 +643,7 @@ URL: [url]', 'no_docs_locked' => 'No hay documentos bloqueados.', 'no_docs_to_approve' => 'Actualmente no hay documentos que necesiten aprobación.', 'no_docs_to_look_at' => 'No hay documentos que necesiten atención.', -'no_docs_to_receipt' => 'Keine Dokumentenempfangsbestätigung erforderlich', +'no_docs_to_receipt' => '', 'no_docs_to_review' => 'Actualmente no hay documentos que necesiten revisión.', 'no_docs_to_revise' => '', 'no_email_or_login' => 'Debe ingresar el usuario o e-mail', @@ -652,6 +653,7 @@ URL: [url]', 'no_linked_files' => 'No hay ficheros vinculados', 'no_previous_versions' => 'No se han encontrado otras versiones', 'no_review_needed' => 'No hay revisiones pendientes.', +'no_revision_planed' => '', 'no_update_cause_locked' => 'No puede actualizar este documento. Contacte con el usuario que lo bloqueó.', 'no_user_image' => 'No se encontró imagen', 'no_version_check' => 'Ha fallado la comprobación de nuevas versiones. En su configuración de PHP, revise que allow_url_fopen no esté en 0', @@ -776,7 +778,8 @@ URL: [url]', 'review_summary' => 'Resumen de revisión', 'review_update_failed' => 'Error actualizando el estado de la revisión. La actualización ha fallado.', 'revise_document' => '', -'revise_document_on' => 'Nächste Überprüfung des Dokuments am [date]', +'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -866,8 +869,6 @@ URL: [url]', 'settings_activate_php_extension' => 'Activar extensión PHP', 'settings_adminIP' => 'IP de administración', 'settings_adminIP_desc' => 'Si establece que el administrador solo puede conectar desde una dirección IP específica, deje en blanco para evitar el control. NOTA: funciona únicamente con autenticación local (no LDAP).', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => 'Avanzado', 'settings_apache_mod_rewrite' => 'Apache - Módulo Reescritura', 'settings_Authentication' => 'Configuración de autenticación', @@ -912,6 +913,8 @@ URL: [url]', 'settings_dropFolderDir' => 'Carpeta para dejar ficheros', 'settings_dropFolderDir_desc' => 'Esta carpeta puede ser usada para dejar ficheros en el sistema de archivos del servidor e importarlos desde ahí en lugar de subirlos vía navegador. La carpeta debe contener un subdirectorio para cada usuario que tenga permiso para importar ficheros de esta forma.', 'settings_Edition' => 'Configuración de edición', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => 'Habilitar Administrador Rev Apr', 'settings_enableAdminRevApp_desc' => 'Deseleccione para no mostrar al administrador como revisor/aprobador', 'settings_enableCalendar' => 'Habilitar calendario', @@ -948,6 +951,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => 'Si quiere permitir a los usuarios fijar una nueva contraseña recibiendo un correo electrónico, active esta opción.', 'settings_enableRecursiveCount' => 'Habilitar cuenta de documento/carpeta recursivo', 'settings_enableRecursiveCount_desc' => 'Si cambia a activado, el número de documentos y carpetas en la carpeta será determinado por la cuenta de todos los objetos recursivos procesados de la carpeta y una vez contados el usuarios tendrá permiso para acceder.', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => 'Permitir al usuario identificado revisar/aprobar.', 'settings_enableSelfRevApp_desc' => 'Habilitar esto si quiere que el usuario identificado sea listado como revisor/aprobador y para las transiciones del flujo de trabajo.', 'settings_enableThemeSelector' => 'Selección de temas (skins)', @@ -989,6 +994,8 @@ URL: [url]', 'settings_install_zendframework' => 'Instale Zend Framework, si quiere usar el sistema de búsqueda de texto completo', 'settings_language' => 'Idioma por defecto', 'settings_language_desc' => 'Idioma por defecto (nombre de una subcarpeta en la carpeta "languages")', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => 'Archivo de registro habilitado', 'settings_logFileEnable_desc' => 'Habilitar/Deshabilitar archivo de registro', 'settings_logFileRotation' => 'Rotación del archivo de registro', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 16e37485e..95400cfa0 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -531,6 +531,7 @@ URL: [url]', 'lastaccess' => 'Dernière connexion', 'last_update' => 'Dernière modification', 'legend' => 'Légende', +'librarydoc' => '', 'linked_documents' => 'Documents liés', 'linked_files' => 'Fichiers attachés', 'link_alt_updatedocument' => 'Pour déposer des fichiers de taille supérieure, utilisez la page d\'ajout multiple.', @@ -651,6 +652,7 @@ URL: [url]', 'no_linked_files' => 'Aucun fichier lié', 'no_previous_versions' => 'Aucune autre version trouvée', 'no_review_needed' => 'Aucune correction en attente', +'no_revision_planed' => '', 'no_update_cause_locked' => 'Vous ne pouvez actuellement pas mettre à jour ce document. Contactez l\'utilisateur qui l\'a verrouillé.', 'no_user_image' => 'Aucune image trouvée', 'no_version_check' => '', @@ -766,6 +768,7 @@ URL: [url]', 'review_update_failed' => 'Erreur lors de la mise à jour de la correction. Echec de la mise à jour.', 'revise_document' => '', 'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -842,8 +845,6 @@ URL: [url]', 'settings_activate_php_extension' => 'Activez l\'extension PHP', 'settings_adminIP' => 'Admin IP', 'settings_adminIP_desc' => 'Si activé l\'administrateur ne peut se connecter que par l\'adresse IP spécifiées, laisser vide pour éviter le contrôle. NOTE: fonctionne uniquement avec autentication locale (sans LDAP)', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => 'Avancé', 'settings_apache_mod_rewrite' => 'Apache - Module Rewrite', 'settings_Authentication' => 'Paramètres d\'authentification', @@ -888,6 +889,8 @@ URL: [url]', 'settings_dropFolderDir' => 'Répertoire de dépôt de fichier sur le serveur', 'settings_dropFolderDir_desc' => 'Ce répertoire peut être utilisé pour déposer des fichiers sur le serveur et les importer à partir d\'ici au lieu de les charger à partir du navigateur. Le répertoire doit avoir un sous-répertoire pour chaque utilisateur autorisé à importer des fichiers de cette manière.', 'settings_Edition' => 'Paramètres d’édition', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => 'Activer Admin Rev App', 'settings_enableAdminRevApp_desc' => 'Décochez pour ne pas lister l\'administrateur à titre de correcteur/approbateur', 'settings_enableCalendar' => 'Activer agenda', @@ -924,6 +927,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => 'Si vous voulez permettre à l\'utilisateur de définir un nouveau mot de passe et l\'envoyer par mail, cochez cette option.', 'settings_enableRecursiveCount' => 'Décompte de documents/répertoires recursif', 'settings_enableRecursiveCount_desc' => 'Si activé, le nombre de documents et répertoires dans un répertoire est calculé en comptant récursivement le contenu des sous-répertoires auxquels l\'utilisateur a accès.', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => 'Autoriser correction/approbbation pour l\'utilisateur actuel', 'settings_enableSelfRevApp_desc' => 'A autoriser pour avoir l\'utilisateur actuel désigné correcteur/approbateur et pour les transitions de workflow.', 'settings_enableThemeSelector' => 'Sélection du thème', @@ -965,6 +970,8 @@ URL: [url]', 'settings_install_zendframework' => 'Installer le Framework Zend, si vous avez l\'intention d\'utiliser le moteur de recherche texte complète', 'settings_language' => 'Langue par défaut', 'settings_language_desc' => 'Langue par défaut (nom d\'un sous-dossier dans le dossier "languages")', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => 'Fichier journal activé', 'settings_logFileEnable_desc' => 'Activer/désactiver le fichier journal', 'settings_logFileRotation' => 'Rotation fichier journal', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index a43338903..8ca503c5c 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -531,6 +531,7 @@ URL: [url]', 'lastaccess' => 'Utolsó hozzáférés', 'last_update' => 'Utolsó frissítés', 'legend' => 'Jelmagyarázat', +'librarydoc' => '', 'linked_documents' => 'Kapcsolódó dokumentumok', 'linked_files' => 'Mellékletek', 'link_alt_updatedocument' => 'Ha a jelenlegi maximális feltöltési méretnél nagyobb állományokat szeretne feltölteni, akkor használja az alternatív feltöltő oldalt.', @@ -652,6 +653,7 @@ URL: [url]', 'no_linked_files' => 'Nincsenek hivatkozott állományok', 'no_previous_versions' => 'Nem találhatók más változatok', 'no_review_needed' => 'Nincs folyamatban lévő felülvizsgálat.', +'no_revision_planed' => '', 'no_update_cause_locked' => 'Emiatt nem módosíthatja a dokumentumot. Kérjük lépjen kapcsolatba a zároló felhasználóval.', 'no_user_image' => 'Kép nem található', 'no_version_check' => 'A SeedDMS új verziójának ellenőrzése hibára futott! Ennek oka lehet, hogy az allow_url_fopen 0-ra van állítva a php konfigurációjában.', @@ -777,6 +779,7 @@ URL: [url]', 'review_update_failed' => 'Hiba a felülvizsgálat állapot frissítése során. Frissítés sikertelen.', 'revise_document' => '', 'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -865,8 +868,6 @@ URL: [url]', 'settings_activate_php_extension' => 'PHP kiterjesztés aktiválása', 'settings_adminIP' => 'Adminisztációs IP', 'settings_adminIP_desc' => 'Amennyiben beállítja az adminisztrátor csak a megadott IP címről tud bejelentkezni. Hagyja üresen az ellenőrzés elkerüléséhez. MEGJEGYZÉS: csak helyi azonosítás esetén működik (LDAP használatakor nem)', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => 'Részletek', 'settings_apache_mod_rewrite' => 'Apache - Rewrite modul', 'settings_Authentication' => 'Hitelesítési beállítások', @@ -911,6 +912,8 @@ URL: [url]', 'settings_dropFolderDir' => 'Drop mappa könyvtára', 'settings_dropFolderDir_desc' => 'Ez a könyvtár használható az importálandó állományok elhelyezésére a fájlrendszeren a böngészővel történő feltöltés helyett. A könyvtárnak tartalmaznia kell alkönyvtárakat minden felhasználóhoz akinek engedélyezett az állományok ilyen módon történő importálása.', 'settings_Edition' => 'Kiadás beállítások', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => 'Engedélyezi a felülvizsgálatot/jóváhagyást az adminisztrátorok számára', 'settings_enableAdminRevApp_desc' => 'Engedélyezze, ha szeretné, hogy az adminisztrátorok listázva legyenek a felülvizsgálóknál/jóváhagyóknál és a munkamenet átmeneteknél.', 'settings_enableCalendar' => 'Naptár engedélyezése', @@ -947,6 +950,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => 'Ha azt szeretné, hogy a felhasználó megadhasson új jelszót és elküldhesse azt emailben, engedélyezze ezt a lehetőséget.', 'settings_enableRecursiveCount' => 'Engedélyezi a rekurzív dokumentum/mappa számot', 'settings_enableRecursiveCount_desc' => 'Ha be van kapcsolva a mappa nézetben a dokumentumok és mappák száma minden objektum rekurzív feldolgozásával kerül meghatározásra és a dokumentumok és mappák száma a felhasználó számára engedélyezett.', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => 'Engedélyezi a felülvizsgálatot/jóváhagyást a bejelentkezett felhasználó számára', 'settings_enableSelfRevApp_desc' => 'Engedélyezze, a azt szeretné, hogy a bejelentkezett felhasználó listázásra kerüljön felülvizsgálóként/jóváhagyóként és a munkamenet átmeneteknél.', 'settings_enableThemeSelector' => 'Téma választása', @@ -988,6 +993,8 @@ URL: [url]', 'settings_install_zendframework' => 'Zend Framework telepítése, ha használni szeretné a teljes szöveges keresőt', 'settings_language' => 'Alapértelmezett nyelv', 'settings_language_desc' => 'Alapértelmezett nyelv (a "languages" mappa alatt található almappa neve)', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => 'Naplóállomány engedélyezése', 'settings_logFileEnable_desc' => 'Naplóállomány engedélyezése/tiltása', 'settings_logFileRotation' => 'Naplóállomány forgatása', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index df9cf7c6a..c0a69c01f 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -536,6 +536,7 @@ URL: [url]', 'lastaccess' => 'Ultimo accesso', 'last_update' => 'Ultima modifica', 'legend' => 'Legenda', +'librarydoc' => '', 'linked_documents' => 'Documenti collegati', 'linked_files' => 'Allegati', 'link_alt_updatedocument' => 'Se vuoi caricare file più grandi del limite massimo attuale, usa la pagina alternativa di upload.', @@ -657,6 +658,7 @@ URL: [url]', 'no_linked_files' => 'Nessun file collegato', 'no_previous_versions' => 'Nessun\'altra versione trovata', 'no_review_needed' => 'Nessuna revisione in sospeso.', +'no_revision_planed' => '', 'no_update_cause_locked' => 'Non è quindi possible aggiornare il documento. Prego contattare l\'utente che l\'ha bloccato.', 'no_user_image' => 'Nessuna immagine trovata', 'no_version_check' => 'Il controllo per una nuova versione di SeedDMS è fallito! Questo può essere causato da allow_url_fopen settato a 0 nella tua configurazione php.', @@ -799,6 +801,7 @@ URL: [url]', 'review_update_failed' => 'Errore nella variazione dello stato di revisione. Aggiornamento fallito.', 'revise_document' => '', 'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -888,8 +891,6 @@ URL: [url]', 'settings_activate_php_extension' => 'Attivazione estensione PHP', 'settings_adminIP' => 'IP Amministratore', 'settings_adminIP_desc' => 'Se attivato l\'Amministratore si può collegare solo da un IP specifico; lasciare vuoto per evitare il controllo. NOTA: funziona solo con autenticazione locale (no LDAP)', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => 'Avanzate', 'settings_apache_mod_rewrite' => 'Apache - Mod Rewrite', 'settings_Authentication' => 'Impostazioni di Autenticazione', @@ -934,6 +935,8 @@ URL: [url]', 'settings_dropFolderDir' => 'Cartella per il drop', 'settings_dropFolderDir_desc' => 'Questa cartella viene utilizzata per rilasciare (drop) files sul server per importarli direttamente anziché caricarli attraverso il browser. La cartella deve contenere una sottocartella per ciascun utente autorizzato ad importare files in questo modo.', 'settings_Edition' => 'Impostazioni di edizione', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => 'Permetti la revisione/approvazione da parte degli amministratori', 'settings_enableAdminRevApp_desc' => 'Abilita per elencare gli amministratori tra i revisori/approvatori e per le transizioni del flusso di lavoro', 'settings_enableCalendar' => 'Abilita calendario', @@ -970,6 +973,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => 'Spuntare nel caso si desideri permettere all\'utente di re-impostare la password inviata per email.', 'settings_enableRecursiveCount' => 'Abilita il conteggio ricursivo di documenti/cartelle', 'settings_enableRecursiveCount_desc' => 'Se selezionato il numero di documenti e sottocartelle accessibili all\'utente sarà calcolato con un conteggio ricursivo di tutti gli oggetti contenuti nella cartella.', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => 'Permetti revisione/approvazione all\'utente registrato', 'settings_enableSelfRevApp_desc' => 'Abilitare se si desidera aggiungere l\'utente attualmente registrato alla lista dei revisori/approvatori e per le transizioni del flusso di lavoro.', 'settings_enableThemeSelector' => 'Selezione tema grafico', @@ -1011,6 +1016,8 @@ URL: [url]', 'settings_install_zendframework' => 'Installare il framework Zend, se si intende usufruire del motore di ricerca fulltext.', 'settings_language' => 'Lingua di default', 'settings_language_desc' => 'Lingua di default (nome della sottocartella corrispondente nella cartella "languages")', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => 'Abilita il file di registro', 'settings_logFileEnable_desc' => 'Abilita/disabilita il file di registro', 'settings_logFileRotation' => 'Rotazione del file di registro', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index c427e3059..31ea66445 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -524,6 +524,7 @@ URL: [url]', 'lastaccess' => '', 'last_update' => 'Laatste Update', 'legend' => 'Legenda', +'librarydoc' => '', 'linked_documents' => 'Gerelateerde Documenten', 'linked_files' => 'Bijlagen', 'link_alt_updatedocument' => 'Als u bestanden wilt uploaden groter dan het huidige maximum, gebruik aub de alternatieve upload pagina.', @@ -644,6 +645,7 @@ URL: [url]', 'no_linked_files' => 'Geen gekoppelde bestanden', 'no_previous_versions' => 'Geen andere versie(s) gevonden', 'no_review_needed' => 'Geen review bezig.', +'no_revision_planed' => '', 'no_update_cause_locked' => 'U kunt daarom dit document niet bijwerken. Neem contact op met de persoon die het document heeft geblokkeerd.', 'no_user_image' => 'Geen afbeelding(en) gevonden', 'no_version_check' => 'Controle op een nieuwe versie van SeedDMS is mislukt! Dit kan komen omdat allow_url_fopen is ingesteld op 0 in uw PHP configuratie.', @@ -768,6 +770,7 @@ URL: [url', 'review_update_failed' => 'Foutmelding: fout bij bijwerken [Controle] Status. Bijwerken mislukt.', 'revise_document' => '', 'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -857,8 +860,6 @@ URL: [url]', 'settings_activate_php_extension' => 'Activeer PHP uitbreiding', 'settings_adminIP' => 'Beheer IP', 'settings_adminIP_desc' => 'Indien ingesteld kan de beheerder alleen vanaf het ingestelde IP adres inloggen. Leeg laten om controle te vermijden. Opmerking: Werkt alleen met lokale authenticatie (Geen LDAP)', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => 'Uitgebreid', 'settings_apache_mod_rewrite' => 'Apache - Module Rewrite', 'settings_Authentication' => 'Authenticatie instellingen', @@ -903,6 +904,8 @@ URL: [url]', 'settings_dropFolderDir' => 'Pad voor drop folder', 'settings_dropFolderDir_desc' => 'Dit pad kan gebruikt worden voor dropfiles op de server en hier vanaf te importeren in plaats van uploaden via de browser.', 'settings_Edition' => 'Uitgave instellingen', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => 'Inschakelen Beheer Contr/Beoord', 'settings_enableAdminRevApp_desc' => 'Uitvinken om beheerder niet te tonen als controleerder/beoordeler', 'settings_enableCalendar' => 'Inschakelen Kalendar', @@ -939,6 +942,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => 'Inschakelen om een wachtwoord via mail te versturen als de gebruiker een nieuw wachtwoord heeft ingesteld.', 'settings_enableRecursiveCount' => 'Document/ map teller herhalen toestaan', 'settings_enableRecursiveCount_desc' => 'If turned on, the number of documents and folders in the folder view will be determined by counting all objects by recursively processing the folders and counting those documents and folders the user is allowed to access.', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => 'Beoordeling/ goedkeuring toestaan voor ingelogde gebruikers', 'settings_enableSelfRevApp_desc' => 'Schakel in indien the huidig ingelogde gebruiker wordt toegewezen als goedkeurder/ beoordelaar en voor workflow overgangen.', 'settings_enableThemeSelector' => 'Selecteer thema', @@ -980,6 +985,8 @@ URL: [url]', 'settings_install_zendframework' => 'Installeer Zend Framework, als u volledigetekst zoekmechanisme wilt gebruiken', 'settings_language' => 'Standaard taal', 'settings_language_desc' => 'Standaard taal (naam van de submap in map "languages")', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => 'Inschakelen Logbestand', 'settings_logFileEnable_desc' => 'Inschakelen/uitschakelen logbestand', 'settings_logFileRotation' => 'Logbestand Rotering', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 3b4970eeb..33c9d62d9 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -524,6 +524,7 @@ URL: [url]', 'lastaccess' => 'Ostatni dostęp', 'last_update' => 'Ostatnia aktualizacja', 'legend' => 'Legenda', +'librarydoc' => '', 'linked_documents' => 'Powiązane dokumenty', 'linked_files' => 'Załączniki', 'link_alt_updatedocument' => 'Jeśli chcesz wczytać pliki większe niż bieżące maksimum, użyj alternatywnej strony wczytywania.', @@ -645,6 +646,7 @@ URL: [url]', 'no_linked_files' => 'Brak powiązanych dokumentów', 'no_previous_versions' => 'Nie znaleziono poprzednich wersji', 'no_review_needed' => 'Brak dokumentów w trakcie opiniowania.', +'no_revision_planed' => '', 'no_update_cause_locked' => 'Nie możesz zaktualizować tego dokumentu. Proszę skontaktuj się z osobą która go blokuje.', 'no_user_image' => 'Nie znaleziono obrazu', 'no_version_check' => 'Poszukiwanie nowej wersji DeedDMS nie powiodło się! To może być spowodowane ustawieniem opcji \'allow_url_fopen = 0\' w twojej konfiguracji PHP.', @@ -756,6 +758,7 @@ URL: [url]', 'review_update_failed' => 'Błąd podczas aktualizowania statusu recenzji. Aktualizacja nie powiodła się.', 'revise_document' => '', 'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -845,8 +848,6 @@ URL: [url]', 'settings_activate_php_extension' => 'Aktywuj rozszerzenie PHP', 'settings_adminIP' => 'Adres IP Administratora', 'settings_adminIP_desc' => 'Wprowadzenie tego adresu IP spowoduje, że administrator będzie mógł się logować tylko z tego adresu. Zostaw puste aby tego nie kontrolować. Uwaga! Działa tylko z autentykacją lokalną (nie w LDAP-ie)', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => 'Zaawansowane', 'settings_apache_mod_rewrite' => 'Apache - Moduł Rewrite', 'settings_Authentication' => 'Ustawienia uwierzytelniania', @@ -891,6 +892,8 @@ URL: [url]', 'settings_dropFolderDir' => 'Katalog dla folderu rozwijanego', 'settings_dropFolderDir_desc' => 'Ten katalog służy do kopiowania plików, przeznaczonych do zaimportowania, bezpośrednio do serwera i z pominięciem przeglądarki. W tym katalogu muszą się znajdować podfoldery dla wszystkich użytkowników, którzy posiadają uprawnienia do tego typu importu.', 'settings_Edition' => 'Ustawienia edycji', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => 'Dołącz Administratora do recenzji/rewizji', 'settings_enableAdminRevApp_desc' => 'Odznacz aby usunąć Administratora z listy zatwierdzających/recenzentów', 'settings_enableCalendar' => 'Włącz kalendarz', @@ -927,6 +930,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => 'Jeśli chcesz zezwolić użytkownikom na zmianę własnego hasła i wysyłanie go emailem, zaznacz tę opcję.', 'settings_enableRecursiveCount' => 'Włącz licznik rekurencji dokumentu/folderu', 'settings_enableRecursiveCount_desc' => 'Jeżeli jest włączone, to liczba dokumentów i folderów w widoku będzie ustalona poprzez zliczenie wszystkich obiektów przez rekurencyjnie przetwarzane foldery i policzenia tych dokumentów i folderów do których użytkownik ma dostęp', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => 'Pozwalaj przeglądać/zatwierdzać dla zalogowanych użytkowników', 'settings_enableSelfRevApp_desc' => 'Włącz tę opcję jeżeli zalogowany użytkownik ma prawo do recenzowania/zatwierdzania oraz do przepływu procesu', 'settings_enableThemeSelector' => '', @@ -968,6 +973,8 @@ URL: [url]', 'settings_install_zendframework' => 'Zainstaluj Zend Framework, jeśli zamierzasz używać przeszukiwania pełnotekstowego', 'settings_language' => 'Domyślny język', 'settings_language_desc' => 'Domyślny język (nazwa podkatalogu w katalogu "languages")', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => 'Włącz plik dziennika', 'settings_logFileEnable_desc' => 'Włącz/Wyłącz plik dziennika', 'settings_logFileRotation' => 'Rotowanie pliku dziennika', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 7d13e5453..2fddbdb57 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -530,6 +530,7 @@ URL: [url]', 'lastaccess' => 'Último acesso', 'last_update' => 'última versão', 'legend' => 'Legenda', +'librarydoc' => '', 'linked_documents' => 'Documentos relacionados', 'linked_files' => 'Arquivos anexados', 'link_alt_updatedocument' => 'Se você gostaria de fazer envio de arquivos maiores que o tamanho permitido, por favor use a página alternativa de envio.', @@ -650,6 +651,7 @@ URL: [url]', 'no_linked_files' => 'Não há arquivos vinculados', 'no_previous_versions' => 'No other versions found', 'no_review_needed' => 'Nenhuma revisão pendente.', +'no_revision_planed' => '', 'no_update_cause_locked' => 'Por isso você não pode atualizar este documento. Por favor contacte usuário que poáui a trava.', 'no_user_image' => 'não foi encontrado imagem de perfil', 'no_version_check' => 'Verificação de uma nova versão do SeedDMS falhou! Isso pode ser causado por allow_url_fopen configurado para 0 na sua configuração do PHP.', @@ -774,6 +776,7 @@ URL: [url]', 'review_update_failed' => 'Error updating review status. Update failed.', 'revise_document' => '', 'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -863,8 +866,6 @@ URL: [url]', 'settings_activate_php_extension' => 'Ativar extensão PHP', 'settings_adminIP' => 'IP Administrador', 'settings_adminIP_desc' => 'Se definido administrador pode entrar apenas por endereço IP especificado, deixe em branco para evitar o controle. NOTA: só funciona com Autenticação local (não LDAP)', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => 'Avançado', 'settings_apache_mod_rewrite' => 'Apache - Módulo Rewrite', 'settings_Authentication' => 'Definições de autenticação', @@ -909,6 +910,8 @@ URL: [url]', 'settings_dropFolderDir' => 'Diretório para pasta suspensa', 'settings_dropFolderDir_desc' => 'Este diretório pode ser usado para soltar arquivos no sistema de arquivos do servidor e importá-los de lá, em vez de fazer o upload através do browser. O diretório deve conter um sub-diretório para cada usuário que tem permissão para importar arquivos desta forma.', 'settings_Edition' => 'Configurações Edição', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => 'Permitir revisão/aprovação para administradores', 'settings_enableAdminRevApp_desc' => 'Ative esta opção se quiser que os administradores sejam listados como revisores/aprovadores e para transições de fluxo de trabalho.', 'settings_enableCalendar' => 'Habilitar Calendário', @@ -945,6 +948,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => 'Se você quiser permitir o usuário definir uma nova senha e enviá-la por e-mail, marque esta opção.', 'settings_enableRecursiveCount' => 'Ativar contagem de documentos/pasta recursiva', 'settings_enableRecursiveCount_desc' => 'Se estiver ativado, o número de documentos e pastas na exibição de pasta será determinada pela contagem de todos os objetos de forma recursiva proceáando as pastas e contando eáes documentos e pastas que o usuário tem permissão de acesso.', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => 'Permitir revisão/aprovação para usuário conectado', 'settings_enableSelfRevApp_desc' => 'Habilite esta opção se quiser que o usuário conectado no momento seja listado como revisores/aprovadores e para transições de fluxo de trabalho.', 'settings_enableThemeSelector' => 'Seleção de tema', @@ -986,6 +991,8 @@ URL: [url]', 'settings_install_zendframework' => 'Instalar Zend Framework, se você pretende usar o motor de pesquisa de texto completo', 'settings_language' => 'Idioma padrão', 'settings_language_desc' => 'Idioma Padrão (nome de uma subpasta na pasta "languages")', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => 'Ativar Log File', 'settings_logFileEnable_desc' => 'Ativar/Dasativar arquivo log', 'settings_logFileRotation' => 'Rotação do Arquivo Log', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index ce68ed3be..d06e2ed46 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -536,6 +536,7 @@ URL: [url]', 'lastaccess' => 'Ultima accesare', 'last_update' => 'Ultima actualizare', 'legend' => 'Legendă', +'librarydoc' => '', 'linked_documents' => 'Documente relationate', 'linked_files' => 'Atașamente', 'link_alt_updatedocument' => 'Dacă doriți să încărcați fișiere mai mari decât dimensiunea maximă curentă de încărcare, vă rugăm să folosiți alternativa pagină de încărcare.', @@ -657,6 +658,7 @@ URL: [url]', 'no_linked_files' => 'Nici un fișiere asociate', 'no_previous_versions' => 'Nu sunt alte versiuni gasite', 'no_review_needed' => 'Nici o revizuire în așteptare.', +'no_revision_planed' => '', 'no_update_cause_locked' => 'Deci, nu puteti sa actualizati acest document. Vă rugăm să contactați administratorul.', 'no_user_image' => 'Nu au fost găsite imagini', 'no_version_check' => 'Verificarea pentru o noua versiune SeedDMS a reușit! Acest lucru ar putea fi cauzat de setarea allow_url_fopen=0 în configurația php-ului dumneavoastră.', @@ -799,6 +801,7 @@ URL: [url]', 'review_update_failed' => 'Eroare actualizarea status revizuire. Actualizarea a eșuat.', 'revise_document' => 'Revizuiti documentul', 'revise_document_on' => 'Urmatoarea revizuire a versiunii document pe [data]', +'revision_date' => '', 'revision_log' => 'Log revizuire', 'revisors' => 'Revizuitori', 'revisor_already_assigned' => 'Utilizatorul este deja asignat ca retrimitor.', @@ -888,8 +891,6 @@ URL: [url]', 'settings_activate_php_extension' => 'Activați extensia PHP', 'settings_adminIP' => 'IP Admin', 'settings_adminIP_desc' => 'Dacă este setat, adminul se poate autentifica numai de la adresa IP specificată, lăsați gol pentru a evita controlul. NOTĂ: funcționează numai cu autentificarea locală (pe LDAP)', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => 'Avansat', 'settings_apache_mod_rewrite' => 'Apache - Module Rewrite', 'settings_Authentication' => 'Setări de autentificare', @@ -934,6 +935,8 @@ URL: [url]', 'settings_dropFolderDir' => 'Director pentru plasare folder(drop folder)', 'settings_dropFolderDir_desc' => 'Acest director poate fi utilizat pentru plasarea fișierelor pe sistemul de fișiere al serverului și importul acestora de acolo în loc să mai fie încărcate prin intermediul browser-ului. Directorul trebuie să conțină un subdirector pentru fiecare utilizator care are permisiunea de a importa fișiere în acest fel.', 'settings_Edition' => 'Setările Editiei', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => 'Permite revizuirea/aprobarea pentru admini', 'settings_enableAdminRevApp_desc' => 'Activați această opțiune dacă doriți ca administratorii să fie listati ca revizuitori/aprobatori sau in tranzițiile workflow-ului.', 'settings_enableCalendar' => 'Activare Calendar', @@ -970,6 +973,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => 'Dacă doriți să permiteti utilizatorilor să stabilească o nouă parolă și să le fie trimisă prin e-mail, bifați această opțiune.', 'settings_enableRecursiveCount' => 'Activați numararea recursiva pentru documente/foldere', 'settings_enableRecursiveCount_desc' => 'Dacă este activată, numărul de documente și foldere din vizualizarea unui director va fi determinat prin numărarea tuturor obiectelor recursiv din folderele unde accesul utilizatorului este permis.', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => 'Permite revizuirea/aprobarea pentru utilizatorul autentificat', 'settings_enableSelfRevApp_desc' => 'Activați această opțiune dacă doriți ca utilizatorul autentificat să fie listat ca revizuitor/aprobator sau in tranzițiile workflow-ului.', 'settings_enableThemeSelector' => 'Selecție Temă', @@ -1011,6 +1016,8 @@ URL: [url]', 'settings_install_zendframework' => 'Instalați Zend Framework, dacă intenționați să utilizați căutare completă pe tot de textul', 'settings_language' => 'Limba implicită', 'settings_language_desc' => 'Limba implicită (numele subfolder-ului din folderul "language")', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => 'Activare Log fișiser', 'settings_logFileEnable_desc' => 'Activare/dezactivare log fișier', 'settings_logFileRotation' => 'Rotire Log fișiser', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index e37603124..09b0a6cc8 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -524,6 +524,7 @@ URL: [url]', 'lastaccess' => '', 'last_update' => 'Последнее обновление', 'legend' => 'Обозначения', +'librarydoc' => '', 'linked_documents' => 'Связанные документы', 'linked_files' => 'Приложения', 'link_alt_updatedocument' => 'Для загрузки файлов, превышающих ограничение размера, используйте другой способ.', @@ -644,6 +645,7 @@ URL: [url]', 'no_linked_files' => 'Нет связанных документов', 'no_previous_versions' => 'Нет предыдущих версий', 'no_review_needed' => 'Рецензия не требуется', +'no_revision_planed' => '', 'no_update_cause_locked' => 'Вы не можете обновить документ. Свяжитесь с заблокировавшим его пользователем.', 'no_user_image' => 'Изображение не найдено', 'no_version_check' => '', @@ -767,6 +769,7 @@ URL: [url]', 'review_update_failed' => 'Ошибка обновления статуса рецензии', 'revise_document' => '', 'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -856,8 +859,6 @@ URL: [url]', 'settings_activate_php_extension' => 'Активировать расширение PHP', 'settings_adminIP' => 'Администраторский IP', 'settings_adminIP_desc' => 'Если установлено, то администратор сможет зайти только с этого IP-адреса. Оставьте пустым, если это не требуется. Не работает с LDAP.', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => 'Дополнительно', 'settings_apache_mod_rewrite' => 'Apache — модуль Rewrite', 'settings_Authentication' => 'Настройки авторизации', @@ -902,6 +903,8 @@ URL: [url]', 'settings_dropFolderDir' => 'Размещение проходного каталога', 'settings_dropFolderDir_desc' => 'Этот каталог используется для размещения файлов на сервере и их импорта вместо загрузки через браузер. Каталог должен содержать подкаталог для каждого пользователя, которому разрешён импорт файлов таким способом.', 'settings_Edition' => 'Настройки версий', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => 'Администратор как
    рецензирующий и утверждающий', 'settings_enableAdminRevApp_desc' => 'Если отключено, администратор не отображается в списке рецензирующих и утверждающих.', 'settings_enableCalendar' => 'Включить календарь', @@ -938,6 +941,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => 'Если включено, разрешает пользователям восстанавливать пароль через e-mail.', 'settings_enableRecursiveCount' => 'Рекурсивно подсчитывать
    документы и каталоги', 'settings_enableRecursiveCount_desc' => 'Если включено, количество документов и каталогов в виде каталога будет определятся рекурсивным подсчётом всех документов и каталогов разрешённых для доступа пользователя.', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => 'Разрешить рецензию/утверждение
    пользователями вошедшими в систему', 'settings_enableSelfRevApp_desc' => 'Включите для того, чтобы пользователи, в настоящее время выполнившие вход в систему, были в списке рецензентов/утверждающих и в изменении процесса.', 'settings_enableThemeSelector' => 'Выбор темы', @@ -979,6 +984,8 @@ URL: [url]', 'settings_install_zendframework' => 'Установите Zend Framework, если собираетесь использовать полнотекстовый поиск', 'settings_language' => 'Язык по умолчанию', 'settings_language_desc' => 'Язык по умолчанию (каталог в «languages»).', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => 'Включить журнал', 'settings_logFileEnable_desc' => 'Включить/отключить журнал.', 'settings_logFileRotation' => 'Ротация журнала', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 6aa0b24b1..77e8bafde 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -455,6 +455,7 @@ $text = array( 'lastaccess' => '', 'last_update' => 'Posledná aktualizácia', 'legend' => '', +'librarydoc' => '', 'linked_documents' => 'Súvisiace dokumenty', 'linked_files' => 'Prílohy', 'link_alt_updatedocument' => '', @@ -552,6 +553,7 @@ $text = array( 'no_linked_files' => 'No linked files', 'no_previous_versions' => 'Neboli nájdené žiadne iné verzie', 'no_review_needed' => 'No review pending.', +'no_revision_planed' => '', 'no_update_cause_locked' => 'Preto nemôžete aktualizovať tento dokument. Prosím, kontaktujte používateľa, ktorý ho zamkol.', 'no_user_image' => 'nebol nájdený žiadny obrázok', 'no_version_check' => '', @@ -640,6 +642,7 @@ $text = array( 'review_update_failed' => 'Chyba pri aktualizácii stavu kontroly. Aktualizácia zlyhala.', 'revise_document' => '', 'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -716,8 +719,6 @@ $text = array( 'settings_activate_php_extension' => '', 'settings_adminIP' => '', 'settings_adminIP_desc' => '', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => '', 'settings_apache_mod_rewrite' => '', 'settings_Authentication' => '', @@ -762,6 +763,8 @@ $text = array( 'settings_dropFolderDir' => '', 'settings_dropFolderDir_desc' => '', 'settings_Edition' => '', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => '', 'settings_enableAdminRevApp_desc' => '', 'settings_enableCalendar' => '', @@ -798,6 +801,8 @@ $text = array( 'settings_enablePasswordForgotten_desc' => '', 'settings_enableRecursiveCount' => '', 'settings_enableRecursiveCount_desc' => '', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => '', 'settings_enableSelfRevApp_desc' => '', 'settings_enableThemeSelector' => '', @@ -839,6 +844,8 @@ $text = array( 'settings_install_zendframework' => '', 'settings_language' => '', 'settings_language_desc' => '', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => '', 'settings_logFileEnable_desc' => '', 'settings_logFileRotation' => '', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 486d6ebb3..f5293e3dd 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -524,6 +524,7 @@ URL: [url]', 'lastaccess' => '', 'last_update' => 'Senast uppdaterat', 'legend' => 'Förteckning', +'librarydoc' => '', 'linked_documents' => 'Relaterade dokument', 'linked_files' => 'Bilagor', 'link_alt_updatedocument' => 'Om du vill ladda upp filer som är större än den aktuella största tillåtna storleken, använd dig av den alternativa metoden att ladda upp filer Alternativ uppladdning.', @@ -645,6 +646,7 @@ URL: [url]', 'no_linked_files' => 'Inga länkade dokumenter', 'no_previous_versions' => 'Inga andra versioner hittades.', 'no_review_needed' => 'Det finns inga dokument som du behöver granska.', +'no_revision_planed' => '', 'no_update_cause_locked' => 'Därför kan du inte uppdatera detta dokument. Ta kontakt med användaren som låst dokumentet.', 'no_user_image' => 'Ingen bild hittades', 'no_version_check' => 'Fel vid sökning efter ny version av SeedDMS! Ursaken kan vara att allow_url_fopen i din php konfiguration är satt till 0.', @@ -762,6 +764,7 @@ URL: [url]', 'review_update_failed' => 'Fel vid uppdatering av granskningsstatus. Kunde inte uppdatera.', 'revise_document' => '', 'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -851,8 +854,6 @@ URL: [url]', 'settings_activate_php_extension' => 'Aktivera PHP-extension', 'settings_adminIP' => 'Admin-IP', 'settings_adminIP_desc' => 'Om den har satts, kan administratören bara logga in från den angivna IP-adressen. Lämna detta fält tomt för att undvika begränsningar. OBS! Fungerar bara med lokal autentisering (ingen LDAP).', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => 'Avancerat', 'settings_apache_mod_rewrite' => 'Apache - Module Rewrite', 'settings_Authentication' => 'Autentiseringsinställningar', @@ -897,6 +898,8 @@ URL: [url]', 'settings_dropFolderDir' => 'Mapp för mellanlagring av filer', 'settings_dropFolderDir_desc' => 'Denna mapp kan användas för att mellanlagra filer på serverns filsystem och den kan importeras därifrån istället för att filen laddas upp via webbläsaren. Mappen måste innehålla en undermapp för varje användare som har tillstånd att importera filer denna vägen.', 'settings_Edition' => 'Redigeringsinställningar', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => 'Visa Admin i listan granska/godkänna', 'settings_enableAdminRevApp_desc' => 'Ta bort utval, så att administratören inte kan väljas som person som kan granska/godkänna', 'settings_enableCalendar' => 'Aktivera kalendern', @@ -933,6 +936,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => 'Om du vill tillåta att användare kan få nytt lösenord genom att skicka e-post, aktivera denna option.', 'settings_enableRecursiveCount' => 'Aktivera rekursiv räkning av dokument/katalog', 'settings_enableRecursiveCount_desc' => 'Om detta sätts på, kommer antal dokument och kataloger i katalogvyn fastställas genom att räkna alla objekter via rekursiv hantering av alla kataloger och räkna dessa dokument och kataloger som användaren har rättigheter till.', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => 'Tillåt granskning/godkänning av inloggad användare', 'settings_enableSelfRevApp_desc' => 'Aktivera om du vill att aktuell inloggad användare visas i listan för personer som granskar/godkänner dokument och i övergång på arbetsflöden.', 'settings_enableThemeSelector' => 'Tema urval', @@ -974,6 +979,8 @@ URL: [url]', 'settings_install_zendframework' => 'Installera Zend Framework, om du tänker använda fulltext-sökningen', 'settings_language' => 'Standardspråk', 'settings_language_desc' => 'Standardspråk (namn på sub-mappen i mappen "languages")', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => 'Aktivera loggfil', 'settings_logFileEnable_desc' => 'Aktivera/Inaktivera loggfil', 'settings_logFileRotation' => 'Loggfils-rotation', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 5c66a19ca..abaa57591 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -530,6 +530,7 @@ URL: [url]', 'lastaccess' => 'Son erişim', 'last_update' => 'Son Güncelleme', 'legend' => 'Lejand', +'librarydoc' => '', 'linked_documents' => 'İlgili Dokümanlar', 'linked_files' => 'Ekler', 'link_alt_updatedocument' => 'Mevcut maksimum yükleme boyutundan daha büyük dosya yüklemek istiyorsanız alternatif yükleme sayfası için tıklayın.', @@ -651,6 +652,7 @@ URL: [url]', 'no_linked_files' => 'Link verilmiş dosya yok', 'no_previous_versions' => 'Başka versiyon yok', 'no_review_needed' => 'Bekleyen kontrol yok.', +'no_revision_planed' => '', 'no_update_cause_locked' => 'Bu doküman kilitli olduğundan güncellenemez. Lütfen kilitleyen kullanıcıyla görüşünüz.', 'no_user_image' => 'Resim bulunamadı', 'no_version_check' => 'SeedDMS yeni versiyon kontrolü başarısız oldu! Bunun sebebi php konfigürasyonunuzdaki allow_url_fopen parametresinin 0 olarak ayarlanması olabilir.', @@ -778,6 +780,7 @@ URL: [url]', 'review_update_failed' => 'Kontrol güncelleme durumu hatalı. Güncelleme başarısız.', 'revise_document' => '', 'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -867,8 +870,6 @@ URL: [url]', 'settings_activate_php_extension' => 'PHP uzantısını etkinleştir', 'settings_adminIP' => 'Admin IP', 'settings_adminIP_desc' => 'Yöneticinin sadece belli bir IP adresinden erişmesini istiyorsanız IP adresini giriniz. Kontrolü kaybetme riski olduğunu düşünüyorsanız boş bırakınız. NOT: sadece yerel yetkilendirme ile çalışır (LDAP ile çalışmaz)', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => 'Gelişmiş ayarlar', 'settings_apache_mod_rewrite' => 'Apache - Module Rewrite', 'settings_Authentication' => 'Yetkilendirme ayarları', @@ -913,6 +914,8 @@ URL: [url]', 'settings_dropFolderDir' => 'Sürükleme klasörü dizini', 'settings_dropFolderDir_desc' => 'Bu dizin, tarayıcı üzerinden dosya göndermek yerine dosyaları sürükleyip bırakmak için kullanılacak dizindir. Bu işi yapmaya yetkili kılınmış her bir kullanıcı için alt dizin içermelidir.', 'settings_Edition' => 'Düzenleme ayarları', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => 'Yöneticilere kontrol/onay izni ver', 'settings_enableAdminRevApp_desc' => 'Yöneticilerin kontrol/onay listesine eklenmesi ve iş akış süreçlerini yapabilmeleri için bu ayarı etkinleştirin.', 'settings_enableCalendar' => 'Takvimi Etkinleştir', @@ -949,6 +952,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => 'Kullanıcının unuttuğu parolayı kendisine gönderilecek e-posta ile sıfırlamasına izin vermek için bu seçeneği etkinleştirebilirsiniz.', 'settings_enableRecursiveCount' => 'Özyinelenen doküman/klasör sayımını etkinleştir', 'settings_enableRecursiveCount_desc' => 'Aktif hale getirildiğinde, klasör içindeki dokümanlar ve diğer klasörlerin sayısı kullanıcının erişim hakkı olan tüm nesnelerin özyinelemeli olarak sayılması yolu ile bulunur.', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => 'Giriş yapmış kullanıcılar için kontrol/onay izni ver', 'settings_enableSelfRevApp_desc' => 'O an giriş yapmış olan kullanıcıları kontrol eden/onaylayan olarak listelemek ve iş akışına dahil etmek için bunu seçebilirsiniz.', 'settings_enableThemeSelector' => 'Tema seçimini aç/kapat', @@ -990,6 +995,8 @@ URL: [url]', 'settings_install_zendframework' => 'Tam metin arama motorundan faydalanmak isterseniz Zend Framework kurmalısınız.', 'settings_language' => 'Varsayılan dil', 'settings_language_desc' => 'Varsayılan dil ("languages" klasörü içindeki dil klasörü)', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => 'Log Dosyası Etkin', 'settings_logFileEnable_desc' => 'Log dosyasını etkinleştir/devredışı bırak', 'settings_logFileRotation' => 'Log Dosyası rotasyonu', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index d23a3dc2f..b909b66f1 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -461,6 +461,7 @@ URL: [url]', 'lastaccess' => '', 'last_update' => '上次更新', 'legend' => '', +'librarydoc' => '', 'linked_documents' => '相关文档', 'linked_files' => '附件', 'link_alt_updatedocument' => '超过20M大文件,请选择上传大文件.', @@ -558,6 +559,7 @@ URL: [url]', 'no_linked_files' => '无链接文件', 'no_previous_versions' => '无其它版本', 'no_review_needed' => '无待校对的文件', +'no_revision_planed' => '', 'no_update_cause_locked' => '您不能更新此文档,请联系该文档锁定人', 'no_user_image' => '无图片', 'no_version_check' => '', @@ -646,6 +648,7 @@ URL: [url]', 'review_update_failed' => '错误 更新校对状态.更新失败', 'revise_document' => '', 'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -722,8 +725,6 @@ URL: [url]', 'settings_activate_php_extension' => '', 'settings_adminIP' => '', 'settings_adminIP_desc' => '', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => '高级设置', 'settings_apache_mod_rewrite' => '', 'settings_Authentication' => '', @@ -768,6 +769,8 @@ URL: [url]', 'settings_dropFolderDir' => '', 'settings_dropFolderDir_desc' => '', 'settings_Edition' => '', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => '', 'settings_enableAdminRevApp_desc' => '', 'settings_enableCalendar' => '', @@ -804,6 +807,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => '', 'settings_enableRecursiveCount' => '', 'settings_enableRecursiveCount_desc' => '', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => '', 'settings_enableSelfRevApp_desc' => '', 'settings_enableThemeSelector' => '', @@ -845,6 +850,8 @@ URL: [url]', 'settings_install_zendframework' => '', 'settings_language' => '语言设置', 'settings_language_desc' => '默认语言(“语言”文件夹的一个子文件夹的名字', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => '', 'settings_logFileEnable_desc' => '', 'settings_logFileRotation' => '', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 551059c73..0ee03b05f 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -459,6 +459,7 @@ URL: [url]', 'lastaccess' => '', 'last_update' => '上次更新', 'legend' => '', +'librarydoc' => '', 'linked_documents' => '相關文檔', 'linked_files' => '附件', 'link_alt_updatedocument' => '超過20M大檔,請選擇上傳大檔.', @@ -556,6 +557,7 @@ URL: [url]', 'no_linked_files' => '無連結檔', 'no_previous_versions' => '無其它版本', 'no_review_needed' => '無待校對的文件', +'no_revision_planed' => '', 'no_update_cause_locked' => '您不能更新此文檔,請聯繫該文檔鎖定人', 'no_user_image' => '無圖片', 'no_version_check' => '', @@ -644,6 +646,7 @@ URL: [url]', 'review_update_failed' => '錯誤 更新校對狀態.更新失敗', 'revise_document' => '', 'revise_document_on' => '', +'revision_date' => '', 'revision_log' => '', 'revisors' => '', 'revisor_already_assigned' => '', @@ -720,8 +723,6 @@ URL: [url]', 'settings_activate_php_extension' => '', 'settings_adminIP' => '', 'settings_adminIP_desc' => '', -'settings_ADOdbPath' => '', -'settings_ADOdbPath_desc' => '', 'settings_Advanced' => '', 'settings_apache_mod_rewrite' => '', 'settings_Authentication' => '', @@ -766,6 +767,8 @@ URL: [url]', 'settings_dropFolderDir' => '', 'settings_dropFolderDir_desc' => '', 'settings_Edition' => '', +'settings_enableAcknowledgeWorkflow' => '', +'settings_enableAcknowledgeWorkflow_desc' => '', 'settings_enableAdminRevApp' => '', 'settings_enableAdminRevApp_desc' => '', 'settings_enableCalendar' => '', @@ -802,6 +805,8 @@ URL: [url]', 'settings_enablePasswordForgotten_desc' => '', 'settings_enableRecursiveCount' => '', 'settings_enableRecursiveCount_desc' => '', +'settings_enableRevisionWorkflow' => '', +'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => '', 'settings_enableSelfRevApp_desc' => '', 'settings_enableThemeSelector' => '', @@ -843,6 +848,8 @@ URL: [url]', 'settings_install_zendframework' => '', 'settings_language' => '', 'settings_language_desc' => '', +'settings_libraryFolder' => '', +'settings_libraryFolder_desc' => '', 'settings_logFileEnable' => '', 'settings_logFileEnable_desc' => '', 'settings_logFileRotation' => '', From 9de1ff7cf459b1c259da0072686fba44737004e7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 Jun 2015 08:52:03 +0200 Subject: [PATCH 0155/2006] add translations for search form --- languages/ar_EG/lang.inc | 4 ++++ languages/bg_BG/lang.inc | 4 ++++ languages/ca_ES/lang.inc | 4 ++++ languages/cs_CZ/lang.inc | 4 ++++ languages/de_DE/lang.inc | 6 +++++- languages/en_GB/lang.inc | 6 +++++- languages/es_ES/lang.inc | 4 ++++ languages/fr_FR/lang.inc | 4 ++++ languages/hu_HU/lang.inc | 4 ++++ languages/it_IT/lang.inc | 4 ++++ languages/nl_NL/lang.inc | 4 ++++ languages/pl_PL/lang.inc | 4 ++++ languages/pt_BR/lang.inc | 4 ++++ languages/ro_RO/lang.inc | 4 ++++ languages/ru_RU/lang.inc | 4 ++++ languages/sk_SK/lang.inc | 4 ++++ languages/sv_SE/lang.inc | 4 ++++ languages/tr_TR/lang.inc | 4 ++++ languages/zh_CN/lang.inc | 10 +++++++--- languages/zh_TW/lang.inc | 4 ++++ 20 files changed, 85 insertions(+), 5 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index 96b389225..de0f0ef10 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -818,11 +818,15 @@ URL: [url]', 'search_fulltext' => 'بحث في النص الكامل', 'search_in' => 'بحث في', 'search_mode_and' => 'كل الكلمات', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => 'على الاقل كلمة واحدة', 'search_no_results' => 'لا يوجد مستند مطابق للبحث', 'search_query' => 'بحث عن', 'search_report' => 'وجد [doccount] مستند و [foldercount] مجلد في [searchtime] ثانية.', 'search_report_fulltext' => 'وجد [doccount] مستندات', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => 'نتائج البحث', 'search_results_access_filtered' => 'نتائج البحث من الممكن ان تحتوى بعد المستندات التى ليس لديك صلاحية اليها', 'search_time' => 'الوقت المتبقي: [time] sec.', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index fcfab086a..b30e81d7c 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -683,11 +683,15 @@ $text = array( 'search_fulltext' => 'Пълнотекстово търсене', 'search_in' => 'Търси в', 'search_mode_and' => 'всички думи', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => 'поне една дума', 'search_no_results' => 'Няма документи, отговарящи на запитването', 'search_query' => 'Търси!', 'search_report' => 'Намерени са [doccount] документа и [foldercount] папки', 'search_report_fulltext' => 'Намерени са [doccount] документа', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => 'Результати от търсенето', 'search_results_access_filtered' => 'Резултатите от търсенето могат да съдържат объекти за които нямате достъп', 'search_time' => 'Изминаха: [time] sec.', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index c387b51f2..205666a31 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -688,11 +688,15 @@ URL: [url]', 'search_fulltext' => 'Search in fulltext', 'search_in' => 'Buscar a', 'search_mode_and' => 'tots els mots', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => 'si més no, un mot', 'search_no_results' => 'No hi ha documents que coincideixn amb la seva cerca', 'search_query' => 'Cercar', 'search_report' => 'Trobats [count] documents', 'search_report_fulltext' => '', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => 'Resultats de la cerca', 'search_results_access_filtered' => 'Els resultats de la cerca podrien incloure continguts amb l\'accés denegat.', 'search_time' => 'Temps transcorregut: [time] seg.', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index 6f03b9096..d0f787f4c 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -827,11 +827,15 @@ URL: [url]', 'search_fulltext' => 'Vyhledat fulltextově', 'search_in' => 'Prohledávat', 'search_mode_and' => 'všechna slova', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => 'alespoň jedno ze slov', 'search_no_results' => 'Vašemu dotazu nevyhovují žádné dokumenty', 'search_query' => 'Hledat', 'search_report' => 'Nalezených [count] dokumentů odpovídajících dotazu', 'search_report_fulltext' => 'Found [doccount] documents', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => 'Výsledky hledání', 'search_results_access_filtered' => 'Výsledky hledání můžou obsahovat obsah, ke kterému byl zamítnut přístup.', 'search_time' => 'Uplynulý čas: [time] sek', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index 4909a2539..50dfb619c 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 (2067), dgrutsch (18) +// Translators: Admin (2071), dgrutsch (18) $text = array( 'accept' => 'Übernehmen', @@ -847,11 +847,15 @@ URL: [url]', 'search_fulltext' => 'Suche im Volltext', 'search_in' => 'Suchen in', 'search_mode_and' => 'alle Begriffe', +'search_mode_documents' => 'Nur Dokumente', +'search_mode_folders' => 'Nur Ordner', 'search_mode_or' => 'min. ein Begriff', 'search_no_results' => 'Die Suche lieferte leider keine Treffer.', 'search_query' => 'Suchbegriffe', 'search_report' => 'Die Suche lieferte [doccount] Dokumente und [foldercount] Ordner in [searchtime] Sek.', 'search_report_fulltext' => 'Die Suche lieferte [doccount] Dokumente', +'search_resultmode' => 'Ergebnis', +'search_resultmode_both' => 'Dokumente und Ordner', 'search_results' => 'Suchergebnis', 'search_results_access_filtered' => 'Suchresultate können Inhalte enthalten, zu welchen der Zugang verweigert wurde.', 'search_time' => 'Dauer: [time] sek.', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index 01d01ff8e..358d9df5d 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 (1195), dgrutsch (3), netixw (14) +// Translators: Admin (1199), dgrutsch (3), netixw (14) $text = array( 'accept' => 'Accept', @@ -854,11 +854,15 @@ URL: [url]', 'search_fulltext' => 'Search in fulltext', 'search_in' => 'Search in', 'search_mode_and' => 'all words', +'search_mode_documents' => 'Documents only', +'search_mode_folders' => 'Folders only', 'search_mode_or' => 'at least one word', 'search_no_results' => 'There are no documents that match your search', 'search_query' => 'Search for', 'search_report' => 'Found [doccount] documents and [foldercount] folders in [searchtime] sec.', 'search_report_fulltext' => 'Found [doccount] documents', +'search_resultmode' => 'Search result', +'search_resultmode_both' => 'Documents and folders', 'search_results' => 'Search results', 'search_results_access_filtered' => 'Search results may contain content to which access has been denied.', 'search_time' => 'Elapsed time: [time] sec.', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index 045f2fb88..3084d8072 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -833,11 +833,15 @@ URL: [url]', 'search_fulltext' => 'Buscar en texto completo', 'search_in' => 'Buscar en', 'search_mode_and' => 'todas las palabras', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => 'al menos una palabra', 'search_no_results' => 'No hay documentos que coincidan con su búsqueda', 'search_query' => 'Buscar', 'search_report' => 'Encontrados [doccount] documentos y [foldercount] carpetas en [searchtime] s.', 'search_report_fulltext' => 'Encontrados [doccount] documentos', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => 'Resultados de la búsqueda', 'search_results_access_filtered' => 'Los resultados de la búsqueda podrían incluir contenidos cuyo acceso ha sido denegado.', 'search_time' => 'Tiempo transcurrido: [time] seg.', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 95400cfa0..9c22f496a 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -809,11 +809,15 @@ URL: [url]', 'search_fulltext' => 'Rechercher dans le texte', 'search_in' => 'Rechercher dans', 'search_mode_and' => 'tous les mots', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => 'au moins un mot', 'search_no_results' => 'Aucun document ne correspond à la recherche', 'search_query' => 'Rechercher', 'search_report' => '[doccount] documents trouvé(s) et [foldercount] dossiers en [searchtime] sec.', 'search_report_fulltext' => '[doccount] documents trouvé(s)', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => 'Résultats de recherche', 'search_results_access_filtered' => 'L\'accès à certains résultats de la recherche pourrait être refusé.', 'search_time' => 'Temps écoulé: [time] sec.', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index 8ca503c5c..f4f329b7d 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -832,11 +832,15 @@ URL: [url]', 'search_fulltext' => 'Keresés a teljes szövegben', 'search_in' => 'Keresés ebben a könyvtárban', 'search_mode_and' => 'egyezés minden szóra', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => 'egyezés legalább egy szóra', 'search_no_results' => 'Nem található a keresett kifejezésnek megfelelő dokumentum', 'search_query' => 'Keresés erre', 'search_report' => '[searchtime] másodperc alatt [doccount] dokumentumot és [foldercount] mappát találtunk.', 'search_report_fulltext' => '[doccount] dokumentum található', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => 'Találatok', 'search_results_access_filtered' => 'Search results may contain content to which access has been denied.', 'search_time' => 'Felhasznßlt id: [time] mßsodperc.', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index c0a69c01f..fa4cfd8c1 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -855,11 +855,15 @@ URL: [url]', 'search_fulltext' => 'Ricerca fulltext', 'search_in' => 'Cerca in', 'search_mode_and' => 'tutte le parole', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => 'almeno una parola', 'search_no_results' => 'Non ci sono documenti che soddisfino la vostra ricerca', 'search_query' => 'Cerca per', 'search_report' => 'Trovati [doccount] documenti e [foldercount] cartelle in [searchtime] secondi.', 'search_report_fulltext' => 'Trovati [doccount] documenti', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => 'Risultato ricerca', 'search_results_access_filtered' => 'La ricerca può produrre risultati al cui contenuto è negato l\'accesso.', 'search_time' => 'Tempo trascorso: [time] secondi.', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 31ea66445..192e7981d 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -824,11 +824,15 @@ URL: [url]', 'search_fulltext' => 'Zoek in volledige tekst', 'search_in' => 'Zoek in', 'search_mode_and' => 'alle woorden', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => 'tenminste 1 woord', 'search_no_results' => 'Er zijn geen documenten gevonden die aan uw zoekvraag voldoen', 'search_query' => 'Zoeken naar', 'search_report' => '[count] documenten en [foldercount] mappen gevonden in [searchtime] sec.', 'search_report_fulltext' => '[doccount] documenten gevonden', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => 'Zoekresultaten', 'search_results_access_filtered' => 'Zoekresultaten kunnen inhoud bevatten waar U geen toegang toe heeft.', 'search_time' => 'Verstreken tijd: [time] sec.', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 33c9d62d9..c58fb77d2 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -812,11 +812,15 @@ URL: [url]', 'search_fulltext' => 'Przeszukaj całe teksty', 'search_in' => 'Szukaj w', 'search_mode_and' => 'wszystkie słowa', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => 'conajmnej jedno słowo', 'search_no_results' => 'Nie znaleziono dokumentów spełniających kryteria wyszukiwania.', 'search_query' => 'Wyszukaj', 'search_report' => 'Znaleziono [doccount] dokumentów i [foldercount] katalogów w [searchtime] sec.', 'search_report_fulltext' => 'Znaleziono [doccount] dokumentów', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => 'Wyniki wyszukiwania', 'search_results_access_filtered' => 'Wyniki wyszukiwania mogą zawierać treści, do których dostęp jest zabroniony.', 'search_time' => 'Upływający czas: [time] sec.', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 2fddbdb57..ab59d4b10 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -830,11 +830,15 @@ URL: [url]', 'search_fulltext' => 'Pesquisa em texto completo', 'search_in' => 'Busca em', 'search_mode_and' => 'todas as palavras', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => 'at least one word', 'search_no_results' => 'não há documento que satisfaçam sua busca', 'search_query' => 'Busca por', 'search_report' => 'Encontrados [count] documentos', 'search_report_fulltext' => 'Encontrados [doccount] documentos', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => 'Resultados da busca', 'search_results_access_filtered' => 'Search results may contain content to which access has been denied.', 'search_time' => 'Tempo decorrido: [time] sec.', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index d06e2ed46..6118a184e 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -855,11 +855,15 @@ URL: [url]', 'search_fulltext' => 'Caută în tot textul', 'search_in' => 'Caută în', 'search_mode_and' => 'toate cuvintele', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => 'cel putin un cuvant', 'search_no_results' => 'Nu există documente care corespund căutarii dumneavoastră', 'search_query' => 'Caută după', 'search_report' => 'S-au găsit [doccount] documente și [foldercount] foldere în [searchtime] sec.', 'search_report_fulltext' => 'S-au găsit [doccount] documente', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => 'Rezultatele căutării', 'search_results_access_filtered' => 'Rezultatele căutării pot cuprinde conținut la care accesul a fost interzis.', 'search_time' => 'Timp scurs: [time] sec.', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index 09b0a6cc8..6526a5704 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -823,11 +823,15 @@ URL: [url]', 'search_fulltext' => 'Полнотекстовый поиск', 'search_in' => 'Поиск', 'search_mode_and' => 'Все слова', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => 'Хотя бы одно слово', 'search_no_results' => 'Нет документов, соответствующих запросу', 'search_query' => 'Искать', 'search_report' => 'Найдено документов: [doccount] и каталогов: [foldercount]', 'search_report_fulltext' => 'Найдено документов: [doccount]', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => 'Результаты поиска', 'search_results_access_filtered' => 'Результаты поиска могут содержать объекты к которым у вас нет доступа', 'search_time' => 'Прошло: [time] с', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 77e8bafde..590278896 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -683,11 +683,15 @@ $text = array( 'search_fulltext' => '', 'search_in' => 'Prehľadávať', 'search_mode_and' => 'všetky slová', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => 'aspoň jedno zo slov', 'search_no_results' => 'Vašej požiadavke nevyhovujú žiadne dokumenty', 'search_query' => 'Hľadať', 'search_report' => 'Nájdených [count] dokumentov', 'search_report_fulltext' => '', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => 'Výsledky hľadania', 'search_results_access_filtered' => 'Výsledky hľadania môžu obsahovať obsah, ku ktorému bol zamietnutý prístup.', 'search_time' => 'Uplynulý čas: [time] sek', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index f5293e3dd..6593ad7bf 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -818,11 +818,15 @@ URL: [url]', 'search_fulltext' => 'Fulltext-sökning', 'search_in' => 'Sök i', 'search_mode_and' => 'alla ord', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => 'minst ett ord', 'search_no_results' => 'Det finns inga dokument som matchar din sökning', 'search_query' => 'Sök efter', 'search_report' => 'Hittat [doccount] dokument och [foldercount] kataloger', 'search_report_fulltext' => 'Hittat [doccount] dokument', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => 'Sökresultat', 'search_results_access_filtered' => 'Sökresultatet kan innehålla filer/dokument som du inte har behörighet att öppna.', 'search_time' => 'Förfluten tid: [time] sek', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index abaa57591..b3979f21e 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -834,11 +834,15 @@ URL: [url]', 'search_fulltext' => 'Tam metinde ara', 'search_in' => 'Şurada ara', 'search_mode_and' => 'tüm sözcükler', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => 'en az bir sözcük', 'search_no_results' => 'Arama kriterinize uyan bir doküman bulunamadı', 'search_query' => 'Arama sorgusu', 'search_report' => '[doccount] adet dosya ve [foldercount] adet klasör [searchtime] saniye içinde bulundu', 'search_report_fulltext' => '[doccount] adet doküman bulundu', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => 'Arama sonucu', 'search_results_access_filtered' => 'Arama sonuçları içerisinde erişimin kısıtlandığı içerik bulunabilir.', 'search_time' => 'Arama süresi: [time] sn.', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index b909b66f1..11b6e228b 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/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 (576), fengjohn (5) +// Translators: Admin (578), fengjohn (5) $text = array( 'accept' => '接受', @@ -174,10 +174,10 @@ URL: [url]', 'change_revisors' => '', 'change_status' => '变更状态', 'charts' => '图表', -'chart_docsaccumulated_title' => '', +'chart_docsaccumulated_title' => '文档数量', 'chart_docspercategory_title' => '', 'chart_docspermimetype_title' => '', -'chart_docspermonth_title' => '', +'chart_docspermonth_title' => '每月创建的新文档', 'chart_docsperstatus_title' => '', 'chart_docsperuser_title' => '', 'chart_selection' => '', @@ -689,11 +689,15 @@ URL: [url]', 'search_fulltext' => '', 'search_in' => '搜索于', 'search_mode_and' => '与模式', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => '或模式', 'search_no_results' => '没有找到与您搜索添加相匹配的文件', 'search_query' => '搜索', 'search_report' => '找到 [count] 个文档', 'search_report_fulltext' => '', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => '搜索结果', 'search_results_access_filtered' => '搜索到得结果中可能包含受限访问的文档', 'search_time' => '耗时:[time]秒', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 0ee03b05f..4bc6e605e 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -687,11 +687,15 @@ URL: [url]', 'search_fulltext' => '', 'search_in' => '搜索於', 'search_mode_and' => '與模式', +'search_mode_documents' => '', +'search_mode_folders' => '', 'search_mode_or' => '或模式', 'search_no_results' => '沒有找到與您搜索添加相匹配的檔', 'search_query' => '搜索', 'search_report' => '找到 [count] 個文檔', 'search_report_fulltext' => '', +'search_resultmode' => '', +'search_resultmode_both' => '', 'search_results' => '搜索結果', 'search_results_access_filtered' => '搜索到得結果中可能包含受限訪問的文檔', 'search_time' => '耗時:[time]秒', From bd08e9b125ee876cdf9588a77dc3a532ebc17bd7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 Jun 2015 08:52:36 +0200 Subject: [PATCH 0156/2006] search for documents/folders only --- op/op.Search.php | 3 +++ views/bootstrap/class.Search.php | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/op/op.Search.php b/op/op.Search.php index f3809faa3..6677c64bb 100644 --- a/op/op.Search.php +++ b/op/op.Search.php @@ -195,6 +195,9 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) { * are found */ $resultmode = 0x03; + if (isset($_GET["resultmode"]) && is_numeric($_GET["resultmode"])) { + $resultmode = $_GET['resultmode']; + } $mode = "AND"; if (isset($_GET["mode"]) && is_numeric($_GET["mode"]) && $_GET["mode"]==0) { diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 248e6d3a9..c004ab91f 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -143,6 +143,16 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
    + + + + From 325b91933d6c079c1ae09a82804c31dcaa9d226d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 Jun 2015 10:00:15 +0200 Subject: [PATCH 0157/2006] new document status S_DRAFT, initial doc status can set --- SeedDMS_Core/Core/inc.ClassDocument.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 17ab05cec..35679017a 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -46,6 +46,14 @@ define("S_IN_WORKFLOW", 3); */ define("S_IN_REVISION", 4); +/* + * Document is in draft status. Being in draft means that the document + * is still worked on. This status is mainly for uploading documents + * which aren't fully complete but needs to accessible for the public, + * e.g. in order to colaborate on them. + */ +define("S_DRAFT", 5); + /* * Document was rejected. A document is in rejected state when * the review failed or approval was not given. @@ -1443,7 +1451,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ * @param object $workflow * @return bool/array false in case of an error or a result set */ - function addContent($comment, $user, $tmpFile, $orgFileName, $fileType, $mimeType, $reviewers=array(), $approvers=array(), $version=0, $attributes=array(), $workflow=null) { /* {{{ */ + function addContent($comment, $user, $tmpFile, $orgFileName, $fileType, $mimeType, $reviewers=array(), $approvers=array(), $version=0, $attributes=array(), $workflow=null, $initstate=S_RELEASED) { /* {{{ */ $db = $this->_dms->getDB(); // the doc path is id/version.filetype @@ -1573,6 +1581,9 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ elseif($workflow) { $status = S_IN_WORKFLOW; $comment = ", workflow: ".$workflow->getName(); + } elseif($initstate == S_DRAFT) { + $status = $initstate; + $comment = ""; } else { $status = S_RELEASED; $comment = ""; @@ -2680,8 +2691,6 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ function getStatus() { /* {{{ */ $db = $this->_document->_dms->getDB(); - if (!is_numeric($limit)) return false; - // Retrieve the current overall status of the content represented by // this object. if (!isset($this->_status)) { @@ -2757,7 +2766,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ // If the supplied value lies outside of the accepted range, return an // error. - if ($status < -3 || $status > 4) { + if ($status < -3 || $status > 5) { return false; } From 3a99d005b1b928dc4ff67321bde0b2ad551c4bfd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 Jun 2015 10:01:08 +0200 Subject: [PATCH 0158/2006] new parameter initialstate for addDocument() --- SeedDMS_Core/Core/inc.ClassFolder.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index 5af747db9..c97cd2be9 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -751,11 +751,14 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { * must be the id of the attribute definition. * @param array $version_attributes list of document version attributes. * The element key must be the id of the attribute definition. + * @param object $workflow + * @param integer $initstate initial document state (only S_RELEASED and + * S_DRAFT are allowed) * @return array/boolean false in case of error, otherwise an array * containing two elements. The first one is the new document, the * second one is the result set returned when inserting the content. */ - function addDocument($name, $comment, $expires, $owner, $keywords, $categories, $tmpFile, $orgFileName, $fileType, $mimeType, $sequence, $reviewers=array(), $approvers=array(),$reqversion=0,$version_comment="", $attributes=array(), $version_attributes=array(), $workflow=null) { /* {{{ */ + function addDocument($name, $comment, $expires, $owner, $keywords, $categories, $tmpFile, $orgFileName, $fileType, $mimeType, $sequence, $reviewers=array(), $approvers=array(),$reqversion=0,$version_comment="", $attributes=array(), $version_attributes=array(), $workflow=null, $initstate=S_RELEASED) { /* {{{ */ $db = $this->_dms->getDB(); $expires = (!$expires) ? 0 : $expires; @@ -782,7 +785,7 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { $document = $this->_dms->getDocument($db->getInsertID()); // if ($version_comment!="") - $res = $document->addContent($version_comment, $owner, $tmpFile, $orgFileName, $fileType, $mimeType, $reviewers, $approvers, $reqversion, $version_attributes, $workflow); + $res = $document->addContent($version_comment, $owner, $tmpFile, $orgFileName, $fileType, $mimeType, $reviewers, $approvers, $reqversion, $version_attributes, $workflow, $initstate); // else $res = $document->addContent($comment, $owner, $tmpFile, $orgFileName, $fileType, $mimeType, $reviewers, $approvers,$reqversion, $version_attributes, $workflow); if (is_bool($res) && !$res) { From 86f641c3b0f2e4fcd42e9fa16d6a0268cf2afede Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 Jun 2015 10:02:02 +0200 Subject: [PATCH 0159/2006] new status in getOverallStatusText() --- inc/inc.Language.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/inc.Language.php b/inc/inc.Language.php index 4baae226a..bb13c30f0 100644 --- a/inc/inc.Language.php +++ b/inc/inc.Language.php @@ -307,6 +307,9 @@ function getOverallStatusText($status) { /* {{{ */ case S_IN_REVISION: return getMLText("in_revision"); break; + case S_DRAFT: + return getMLText("draft"); + break; default: return getMLText("status_unknown"); break; From d9d4d89a27727a1fa246d668a74e9879cbe5118d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 Jun 2015 10:02:46 +0200 Subject: [PATCH 0160/2006] set initial document status --- inc/inc.ClassSettings.php | 5 ++++- op/op.Settings.php | 1 + views/bootstrap/class.Settings.php | 9 +++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index b770d8d9c..975eb05d0 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -136,6 +136,8 @@ class Settings { /* {{{ */ var $_enableNotificationWorkflow = false; // preset expiration date var $_presetExpirationDate = ""; + // initial document status + var $_initialDocumentStatus = S_RELEASED; // the name of the versioning info file created by the backup tool var $_versioningFileName = "versioning_info.txt"; // the mode of workflow @@ -499,6 +501,7 @@ class Settings { /* {{{ */ $this->_enableOwnerRevApp = Settings::boolval($tab["enableOwnerRevApp"]); $this->_enableSelfRevApp = Settings::boolval($tab["enableSelfRevApp"]); $this->_presetExpirationDate = strval($tab["presetExpirationDate"]); + $this->_initialDocumentStatus = intval($tab["initialDocumentStatus"]); $this->_versioningFileName = strval($tab["versioningFileName"]); $this->_workflowMode = strval($tab["workflowMode"]); $this->_enableAcknowledgeWorkflow = strval($tab["enableAcknowledgeWorkflow"]); @@ -774,8 +777,8 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "enableOwnerRevApp", $this->_enableOwnerRevApp); $this->setXMLAttributValue($node, "enableSelfRevApp", $this->_enableSelfRevApp); $this->setXMLAttributValue($node, "presetExpirationDate", $this->_presetExpirationDate); + $this->setXMLAttributValue($node, "initialDocumentStatus", $this->_initialDocumentStatus); $this->setXMLAttributValue($node, "versioningFileName", $this->_versioningFileName); - $this->setXMLAttributValue($node, "presetExpirationDate", $this->_presetExpirationDate); $this->setXMLAttributValue($node, "workflowMode", $this->_workflowMode); $this->setXMLAttributValue($node, "enableAcknowledgeWorkflow", $this->_enableAcknowledgeWorkflow); $this->setXMLAttributValue($node, "enableRevisionWorkflow", $this->_enableRevisionWorkflow); diff --git a/op/op.Settings.php b/op/op.Settings.php index 8d6aa0695..34bac533e 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -148,6 +148,7 @@ if ($action == "saveSettings") // SETTINGS - ADVANCED - EDITION $settings->_versioningFileName = $_POST["versioningFileName"]; $settings->_presetExpirationDate = $_POST["presetExpirationDate"]; + $settings->_initialDocumentStatus = $_POST["initialDocumentStatus"]; $settings->_workflowMode = $_POST["workflowMode"]; $settings->_enableAcknowledgeWorkflow = $_POST["enableAcknowledgeWorkflow"]; $settings->_enableRevisionWorkflow = $_POST["enableRevisionWorkflow"]; diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 6fc9ace1e..2bcb53478 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -512,6 +512,15 @@ if(!is_writeable($settings->_configFilePath)) { + "> + + + "> From 944b059abed55fc57f77152dde3d2ab62ec2f63d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 Jun 2015 10:03:09 +0200 Subject: [PATCH 0161/2006] set initial document status --- controllers/class.AddDocument.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/class.AddDocument.php b/controllers/class.AddDocument.php index 3217ba9dc..f856a4989 100644 --- a/controllers/class.AddDocument.php +++ b/controllers/class.AddDocument.php @@ -56,6 +56,7 @@ class SeedDMS_Controller_AddDocument extends SeedDMS_Controller_Common { $workflow = $this->getParam('workflow'); $notificationgroups = $this->getParam('notificationgroups'); $notificationusers = $this->getParam('notificationusers'); + $initialdocumentstatus = $this->getParam('initialdocumentstatus'); $result = $this->callHook('addDocument'); if($result === null) { @@ -63,7 +64,7 @@ class SeedDMS_Controller_AddDocument extends SeedDMS_Controller_Common { $cats, $userfiletmp, basename($userfilename), $filetype, $userfiletype, $sequence, $reviewers, $approvers, $reqversion, - $version_comment, $attributes, $attributes_version, $workflow); + $version_comment, $attributes, $attributes_version, $workflow, $initialdocumentstatus); if (is_bool($res) && !$res) { $this->errormsg = "error_occured"; From 5a29cde314bd2c98135154e07e715fea0b62d6dd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 Jun 2015 10:03:34 +0200 Subject: [PATCH 0162/2006] set initial document status --- op/op.AddDocument.php | 1 + 1 file changed, 1 insertion(+) diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php index 2d639170e..50e9b9421 100644 --- a/op/op.AddDocument.php +++ b/op/op.AddDocument.php @@ -359,6 +359,7 @@ for ($file_num=0;$file_numsetParam('workflow', $workflow); $controller->setParam('notificationgroups', $notgroups); $controller->setParam('notificationusers', $notusers); + $controller->setParam('initialdocumentstatus', $settings->_initialDocumentStatus); if(!$document = $controller->run()) { UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText($controller->getErrorMsg())); From 1bc5e6116c8837dd2a9aec7b7bba0ee5b010b0eb Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 Jun 2015 10:04:01 +0200 Subject: [PATCH 0163/2006] document status S_DRAFT can be set --- op/op.OverrideContentStatus.php | 2 +- views/bootstrap/class.OverrideContentStatus.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/op/op.OverrideContentStatus.php b/op/op.OverrideContentStatus.php index d1c429eb6..080692d11 100644 --- a/op/op.OverrideContentStatus.php +++ b/op/op.OverrideContentStatus.php @@ -54,7 +54,7 @@ if (!is_object($content)) { } if (!isset($_POST["overrideStatus"]) || !is_numeric($_POST["overrideStatus"]) || - (intval($_POST["overrideStatus"])<-3 && intval($_POST["overrideStatus"])>2)) { + (intval($_POST["overrideStatus"]) != S_RELEASED && intval($_POST["overrideStatus"]) != S_OBSOLETE && intval($_POST["overrideStatus"]) != S_DRAFT)) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_status")); } diff --git a/views/bootstrap/class.OverrideContentStatus.php b/views/bootstrap/class.OverrideContentStatus.php index 26c30d68d..709875bf2 100644 --- a/views/bootstrap/class.OverrideContentStatus.php +++ b/views/bootstrap/class.OverrideContentStatus.php @@ -87,8 +87,9 @@ function checkForm() ".getOverallStatusText(S_RELEASED).""; - if ($overallStatus["status"] == S_RELEASED) echo ""; + if ($overallStatus["status"] != S_RELEASED) echo ""; + if ($overallStatus["status"] != S_OBSOLETE) echo ""; + if ($overallStatus["status"] != S_DRAFT) echo ""; ?> From 1123611371dda1284f1e2f86cb92829722a173a9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 Jun 2015 10:04:35 +0200 Subject: [PATCH 0164/2006] rename mayOverwriteStatus() to mayOverrideStatus() --- inc/inc.ClassAccessOperation.php | 4 ++-- views/bootstrap/class.ViewDocument.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index ed550e6d9..2a88af8df 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -74,11 +74,11 @@ class SeedDMS_AccessOperation { * The admin may even modify the status * even if is disallowed in the settings. */ - function mayOverwriteStatus() { /* {{{ */ + function mayOverrideStatus() { /* {{{ */ if(get_class($this->obj) == 'SeedDMS_Core_Document') { $latestContent = $this->obj->getLatestContent(); $status = $latestContent->getStatus(); - if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]==S_RELEASED || $status["status"]==S_OBSOLETE )) { + if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]==S_DRAFT || $status["status"]==S_RELEASED || $status["status"]==S_OBSOLETE)) { return true; } } diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 9848f9e02..8bc24643d 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -544,7 +544,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if($accessop->mayRemoveVersion()) { print "
  • getVersion()."\">".getMLText("rm_version")."
  • "; } - if($accessop->mayOverwriteStatus()) { + if($accessop->mayOverrideStatus()) { print "
  • ".getMLText("change_status")."
  • "; } if($accessop->maySetRecipients()) { From ec78639d9488ed4133de9f7bce23d727d2e29db4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 Jun 2015 10:18:37 +0200 Subject: [PATCH 0165/2006] do not hide review if workflow mode is traditional_only_approve otherwise old documents which are still in review can't be reviewed anymore --- views/bootstrap/class.ViewDocument.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 8bc24643d..aa47a82b1 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -636,7 +636,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { $this->contentContainerstart(); print "
    ".getMLText("name")."
    : + +
    : printFolderChooser("form1", M_READ, -1, $startfolder);?>
    :
    : + +
    : _enableAdminRevApp) echo "checked" ?> />
    \n"; - if ($workflowmode != 'traditional_only_approval' && is_array($reviewStatus) && count($reviewStatus)>0) { + /* Just check fo an exting reviewStatus, even workflow mode is set + * to traditional_only_approval. There may be old documents which + * are still in S_DRAFT_REV. + */ + if (/*$workflowmode != 'traditional_only_approval' &&*/ is_array($reviewStatus) && count($reviewStatus)>0) { print " - +
    \n"; $this->contentSubHeading(getMLText("reviewers")); @@ -772,7 +776,12 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { ?>
    getReviewStatus(10) /*$workflowmode != 'traditional_only_approval'*/) { ?>
    printProtocol($latestContent, 'review'); ?> From dea874de02d2082055443750b2f049af588bdbfe Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 Jun 2015 17:26:41 +0200 Subject: [PATCH 0166/2006] set $_initialDocumentStatus to 2 instead of S_RELEASED the constant S_RELEASED isn't know at that time --- inc/inc.ClassSettings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 975eb05d0..faaa56f0b 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -137,7 +137,7 @@ class Settings { /* {{{ */ // preset expiration date var $_presetExpirationDate = ""; // initial document status - var $_initialDocumentStatus = S_RELEASED; + var $_initialDocumentStatus = 2; //S_RELEASED; // the name of the versioning info file created by the backup tool var $_versioningFileName = "versioning_info.txt"; // the mode of workflow From a6085279c94744acc45632f18f1a50449160eb9c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 Jun 2015 17:27:35 +0200 Subject: [PATCH 0167/2006] add class for downloading a bunch of document versions --- inc/inc.ClassDownloadMgr.php | 69 ++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 inc/inc.ClassDownloadMgr.php diff --git a/inc/inc.ClassDownloadMgr.php b/inc/inc.ClassDownloadMgr.php new file mode 100644 index 000000000..598375cab --- /dev/null +++ b/inc/inc.ClassDownloadMgr.php @@ -0,0 +1,69 @@ + + * @copyright 2015 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Class to represent an download manager + * + * This class provides some very basic methods to download document lists. + * + * @category DMS + * @package SeedDMS + * @author Uwe Steinmann + * @copyright 2015 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_Download_Mgr { + /** + * @var string $tmpdir directory where download archive is temp. created + * @access protected + */ + protected $tmpdir; + + /** + * @var array $items list of document content items + * @access protected + */ + protected $items; + + function __construct($tmpdir = '') { + $this->tmpdir = $tmpdir; + $this->items = array(); + } + + public function addItem($item) { /* {{{ */ + $this->items[$item->getID()] = $item; + } /* }}} */ + + public function createArchive($filename) { /* {{{ */ + if(!$this->items) { + return false; + } + + $zip = new ZipArchive(); + $prefixdir = date('Y-m-d', time()); + + if($zip->open($filename, ZipArchive::CREATE) !== TRUE) { + return false; + } + + foreach($this->items as $item) { + $document = $item->getDocument(); + $dms = $document->_dms; + + $zip->addFile($dms->contentDir.$item->getPath(), $prefixdir."/".$document->getID()."-".$item->getOriginalFileName()); + } + $zip->close(); + } /* }}} */ +} From 11bac92d2f34688169ad091a1da9f2986d70a50e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 Jun 2015 17:28:09 +0200 Subject: [PATCH 0168/2006] if $_GE['export'] is set the search result will be downloaded as a zipfile --- op/op.Search.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/op/op.Search.php b/op/op.Search.php index 6677c64bb..4659270f1 100644 --- a/op/op.Search.php +++ b/op/op.Search.php @@ -414,6 +414,27 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) { } } } + if($_GET['export']) { + include("../inc/inc.ClassDownloadMgr.php"); + $downmgr = new SeedDMS_Download_Mgr(); + foreach($entries as $entry) { + if(get_class($entry) == $dms->getClassname('document')) { + $downmgr->addItem($entry->getLatestContent()); + } + } + $filename = tempnam('/tmp', ''); + $downmgr->createArchive($filename); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($filename)); + header("Content-Disposition: attachment; filename=\"export-" .date('Y-m-d') . ".zip\""); + header("Content-Type: application/zip"); + header("Cache-Control: must-revalidate"); + + readfile($filename); + unlink($filename); + exit; + } + $totalPages = (int) (count($entries)/$limit); if(count($entries)%$limit) $totalPages++; From 13a977f84f44537f17e0f27bb95608cd169b714d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 Jun 2015 17:29:33 +0200 Subject: [PATCH 0169/2006] add export button if search returned documents --- views/bootstrap/class.Search.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index c004ab91f..50f90fd2e 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -192,7 +192,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { ?>
    "> Export
    @@ -406,6 +406,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { + "; From 94744862a54ffce136e04af80988279ccf62dcd6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 8 Jun 2015 09:06:59 +0200 Subject: [PATCH 0170/2006] create excel file with meta data for for files in zip archive --- inc/inc.ClassDownloadMgr.php | 93 ++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/inc/inc.ClassDownloadMgr.php b/inc/inc.ClassDownloadMgr.php index 598375cab..8b8ee4e16 100644 --- a/inc/inc.ClassDownloadMgr.php +++ b/inc/inc.ClassDownloadMgr.php @@ -13,6 +13,8 @@ * @version Release: @package_version@ */ +require_once("PHPExcel.php"); + /** * Class to represent an download manager * @@ -58,12 +60,103 @@ class SeedDMS_Download_Mgr { return false; } + $objPHPExcel = new PHPExcel(); + $objPHPExcel->getProperties()->setCreator("MMK GmbH, Hagen, Germany")->setTitle("Metadata"); + $sheet = $objPHPExcel->setActiveSheetIndex(0); + + $i = 1; + $sheet->setCellValueByColumnAndRow(0, $i, 'Dokumenten-Nr.'); + $sheet->setCellValueByColumnAndRow(1, $i, 'Dateiname'); + $sheet->setCellValueByColumnAndRow(2, $i, 'Status'); + $sheet->setCellValueByColumnAndRow(3, $i, 'Int. Version'); + $sheet->setCellValueByColumnAndRow(4, $i, 'Prüfer'); + $sheet->setCellValueByColumnAndRow(5, $i, 'Prüfdatum'); + $sheet->setCellValueByColumnAndRow(6, $i, 'Prüfkommentar'); + $sheet->setCellValueByColumnAndRow(7, $i, 'Prüfstatus'); + $sheet->setCellValueByColumnAndRow(8, $i, 'Freigeber'); + $sheet->setCellValueByColumnAndRow(9, $i, 'Freigabedatum'); + $sheet->setCellValueByColumnAndRow(10, $i, 'Freigabekommentar'); + $sheet->setCellValueByColumnAndRow(11, $i, 'Freigabestatus'); + $i++; foreach($this->items as $item) { $document = $item->getDocument(); $dms = $document->_dms; + $status = $item->getStatus(); + $reviewStatus = $item->getReviewStatus(); + $approvalStatus = $item->getApprovalStatus(); $zip->addFile($dms->contentDir.$item->getPath(), $prefixdir."/".$document->getID()."-".$item->getOriginalFileName()); + $sheet->setCellValueByColumnAndRow(0, $i, $document->getID()); + $sheet->setCellValueByColumnAndRow(1, $i, $document->getID()."-".$item->getOriginalFileName()); + $sheet->setCellValueByColumnAndRow(2, $i, getOverallStatusText($status['status'])); + $sheet->setCellValueByColumnAndRow(3, $i, $item->getVersion()); + $l = $i; + $k = $i; + if($reviewStatus) { + foreach ($reviewStatus as $r) { + switch ($r["type"]) { + case 0: // Reviewer is an individual. + $required = $dms->getUser($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } else { + $reqName = htmlspecialchars($required->getFullName()." (".$required->getLogin().")"); + } + break; + case 1: // Reviewer is a group. + $required = $dms->getGroup($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } else { + $reqName = htmlspecialchars($required->getName()); + } + break; + } + $sheet->setCellValueByColumnAndRow(4, $l, $reqName); + $sheet->setCellValueByColumnAndRow(5, $l, $r['date']); + $sheet->setCellValueByColumnAndRow(6, $l, $r['comment']); + $sheet->setCellValueByColumnAndRow(7, $l, getReviewStatusText($r["status"])); + $l++; + } + $l--; + } + if($approvalStatus) { + foreach ($approvalStatus as $r) { + switch ($r["type"]) { + case 0: // Reviewer is an individual. + $required = $dms->getUser($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_user")." '".$r["required"]."'"; + } else { + $reqName = htmlspecialchars($required->getFullName()." (".$required->getLogin().")"); + } + break; + case 1: // Reviewer is a group. + $required = $dms->getGroup($r["required"]); + if (!is_object($required)) { + $reqName = getMLText("unknown_group")." '".$r["required"]."'"; + } else { + $reqName = htmlspecialchars($required->getName()); + } + break; + } + $sheet->setCellValueByColumnAndRow(8, $k, $reqName); + $sheet->setCellValueByColumnAndRow(9, $k, $r['date']); + $sheet->setCellValueByColumnAndRow(10, $k, $r['comment']); + $sheet->setCellValueByColumnAndRow(11, $k, getReviewStatusText($r["status"])); + $k++; + } + $k--; + } + $i = max($l, $k); + $i++; } + + $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); + $file = tempnam("/tmp", "export-list-"); + $objWriter->save($file); + $zip->addFile($file, $prefixdir."/metadata.xls"); $zip->close(); + unlink($file); } /* }}} */ } From f7c8d39b5da21551e755319c6009b03e8f1cf24b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 8 Jun 2015 09:08:32 +0200 Subject: [PATCH 0171/2006] pass resultmode to view --- op/op.Search.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/op/op.Search.php b/op/op.Search.php index 4659270f1..9c7ca3731 100644 --- a/op/op.Search.php +++ b/op/op.Search.php @@ -414,7 +414,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) { } } } - if($_GET['export']) { + if(isset($_GET['export']) && $_GET['export']) { include("../inc/inc.ClassDownloadMgr.php"); $downmgr = new SeedDMS_Download_Mgr(); foreach($entries as $entry) { @@ -462,6 +462,7 @@ if(count($entries) == 1) { $view->setParam('totalfolders', $fcount /*resArr['totalFolders']*/); $view->setParam('fullsearch', (isset($_GET["fullsearch"]) && $_GET["fullsearch"]) ? true : false); $view->setParam('mode', isset($mode) ? $mode : ''); + $view->setParam('resultmode', isset($resultmode) ? $resultmode : ''); $view->setParam('searchin', isset($searchin) ? $searchin : array()); $view->setParam('startfolder', isset($startFolder) ? $startFolder : null); $view->setParam('owner', $owner); From 4b23765042235ba8e27769c9a3bb8d3ae46cf192 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 8 Jun 2015 09:09:03 +0200 Subject: [PATCH 0172/2006] show button to approve document if status is null was only shown if the status of the document was S_APP_DRAFT --- views/bootstrap/class.ViewDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index aa47a82b1..744121070 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -756,7 +756,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "
      "; if($accessop->mayApprove()) { - if ($is_approver && $status["status"]==S_DRAFT_APP) { + if ($is_approver && $r['status'] == 0 /*$status["status"]==S_DRAFT_APP*/) { print "
    • getVersion()."&approveid=".$a['approveID']."\">".getMLText("add_approval")."
    • "; }else if (($updateUser==$user)&&(($a["status"]==1)||($a["status"]==-1))&&(!$document->hasExpired())){ print "
    • getVersion()."&approveid=".$a['approveID']."\">".getMLText("edit")."
    • "; From c2e2b1e9be2716a09e7f5b834924f7843c513997 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 8 Jun 2015 09:10:34 +0200 Subject: [PATCH 0173/2006] take resultmode from view parameters --- views/bootstrap/class.Search.php | 1 + 1 file changed, 1 insertion(+) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 50f90fd2e..ce0d86ae4 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -57,6 +57,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { $allCats = $this->params['allcategories']; $allUsers = $this->params['allusers']; $mode = $this->params['mode']; + $resultmode = $this->params['resultmode']; $workflowmode = $this->params['workflowmode']; $enablefullsearch = $this->params['enablefullsearch']; $enableclipboard = $this->params['enableclipboard']; From da0b3e71b3783a64678bafdb00faf759a673b278 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 8 Jun 2015 21:58:17 +0200 Subject: [PATCH 0174/2006] approval can be added again --- views/bootstrap/class.ViewDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 744121070..1ff85f0d3 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -756,7 +756,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "
        "; if($accessop->mayApprove()) { - if ($is_approver && $r['status'] == 0 /*$status["status"]==S_DRAFT_APP*/) { + if ($is_approver && $a['status'] == 0 /*$status["status"]==S_DRAFT_APP*/) { print "
      • getVersion()."&approveid=".$a['approveID']."\">".getMLText("add_approval")."
      • "; }else if (($updateUser==$user)&&(($a["status"]==1)||($a["status"]==-1))&&(!$document->hasExpired())){ print "
      • getVersion()."&approveid=".$a['approveID']."\">".getMLText("edit")."
      • "; From 46dc4ea6e30d4dac311b308db3ef4fcfa1d5fde0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 8 Jun 2015 21:59:56 +0200 Subject: [PATCH 0175/2006] add code for downloading file into contoller --- controllers/class.Download.php | 19 ++++++++++++++++++- op/op.Download.php | 16 +++------------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/controllers/class.Download.php b/controllers/class.Download.php index 36d7b8186..577db2740 100644 --- a/controllers/class.Download.php +++ b/controllers/class.Download.php @@ -25,10 +25,10 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common { public function run() { $dms = $this->params['dms']; $type = $this->params['type']; - $content = $this->params['content']; switch($type) { case "version": + $content = $this->params['content']; if(!$this->callHook('version')) { header("Content-Transfer-Encoding: binary"); @@ -40,6 +40,23 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common { readfile($dms->contentDir . $content->getPath()); } break; + case "file": + $file = $this->params['file']; + + if(!$this->callHook('file')) { + header("Content-Type: application/force-download; name=\"" . $file->getOriginalFileName() . "\""); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($dms->contentDir . $file->getPath() )); + header("Content-Disposition: attachment; filename=\"" . $file->getOriginalFileName() . "\""); + //header("Expires: 0"); + header("Content-Type: " . $file->getMimeType()); + //header("Cache-Control: no-cache, must-revalidate"); + header("Cache-Control: must-revalidate"); + //header("Pragma: no-cache"); + + readfile($dms->contentDir . $file->getPath()); + } + break; } } } diff --git a/op/op.Download.php b/op/op.Download.php index 483a8e427..3d5453873 100644 --- a/op/op.Download.php +++ b/op/op.Download.php @@ -100,19 +100,9 @@ if (isset($_GET["version"])) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_file_id")); } - header("Content-Type: application/force-download; name=\"" . $file->getOriginalFileName() . "\""); - header("Content-Transfer-Encoding: binary"); - header("Content-Length: " . filesize($dms->contentDir . $file->getPath() )); - header("Content-Disposition: attachment; filename=\"" . $file->getOriginalFileName() . "\""); - //header("Expires: 0"); - header("Content-Type: " . $file->getMimeType()); - //header("Cache-Control: no-cache, must-revalidate"); - header("Cache-Control: must-revalidate"); - //header("Pragma: no-cache"); - - ob_clean(); - readfile($dms->contentDir . $file->getPath()); - + $controller->setParam('file', $file); + $controller->setParam('type', 'file'); + $controller->run(); } elseif (isset($_GET["arkname"])) { $filename = basename($_GET["arkname"]); From 20f28bb7dfc1117e1987ae256118766580016c27 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 8 Jun 2015 22:00:27 +0200 Subject: [PATCH 0176/2006] use /tmp for tempnam() --- 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 50e9b9421..6bdb2bebb 100644 --- a/op/op.AddDocument.php +++ b/op/op.AddDocument.php @@ -256,7 +256,7 @@ if($settings->_libraryFolder) { if($clonedoc = $dms->getDocument($_POST["librarydoc"])) { if($content = $clonedoc->getLatestContent()) { $docsource = 'library'; - $fullfile = tempnam('', ''); + $fullfile = tempnam('/tmp', ''); if(SeedDMS_Core_File::copyFile($dms->contentDir . $content->getPath(), $fullfile)) { /* Check if a local file is uploaded as well */ if(isset($_FILES["userfile"]['error'][0])) { From fb2e7dfe1272a41c64cd7997c802923ef9b742c4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 8 Jun 2015 22:03:08 +0200 Subject: [PATCH 0177/2006] utf8_decode file name in zip file --- inc/inc.ClassDownloadMgr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/inc.ClassDownloadMgr.php b/inc/inc.ClassDownloadMgr.php index 8b8ee4e16..005d0ffa4 100644 --- a/inc/inc.ClassDownloadMgr.php +++ b/inc/inc.ClassDownloadMgr.php @@ -85,7 +85,7 @@ class SeedDMS_Download_Mgr { $reviewStatus = $item->getReviewStatus(); $approvalStatus = $item->getApprovalStatus(); - $zip->addFile($dms->contentDir.$item->getPath(), $prefixdir."/".$document->getID()."-".$item->getOriginalFileName()); + $zip->addFile($dms->contentDir.$item->getPath(), utf8_decode($prefixdir."/".$document->getID()."-".$item->getOriginalFileName())); $sheet->setCellValueByColumnAndRow(0, $i, $document->getID()); $sheet->setCellValueByColumnAndRow(1, $i, $document->getID()."-".$item->getOriginalFileName()); $sheet->setCellValueByColumnAndRow(2, $i, getOverallStatusText($status['status'])); From 15bb6177d8604b9fe4558616d9a0083ddd5a94aa Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Jun 2015 07:00:06 +0200 Subject: [PATCH 0178/2006] pass version to url checking for new versions --- out/out.Info.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/out/out.Info.php b/out/out.Info.php index db7bd15d1..3fdc51744 100644 --- a/out/out.Info.php +++ b/out/out.Info.php @@ -34,7 +34,7 @@ if (!$user->isAdmin()) { $v = new SeedDMS_Version; $versions = array(); if(@ini_get('allow_url_fopen') == '1') { - $lines = @file('http://www.seeddms.org/latest', FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES); + $lines = @file('http://www.seeddms.org/latest?version='.$v->version(), FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES); if($lines) { foreach($lines as $line) { $versions[] = explode(':', $line); From bd85c0c25aa2fb401aff7a94b8a39dc96191bcce Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Jun 2015 07:15:18 +0200 Subject: [PATCH 0179/2006] set missing parameter [url] in email notification --- op/op.SetReviewersApprovers.php | 1 + 1 file changed, 1 insertion(+) diff --git a/op/op.SetReviewersApprovers.php b/op/op.SetReviewersApprovers.php index c905ab87c..54efefe83 100644 --- a/op/op.SetReviewersApprovers.php +++ b/op/op.SetReviewersApprovers.php @@ -448,6 +448,7 @@ foreach ($pGrpApp as $p) { $params['version'] = $content->_version; $params['comment'] = $content->getComment(); $params['username'] = $user->getFullName(); + $params['url'] = "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $settings->_siteName; $params['http_root'] = $settings->_httpRoot; From 380ac2f1bdcd5478b75cf8ac6177874082a6f15a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Jun 2015 08:59:25 +0200 Subject: [PATCH 0180/2006] add currenttab to link when redirecting to out/out.ViewDocument.php --- op/op.AddDocumentLink.php | 2 +- op/op.AddFile.php | 2 +- op/op.ApproveDocument.php | 2 +- op/op.ReceiptDocument.php | 2 +- op/op.RemoveDocumentFile.php | 2 +- op/op.RemoveDocumentLink.php | 2 +- op/op.RemoveVersion.php | 2 +- op/op.ReviewDocument.php | 2 +- op/op.ReviseDocument.php | 2 +- op/op.RewindWorkflow.php | 2 +- op/op.RunSubWorkflow.php | 2 +- op/op.TriggerWorkflow.php | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/op/op.AddDocumentLink.php b/op/op.AddDocumentLink.php index ca72f07be..40cfed21e 100644 --- a/op/op.AddDocumentLink.php +++ b/op/op.AddDocumentLink.php @@ -66,6 +66,6 @@ if (!$document->addDocumentLink($docid, $user->getID(), $public)){ UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); } -header("Location:../out/out.ViewDocument.php?documentid=".$documentid); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid."¤ttab=links"); ?> diff --git a/op/op.AddFile.php b/op/op.AddFile.php index bc4a5788f..8dfe3f4e1 100644 --- a/op/op.AddFile.php +++ b/op/op.AddFile.php @@ -108,7 +108,7 @@ if (is_bool($res) && !$res) { add_log_line("?name=".$name."&documentid=".$documentid); -header("Location:../out/out.ViewDocument.php?documentid=".$documentid); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid."¤ttab=attachments"); ?> diff --git a/op/op.ApproveDocument.php b/op/op.ApproveDocument.php index 989b9d97f..cee6769de 100644 --- a/op/op.ApproveDocument.php +++ b/op/op.ApproveDocument.php @@ -154,6 +154,6 @@ if($olddocstatus['status'] != $newdocstatus['status']) { // TODO: if user os not owner send notification to owner } -header("Location:../out/out.ViewDocument.php?documentid=".$documentid); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid."¤ttab=revapp"); ?> diff --git a/op/op.ReceiptDocument.php b/op/op.ReceiptDocument.php index 509e3938c..76f578833 100644 --- a/op/op.ReceiptDocument.php +++ b/op/op.ReceiptDocument.php @@ -97,6 +97,6 @@ if(!$controller->run()) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText($controller->getErrorMsg())); } -header("Location:../out/out.ViewDocument.php?documentid=".$documentid); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid."¤ttab=recipients"); ?> diff --git a/op/op.RemoveDocumentFile.php b/op/op.RemoveDocumentFile.php index f4726e4ff..fd9e61661 100644 --- a/op/op.RemoveDocumentFile.php +++ b/op/op.RemoveDocumentFile.php @@ -95,6 +95,6 @@ if (!$document->removeDocumentFile($fileid)) { add_log_line("?documentid=".$documentid."&fileid=".$fileid); -header("Location:../out/out.ViewDocument.php?documentid=".$documentid); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid."¤ttab=attachments"); ?> diff --git a/op/op.RemoveDocumentLink.php b/op/op.RemoveDocumentLink.php index 435104258..359a9518d 100644 --- a/op/op.RemoveDocumentLink.php +++ b/op/op.RemoveDocumentLink.php @@ -70,6 +70,6 @@ if (!$document->removeDocumentLink($linkid)) { add_log_line("?documentid=".$documentid."&linkid=".$linkid); -header("Location:../out/out.ViewDocument.php?documentid=".$documentid); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid."¤ttab=links"); ?> diff --git a/op/op.RemoveVersion.php b/op/op.RemoveVersion.php index c4945ad6b..946eccaa8 100644 --- a/op/op.RemoveVersion.php +++ b/op/op.RemoveVersion.php @@ -191,6 +191,6 @@ else { add_log_line("?documentid=".$documentid."&version".$version_num); -header("Location:../out/out.ViewDocument.php?documentid=".$documentid); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid."¤ttab=previous"); ?> diff --git a/op/op.ReviewDocument.php b/op/op.ReviewDocument.php index 082ea758f..dc401c1e7 100644 --- a/op/op.ReviewDocument.php +++ b/op/op.ReviewDocument.php @@ -176,6 +176,6 @@ if ($newStatus == S_DRAFT_APP) { } } -header("Location:../out/out.ViewDocument.php?documentid=".$documentid); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid."¤ttab=revapp"); ?> diff --git a/op/op.ReviseDocument.php b/op/op.ReviseDocument.php index 2ef633378..7b22e1cda 100644 --- a/op/op.ReviseDocument.php +++ b/op/op.ReviseDocument.php @@ -145,6 +145,6 @@ if($olddocstatus['status'] != $newdocstatus['status']) { } } -header("Location:../out/out.ViewDocument.php?documentid=".$documentid); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid."¤ttab=revision"); ?> diff --git a/op/op.RewindWorkflow.php b/op/op.RewindWorkflow.php index 5147ee094..ccf6c4d9b 100644 --- a/op/op.RewindWorkflow.php +++ b/op/op.RewindWorkflow.php @@ -94,5 +94,5 @@ if($version->rewindWorkflow()) { add_log_line("?documentid=".$documentid."&version".$version_num); -header("Location:../out/out.ViewDocument.php?documentid=".$documentid); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid."¤ttab=workflow"); ?> diff --git a/op/op.RunSubWorkflow.php b/op/op.RunSubWorkflow.php index a0e8dfb74..c0225cc25 100644 --- a/op/op.RunSubWorkflow.php +++ b/op/op.RunSubWorkflow.php @@ -103,5 +103,5 @@ if($version->runSubWorkflow($subworkflow)) { add_log_line("?documentid=".$documentid."&version".$version_num); -header("Location:../out/out.ViewDocument.php?documentid=".$documentid); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid."¤ttab=workflow"); ?> diff --git a/op/op.TriggerWorkflow.php b/op/op.TriggerWorkflow.php index 724d7ce78..6d01b1f8f 100644 --- a/op/op.TriggerWorkflow.php +++ b/op/op.TriggerWorkflow.php @@ -135,5 +135,5 @@ if($version->triggerWorkflowTransition($user, $transition, $_POST["comment"])) { add_log_line("?documentid=".$documentid."&version".$version_num); -header("Location:../out/out.ViewDocument.php?documentid=".$documentid); +header("Location:../out/out.ViewDocument.php?documentid=".$documentid."¤ttab=workflow"); ?> From 82190c7d0e106392dc4446c19f4d869e2289ee39 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Jun 2015 09:00:22 +0200 Subject: [PATCH 0181/2006] check for current tab --- out/out.ViewDocument.php | 1 + views/bootstrap/class.ViewDocument.php | 33 +++++++++++++------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/out/out.ViewDocument.php b/out/out.ViewDocument.php index 091c2b496..527201038 100644 --- a/out/out.ViewDocument.php +++ b/out/out.ViewDocument.php @@ -85,6 +85,7 @@ if($view) { $view->setParam('previewWidthList', $settings->_previewWidthList); $view->setParam('previewWidthDetail', $settings->_previewWidthDetail); $view->setParam('checkOutDir', $settings->_checkOutDir); + $view->setParam('currenttab', isset($_REQUEST['currenttab']) ? $_REQUEST['currenttab'] : ''); $view->show(); exit; } diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 1ff85f0d3..3b7a82b16 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -212,6 +212,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { $previewwidthdetail = $this->params['previewWidthDetail']; $checkoutdir = $this->params['checkOutDir']; $documentid = $document->getId(); + $currenttab = $this->params['currenttab']; $versions = $document->getContent(); @@ -403,41 +404,41 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
    -
    +
    contentContainerStart(); @@ -631,7 +632,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if((is_array($reviewStatus) && count($reviewStatus)>0) || (is_array($approvalStatus) && count($approvalStatus)>0)) { ?> -
    +
    contentContainerstart(); print "\n"; @@ -802,7 +803,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } else { if($workflow) { ?> -
    +
    contentContainerStart(); if($user->isAdmin()) { @@ -983,7 +984,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } if(is_array($receiptStatus) && count($receiptStatus)>0) { ?> -
    +
    contentContainerStart(); print "
    \n"; @@ -1070,7 +1071,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } if(is_array($revisionStatus) && count($revisionStatus)>0) { ?> -
    +
    getRevisionDate()) { @@ -1171,7 +1172,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } if (count($versions)>1) { ?> -
    "; + print ""; print ""; print ""; print ""; @@ -156,7 +156,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; } print ""; - print ""; + print ""; print ""; print ""; print ""; @@ -205,7 +205,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; } print ""; - print ""; + print ""; print ""; print ""; print ""; @@ -239,7 +239,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; } print ""; - print ""; + print ""; print ""; print ""; print ""; @@ -424,7 +424,7 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; } print ""; - print "\n"; + print "\n"; print ""; print ""; print ""; From d7f7a40f0623930af8b39c88bfbea1e292c753d2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Jun 2015 13:50:00 +0200 Subject: [PATCH 0183/2006] add phrases for initial document status and new document status --- languages/ar_EG/lang.inc | 5 +++++ languages/bg_BG/lang.inc | 5 +++++ languages/ca_ES/lang.inc | 5 +++++ languages/cs_CZ/lang.inc | 5 +++++ languages/de_DE/lang.inc | 7 ++++++- languages/en_GB/lang.inc | 7 ++++++- languages/es_ES/lang.inc | 5 +++++ languages/fr_FR/lang.inc | 5 +++++ languages/hu_HU/lang.inc | 5 +++++ languages/it_IT/lang.inc | 5 +++++ languages/nl_NL/lang.inc | 5 +++++ languages/pl_PL/lang.inc | 5 +++++ languages/pt_BR/lang.inc | 5 +++++ languages/ro_RO/lang.inc | 5 +++++ languages/ru_RU/lang.inc | 5 +++++ languages/sk_SK/lang.inc | 5 +++++ languages/sv_SE/lang.inc | 5 +++++ languages/tr_TR/lang.inc | 5 +++++ languages/zh_CN/lang.inc | 5 +++++ languages/zh_TW/lang.inc | 5 +++++ 20 files changed, 102 insertions(+), 2 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index de0f0ef10..682a52866 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -334,6 +334,7 @@ URL: [url]', 'do_object_setchecksum' => 'تحديد فحص اخطاء', 'do_object_setfilesize' => 'تحديد حجم الملف', 'do_object_unlink' => 'مسح اصدار مستند', +'draft' => '', 'draft_pending_approval' => 'مسودة - قيد الموافقة', 'draft_pending_review' => 'مسودة - قيد المراجعة', 'drag_icon_here' => 'قم بسحب ايقونة المستند او المجلد الى هنا!', @@ -973,6 +974,10 @@ URL: [url]', 'settings_guestID_desc' => '', 'settings_httpRoot' => '', 'settings_httpRoot_desc' => '', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => '', 'settings_install_disabled' => '', 'settings_install_pear_package_log' => '', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index b30e81d7c..db7b61717 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -289,6 +289,7 @@ $text = array( 'do_object_setchecksum' => 'Установи контролна сума', 'do_object_setfilesize' => 'Установи размер на файла', 'do_object_unlink' => '', +'draft' => '', 'draft_pending_approval' => 'Чернова - очаква утвърждаване', 'draft_pending_review' => 'Чернова - очаква рецензия', 'drag_icon_here' => 'Провлачи икона или папка, или документ ТУК!', @@ -838,6 +839,10 @@ $text = array( 'settings_guestID_desc' => 'Идентификатор за гост (може да не се променя)', 'settings_httpRoot' => 'Корен Http', 'settings_httpRoot_desc' => 'Относителен път в URL, след доменната част. Без http://. Например ако пълния URL http://www.example.com/letodms/, то трябва да укажем \'/letodms/\'. Ако URL http://www.example.com/, то \'/\'', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => 'Инсталирай ADOdb', 'settings_install_disabled' => 'ENABLE_INSTALL_TOOL изтрит. Сега може да влезете за последваща конфигурация на системата.', 'settings_install_pear_package_log' => 'Инсталирай пакета Pear \'Log\'', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index 205666a31..e41ff3d26 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -294,6 +294,7 @@ URL: [url]', 'do_object_setchecksum' => '', 'do_object_setfilesize' => '', 'do_object_unlink' => '', +'draft' => '', 'draft_pending_approval' => 'Esborrany - pendent d\'aprovació', 'draft_pending_review' => 'Esborrany - pendent de revisió', 'drag_icon_here' => '', @@ -843,6 +844,10 @@ URL: [url]', 'settings_guestID_desc' => '', 'settings_httpRoot' => 'Http Root', 'settings_httpRoot_desc' => '', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => 'Install ADOdb', 'settings_install_disabled' => '', 'settings_install_pear_package_log' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index d0f787f4c..dcb6ccdda 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -341,6 +341,7 @@ URL: [url]', 'do_object_setchecksum' => 'Nastavit kontrolní součet', 'do_object_setfilesize' => 'Nastavit velikost souboru', 'do_object_unlink' => 'Smazat verzi dokumentu', +'draft' => '', 'draft_pending_approval' => 'Návrh - čeká na schválení', 'draft_pending_review' => 'Návrh - čeká na kontrolu', 'drag_icon_here' => 'Přetáhnout ikonu složky nebo dokumentu sem!', @@ -982,6 +983,10 @@ URL: [url]', 'settings_guestID_desc' => '', 'settings_httpRoot' => 'Http Root', 'settings_httpRoot_desc' => '', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => 'Install ADOdb', 'settings_install_disabled' => '', 'settings_install_pear_package_log' => 'Install Pear package \'Log\'', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index 50dfb619c..b2d5907bd 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 (2071), dgrutsch (18) +// Translators: Admin (2075), dgrutsch (18) $text = array( 'accept' => 'Übernehmen', @@ -346,6 +346,7 @@ URL: [url]', 'do_object_setchecksum' => 'Setze Check-Summe', 'do_object_setfilesize' => 'Setze Dateigröße', 'do_object_unlink' => 'Lösche Dokumentenversion', +'draft' => 'Entwurf', 'draft_pending_approval' => 'Entwurf - bevorstehende Freigabe', 'draft_pending_review' => 'Entwurf - bevorstehende Prüfung', 'drag_icon_here' => 'Icon eines Ordners oder Dokuments hier hin ziehen!', @@ -1002,6 +1003,10 @@ URL: [url]', 'settings_guestID_desc' => 'Id des Gast-Benutzers, wenn man sich als \'guest\' anmeldet.', 'settings_httpRoot' => 'HTTP Wurzelverzeichnis', 'settings_httpRoot_desc' => 'Der relative Pfad in der URL nach der Domain, also ohne http:// und den hostnamen. z.B. wenn die komplette URL http://www.example.com/seeddms/ ist, dann setzen Sie diesen Wert auf \'/seeddms/\'. Wenn die URL http://www.example.com/ ist, tragen Sie \'/\' ein.', +'settings_initialDocumentStatus' => 'Initialer Dokumentenstatus', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => 'Entwurf', +'settings_initialDocumentStatus_released' => 'freigegeben', 'settings_installADOdb' => 'Installieren Sie ADOdb', 'settings_install_disabled' => 'Datei ENABLE_INSTALL_TOOL wurde gelöscht. Sie können sich nun bei SeedDMS anmeldung und mit der Konfiguration fortfahren.', 'settings_install_pear_package_log' => 'Installiere Pear package \'Log\'', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index 358d9df5d..deb425168 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 (1199), dgrutsch (3), netixw (14) +// Translators: Admin (1203), dgrutsch (3), netixw (14) $text = array( 'accept' => 'Accept', @@ -346,6 +346,7 @@ URL: [url]', 'do_object_setchecksum' => 'Set checksum', 'do_object_setfilesize' => 'Set file size', 'do_object_unlink' => 'Delete document version', +'draft' => 'Draft', 'draft_pending_approval' => 'Draft - pending approval', 'draft_pending_review' => 'Draft - pending review', 'drag_icon_here' => 'Drag icon of folder or document here!', @@ -1009,6 +1010,10 @@ URL: [url]', 'settings_guestID_desc' => 'ID of guest-user used when logged in as guest (mostly no need to change)', 'settings_httpRoot' => 'Http Root', 'settings_httpRoot_desc' => 'The relative path in the URL, after the domain part. Do not include the http:// prefix or the web host name. e.g. If the full URL is http://www.example.com/seeddms/, set \'/seeddms/\'. If the URL is http://www.example.com/, set \'/\'', +'settings_initialDocumentStatus' => 'Initial document status', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => 'Draft', +'settings_initialDocumentStatus_released' => 'released', 'settings_installADOdb' => 'Install ADOdb', 'settings_install_disabled' => 'File ENABLE_INSTALL_TOOL was deleted. You can now log into SeedDMS and do further configuration.', 'settings_install_pear_package_log' => 'Install Pear package \'Log\'', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index 3084d8072..b93a6d367 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -341,6 +341,7 @@ URL: [url]', 'do_object_setchecksum' => 'Set checksum', 'do_object_setfilesize' => 'Asignar tamaño de fichero', 'do_object_unlink' => 'Borrar versión del documento', +'draft' => '', 'draft_pending_approval' => 'Borador - pendiente de aprobación', 'draft_pending_review' => 'Borrador - pendiente de revisión', 'drag_icon_here' => 'Arrastre carpeta o documento aquí!', @@ -988,6 +989,10 @@ URL: [url]', 'settings_guestID_desc' => 'ID del usuario invitado cuando se conecta como invitado (mayormente no necesita cambiarlo)', 'settings_httpRoot' => 'Raíz Http', 'settings_httpRoot_desc' => 'La ruta relativa de la URL, después de la parte del servidor. No incluir el prefijo http:// o el nombre del servidor. Por ejemplo, si la URL completa es http://www.example.com/seeddms/, configure «/seeddms/». Si la URL completa es http://www.example.com/, configure «/»', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => 'Instalar ADOdb', 'settings_install_disabled' => 'El archivo ENABLE_INSTALL_TOOL ha sido eliminado. Ahora puede conectarse a SeedDMS y seguir con la configuración.', 'settings_install_pear_package_log' => 'Instale el paquete Pear \'Log\'', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 9c22f496a..83813e21b 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -341,6 +341,7 @@ URL: [url]', 'do_object_setchecksum' => 'Définir checksum', 'do_object_setfilesize' => 'Définir la taille du fichier', 'do_object_unlink' => 'Supprimer la version du document', +'draft' => '', 'draft_pending_approval' => 'Ebauche - En cours d\'approbation', 'draft_pending_review' => 'Ebauche - En cours de correction', 'drag_icon_here' => 'Glisser/déposer le fichier ou document ici!', @@ -964,6 +965,10 @@ URL: [url]', 'settings_guestID_desc' => 'ID de l\'invité utilisé lorsque vous êtes connecté en tant qu\'invité (la plupart du temps pas besoin de changer)', 'settings_httpRoot' => 'Http Root', 'settings_httpRoot_desc' => 'Le chemin relatif dans l\'URL, après le nom de domaine. Ne pas inclure le préfixe http:// ou le nom d\'hôte Internet. Par exemple Si l\'URL complète est http://www.example.com/letodms/, mettez \'/letodms/\'. Si l\'URL est http://www.example.com/, mettez \'/\'', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => 'Installer ADOdb', 'settings_install_disabled' => 'Le fichier ENABLE_INSTALL_TOOL a été supprimé. ous pouvez maintenant vous connecter à SeedDMS et poursuivre la configuration.', 'settings_install_pear_package_log' => 'Installer le paquet Pear \'Log\'', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index f4f329b7d..2f27f7c29 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -341,6 +341,7 @@ URL: [url]', 'do_object_setchecksum' => 'Ellenőrző összeg beállítása', 'do_object_setfilesize' => 'Állomány méret beállítása', 'do_object_unlink' => 'Dokumentum verzió törlése', +'draft' => '', 'draft_pending_approval' => 'Piszkozat - jóváhagyás folyamatban', 'draft_pending_review' => 'Piszkozat - felülvizsgálat folyamatban', 'drag_icon_here' => 'Húzza a mappa vagy dokumentum ikonját ide!', @@ -987,6 +988,10 @@ URL: [url]', 'settings_guestID_desc' => 'A vendég felhasználó azonosítója ami a vendégként történő bejelentkezéskor lesz használva (általában nem szükséges módosítani)', 'settings_httpRoot' => 'Http gyökér', 'settings_httpRoot_desc' => 'A relatív elérési út az URL-ben a tartomány rész után. Ne tartalmazza a http:// előtagot vag a web szerver nevét. Pl.: ha a teljes URL http://www.example.com/seeddms/, adja meg \'/seeddms/\'. Ha az URL http://www.example.com/, adja meg \'/\'', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => 'ADOdb telepítése', 'settings_install_disabled' => 'Az ENABLE_INSTALL_TOOL állomány törölve lett. Bejelentkezhet a SeedDMS alkalmazásba és elvégezheti a további konfigurációt.', 'settings_install_pear_package_log' => 'PEAR csomag \'Log\' telepítése', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index fa4cfd8c1..a732a1f36 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -346,6 +346,7 @@ URL: [url]', 'do_object_setchecksum' => 'Imposta il checksum', 'do_object_setfilesize' => 'Imposta la dimensione del file', 'do_object_unlink' => 'Cancella la versione del documento', +'draft' => '', 'draft_pending_approval' => 'Bozza - in approvazione', 'draft_pending_review' => 'Bozza - in revisione', 'drag_icon_here' => 'Trascina qui l\'icona della cartella o del documento', @@ -1010,6 +1011,10 @@ URL: [url]', 'settings_guestID_desc' => 'ID o utenza ospite utilizzata quando collegati al sito come ospite (da cambiare solo in casi eccezionali).', 'settings_httpRoot' => 'Cartella web principale', 'settings_httpRoot_desc' => 'Percorso relativo nell\'URL dopo il dominio e senza il prefisso \'http://\'. Es: se l\'URL completo è http://www.esempio.com/SeedDMS/, impostare \'/SeedDMS/\'; se invece l\'URL è http://www.esempio.com/, impostare \'/\'', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => 'Installa ADOdb', 'settings_install_disabled' => 'Il file ENABLE_INSTALL_TOOL è stato cancellato. Ora puoi effettuare il login in SeedDMS e fare ulteriori configurazioni.', 'settings_install_pear_package_log' => 'Installa il registro del pacchetto Pear', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 192e7981d..cc94f6db3 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -334,6 +334,7 @@ URL: [url]', 'do_object_setchecksum' => 'Set checksum', 'do_object_setfilesize' => 'Voer bestandgrootte in', 'do_object_unlink' => 'Verwijdere documentversie', +'draft' => '', 'draft_pending_approval' => 'Draft - in afwachting van goedkeuring', 'draft_pending_review' => 'Draft - in afwachting van controle', 'drag_icon_here' => 'Versleep icoon van de folder of bestand hier!', @@ -979,6 +980,10 @@ URL: [url]', 'settings_guestID_desc' => 'ID van gastgebruiker gebruikt indien ingelogd als gast (meestal geen wijziging nodig)', 'settings_httpRoot' => 'Http Basis', 'settings_httpRoot_desc' => 'Het relatieve pad in de URL, na het domeindeel. Voeg geen http:// toe aan het begin of de websysteemnaam. Bijv: Als de volledige URL http://www.example.com/letodms/ is, voer \'/letodms/\' in. Als de URL http://www.example.com/ is, voer \'/\' in', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => 'Installeer ADOdb', 'settings_install_disabled' => 'Bestand ENABLE_INSTALL_TOOL is verwijderd. U kunt nu inloggen in SeedDMS en verdere configuratie uitvoeren.', 'settings_install_pear_package_log' => 'Installeer Pear package \'Log\'', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index c58fb77d2..a540743d2 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -334,6 +334,7 @@ URL: [url]', 'do_object_setchecksum' => 'Ustaw sumę kontrolną', 'do_object_setfilesize' => 'Podaj rozmiar pliku', 'do_object_unlink' => 'Usuń wersję dokumentu', +'draft' => '', 'draft_pending_approval' => 'Szkic - w oczekiwaniu na akceptację', 'draft_pending_review' => 'Szkic - w oczekiwaniu na opinię', 'drag_icon_here' => 'Przeciągnij ikonę folderu lub dokumentu tutaj!', @@ -967,6 +968,10 @@ URL: [url]', 'settings_guestID_desc' => 'ID gościa używane kiedy gość jest zalogowany (zazwyczaj nie wymaga zmiany)', 'settings_httpRoot' => 'Http Root', 'settings_httpRoot_desc' => 'Relatywna ścieżka w URL, część za domeną. Nie dołączaj przedrostka http:// ani nazwy hosta. Np. Jeśli cały URL to http://www.example.com/letodms/, wpisz \'/letodms/\'. Jeśli URL to http://www.example.com/, set \'/\'', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => 'Zainstaluj ADOdb', 'settings_install_disabled' => 'Plik ENABLE_INSTALL_TOOL został usunięty. Możesz teraz zalogować się do LetoDMS i przeprowadzić dalszą konfigurację.', 'settings_install_pear_package_log' => 'Zainstaluj pakiet Pear \'Log\'', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index ab59d4b10..9552b1c81 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -340,6 +340,7 @@ URL: [url]', 'do_object_setchecksum' => 'Defina soma de verificação', 'do_object_setfilesize' => 'Defina o tamanho do arquivo', 'do_object_unlink' => 'Excluir versão do documento', +'draft' => '', 'draft_pending_approval' => '', 'draft_pending_review' => 'Draft - pending review', 'drag_icon_here' => 'Arraste ícone de pasta ou documento para aqui!', @@ -985,6 +986,10 @@ URL: [url]', 'settings_guestID_desc' => 'ID do usuário-convidado usada quando conectado como convidado (na maioria das vezes não há necessidade de mudar)', 'settings_httpRoot' => 'Raiz Http', 'settings_httpRoot_desc' => 'O caminho relativo na URL, após a parte do domínio. Não inclua o prefixo http:// ou o nome do host. por exemplo Se a URL completa é http://www.example.com/seeddms/, definir \'/seeddms/\'. Se a URL é http://www.example.com/, definir \'/\'', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => 'Instalar ADOdb', 'settings_install_disabled' => 'O arquivo ENABLE_INSTALL_TOOL foi excluído. Agora você pode entrar em SeedDMS e fazer outras configurações.', 'settings_install_pear_package_log' => 'Instalar o Pacote pear \'Log\'', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index 6118a184e..97a57b903 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -346,6 +346,7 @@ URL: [url]', 'do_object_setchecksum' => 'Setare sumă de control(checksum)', 'do_object_setfilesize' => 'Setare dimensiune fișier', 'do_object_unlink' => 'Sterge versiune document', +'draft' => '', 'draft_pending_approval' => 'Proiect - în așteptarea aprobarii', 'draft_pending_review' => 'Proiect - în așteptarea revizuirii', 'drag_icon_here' => 'Trageți iconul de folder sau document aici!', @@ -1010,6 +1011,10 @@ URL: [url]', 'settings_guestID_desc' => 'ID-ul utilizatorului oaspete folosit când la Logarea ca oaspete (de cele mai multe ori nu este nevoie să se schimbe)', 'settings_httpRoot' => 'Http Root', 'settings_httpRoot_desc' => 'Calea relativă în URL-ul, după partea domeniului. Nu includeți prefixul http:// sau numele host-ului. (ex: Dacă URL-ul complet este http://www.example.com/seeddms/, setați \'/seeddms/\'. Dacă URL-ul complet este http://www.example.com/, setați \'/\')', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => 'Instalați ADOdb', 'settings_install_disabled' => 'Fișierul ENABLE_INSTALL_TOOL a fost șters. Vă puteți conecta acum în SeedDMS și puteți trece la configurările ulterioare.', 'settings_install_pear_package_log' => 'Instalați pachetul Pear \'Log\'', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index 6526a5704..9ada8e022 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -334,6 +334,7 @@ URL: [url]', 'do_object_setchecksum' => 'Установить контрольную сумму', 'do_object_setfilesize' => 'Установить размер файла', 'do_object_unlink' => 'Удалить версию документа', +'draft' => '', 'draft_pending_approval' => 'Черновик — ожидает утверждения', 'draft_pending_review' => 'Черновик — ожидает рецензии', 'drag_icon_here' => 'Перетащите сюда значок каталога или документа.', @@ -978,6 +979,10 @@ URL: [url]', 'settings_guestID_desc' => 'Идентификатор гостя (можно не изменять).', 'settings_httpRoot' => 'Корень http', 'settings_httpRoot_desc' => 'Относительный путь в URL, после доменной части. Без http://. Например, если полный URL http://www.example.com/seeddms/, то нужно указать «/seeddms/». Если URL http://www.example.com/, то «/».', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => 'Установить ADOdb', 'settings_install_disabled' => 'ENABLE_INSTALL_TOOL удалён. Теперь можно войти для дальнейшей настройки системы.', 'settings_install_pear_package_log' => 'Установите пакет Pear \'Log\'', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 590278896..fd1747659 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -289,6 +289,7 @@ $text = array( 'do_object_setchecksum' => '', 'do_object_setfilesize' => '', 'do_object_unlink' => '', +'draft' => '', 'draft_pending_approval' => 'Návrh - čaká na schválenie', 'draft_pending_review' => 'Návrh - čaká na kontrolu', 'drag_icon_here' => 'Sem myšou pretiahnite ikonu, zložku alebo dokument', @@ -838,6 +839,10 @@ $text = array( 'settings_guestID_desc' => '', 'settings_httpRoot' => '', 'settings_httpRoot_desc' => '', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => '', 'settings_install_disabled' => '', 'settings_install_pear_package_log' => '', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 6593ad7bf..5e2a47cb4 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -334,6 +334,7 @@ URL: [url]', 'do_object_setchecksum' => 'Lägg till checksumma', 'do_object_setfilesize' => 'Ange filstorlek', 'do_object_unlink' => 'Ta bort dokument version', +'draft' => '', 'draft_pending_approval' => 'Utkast: väntar på godkännande', 'draft_pending_review' => 'Utkast: väntar på granskning', 'drag_icon_here' => 'Dra ikon av mappen eller dokument hit!', @@ -973,6 +974,10 @@ URL: [url]', 'settings_guestID_desc' => 'ID som används för inloggad gästanvändare (behöver oftast inte ändras)', 'settings_httpRoot' => 'Http-Root', 'settings_httpRoot_desc' => 'Den relativa sökvägen i URL, efter domänen. Ta inte med http:// eller web host-namnet. t.ex. om hela URLen är http://www.example.com/letodms/, sätt \'/letodms/\'. Om URLen är http://www.example.com/, sätt \'/\'', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => 'Installera ADOdb', 'settings_install_disabled' => 'Filen ENABLE_INSTALL_TOOL har tagits bort. Du kan nu logga in till LetoDMS och göra ytterligare inställningar.', 'settings_install_pear_package_log' => 'Installera Pear-paketet \'Log\'', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index b3979f21e..6d0981539 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -340,6 +340,7 @@ URL: [url]', 'do_object_setchecksum' => 'Sağlama (checksum) ayarla', 'do_object_setfilesize' => 'Dosya boyutu ayarla', 'do_object_unlink' => 'Doküman versiyonunu sil', +'draft' => '', 'draft_pending_approval' => 'Taslak - onay bekliyor', 'draft_pending_review' => 'Taslak - kontrol bekliyor', 'drag_icon_here' => 'Klasör veya dokümanın ikonunu buraya sürükleyin!', @@ -989,6 +990,10 @@ URL: [url]', 'settings_guestID_desc' => 'Misafir kullanıcı için ID (genelde değiştirmek gerekmez)', 'settings_httpRoot' => 'Http Kök dizini', 'settings_httpRoot_desc' => 'Domainden sonraki yol. http:// ve domain yazmadan domainden sonraki bölüm yazılacak. Örneğin tam URL http://www.ornek.com/seeddms/ ise sadece \'seeddms\' olarak ayarlayın. Eğer URL http://www.ornek.com/ ise sadece \'/\' koymanız yeterli', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => 'ADOdb yükle', 'settings_install_disabled' => 'ENABLE_INSTALL_TOOL silindi. SeedDMS\'e giriş yaparak diğer ayarları yapabilirsiniz.', 'settings_install_pear_package_log' => 'Pear package \'Log\' yükleyin', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index 11b6e228b..d9c4b3668 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -295,6 +295,7 @@ URL: [url]', 'do_object_setchecksum' => '', 'do_object_setfilesize' => '设置文件大小', 'do_object_unlink' => '', +'draft' => '', 'draft_pending_approval' => '待审核', 'draft_pending_review' => '待校对', 'drag_icon_here' => '拖动图标到这里', @@ -844,6 +845,10 @@ URL: [url]', 'settings_guestID_desc' => '', 'settings_httpRoot' => '', 'settings_httpRoot_desc' => '', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => '', 'settings_install_disabled' => '', 'settings_install_pear_package_log' => '', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 4bc6e605e..e2f1163c5 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -293,6 +293,7 @@ URL: [url]', 'do_object_setchecksum' => '', 'do_object_setfilesize' => '', 'do_object_unlink' => '', +'draft' => '', 'draft_pending_approval' => '待審核', 'draft_pending_review' => '待校對', 'drag_icon_here' => '拖動圖示到這裡', @@ -842,6 +843,10 @@ URL: [url]', 'settings_guestID_desc' => '', 'settings_httpRoot' => '', 'settings_httpRoot_desc' => '', +'settings_initialDocumentStatus' => '', +'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_draft' => '', +'settings_initialDocumentStatus_released' => '', 'settings_installADOdb' => '', 'settings_install_disabled' => '', 'settings_install_pear_package_log' => '', From a178ab9bc01af8e3dfd076954ad35fd069342ae3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Jun 2015 13:53:16 +0200 Subject: [PATCH 0184/2006] add missing translations --- languages/de_DE/lang.inc | 4 ++-- languages/en_GB/lang.inc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index b2d5907bd..8d5b00b7f 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 (2075), dgrutsch (18) +// Translators: Admin (2076), dgrutsch (18) $text = array( 'accept' => 'Übernehmen', @@ -1004,7 +1004,7 @@ URL: [url]', 'settings_httpRoot' => 'HTTP Wurzelverzeichnis', 'settings_httpRoot_desc' => 'Der relative Pfad in der URL nach der Domain, also ohne http:// und den hostnamen. z.B. wenn die komplette URL http://www.example.com/seeddms/ ist, dann setzen Sie diesen Wert auf \'/seeddms/\'. Wenn die URL http://www.example.com/ ist, tragen Sie \'/\' ein.', 'settings_initialDocumentStatus' => 'Initialer Dokumentenstatus', -'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_desc' => 'Dieser STatus wird bei Dokumenten gesetzt, die neu hinzugefügt wurden.', 'settings_initialDocumentStatus_draft' => 'Entwurf', 'settings_initialDocumentStatus_released' => 'freigegeben', 'settings_installADOdb' => 'Installieren Sie ADOdb', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index deb425168..d3fdac120 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 (1203), dgrutsch (3), netixw (14) +// Translators: Admin (1204), dgrutsch (3), netixw (14) $text = array( 'accept' => 'Accept', @@ -1011,7 +1011,7 @@ URL: [url]', 'settings_httpRoot' => 'Http Root', 'settings_httpRoot_desc' => 'The relative path in the URL, after the domain part. Do not include the http:// prefix or the web host name. e.g. If the full URL is http://www.example.com/seeddms/, set \'/seeddms/\'. If the URL is http://www.example.com/, set \'/\'', 'settings_initialDocumentStatus' => 'Initial document status', -'settings_initialDocumentStatus_desc' => '', +'settings_initialDocumentStatus_desc' => 'This status will be set when a document is added.', 'settings_initialDocumentStatus_draft' => 'Draft', 'settings_initialDocumentStatus_released' => 'released', 'settings_installADOdb' => 'Install ADOdb', From 394a23fa57b5f78962d3597f9093dbd8248197f0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Jun 2015 21:31:13 +0200 Subject: [PATCH 0185/2006] add download of documents --- controllers/class.TransmittalDownload.php | 27 ++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/controllers/class.TransmittalDownload.php b/controllers/class.TransmittalDownload.php index 73ade9f50..37ff3f29d 100644 --- a/controllers/class.TransmittalDownload.php +++ b/controllers/class.TransmittalDownload.php @@ -28,12 +28,29 @@ class SeedDMS_Controller_TransmittalDownload extends SeedDMS_Controller_Common { $transmittal = $this->params['transmittal']; $items = $transmittal->getItems(); - foreach($items as $item) { - $content = $item->getContent(); - $document = $content->getDocument(); - if ($document->getAccessMode($user) >= M_READ) { - echo $document->getName(); + if($items) { + include("../inc/inc.ClassDownloadMgr.php"); + $downmgr = new SeedDMS_Download_Mgr(); + + foreach($items as $item) { + $content = $item->getContent(); + $document = $content->getDocument(); + if ($document->getAccessMode($user) >= M_READ) { + $downmgr->addItem($content); + } } + + $filename = tempnam('/tmp', ''); + $downmgr->createArchive($filename); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($filename)); + header("Content-Disposition: attachment; filename=\"export-" .date('Y-m-d') . ".zip\""); + header("Content-Type: application/zip"); + header("Cache-Control: must-revalidate"); + + readfile($filename); + unlink($filename); + exit; } } } From 6a7b9c8a6591f9a0cdea22fba1c43a005242eefc Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Jun 2015 21:33:08 +0200 Subject: [PATCH 0186/2006] mayRecipients() and mayRevision() return only true if document ist released --- inc/inc.ClassAccessOperation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index 2a88af8df..b7d7f7235 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -118,7 +118,7 @@ class SeedDMS_AccessOperation { if(get_class($this->obj) == 'SeedDMS_Core_Document') { $latestContent = $this->obj->getLatestContent(); $status = $latestContent->getStatus(); - if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin())) { + if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]==S_RELEASED)) { return true; } } @@ -138,7 +138,7 @@ class SeedDMS_AccessOperation { if(get_class($this->obj) == 'SeedDMS_Core_Document') { $latestContent = $this->obj->getLatestContent(); $status = $latestContent->getStatus(); - if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]!=S_OBSOLETE)) { + if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]==S_RELEASED || $status["status"]==S_IN_REVISION)) { return true; } } From 0c053d410c6e0030e11b9f056489b81edd65d8bf Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Jun 2015 21:34:07 +0200 Subject: [PATCH 0187/2006] put creation of excel file into its own method --- inc/inc.ClassDownloadMgr.php | 48 ++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/inc/inc.ClassDownloadMgr.php b/inc/inc.ClassDownloadMgr.php index 005d0ffa4..ffeb332a2 100644 --- a/inc/inc.ClassDownloadMgr.php +++ b/inc/inc.ClassDownloadMgr.php @@ -48,20 +48,9 @@ class SeedDMS_Download_Mgr { $this->items[$item->getID()] = $item; } /* }}} */ - public function createArchive($filename) { /* {{{ */ - if(!$this->items) { - return false; - } - - $zip = new ZipArchive(); - $prefixdir = date('Y-m-d', time()); - - if($zip->open($filename, ZipArchive::CREATE) !== TRUE) { - return false; - } - + public function createToc($file, $items) { /* {{{ */ $objPHPExcel = new PHPExcel(); - $objPHPExcel->getProperties()->setCreator("MMK GmbH, Hagen, Germany")->setTitle("Metadata"); + $objPHPExcel->getProperties()->setCreator("SeedDMS")->setTitle("Metadata"); $sheet = $objPHPExcel->setActiveSheetIndex(0); $i = 1; @@ -78,14 +67,13 @@ class SeedDMS_Download_Mgr { $sheet->setCellValueByColumnAndRow(10, $i, 'Freigabekommentar'); $sheet->setCellValueByColumnAndRow(11, $i, 'Freigabestatus'); $i++; - foreach($this->items as $item) { + foreach($items as $item) { $document = $item->getDocument(); $dms = $document->_dms; $status = $item->getStatus(); $reviewStatus = $item->getReviewStatus(); $approvalStatus = $item->getApprovalStatus(); - $zip->addFile($dms->contentDir.$item->getPath(), utf8_decode($prefixdir."/".$document->getID()."-".$item->getOriginalFileName())); $sheet->setCellValueByColumnAndRow(0, $i, $document->getID()); $sheet->setCellValueByColumnAndRow(1, $i, $document->getID()."-".$item->getOriginalFileName()); $sheet->setCellValueByColumnAndRow(2, $i, getOverallStatusText($status['status'])); @@ -113,7 +101,7 @@ class SeedDMS_Download_Mgr { break; } $sheet->setCellValueByColumnAndRow(4, $l, $reqName); - $sheet->setCellValueByColumnAndRow(5, $l, $r['date']); + $sheet->setCellValueByColumnAndRow(5, $l, ($r['status']==1 || $r['status']==-1) ? $r['date'] : ""); $sheet->setCellValueByColumnAndRow(6, $l, $r['comment']); $sheet->setCellValueByColumnAndRow(7, $l, getReviewStatusText($r["status"])); $l++; @@ -141,7 +129,7 @@ class SeedDMS_Download_Mgr { break; } $sheet->setCellValueByColumnAndRow(8, $k, $reqName); - $sheet->setCellValueByColumnAndRow(9, $k, $r['date']); + $sheet->setCellValueByColumnAndRow(9, $k, ($r['status']==1 || $r['status']==-1) ?$r['date'] : ""); $sheet->setCellValueByColumnAndRow(10, $k, $r['comment']); $sheet->setCellValueByColumnAndRow(11, $k, getReviewStatusText($r["status"])); $k++; @@ -153,8 +141,32 @@ class SeedDMS_Download_Mgr { } $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); - $file = tempnam("/tmp", "export-list-"); $objWriter->save($file); + + return true; + } /* }}} */ + + public function createArchive($filename) { /* {{{ */ + if(!$this->items) { + return false; + } + + $file = tempnam("/tmp", "export-list-"); + $this->createToc($file, $this->items); + + $zip = new ZipArchive(); + $prefixdir = date('Y-m-d', time()); + + if($zip->open($filename, ZipArchive::CREATE) !== TRUE) { + return false; + } + + foreach($this->items as $item) { + $document = $item->getDocument(); + $dms = $document->_dms; + $zip->addFile($dms->contentDir.$item->getPath(), utf8_decode($prefixdir."/".$document->getID()."-".$item->getOriginalFileName())); + } + $zip->addFile($file, $prefixdir."/metadata.xls"); $zip->close(); unlink($file); From 68096452567be9e8555d210f7b0dd31d4c251a51 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Jun 2015 21:35:10 +0200 Subject: [PATCH 0188/2006] take out download of version info, take out next revision unless document is released --- views/bootstrap/class.ViewDocument.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 3b7a82b16..41520ab96 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -581,7 +581,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "
  • getVersion()."\">".getMLText("edit_attributes")."
  • "; } - print "
  • ".getMLText("versioning_info")."
  • "; + // print "
  • ".getMLText("versioning_info")."
  • "; print ""; echo ""; @@ -1083,11 +1083,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
    contentContainerStart(); print "
    ".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) ."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"])."".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"])."".$st["version"]."".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"])."" . htmlspecialchars($res["name"]) . "" . htmlspecialchars($res["name"]) . "".getOverallStatusText($res["status"])."".$res["version"]."".$res["statusDate"]." ".htmlspecialchars($res["statusName"])."
    \n"; From 4cc1704915be4d2ac952c5824518e051d635ef56 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Jun 2015 21:36:06 +0200 Subject: [PATCH 0189/2006] add table tblCachedAccess (not used) --- install/create_tables-innodb.sql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/install/create_tables-innodb.sql b/install/create_tables-innodb.sql index 8440c2927..4f5ac4cb2 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -831,6 +831,22 @@ CREATE TABLE `tblTransmittalItems` ( -- -------------------------------------------------------- +-- +-- Table structure for cached read access +-- + +CREATE TABLE `tblCachedAccess` ( + `id` int(11) NOT NULL auto_increment, + `document` int(11) default NULL, + `user` int(11) default null, + `mode` tinyint(4) NOT NULL default '0', + PRIMARY KEY (`id`), + CONSTRAINT `tblCachedAccess_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, + CONSTRAINT `tblCachedAccess_user` FOREIGN KEY (`user`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- -------------------------------------------------------- + -- -- Table structure for access request objects -- @@ -842,6 +858,7 @@ CREATE TABLE `tblAros` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- -------------------------------------------------------- -- -- Table structure for access control objects From f2a7811f0c3c23c98df477968bbfadfcab6af522 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 9 Jun 2015 21:50:32 +0200 Subject: [PATCH 0190/2006] use SeedDMS_Core_DMS::getClassname() to check for propper class --- inc/inc.ClassSession.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/inc/inc.ClassSession.php b/inc/inc.ClassSession.php index c29eeed9e..d67532521 100644 --- a/inc/inc.ClassSession.php +++ b/inc/inc.ClassSession.php @@ -285,10 +285,11 @@ class SeedDMS_Session { function addToClipboard($object) { /* {{{ */ /* id is only set if load() was called before */ if($this->id) { - if(get_class($object) == 'SeedDMS_Core_Document') { + $dms = $object->_dms; + if(get_class($object) == $dms->getClassname('document')) { if(!in_array($object->getID(), $this->data['clipboard']['docs'])) array_push($this->data['clipboard']['docs'], $object->getID()); - } elseif(get_class($object) == 'SeedDMS_Core_Folder') { + } elseif(get_class($object) == $dms->getClassname('folder')) { if(!in_array($object->getID(), $this->data['clipboard']['folders'])) array_push($this->data['clipboard']['folders'], $object->getID()); } @@ -307,11 +308,12 @@ class SeedDMS_Session { function removeFromClipboard($object) { /* {{{ */ /* id is only set if load() was called before */ if($this->id) { - if(get_class($object) == 'SeedDMS_Core_Document') { + $dms = $object->_dms; + if(get_class($object) == $dms->getClassname('document')) { $key = array_search($object->getID(), $this->data['clipboard']['docs']); if($key !== false) unset($this->data['clipboard']['docs'][$key]); - } elseif(get_class($object) == 'SeedDMS_Core_Folder') { + } elseif(get_class($object) == $dms->getClassname('folder')) { $key = array_search($object->getID(), $this->data['clipboard']['folders']); if($key !== false) unset($this->data['clipboard']['folders'][$key]); From 2cd37d90b157bf7429047c77586f1550b4c4543b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 10 Jun 2015 19:14:07 +0200 Subject: [PATCH 0191/2006] send end date to end of day --- op/op.Search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op/op.Search.php b/op/op.Search.php index 9c7ca3731..d2b75aef3 100644 --- a/op/op.Search.php +++ b/op/op.Search.php @@ -274,7 +274,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) { } if(isset($_GET["createend"])) { $tmp = explode("-", $_GET["createend"]); - $stopdate = array('year'=>(int)$tmp[2], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[0], 'hour'=>0, 'minute'=>0, 'second'=>0); + $stopdate = array('year'=>(int)$tmp[2], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[0], 'hour'=>23, 'minute'=>59, 'second'=>59); } else { if(isset($_GET["createendyear"])) $stopdate = array('year'=>$_GET["createendyear"], 'month'=>$_GET["createendmonth"], 'day'=>$_GET["createendday"], 'hour'=>23, 'minute'=>59, 'second'=>59); From 0e8a385b6d1d0b386de7b7ba8c2e0654df27aaa2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 11 Jun 2015 06:41:49 +0200 Subject: [PATCH 0192/2006] allow context sensitive help files --- out/out.Help.php | 10 +++++++++- views/bootstrap/class.Bootstrap.php | 3 ++- views/bootstrap/class.Help.php | 9 +++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/out/out.Help.php b/out/out.Help.php index b5204478a..f535764d3 100644 --- a/out/out.Help.php +++ b/out/out.Help.php @@ -25,8 +25,16 @@ include("../inc/inc.ClassUI.php"); include("../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]); + +if(isset($_GET['context'])) + $context = $_GET['context']; +else + $context = ''; if($view) { + $view->setParam('dms', $dms); + $view->setParam('user', $user); + $view->setParam('context', $context); $view->show(); exit; } diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 8f9eb9857..e1980e67a 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -314,7 +314,8 @@ $(document).ready(function () { // echo "
  • params['rootfolderid']."\">".getMLText("search")."
  • \n"; if ($this->params['enablecalendar']) echo "
  • params['calendardefaultview']."\">".getMLText("calendar")."
  • \n"; if ($this->params['user']->isAdmin()) echo "
  • ".getMLText("admin_tools")."
  • \n"; - echo "
  • ".getMLText("help")."
  • \n"; + $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); + echo "
  • ".getMLText("help")."
  • \n"; echo " \n"; echo "
    "; if ($folder!=null && is_object($folder) && !strcasecmp(get_class($folder), $dms->getClassname('folder'))) { diff --git a/views/bootstrap/class.Help.php b/views/bootstrap/class.Help.php index 96864e17b..5a209068e 100644 --- a/views/bootstrap/class.Help.php +++ b/views/bootstrap/class.Help.php @@ -34,15 +34,20 @@ class SeedDMS_View_Help extends SeedDMS_Bootstrap_Style { function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; + $context = $this->params['context']; $this->htmlStartPage(getMLText("help")); $this->globalNavigation(); $this->contentStart(); - $this->pageNavigation(getMLText("help"), ""); + $this->pageNavigation(getMLText("help").": ".getMLText('help_'.strtolower($context), array(), $context), ""); $this->contentContainerStart(); - readfile("../languages/".$this->params['session']->getLanguage()."/help.htm"); + $helpfile = "../languages/".$this->params['session']->getLanguage()."/help/".$context.".html"; + if(file_exists($helpfile)) + readfile($helpfile); + else + readfile("../languages/".$this->params['session']->getLanguage()."/help.htm"); $this->contentContainerEnd(); $this->htmlEndPage(); From 5bc915f487dbf809864cfb68bbcbd54bfd4ce480 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 11 Jun 2015 06:53:31 +0200 Subject: [PATCH 0193/2006] add directory for help files --- languages/ar_EG/help/README | 1 + languages/bg_BG/help/README | 1 + languages/ca_ES/help/README | 1 + languages/cs_CZ/help/README | 1 + languages/de_DE/help/README | 1 + languages/en_GB/help/README | 1 + languages/es_ES/help/README | 1 + languages/fr_FR/help/README | 1 + languages/hu_HU/help/README | 1 + languages/it_IT/help/README | 1 + languages/nl_NL/help/README | 1 + languages/pl_PL/help/README | 1 + languages/pt_BR/help/README | 1 + languages/ro_RO/help/README | 1 + languages/ru_RU/help/README | 1 + languages/sk_SK/help/README | 1 + languages/sv_SE/help/README | 1 + languages/tr_TR/help/README | 1 + languages/zh_CN/help/README | 1 + languages/zh_TW/help/README | 1 + 20 files changed, 20 insertions(+) create mode 100644 languages/ar_EG/help/README create mode 100644 languages/bg_BG/help/README create mode 100644 languages/ca_ES/help/README create mode 100644 languages/cs_CZ/help/README create mode 100644 languages/de_DE/help/README create mode 100644 languages/en_GB/help/README create mode 100644 languages/es_ES/help/README create mode 100644 languages/fr_FR/help/README create mode 100644 languages/hu_HU/help/README create mode 100644 languages/it_IT/help/README create mode 100644 languages/nl_NL/help/README create mode 100644 languages/pl_PL/help/README create mode 100644 languages/pt_BR/help/README create mode 100644 languages/ro_RO/help/README create mode 100644 languages/ru_RU/help/README create mode 100644 languages/sk_SK/help/README create mode 100644 languages/sv_SE/help/README create mode 100644 languages/tr_TR/help/README create mode 100644 languages/zh_CN/help/README create mode 100644 languages/zh_TW/help/README diff --git a/languages/ar_EG/help/README b/languages/ar_EG/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/ar_EG/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/bg_BG/help/README b/languages/bg_BG/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/bg_BG/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/ca_ES/help/README b/languages/ca_ES/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/ca_ES/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/cs_CZ/help/README b/languages/cs_CZ/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/cs_CZ/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/de_DE/help/README b/languages/de_DE/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/de_DE/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/en_GB/help/README b/languages/en_GB/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/en_GB/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/es_ES/help/README b/languages/es_ES/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/es_ES/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/fr_FR/help/README b/languages/fr_FR/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/fr_FR/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/hu_HU/help/README b/languages/hu_HU/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/hu_HU/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/it_IT/help/README b/languages/it_IT/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/it_IT/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/nl_NL/help/README b/languages/nl_NL/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/nl_NL/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/pl_PL/help/README b/languages/pl_PL/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/pl_PL/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/pt_BR/help/README b/languages/pt_BR/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/pt_BR/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/ro_RO/help/README b/languages/ro_RO/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/ro_RO/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/ru_RU/help/README b/languages/ru_RU/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/ru_RU/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/sk_SK/help/README b/languages/sk_SK/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/sk_SK/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/sv_SE/help/README b/languages/sv_SE/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/sv_SE/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/tr_TR/help/README b/languages/tr_TR/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/tr_TR/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/zh_CN/help/README b/languages/zh_CN/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/zh_CN/help/README @@ -0,0 +1 @@ +place help files in here diff --git a/languages/zh_TW/help/README b/languages/zh_TW/help/README new file mode 100644 index 000000000..e3763b503 --- /dev/null +++ b/languages/zh_TW/help/README @@ -0,0 +1 @@ +place help files in here From 2fceade3a29ac4b49e555ed0f71aec5d121e5ac9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 11 Jun 2015 11:25:14 +0200 Subject: [PATCH 0194/2006] show docs in root folder of document chooser --- views/bootstrap/class.Bootstrap.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index e1980e67a..2fcf1bb8e 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1247,6 +1247,14 @@ function clearFilename() { } } else { $node['children'] = jqtree($path, $folder, $this->params['user'], $accessmode, $showdocs, $expandtree, $orderby); + if($showdocs) { + $documents = $folder->getDocuments($orderby); + $documents = SeedDMS_Core_DMS::filterAccess($documents, $this->params['user'], $accessmode); + foreach($documents as $document) { + $node2 = array('label'=>$document->getName(), 'id'=>$document->getID(), 'load_on_demand'=>false, 'is_folder'=>false); + $node['children'][] = $node2; + } + } } /* Nasty hack to remove the highest folder */ if(isset($this->params['remove_root_from_tree']) && $this->params['remove_root_from_tree']) { From 01ce03ca5cc31c54bc26181cd1a387990f07cd98 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 11 Jun 2015 14:09:50 +0200 Subject: [PATCH 0195/2006] redirect relative to http_root --- op/op.Login.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op/op.Login.php b/op/op.Login.php index 7cafc7427..4014a73e1 100644 --- a/op/op.Login.php +++ b/op/op.Login.php @@ -332,7 +332,7 @@ if (isset($referuri) && strlen($referuri)>0) { header("Location: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'] . $referuri); } else { - header("Location: ../".(isset($settings->_siteDefaultPage) && strlen($settings->_siteDefaultPage)>0 ? $settings->_siteDefaultPage : "out/out.ViewFolder.php?folderid=".($user->getHomeFolder() ? $user->getHomeFolder() : $settings->_rootFolderID))); + header("Location: ".$settings->_httpRoot.(isset($settings->_siteDefaultPage) && strlen($settings->_siteDefaultPage)>0 ? $settings->_siteDefaultPage : "out/out.ViewFolder.php?folderid=".($user->getHomeFolder() ? $user->getHomeFolder() : $settings->_rootFolderID))); } //_printMessage(getMLText("login_ok"), From 5bac2e9a4ec3e90b343bc3126d26a08ebb50a4a8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 11 Jun 2015 21:28:04 +0200 Subject: [PATCH 0196/2006] manage file uploaded with review or approval --- SeedDMS_Core/Core/inc.ClassDocument.php | 74 +++++++++++++++++++++---- 1 file changed, 62 insertions(+), 12 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 35679017a..551e031ae 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -1794,6 +1794,17 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $stList = ""; foreach ($status as $st) { $stList .= (strlen($stList)==0 ? "" : ", "). "'".$st["reviewID"]."'"; + $queryStr = "SELECT * FROM tblDocumentReviewLog WHERE reviewID = " . $st['reviewID']; + $resArr = $db->getResultArray($queryStr); + if ((is_bool($resArr) && !$resArr)) { + $db->rollbackTransaction(); + return false; + } + foreach($resArr as $res) { + $file = $this->_dms->contentDir . $this->getDir().'r'.$res['reviewLogID']; + if(file_exists($file)) + SeedDMS_Core_File::removeFile($file); + } if ($st["status"]==0 && !in_array($st["required"], $emailList)) { $emailList[] = $st["required"]; } @@ -1815,10 +1826,22 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $stList = ""; foreach ($status as $st) { $stList .= (strlen($stList)==0 ? "" : ", "). "'".$st["approveID"]."'"; + $queryStr = "SELECT * FROM tblDocumentApproveLog WHERE approveID = " . $st['approveID']; + $resArr = $db->getResultArray($queryStr); + if ((is_bool($resArr) && !$resArr)) { + $db->rollbackTransaction(); + return false; + } + foreach($resArr as $res) { + $file = $this->_dms->contentDir . $this->getDir().'a'.$res['approveLogID']; + if(file_exists($file)) + SeedDMS_Core_File::removeFile($file); + } if ($st["status"]==0 && !in_array($st["required"], $emailList)) { $emailList[] = $st["required"]; } } + if (strlen($stList)>0) { $queryStr = "DELETE FROM `tblDocumentApproveLog` WHERE `tblDocumentApproveLog`.`approveID` IN (".$stList.")"; if (!$db->getResult($queryStr)) { @@ -2865,6 +2888,13 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ unset($this->_reviewStatus); return false; } + foreach($res as &$t) { + $filename = $this->_dms->contentDir . $this->_document->getDir().'r'.$t['reviewLogID']; + if(file_exists($filename)) + $t['file'] = $filename; + else + $t['file'] = ''; + } $this->_reviewStatus = array_merge($this->_reviewStatus, $res); } } @@ -2900,7 +2930,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if($recs) { foreach($recs as $rec) { $queryStr= - "SELECT `tblDocumentApprovers`.*, `tblDocumentApproveLog`.`status`, ". + "SELECT `tblDocumentApprovers`.*, `tblDocumentApproveLog`.`approveLogId`, `tblDocumentApproveLog`.`status`, ". "`tblDocumentApproveLog`.`comment`, `tblDocumentApproveLog`.`date`, ". "`tblDocumentApproveLog`.`userID`, `tblUsers`.`fullName`, `tblGroups`.`name` AS `groupName` ". "FROM `tblDocumentApprovers` ". @@ -2915,6 +2945,13 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ unset($this->_approvalStatus); return false; } + foreach($res as &$t) { + $filename = $this->_dms->contentDir . $this->_document->getDir().'a'.$t['approveLogId']; + if(file_exists($filename)) + $t['file'] = $filename; + else + $t['file'] = ''; + } $this->_approvalStatus = array_merge($this->_approvalStatus, $res); } } @@ -3155,7 +3192,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ * @param string $comment comment for review * @return integer new review log id */ - function setReviewByInd($user, $requestUser, $status, $comment) { /* {{{ */ + function setReviewByInd($user, $requestUser, $status, $comment, $file='') { /* {{{ */ $db = $this->_document->_dms->getDB(); // Check to see if the user can be removed from the review list. @@ -3185,10 +3222,12 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ $res=$db->getResult($queryStr); if (is_bool($res) && !$res) return -1; - else { - $reviewLogID = $db->getInsertID(); - return $reviewLogID; + + $reviewLogID = $db->getInsertID(); + if($file) { + SeedDMS_Core_File::copyFile($file, $this->_dms->contentDir . $this->_document->getDir() . 'r' . $reviewLogID); } + return $reviewLogID; } /* }}} */ /** @@ -3205,7 +3244,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ * @param string $comment comment for review * @return integer new review log id */ - function setReviewByGrp($group, $requestUser, $status, $comment) { /* {{{ */ + function setReviewByGrp($group, $requestUser, $status, $comment, $file='') { /* {{{ */ $db = $this->_document->_dms->getDB(); // Check to see if the user can be removed from the review list. @@ -3237,6 +3276,9 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return -1; else { $reviewLogID = $db->getInsertID(); + if($file) { + SeedDMS_Core_File::copyFile($file, $this->_dms->contentDir . $this->_document->getDir() . 'r' . $reviewLogID); + } return $reviewLogID; } } /* }}} */ @@ -3372,7 +3414,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ * @param string $comment approval comment * @return integer 0 on success, < 0 in case of an error */ - function setApprovalByInd($user, $requestUser, $status, $comment) { /* {{{ */ + function setApprovalByInd($user, $requestUser, $status, $comment, $file='') { /* {{{ */ $db = $this->_document->_dms->getDB(); // Check to see if the user can be removed from the approval list. @@ -3402,8 +3444,12 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ $res=$db->getResult($queryStr); if (is_bool($res) && !$res) return -1; - else - return 0; + + $approveLogID = $db->getInsertID(); + if($file) { + SeedDMS_Core_File::copyFile($file, $this->_dms->contentDir . $this->_document->getDir() . 'a' . $approveLogID); + } + return $approveLogId; } /* }}} */ /** @@ -3412,7 +3458,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ * {link SeedDMS_Core_DocumentContent::setApprovalByInd} but does it for * group instead of a user */ - function setApprovalByGrp($group, $requestUser, $status, $comment) { /* {{{ */ + function setApprovalByGrp($group, $requestUser, $status, $comment, $file='') { /* {{{ */ $db = $this->_document->_dms->getDB(); // Check to see if the user can be removed from the approval list. @@ -3442,8 +3488,12 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ $res=$db->getResult($queryStr); if (is_bool($res) && !$res) return -1; - else - return 0; + + $approveLogID = $db->getInsertID(); + if($file) { + SeedDMS_Core_File::copyFile($file, $this->_dms->contentDir . $this->_document->getDir() . 'a' . $approveLogID); + } + return $approveLogId; } /* }}} */ function addIndRecipient($user, $requestUser) { /* {{{ */ From fcddfb016229b306cf07f4d5e6eec068fa8ae838 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 11 Jun 2015 21:30:56 +0200 Subject: [PATCH 0197/2006] allow to upload a file with each review/approval Conflicts: op/op.ApproveDocument.php op/op.ReviewDocument.php --- op/op.ApproveDocument.php | 11 +++++++++++ op/op.ReviewDocument.php | 11 +++++++++++ views/bootstrap/class.ApproveDocument.php | 17 +++++++++++++---- views/bootstrap/class.ReviewDocument.php | 10 +++++++++- 4 files changed, 44 insertions(+), 5 deletions(-) diff --git a/op/op.ApproveDocument.php b/op/op.ApproveDocument.php index cee6769de..5d84b477b 100644 --- a/op/op.ApproveDocument.php +++ b/op/op.ApproveDocument.php @@ -84,6 +84,12 @@ if (!isset($_POST["approvalStatus"]) || !is_numeric($_POST["approvalStatus"]) || UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_approval_status")); } +if($_FILES["approvalfile"]["tmp_name"]) { + if (is_uploaded_file($_FILES["approvalfile"]["tmp_name"]) && $_FILES['approvalfile']['error']!=0){ + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("uploading_failed")); + } +} + $controller->setParam('document', $document); $controller->setParam('content', $latestContent); $controller->setParam('approvalstatus', $_POST["approvalStatus"]); @@ -93,8 +99,13 @@ if ($_POST["approvalType"] == "grp") { } else { $group = null; } +if($_FILES["approvalfile"]["tmp_name"]) + $file = $_FILES["approvalfile"]["tmp_name"]; +else + $file = ''; $controller->setParam('group', $group); $controller->setParam('comment', $_POST["comment"]); +$controller->setParam('file', $file); if(!$controller->run()) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText($controller->getErrorMsg())); } diff --git a/op/op.ReviewDocument.php b/op/op.ReviewDocument.php index dc401c1e7..9a57c39e8 100644 --- a/op/op.ReviewDocument.php +++ b/op/op.ReviewDocument.php @@ -83,6 +83,12 @@ if (!isset($_POST["reviewStatus"]) || !is_numeric($_POST["reviewStatus"]) || UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_review_status")); } +if($_FILES["reviewfile"]["tmp_name"]) { + if (is_uploaded_file($_FILES["reviewfile"]["tmp_name"]) && $_FILES['reviewfile']['error']!=0){ + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("uploading_failed")); + } +} + $controller->setParam('document', $document); $controller->setParam('content', $latestContent); $controller->setParam('reviewstatus', $_POST["reviewStatus"]); @@ -92,8 +98,13 @@ if ($_POST["reviewType"] == "grp") { } else { $group = null; } +if($_FILES["reviewfile"]["tmp_name"]) + $file = $_FILES["reviewfile"]["tmp_name"]; +else + $file = ''; $controller->setParam('group', $group); $controller->setParam('comment', $_POST["comment"]); +$controller->setParam('file', $file); if(!$controller->run()) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText($controller->getErrorMsg())); } diff --git a/views/bootstrap/class.ApproveDocument.php b/views/bootstrap/class.ApproveDocument.php index 4d3eb7934..16e6d3523 100644 --- a/views/bootstrap/class.ApproveDocument.php +++ b/views/bootstrap/class.ApproveDocument.php @@ -118,12 +118,21 @@ function checkGrpForm() print "

    \n"; } ?> - + - - + + + + + + + +
    : -
    :
    : +printFileChooser('approvalfile', false); +?> +
    :

    "; } ?> - + + + + + "; echo ""; - print "\n"; + print "\n"; print "\n"; print ""; - print "\n"; + print "\n"; print "\n"; print "\n"; print "\n"; From da7c04d250372b37b393cbb2cbe7fc6ad28bb69b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 12 Jun 2015 12:56:17 +0200 Subject: [PATCH 0202/2006] actually use uploaded file --- controllers/class.ApproveDocument.php | 5 +++-- controllers/class.ReviewDocument.php | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/controllers/class.ApproveDocument.php b/controllers/class.ApproveDocument.php index 5296b6d5f..ec0caf8ed 100644 --- a/controllers/class.ApproveDocument.php +++ b/controllers/class.ApproveDocument.php @@ -32,6 +32,7 @@ class SeedDMS_Controller_ApproveDocument extends SeedDMS_Controller_Common { $approvaltype = $this->params['approvaltype']; $group = $this->params['group']; $comment = $this->params['comment']; + $file = $this->params['file']; /* Get the document id and name before removing the document */ $docname = $document->getName(); @@ -43,13 +44,13 @@ class SeedDMS_Controller_ApproveDocument extends SeedDMS_Controller_Common { $result = $this->callHook('approveDocument', $content); if($result === null) { if ($approvaltype == "ind") { - if(0 > $content->setApprovalByInd($user, $user, $approvalstatus, $comment)) { + if(0 > $content->setApprovalByInd($user, $user, $approvalstatus, $comment, $file)) { $this->error = 1; $this->errormsg = "approval_update_failed"; return false; } } elseif ($approvaltype == "grp") { - if(0 > $content->setApprovalByGrp($group, $user, $approvalstatus, $comment)) { + if(0 > $content->setApprovalByGrp($group, $user, $approvalstatus, $comment, $file)) { $this->error = 1; $this->errormsg = "approval_update_failed"; return false; diff --git a/controllers/class.ReviewDocument.php b/controllers/class.ReviewDocument.php index 936503679..8139f6663 100644 --- a/controllers/class.ReviewDocument.php +++ b/controllers/class.ReviewDocument.php @@ -32,6 +32,7 @@ class SeedDMS_Controller_ReviewDocument extends SeedDMS_Controller_Common { $reviewtype = $this->params['reviewtype']; $group = $this->params['group']; $comment = $this->params['comment']; + $file = $this->params['file']; /* Get the document id and name before removing the document */ $docname = $document->getName(); @@ -44,13 +45,13 @@ class SeedDMS_Controller_ReviewDocument extends SeedDMS_Controller_Common { if($result === null) { if ($reviewtype == "ind") { - if(0 > $content->setReviewByInd($user, $user, $reviewstatus, $comment)) { + if(0 > $content->setReviewByInd($user, $user, $reviewstatus, $comment, $file)) { $this->error = 1; $this->errormsg = "review_update_failed"; return false; } } elseif ($reviewtype == "grp") { - if(0 > $content->setReviewByGrp($group, $user, $reviewstatus, $comment)) { + if(0 > $content->setReviewByGrp($group, $user, $reviewstatus, $comment, $file)) { $this->error = 1; $this->errormsg = "review_update_failed"; return false; From ecafa39d1e587eb5751dfb4b5d4eb38bb1669fd2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 15 Jun 2015 08:53:39 +0200 Subject: [PATCH 0203/2006] mayApprove() checks if document is in review --- inc/inc.ClassAccessOperation.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index b7d7f7235..c430b13dc 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -251,14 +251,15 @@ class SeedDMS_AccessOperation { * Check if document content may be approved * * Approving a document content is only allowed if the document was not - * obsoleted. There are other requirements which are not taken into + * obsoleted and the document is not in review status. + * There are other requirements which are not taken into * account here. */ function mayApprove() { /* {{{ */ if(get_class($this->obj) == 'SeedDMS_Core_Document') { $latestContent = $this->obj->getLatestContent(); $status = $latestContent->getStatus(); - if ($status["status"]!=S_OBSOLETE) { + if ($status["status"]!=S_OBSOLETE && $status["status"]!=S_DRAFT_REV) { return true; } } From 15a708fbf25682120d8e5fad9730b1d58d566f16 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 15 Jun 2015 08:55:20 +0200 Subject: [PATCH 0204/2006] use access operation to check if approval is allowed Conflicts: op/op.ApproveDocument.php Conflicts: op/op.ApproveDocument.php --- op/op.ApproveDocument.php | 8 ++++++-- out/out.ApproveDocument.php | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/op/op.ApproveDocument.php b/op/op.ApproveDocument.php index 5d84b477b..08f980201 100644 --- a/op/op.ApproveDocument.php +++ b/op/op.ApproveDocument.php @@ -27,6 +27,7 @@ include("../inc/inc.Init.php"); include("../inc/inc.Extension.php"); include("../inc/inc.ClassEmail.php"); include("../inc/inc.DBInit.php"); +include("../inc/inc.ClassAccessOperation.php"); include("../inc/inc.Authentication.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.ClassController.php"); @@ -73,9 +74,12 @@ if ($latestContent->getVersion()!=$version) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); } +/* Create object for checking access to certain operations */ +$accessop = new SeedDMS_AccessOperation($document, $user, $settings); + $olddocstatus = $content->getStatus(); -// verify if document has expired -if ($document->hasExpired()){ +// verify if document may be approved +if ($accessop->mayApprove()){ UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); } diff --git a/out/out.ApproveDocument.php b/out/out.ApproveDocument.php index dc343eb95..4b9efa878 100644 --- a/out/out.ApproveDocument.php +++ b/out/out.ApproveDocument.php @@ -61,8 +61,9 @@ $latestContent = $document->getLatestContent(); if ($latestContent->getVersion()!=$version) { UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); } -// verify if document has expired -if ($document->hasExpired()){ + +// verify if document may be approved +if ($accessop->mayApprove()){ UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); } From 03d8d6c247a9fad8a4784c375813b4861d2905da Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 15 Jun 2015 08:53:39 +0200 Subject: [PATCH 0205/2006] mayApprove() checks if document is in review From 67d10d10ae1b3aaca7acb1d7cec9abde07a3fa65 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 15 Jun 2015 09:05:20 +0200 Subject: [PATCH 0206/2006] use access operation to check if document may be reviewed --- op/op.ReviewDocument.php | 7 +++++-- out/out.ReviewDocument.php | 11 ++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/op/op.ReviewDocument.php b/op/op.ReviewDocument.php index 9a57c39e8..1726a1952 100644 --- a/op/op.ReviewDocument.php +++ b/op/op.ReviewDocument.php @@ -72,9 +72,12 @@ if ($latestContent->getVersion()!=$version) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); } +/* Create object for checking access to certain operations */ +$accessop = new SeedDMS_AccessOperation($document, $user, $settings); + $olddocstatus = $content->getStatus(); -// verify if document has expired -if ($document->hasExpired()){ +// verify if document may be reviewed +if ($accessop->mayReview()){ UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); } diff --git a/out/out.ReviewDocument.php b/out/out.ReviewDocument.php index 7580f2ac3..298b89a79 100644 --- a/out/out.ReviewDocument.php +++ b/out/out.ReviewDocument.php @@ -58,8 +58,12 @@ $latestContent = $document->getLatestContent(); if ($latestContent->getVersion()!=$version) { UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); } -// verify if document has expired -if ($document->hasExpired()){ + +/* Create object for checking access to certain operations */ +$accessop = new SeedDMS_AccessOperation($document, $user, $settings); + +// verify if document may be reviewed +if ($accessop->mayReview()){ UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); } @@ -68,9 +72,6 @@ if(!$reviews) { UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("no_action")); } -/* Create object for checking access to certain operations */ -$accessop = new SeedDMS_AccessOperation($document, $user, $settings); - $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$content)); if($view) { From e7ed3f77899ceebefebda26fbf76526c5fd14b80 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 15 Jun 2015 09:20:33 +0200 Subject: [PATCH 0207/2006] add optional parameter class to contentContainerStart() --- views/bootstrap/class.Bootstrap.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 2fcf1bb8e..53bfd1d6e 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -716,10 +716,8 @@ $(document).ready(function () { return; } /* }}} */ - function contentContainerStart($type='info') { /* {{{ */ - - //echo "
    \n"; - echo "
    \n"; + function contentContainerStart($class='') { /* {{{ */ + echo "
    \n"; return; } /* }}} */ From d8df11367693695ef9835c4f1263864d4f3c5d6c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 15 Jun 2015 09:24:25 +0200 Subject: [PATCH 0208/2006] add class 'help' --- styles/bootstrap/application.css | 12 ++++++++++++ views/bootstrap/class.Help.php | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/styles/bootstrap/application.css b/styles/bootstrap/application.css index 1cd0f7dba..4ddbe25bd 100644 --- a/styles/bootstrap/application.css +++ b/styles/bootstrap/application.css @@ -111,6 +111,18 @@ div.statusbar a.btn { height: 20px; } +div.help h1 { + font-size: 24px; +} + +div.help h2 { + font-size: 18px; +} + +div.help h3 { + font-size: 16px; +} + @media (max-width: 480px) { .nav-tabs > li { float:none; diff --git a/views/bootstrap/class.Help.php b/views/bootstrap/class.Help.php index 5a209068e..3dbeceb4a 100644 --- a/views/bootstrap/class.Help.php +++ b/views/bootstrap/class.Help.php @@ -41,7 +41,7 @@ class SeedDMS_View_Help extends SeedDMS_Bootstrap_Style { $this->contentStart(); $this->pageNavigation(getMLText("help").": ".getMLText('help_'.strtolower($context), array(), $context), ""); - $this->contentContainerStart(); + $this->contentContainerStart('help'); $helpfile = "../languages/".$this->params['session']->getLanguage()."/help/".$context.".html"; if(file_exists($helpfile)) From d12f9993ddfbc11363d3556b9eba86b576c6ffd3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 15 Jun 2015 14:13:38 +0200 Subject: [PATCH 0209/2006] add mayReceipt() --- inc/inc.ClassAccessOperation.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index c430b13dc..9d7e4de3f 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -138,7 +138,7 @@ class SeedDMS_AccessOperation { if(get_class($this->obj) == 'SeedDMS_Core_Document') { $latestContent = $this->obj->getLatestContent(); $status = $latestContent->getStatus(); - if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]==S_RELEASED || $status["status"]==S_IN_REVISION)) { + if ((($this->settings->_enableVersionModification && ($this->obj->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) /* && ($status["status"]==S_RELEASED || $status["status"]==S_IN_REVISION)*/) { return true; } } @@ -266,6 +266,24 @@ class SeedDMS_AccessOperation { return false; } /* }}} */ + /** + * Check if document content may be receipted + * + * Reviewing a document content is only allowed if the document was not + * obsoleted. There are other requirements which are not taken into + * account here. + */ + function mayReceipt() { /* {{{ */ + if(get_class($this->obj) == 'SeedDMS_Core_Document') { + $latestContent = $this->obj->getLatestContent(); + $status = $latestContent->getStatus(); + if ($status["status"]!=S_OBSOLETE) { + return true; + } + } + return false; + } /* }}} */ + /** * Check if document content may be revised * From 80a49262f44d71c8efbb9f5013bd2b97ca897ac2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 15 Jun 2015 14:14:31 +0200 Subject: [PATCH 0210/2006] propperly check for sufficient access rights --- op/op.ApproveDocument.php | 2 +- op/op.ReceiptDocument.php | 8 ++++++-- op/op.ReviewDocument.php | 3 ++- op/op.ReviseDocument.php | 8 ++++++-- out/out.ApproveDocument.php | 2 +- out/out.ReceiptDocument.php | 10 +++++----- out/out.ReviewDocument.php | 2 +- out/out.ReviseDocument.php | 11 ++++++----- 8 files changed, 28 insertions(+), 18 deletions(-) diff --git a/op/op.ApproveDocument.php b/op/op.ApproveDocument.php index 08f980201..65d5e62a2 100644 --- a/op/op.ApproveDocument.php +++ b/op/op.ApproveDocument.php @@ -79,7 +79,7 @@ $accessop = new SeedDMS_AccessOperation($document, $user, $settings); $olddocstatus = $content->getStatus(); // verify if document may be approved -if ($accessop->mayApprove()){ +if (!$accessop->mayApprove()){ UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); } diff --git a/op/op.ReceiptDocument.php b/op/op.ReceiptDocument.php index 76f578833..2b365bce9 100644 --- a/op/op.ReceiptDocument.php +++ b/op/op.ReceiptDocument.php @@ -26,6 +26,7 @@ include("../inc/inc.Init.php"); include("../inc/inc.Extension.php"); include("../inc/inc.ClassEmail.php"); include("../inc/inc.DBInit.php"); +include("../inc/inc.ClassAccessOperation.php"); include("../inc/inc.Authentication.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.ClassController.php"); @@ -72,8 +73,11 @@ if ($latestContent->getVersion()!=$version) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); } -// verify if document has expired -if ($document->hasExpired()){ +/* Create object for checking access to certain operations */ +$accessop = new SeedDMS_AccessOperation($document, $user, $settings); + +// verify if document may be receіpted +if (!$accessop->mayReceipt()){ UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); } diff --git a/op/op.ReviewDocument.php b/op/op.ReviewDocument.php index 1726a1952..b14faa160 100644 --- a/op/op.ReviewDocument.php +++ b/op/op.ReviewDocument.php @@ -26,6 +26,7 @@ include("../inc/inc.Init.php"); include("../inc/inc.Extension.php"); include("../inc/inc.ClassEmail.php"); include("../inc/inc.DBInit.php"); +include("../inc/inc.ClassAccessOperation.php"); include("../inc/inc.Authentication.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.ClassController.php"); @@ -77,7 +78,7 @@ $accessop = new SeedDMS_AccessOperation($document, $user, $settings); $olddocstatus = $content->getStatus(); // verify if document may be reviewed -if ($accessop->mayReview()){ +if (!$accessop->mayReview()){ UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); } diff --git a/op/op.ReviseDocument.php b/op/op.ReviseDocument.php index 7b22e1cda..d302a6195 100644 --- a/op/op.ReviseDocument.php +++ b/op/op.ReviseDocument.php @@ -26,6 +26,7 @@ include("../inc/inc.Init.php"); include("../inc/inc.Extension.php"); include("../inc/inc.ClassEmail.php"); include("../inc/inc.DBInit.php"); +include("../inc/inc.ClassAccessOperation.php"); include("../inc/inc.Authentication.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.ClassController.php"); @@ -72,9 +73,12 @@ if ($latestContent->getVersion()!=$version) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version")); } +/* Create object for checking access to certain operations */ +$accessop = new SeedDMS_AccessOperation($document, $user, $settings); + $olddocstatus = $content->getStatus(); -// verify if document has expired -if ($document->hasExpired()){ +// verify if document maybe revised +if (!$document->mayRevise()){ UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); } diff --git a/out/out.ApproveDocument.php b/out/out.ApproveDocument.php index 4b9efa878..f891a589f 100644 --- a/out/out.ApproveDocument.php +++ b/out/out.ApproveDocument.php @@ -63,7 +63,7 @@ if ($latestContent->getVersion()!=$version) { } // verify if document may be approved -if ($accessop->mayApprove()){ +if (!$accessop->mayApprove()){ UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); } diff --git a/out/out.ReceiptDocument.php b/out/out.ReceiptDocument.php index c115b4eac..ca3498ae9 100644 --- a/out/out.ReceiptDocument.php +++ b/out/out.ReceiptDocument.php @@ -58,8 +58,11 @@ $latestContent = $document->getLatestContent(); if ($latestContent->getVersion()!=$version) { UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); } -// verify if document has expired -if ($document->hasExpired()){ +/* Create object for checking access to certain operations */ +$accessop = new SeedDMS_AccessOperation($document, $user, $settings); + +// verify if document may be receipted +if (!$accessop->mayReceipt()){ UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); } @@ -68,9 +71,6 @@ if(!$receipts) { UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("no_action")); } -/* Create object for checking access to certain operations */ -$accessop = new SeedDMS_AccessOperation($document, $user, $settings); - $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$content)); if($view) { diff --git a/out/out.ReviewDocument.php b/out/out.ReviewDocument.php index 298b89a79..9059ca291 100644 --- a/out/out.ReviewDocument.php +++ b/out/out.ReviewDocument.php @@ -63,7 +63,7 @@ if ($latestContent->getVersion()!=$version) { $accessop = new SeedDMS_AccessOperation($document, $user, $settings); // verify if document may be reviewed -if ($accessop->mayReview()){ +if (!$accessop->mayReview()){ UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); } diff --git a/out/out.ReviseDocument.php b/out/out.ReviseDocument.php index a07f4b312..d0fd6d197 100644 --- a/out/out.ReviseDocument.php +++ b/out/out.ReviseDocument.php @@ -58,8 +58,12 @@ $latestContent = $document->getLatestContent(); if ($latestContent->getVersion()!=$version) { UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_version")); } -// verify if document has expired -if ($document->hasExpired()){ + +/* Create object for checking access to certain operations */ +$accessop = new SeedDMS_AccessOperation($document, $user, $settings); + +// verify if document maybe revised +if (!$document->mayRevise()){ UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); } @@ -68,9 +72,6 @@ if(!$revisions) { UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("no_action")); } -/* Create object for checking access to certain operations */ -$accessop = new SeedDMS_AccessOperation($document, $user, $settings); - $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$content, 'revisionid'=>(int) $_GET['revisionid'])); if($view) { From 9eb9114eceb6e1e66cd740339508dee44a925421 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 15 Jun 2015 14:15:04 +0200 Subject: [PATCH 0211/2006] receipt protocol just contains last entry, propperly check for access on receiping a version --- views/bootstrap/class.ViewDocument.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 9e5cadf43..95c1ae2c2 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -133,7 +133,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { $statusList = $latestContent->getRevisionStatus(10); break; case "receipt": - $statusList = $latestContent->getReceiptStatus(10); + $statusList = $latestContent->getReceiptStatus(1); break; default: $statusList = array(); @@ -1062,7 +1062,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "
    \n"; print " - +
    :
    : +printFileChooser('reviewfile', false); +?> +
    From b3c9cb2728f2d4d6932770d70633211f0f9728fa Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 12 Jun 2015 08:59:05 +0200 Subject: [PATCH 0198/2006] add function get_extension() returns file extension by mimetype Conflicts: inc/inc.Utils.php --- inc/inc.Utils.php | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php index ae34ed5c1..eabfe1787 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -503,4 +503,45 @@ function decryptData($key, $value){ return trim($decrypttext); } +/** + * Return file extension for a give mimetype + * + * @param string $mimetype Mime-Type + * @return string file extension including leading dot + */ +function get_extension($mimetype) { /* {{{ */ + if(empty($mimetype)) return false; + switch($mimetype) { + case 'image/bmp': return '.bmp'; + case 'image/cis-cod': return '.cod'; + case 'image/gif': return '.gif'; + case 'image/ief': return '.ief'; + case 'image/jpeg': return '.jpg'; + case 'image/pipeg': return '.jfif'; + case 'image/tiff': return '.tif'; + case 'image/x-cmu-raster': return '.ras'; + case 'image/x-cmx': return '.cmx'; + case 'image/x-icon': return '.ico'; + case 'image/x-portable-anymap': return '.pnm'; + case 'image/x-portable-bitmap': return '.pbm'; + case 'image/x-portable-graymap': return '.pgm'; + case 'image/x-portable-pixmap': return '.ppm'; + case 'image/x-rgb': return '.rgb'; + case 'image/x-xbitmap': return '.xbm'; + case 'image/x-xpixmap': return '.xpm'; + case 'image/x-xwindowdump': return '.xwd'; + case 'image/png': return '.png'; + case 'image/x-jps': return '.jps'; + case 'image/x-freehand': return '.fh'; + case 'image/svg+xml': return '.svg'; + case 'application/zip': return '.zip'; + case 'application/x-rar': return '.rar'; + case 'application/pdf': return '.pdf'; + case 'application/postscript': return '.ps'; + case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': return '.docx'; + case 'text/plain': return '.txt'; + case 'text/csv': return '.csv'; + default: return false; + } +} /* }}} */ ?> From 77794294b152d4f548568e8bc3329f2e37887dc1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 12 Jun 2015 08:59:36 +0200 Subject: [PATCH 0199/2006] download review/approval files --- op/op.Download.php | 62 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/op/op.Download.php b/op/op.Download.php index 3d5453873..822c531ea 100644 --- a/op/op.Download.php +++ b/op/op.Download.php @@ -210,6 +210,68 @@ if (isset($_GET["version"])) { ob_clean(); readfile($settings->_contentDir .$filename ); +} elseif (isset($_GET["reviewlogid"])) { + if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); + } + + if (!isset($_GET["reviewlogid"]) || !is_numeric($_GET["reviewlogid"]) || intval($_GET["reviewlogid"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_reviewlog_id")); + } + + $documentid = $_GET["documentid"]; + $document = $dms->getDocument($documentid); + if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_doc_id")); + } + + if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); + } + + $filename = $dms->contentDir . $document->getDir().'r'.(int) $_GET['reviewlogid']; + if(file_exists($filename)) { + $finfo = finfo_open(FILEINFO_MIME_TYPE); + $mimetype = finfo_file($finfo, $filename); + + header("Content-Type: ".$mimetype."; name=\"review-" . $document->getID()."-".(int) $_GET['reviewlogid'] . get_extension($mimetype) . "\""); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($filename )); + header("Content-Disposition: attachment; filename=\"review-" . $document->getID()."-".(int) $_GET['reviewlogid'] . get_extension($mimetype) . "\""); + header("Cache-Control: must-revalidate"); + readfile($filename); + } +} elseif (isset($_GET["approvelogid"])) { + if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); + } + + if (!isset($_GET["approvelogid"]) || !is_numeric($_GET["approvelogid"]) || intval($_GET["approvelogid"])<1) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_approvelog_id")); + } + + $documentid = $_GET["documentid"]; + $document = $dms->getDocument($documentid); + if (!is_object($document)) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_doc_id")); + } + + if ($document->getAccessMode($user) < M_READ) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); + } + + $filename = $dms->contentDir . $document->getDir().'a'.(int) $_GET['approvelogid']; + if(file_exists($filename)) { + $finfo = finfo_open(FILEINFO_MIME_TYPE); + $mimetype = finfo_file($finfo, $filename); + + header("Content-Type: ".$mimetype."; name=\"approval-" . $document->getID()."-".(int) $_GET['approvelogid'] . get_extension($mimetype) . "\""); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($filename )); + header("Content-Disposition: attachment; filename=\"approval-" . $document->getID()."-".(int) $_GET['approvelogid'] . get_extension($mimetype) . "\""); + header("Cache-Control: must-revalidate"); + readfile($filename); + } } add_log_line(); From 42d822a48d4fca8ec4d72dc53d15f4adb282a23b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 12 Jun 2015 11:23:44 +0200 Subject: [PATCH 0200/2006] output link to approval/review file --- views/bootstrap/class.ViewDocument.php | 28 ++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 41520ab96..5553b3286 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -172,6 +172,20 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { echo ""; if($rec['comment']) echo "
    ".htmlspecialchars($rec['comment']); + switch($type) { + case "review": + if($rec['file']) { + echo "
    "; + echo " ".getMLText('download').""; + } + break; + case "approval": + if($rec['file']) { + echo "
    "; + echo " ".getMLText('download').""; + } + break; + } echo "
    "; switch($type) { @@ -688,7 +702,12 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { /* $updateUser is the user who has done the review */ $updateUser = $dms->getUser($r["userID"]); print "
  • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$r["userID"]."'")."
  • ".htmlspecialchars($r["comment"])."".htmlspecialchars($r["comment"]); + if($r['file']) { + echo "
    "; + echo " ".getMLText('download').""; + } + print "
    ".getReviewStatusText($r["status"])."
      "; @@ -752,7 +771,12 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { /* $updateUser is the user who has done the approval */ $updateUser = $dms->getUser($a["userID"]); print "
    • ".(is_object($updateUser) ? htmlspecialchars($updateUser->getFullName()." (".$updateUser->getLogin().")") : "unknown user id '".$a["userID"]."'")."
    ".htmlspecialchars($a["comment"])."".htmlspecialchars($a["comment"]); + if($a['file']) { + echo "
    "; + echo " ".getMLText('download').""; + } + echo "
    ".getApprovalStatusText($a["status"])."
      "; From 34a7df9180e7be17e7e2151075f6ced6b6372dcb Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 12 Jun 2015 12:43:54 +0200 Subject: [PATCH 0201/2006] rename approveLogId to approveLogID Conflicts: views/bootstrap/class.ViewDocument.php --- SeedDMS_Core/Core/inc.ClassDocument.php | 10 +++++----- views/bootstrap/class.ViewDocument.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 551e031ae..58c6b7cdf 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -2930,7 +2930,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if($recs) { foreach($recs as $rec) { $queryStr= - "SELECT `tblDocumentApprovers`.*, `tblDocumentApproveLog`.`approveLogId`, `tblDocumentApproveLog`.`status`, ". + "SELECT `tblDocumentApprovers`.*, `tblDocumentApproveLog`.`approveLogID`, `tblDocumentApproveLog`.`status`, ". "`tblDocumentApproveLog`.`comment`, `tblDocumentApproveLog`.`date`, ". "`tblDocumentApproveLog`.`userID`, `tblUsers`.`fullName`, `tblGroups`.`name` AS `groupName` ". "FROM `tblDocumentApprovers` ". @@ -2938,7 +2938,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ "LEFT JOIN `tblUsers` on `tblUsers`.`id` = `tblDocumentApprovers`.`required` ". "LEFT JOIN `tblGroups` on `tblGroups`.`id` = `tblDocumentApprovers`.`required`". "WHERE `tblDocumentApprovers`.`approveID` = '". $rec['approveID'] ."' ". - "ORDER BY `tblDocumentApproveLog`.`approveLogId` DESC LIMIT ".(int) $limit; + "ORDER BY `tblDocumentApproveLog`.`approveLogID` DESC LIMIT ".(int) $limit; $res = $db->getResultArray($queryStr); if (is_bool($res) && !$res) { @@ -2946,7 +2946,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return false; } foreach($res as &$t) { - $filename = $this->_dms->contentDir . $this->_document->getDir().'a'.$t['approveLogId']; + $filename = $this->_dms->contentDir . $this->_document->getDir().'a'.$t['approveLogID']; if(file_exists($filename)) $t['file'] = $filename; else @@ -3449,7 +3449,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if($file) { SeedDMS_Core_File::copyFile($file, $this->_dms->contentDir . $this->_document->getDir() . 'a' . $approveLogID); } - return $approveLogId; + return $approveLogID; } /* }}} */ /** @@ -3493,7 +3493,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if($file) { SeedDMS_Core_File::copyFile($file, $this->_dms->contentDir . $this->_document->getDir() . 'a' . $approveLogID); } - return $approveLogId; + return $approveLogID; } /* }}} */ function addIndRecipient($user, $requestUser) { /* {{{ */ diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 5553b3286..9e5cadf43 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -182,7 +182,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { case "approval": if($rec['file']) { echo "
      "; - echo " ".getMLText('download').""; + echo " ".getMLText('download').""; } break; } @@ -774,7 +774,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "
    ".htmlspecialchars($a["comment"]); if($a['file']) { echo "
    "; - echo " ".getMLText('download').""; + echo " ".getMLText('download').""; } echo "
    ".getApprovalStatusText($a["status"])."".getReceiptStatusText($r["status"])."
      "; - if($accessop->mayReview()) { + if($accessop->mayReceipt()) { if ($is_recipient && $r["status"]==0) { print "
    • getVersion()."&receiptid=".$r['receiptID']."\" class=\"btn btn-mini\">".getMLText("add_receipt")."
    • "; }else if (($updateUser==$user)&&(($r["status"]==1)||($r["status"]==-1))&&(!$document->hasExpired())){ From 5b03c3dcc30e392e5de60d16135fe7d293e41aab Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 15 Jun 2015 15:28:25 +0200 Subject: [PATCH 0212/2006] show link to Indexer only if fulltext is enabled --- views/bootstrap/class.Bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 53bfd1d6e..bf3f7a83f 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -438,7 +438,7 @@ $(document).ready(function () { } echo "
    • ".getMLText("edit_existing_notify")."
    • \n"; } - if ($this->params['user']->isAdmin()) { + if ($this->params['user']->isAdmin() && $this->params['enablefullsearch']) { echo "
    • ".getMLText("index_folder")."
    • \n"; } echo "
    \n"; From 5d5d9540773c5dd2490034396c3b225759b7a560 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 17 Jun 2015 07:59:06 +0200 Subject: [PATCH 0213/2006] createToc() uses self::items, use counter for columns --- inc/inc.ClassDownloadMgr.php | 61 +++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/inc/inc.ClassDownloadMgr.php b/inc/inc.ClassDownloadMgr.php index ffeb332a2..cfc2e02e2 100644 --- a/inc/inc.ClassDownloadMgr.php +++ b/inc/inc.ClassDownloadMgr.php @@ -48,24 +48,27 @@ class SeedDMS_Download_Mgr { $this->items[$item->getID()] = $item; } /* }}} */ - public function createToc($file, $items) { /* {{{ */ + public function createToc($file) { /* {{{ */ + $items = $this->items; $objPHPExcel = new PHPExcel(); $objPHPExcel->getProperties()->setCreator("SeedDMS")->setTitle("Metadata"); $sheet = $objPHPExcel->setActiveSheetIndex(0); $i = 1; - $sheet->setCellValueByColumnAndRow(0, $i, 'Dokumenten-Nr.'); - $sheet->setCellValueByColumnAndRow(1, $i, 'Dateiname'); - $sheet->setCellValueByColumnAndRow(2, $i, 'Status'); - $sheet->setCellValueByColumnAndRow(3, $i, 'Int. Version'); - $sheet->setCellValueByColumnAndRow(4, $i, 'Prüfer'); - $sheet->setCellValueByColumnAndRow(5, $i, 'Prüfdatum'); - $sheet->setCellValueByColumnAndRow(6, $i, 'Prüfkommentar'); - $sheet->setCellValueByColumnAndRow(7, $i, 'Prüfstatus'); - $sheet->setCellValueByColumnAndRow(8, $i, 'Freigeber'); - $sheet->setCellValueByColumnAndRow(9, $i, 'Freigabedatum'); - $sheet->setCellValueByColumnAndRow(10, $i, 'Freigabekommentar'); - $sheet->setCellValueByColumnAndRow(11, $i, 'Freigabestatus'); + $col = 0; + $sheet->setCellValueByColumnAndRow($col++, $i, 'Dokumenten-Nr.'); + $sheet->setCellValueByColumnAndRow($col++, $i, 'Dokumentenname'); + $sheet->setCellValueByColumnAndRow($col++, $i, 'Dateiname'); + $sheet->setCellValueByColumnAndRow($col++, $i, 'Status'); + $sheet->setCellValueByColumnAndRow($col++, $i, 'Int. Version'); + $sheet->setCellValueByColumnAndRow($col++, $i, 'Prüfer'); + $sheet->setCellValueByColumnAndRow($col++, $i, 'Prüfdatum'); + $sheet->setCellValueByColumnAndRow($col++, $i, 'Prüfkommentar'); + $sheet->setCellValueByColumnAndRow($col++, $i, 'Prüfstatus'); + $sheet->setCellValueByColumnAndRow($col++, $i, 'Freigeber'); + $sheet->setCellValueByColumnAndRow($col++, $i, 'Freigabedatum'); + $sheet->setCellValueByColumnAndRow($col++, $i, 'Freigabekommentar'); + $sheet->setCellValueByColumnAndRow($col++, $i, 'Freigabestatus'); $i++; foreach($items as $item) { $document = $item->getDocument(); @@ -74,10 +77,12 @@ class SeedDMS_Download_Mgr { $reviewStatus = $item->getReviewStatus(); $approvalStatus = $item->getApprovalStatus(); - $sheet->setCellValueByColumnAndRow(0, $i, $document->getID()); - $sheet->setCellValueByColumnAndRow(1, $i, $document->getID()."-".$item->getOriginalFileName()); - $sheet->setCellValueByColumnAndRow(2, $i, getOverallStatusText($status['status'])); - $sheet->setCellValueByColumnAndRow(3, $i, $item->getVersion()); + $col = 0; + $sheet->setCellValueByColumnAndRow($col++, $i, $document->getID()); + $sheet->setCellValueByColumnAndRow($col++, $i, $document->getName()); + $sheet->setCellValueByColumnAndRow($col++, $i, $document->getID()."-".$item->getOriginalFileName()); + $sheet->setCellValueByColumnAndRow($col++, $i, getOverallStatusText($status['status'])); + $sheet->setCellValueByColumnAndRow($col++, $i, $item->getVersion()); $l = $i; $k = $i; if($reviewStatus) { @@ -100,12 +105,14 @@ class SeedDMS_Download_Mgr { } break; } - $sheet->setCellValueByColumnAndRow(4, $l, $reqName); - $sheet->setCellValueByColumnAndRow(5, $l, ($r['status']==1 || $r['status']==-1) ? $r['date'] : ""); - $sheet->setCellValueByColumnAndRow(6, $l, $r['comment']); - $sheet->setCellValueByColumnAndRow(7, $l, getReviewStatusText($r["status"])); + $tcol = $col; + $sheet->setCellValueByColumnAndRow($tcol++, $l, $reqName); + $sheet->setCellValueByColumnAndRow($tcol++, $l, ($r['status']==1 || $r['status']==-1) ? $r['date'] : ""); + $sheet->setCellValueByColumnAndRow($tcol++, $l, $r['comment']); + $sheet->setCellValueByColumnAndRow($tcol++, $l, getReviewStatusText($r["status"])); $l++; } + $col = $tcol; $l--; } if($approvalStatus) { @@ -128,12 +135,14 @@ class SeedDMS_Download_Mgr { } break; } - $sheet->setCellValueByColumnAndRow(8, $k, $reqName); - $sheet->setCellValueByColumnAndRow(9, $k, ($r['status']==1 || $r['status']==-1) ?$r['date'] : ""); - $sheet->setCellValueByColumnAndRow(10, $k, $r['comment']); - $sheet->setCellValueByColumnAndRow(11, $k, getReviewStatusText($r["status"])); + $tcol = $col; + $sheet->setCellValueByColumnAndRow($tcol++, $k, $reqName); + $sheet->setCellValueByColumnAndRow($tcol++, $k, ($r['status']==1 || $r['status']==-1) ?$r['date'] : ""); + $sheet->setCellValueByColumnAndRow($tcol++, $k, $r['comment']); + $sheet->setCellValueByColumnAndRow($tcol++, $k, getApprovalStatusText($r["status"])); $k++; } + $col = $tcol; $k--; } $i = max($l, $k); @@ -152,7 +161,7 @@ class SeedDMS_Download_Mgr { } $file = tempnam("/tmp", "export-list-"); - $this->createToc($file, $this->items); + $this->createToc($file); $zip = new ZipArchive(); $prefixdir = date('Y-m-d', time()); From 1a179c7dcacab81fe5f6b695eee4a60b7f5298ea Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 17 Jun 2015 08:34:15 +0200 Subject: [PATCH 0214/2006] check if includecontent is set if not set only the excel file is delivered --- op/op.Search.php | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/op/op.Search.php b/op/op.Search.php index d2b75aef3..75dbd4b44 100644 --- a/op/op.Search.php +++ b/op/op.Search.php @@ -423,12 +423,21 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) { } } $filename = tempnam('/tmp', ''); - $downmgr->createArchive($filename); - header("Content-Transfer-Encoding: binary"); - header("Content-Length: " . filesize($filename)); - header("Content-Disposition: attachment; filename=\"export-" .date('Y-m-d') . ".zip\""); - header("Content-Type: application/zip"); - header("Cache-Control: must-revalidate"); + if(isset($_GET['includecontent']) && $_GET['includecontent']) { + $downmgr->createArchive($filename); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($filename)); + header("Content-Disposition: attachment; filename=\"export-" .date('Y-m-d') . ".zip\""); + header("Content-Type: application/zip"); + header("Cache-Control: must-revalidate"); + } else { + $downmgr->createToc($filename); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($filename)); + header("Content-Disposition: attachment; filename=\"export-" .date('Y-m-d') . ".xls\""); + header("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml. sheet"); + header("Cache-Control: must-revalidate"); + } readfile($filename); unlink($filename); From dbf31053c9284828a5bf316846d2f19ef0199987 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 17 Jun 2015 08:35:10 +0200 Subject: [PATCH 0215/2006] put export button into arcodion --- views/bootstrap/class.Search.php | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index ce0d86ae4..27b772e50 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -193,14 +193,38 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { ?>
    "> Export
    contentContainerEnd(); // }}} - +?> + +
    +
    +
    + + + +
    +
    " style="_height: 0px;"> +
    + + + + + + + +
    "> Export
    +
    +
    +
    +
    + + Date: Wed, 17 Jun 2015 11:17:27 +0200 Subject: [PATCH 0216/2006] add new phrases --- languages/ar_EG/lang.inc | 4 ++++ languages/bg_BG/lang.inc | 4 ++++ languages/ca_ES/lang.inc | 4 ++++ languages/cs_CZ/lang.inc | 4 ++++ languages/de_DE/lang.inc | 6 +++++- languages/en_GB/lang.inc | 6 +++++- languages/es_ES/lang.inc | 10 +++++++--- languages/fr_FR/lang.inc | 4 ++++ languages/hu_HU/lang.inc | 4 ++++ languages/it_IT/lang.inc | 4 ++++ languages/nl_NL/lang.inc | 4 ++++ languages/pl_PL/lang.inc | 4 ++++ languages/pt_BR/lang.inc | 4 ++++ languages/ro_RO/lang.inc | 4 ++++ languages/ru_RU/lang.inc | 4 ++++ languages/sk_SK/lang.inc | 14 +++++++++----- languages/sv_SE/lang.inc | 4 ++++ languages/tr_TR/lang.inc | 8 ++++++-- languages/zh_CN/lang.inc | 4 ++++ languages/zh_TW/lang.inc | 4 ++++ 20 files changed, 92 insertions(+), 12 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index 682a52866..5e9f636c9 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -84,6 +84,7 @@ URL: [url]', 'approval_deletion_email' => 'طلب الموافقة تم الغاؤه', 'approval_deletion_email_body' => '', 'approval_deletion_email_subject' => '', +'approval_file' => '', 'approval_group' => 'مجموعة الموافقة', 'approval_log' => 'ﺲﺠﻟ ﺎﻠﻣﻭﺎﻔﻗﺓ', 'approval_request_email' => 'طلب الموافقة', @@ -386,6 +387,7 @@ Parent folder: [folder_path] المستخدم: [username] URL: [url]', 'expiry_changed_email_subject' => '[sitename]: [name] - تم تغيير تاريخ الصلاحية', +'export' => '', 'extension_manager' => '', 'february' => 'فبراير', 'file' => 'ملف', @@ -464,6 +466,7 @@ URL: [url]', 'hu_HU' => 'مجرية', 'id' => 'معرف', 'identical_version' => 'الاصدار الجديد مماثل للاصدار الحالي.', +'include_content' => '', 'include_documents' => 'اشمل مستندات', 'include_subdirectories' => 'اشمل مجلدات فرعية', 'index_converters' => 'فهرس تحويل المستند', @@ -745,6 +748,7 @@ URL: [url]', 'review_deletion_email' => 'طلب المراجعة تم مسحه', 'review_deletion_email_body' => '', 'review_deletion_email_subject' => '', +'review_file' => '', 'review_group' => 'مجموعة المراجعة', 'review_log' => 'ﺲﺠﻟ ﺎﻠﻣﺭﺎﺠﻋﺓ', 'review_request_email' => 'طلب مراجعة', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index db7b61717..7364e0958 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -80,6 +80,7 @@ $text = array( 'approval_deletion_email' => 'Запитване за утвърждаване за изтрит', 'approval_deletion_email_body' => '', 'approval_deletion_email_subject' => '', +'approval_file' => '', 'approval_group' => 'Утвърждаваща група', 'approval_log' => '', 'approval_request_email' => 'Запитване за утвърждаване', @@ -337,6 +338,7 @@ $text = array( 'expiry_changed_email' => 'Датата на изтичане променена', 'expiry_changed_email_body' => '', 'expiry_changed_email_subject' => '', +'export' => '', 'extension_manager' => '', 'february' => 'Февруари', 'file' => 'Файл', @@ -395,6 +397,7 @@ $text = array( 'hu_HU' => '', 'id' => 'ID', 'identical_version' => 'Новата версия е идентична с текущата.', +'include_content' => '', 'include_documents' => 'Включи документи', 'include_subdirectories' => 'Включи под-папки', 'index_converters' => 'Index document conversion', @@ -630,6 +633,7 @@ $text = array( 'review_deletion_email' => 'Запитване за рецензия премахнато', 'review_deletion_email_body' => '', 'review_deletion_email_subject' => '', +'review_file' => '', 'review_group' => 'Рецензираща група', 'review_log' => '', 'review_request_email' => 'Запитване за рецензия', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index e41ff3d26..4418ce6a7 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -80,6 +80,7 @@ $text = array( 'approval_deletion_email' => 'Demanda d\'aprovació esborrada', 'approval_deletion_email_body' => '', 'approval_deletion_email_subject' => '', +'approval_file' => '', 'approval_group' => 'Grup aprovador', 'approval_log' => '', 'approval_request_email' => 'Petició d\'aprovació', @@ -342,6 +343,7 @@ URL: [url]', 'expiry_changed_email' => 'Data de caducitat modificada', 'expiry_changed_email_body' => '', 'expiry_changed_email_subject' => '', +'export' => '', 'extension_manager' => '', 'february' => 'Febrer', 'file' => 'Fitxer', @@ -400,6 +402,7 @@ URL: [url]', 'hu_HU' => '', 'id' => 'ID', 'identical_version' => '', +'include_content' => '', 'include_documents' => 'Incloure documents', 'include_subdirectories' => 'Incloure subdirectoris', 'index_converters' => '', @@ -635,6 +638,7 @@ URL: [url]', 'review_deletion_email' => 'Petició de revisió eliminada', 'review_deletion_email_body' => '', 'review_deletion_email_subject' => '', +'review_file' => '', 'review_group' => 'Grup de revisió', 'review_log' => '', 'review_request_email' => 'Petició de revisió', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index dcb6ccdda..bc5ca04b0 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -84,6 +84,7 @@ URL: [url]', 'approval_deletion_email' => 'Zrušení schválení požadavku', 'approval_deletion_email_body' => '', 'approval_deletion_email_subject' => '', +'approval_file' => '', 'approval_group' => 'Skupina schválení', 'approval_log' => 'Log schvalování', 'approval_request_email' => 'Schválení požadavku', @@ -393,6 +394,7 @@ Nadřazená složka: [folder_path] Uživatel: [username] URL: [url]', 'expiry_changed_email_subject' => '[sitename]: [name] - Datum ukončení platnosti změněn', +'export' => '', 'extension_manager' => 'Správa rozšíření', 'february' => 'Únor', 'file' => 'Soubor', @@ -471,6 +473,7 @@ URL: [url]', 'hu_HU' => 'Maďarština', 'id' => 'ID', 'identical_version' => 'Nová verze je identická s verzí současnou', +'include_content' => '', 'include_documents' => 'Včetně dokumentů', 'include_subdirectories' => 'Včetně podadresářů', 'index_converters' => 'Index konverze dokumentu', @@ -755,6 +758,7 @@ URL: [url]', 'review_deletion_email' => 'Žádost na revizi odstraněn', 'review_deletion_email_body' => '', 'review_deletion_email_subject' => '', +'review_file' => '', 'review_group' => 'Skupina kontroly', 'review_log' => 'Přezkum logu', 'review_request_email' => 'Požadavek na kontrolu', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index 8d5b00b7f..6345a58b6 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 (2076), dgrutsch (18) +// Translators: Admin (2080), dgrutsch (18) $text = array( 'accept' => 'Übernehmen', @@ -89,6 +89,7 @@ Elternordner: [folder_path] Benutzer: [username] URL: [url]', 'approval_deletion_email_subject' => '[sitename]: [name] - Freigabeaufforderung gelöscht', +'approval_file' => 'Datei', 'approval_group' => 'Berechtigungsgruppe', 'approval_log' => 'Freigabeprotokoll', 'approval_request_email' => 'Aufforderung zur Freigabe', @@ -398,6 +399,7 @@ Elternordner: [folder_path] Benutzer: [username] URL: [url]', 'expiry_changed_email_subject' => '[sitename]: [name] - Ablaufdatum geändert', +'export' => 'Export', 'extension_manager' => 'Erweiterungen verwalten', 'february' => 'Februar', 'file' => 'Datei', @@ -476,6 +478,7 @@ URL: [url]', 'hu_HU' => 'Ungarisch', 'id' => 'ID', 'identical_version' => 'Neue Version ist identisch zu aktueller Version.', +'include_content' => 'Inhalte mit exportieren', 'include_documents' => 'Dokumente miteinbeziehen', 'include_subdirectories' => 'Unterverzeichnisse miteinbeziehen', 'index_converters' => 'Index Dokumentenumwandlung', @@ -769,6 +772,7 @@ Elternordner: [folder_path] Benutzer: [username] URL: [url]', 'review_deletion_email_subject' => '[sitename]: [name] - Prüfungsaufforderung gelöscht', +'review_file' => 'Datei', 'review_group' => 'Gruppe: prüfen', 'review_log' => 'Prüfungsprotokoll', 'review_request_email' => 'Aufforderung zur Prüfung', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index d3fdac120..68fca393c 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 (1204), dgrutsch (3), netixw (14) +// Translators: Admin (1208), dgrutsch (3), netixw (14) $text = array( 'accept' => 'Accept', @@ -89,6 +89,7 @@ Elternordner: [folder_path] Benutzer: [username] URL: [url]', 'approval_deletion_email_subject' => '[sitename]: [name] - Approval request deleted', +'approval_file' => 'File', 'approval_group' => 'Approval Group', 'approval_log' => 'Approval Log', 'approval_request_email' => 'Approval request', @@ -398,6 +399,7 @@ Parent folder: [folder_path] User: [username] URL: [url]', 'expiry_changed_email_subject' => '[sitename]: [name] - Expiry date changed', +'export' => 'Export', 'extension_manager' => 'Manage extensions', 'february' => 'February', 'file' => 'File', @@ -476,6 +478,7 @@ URL: [url]', 'hu_HU' => 'Hungarian', 'id' => 'ID', 'identical_version' => 'New version is identical to current version.', +'include_content' => 'Include content', 'include_documents' => 'Include documents', 'include_subdirectories' => 'Include subdirectories', 'index_converters' => 'Index document conversion', @@ -776,6 +779,7 @@ Elternordner: [folder_path] Benutzer: [username] URL: [url]', 'review_deletion_email_subject' => '[sitename]: [name] - Review request deleted', +'review_file' => 'File', 'review_group' => 'Review group', 'review_log' => 'Review log', 'review_request_email' => 'Review request', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index b93a6d367..e50f0bb5d 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/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: acabello (20), Admin (940), angel (123), francisco (2), jaimem (14) +// Translators: acabello (20), Admin (942), angel (123), francisco (2), jaimem (14) $text = array( 'accept' => 'Aceptar', @@ -84,6 +84,7 @@ URL: [url]', 'approval_deletion_email' => 'Petición de aprobación eliminada', 'approval_deletion_email_body' => '', 'approval_deletion_email_subject' => '', +'approval_file' => '', 'approval_group' => 'Grupo aprobador', 'approval_log' => 'Traza de aprovación', 'approval_request_email' => 'Petición de aprobación', @@ -393,6 +394,7 @@ Carpeta principal: [folder_path] Usuario: [username] URL: [url]', 'expiry_changed_email_subject' => '[sitename]: [name] - Fecha de caducidad modificada', +'export' => '', 'extension_manager' => 'Administrar extensiones', 'february' => 'Febrero', 'file' => 'Fichero', @@ -471,6 +473,7 @@ URL: [url]', 'hu_HU' => 'Hungaro', 'id' => 'ID', 'identical_version' => 'La nueva versión es idéntica a la actual.', +'include_content' => '', 'include_documents' => 'Incluir documentos', 'include_subdirectories' => 'Incluir subcarpetas', 'index_converters' => 'Conversión de índice de documentos', @@ -760,6 +763,7 @@ nURL: [url]', 'review_deletion_email' => 'Petición de revisión eliminada', 'review_deletion_email_body' => '', 'review_deletion_email_subject' => '', +'review_file' => '', 'review_group' => 'Grupo de revisión', 'review_log' => 'Traza de revisión', 'review_request_email' => 'Petición de revisión', @@ -946,8 +950,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => 'Si se habilita, la carga de ficheros también estará disponible a través de un applet java llamado jumploader, sin límite de tamaño de fichero fijado por el navegador. También permite la carga de múltiples ficheros de una sola vez.', 'settings_enableNotificationAppRev' => 'Habilitar notificación a revisor/aprobador', 'settings_enableNotificationAppRev_desc' => 'Habilitar para enviar notificación a revisor/aprobador cuando se añade una nueva versión de documento', -'settings_enableNotificationWorkflow' => '', -'settings_enableNotificationWorkflow_desc' => '', +'settings_enableNotificationWorkflow' => 'Enviar notificación a los usuarios en la siguiente transacción del flujo.', +'settings_enableNotificationWorkflow_desc' => 'Si esta opción esta activa, los usuarios y grupos que deban tomar una acción en la siguiente transacción del flujo, serán notificados. Incluso si ellos no han adicionado una notificación al documento.', 'settings_enableOwnerNotification' => 'Habilitar notificación al propietario por defecto', 'settings_enableOwnerNotification_desc' => 'Marcar para añadir una notificación al propietario del documento cuando es añadido.', 'settings_enableOwnerRevApp' => 'Permitir al propietario revisar/aprobar', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 83813e21b..dca8ea389 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -84,6 +84,7 @@ URL: [url]', 'approval_deletion_email' => 'Demande d\'approbation supprimée', 'approval_deletion_email_body' => '', 'approval_deletion_email_subject' => '', +'approval_file' => '', 'approval_group' => 'Groupe d\'approbation', 'approval_log' => 'Journal des approbations', 'approval_request_email' => 'Demande d\'approbation', @@ -393,6 +394,7 @@ Dossier parent: [folder_path] Utilisateur: [username] URL: [url]', 'expiry_changed_email_subject' => '[sitename]: [name] - Date d\'expiration modifiée', +'export' => '', 'extension_manager' => 'Gestionnaire d\'extensions', 'february' => 'Février', 'file' => 'Fichier', @@ -471,6 +473,7 @@ URL: [url]', 'hu_HU' => 'Hongrois', 'id' => 'ID', 'identical_version' => 'Nouvelle version identique à l\'actuelle.', +'include_content' => '', 'include_documents' => 'Inclure les documents', 'include_subdirectories' => 'Inclure les sous-dossiers', 'index_converters' => 'Conversion de document Index', @@ -749,6 +752,7 @@ URL: [url]', 'review_deletion_email' => 'Demande de correction supprimée', 'review_deletion_email_body' => '', 'review_deletion_email_subject' => '', +'review_file' => '', 'review_group' => 'Groupe de correction', 'review_log' => '', 'review_request_email' => 'Demande de correction', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index 2f27f7c29..9647100ec 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -84,6 +84,7 @@ URL: [url]', 'approval_deletion_email' => 'Jóváhagyási kérelem törölve', 'approval_deletion_email_body' => '', 'approval_deletion_email_subject' => '', +'approval_file' => '', 'approval_group' => 'Jóváhagyó csoport', 'approval_log' => 'Jóváhagyási napló', 'approval_request_email' => 'Jóváhagyási kérelem', @@ -393,6 +394,7 @@ Szülő mappa: [folder_path] Felhasználó: [username] URL: [url]', 'expiry_changed_email_subject' => '[sitename]: [name] - Lejárati dátum módosítva', +'export' => '', 'extension_manager' => 'Bővítmények kezelése', 'february' => 'Február', 'file' => 'Állomány', @@ -471,6 +473,7 @@ URL: [url]', 'hu_HU' => 'Magyar', 'id' => 'ID', 'identical_version' => 'Az új verzió megegyezik az eredetivel.', +'include_content' => '', 'include_documents' => 'Tartalmazó dokumentumok', 'include_subdirectories' => 'Tartalmazó alkönyvtárak', 'index_converters' => 'Index dokumentum konverzió', @@ -760,6 +763,7 @@ URL: [url]', 'review_deletion_email' => 'Felülvizsgálat kérés törölve', 'review_deletion_email_body' => '', 'review_deletion_email_subject' => '', +'review_file' => '', 'review_group' => 'Felülvizsgáló csoport', 'review_log' => 'Felülvizsgálati napló', 'review_request_email' => 'Felülvizsgálat kérés', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index a732a1f36..1a74bbd83 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -89,6 +89,7 @@ Cartella: [folder_path] Utente: [username] URL: [url]', 'approval_deletion_email_subject' => '[sitename]: [name] - Richiesta di approvazione cancellata', +'approval_file' => '', 'approval_group' => 'Gruppo di approvazione', 'approval_log' => 'Registro delle approvazioni', 'approval_request_email' => 'Richiesta di approvazione', @@ -398,6 +399,7 @@ Cartella: [folder_path] Utente: [username] URL: [url]', 'expiry_changed_email_subject' => '[sitename]: [name] - Scadenza cambiata', +'export' => '', 'extension_manager' => 'Gestisci le estensioni dei files', 'february' => 'Febbraio', 'file' => 'File', @@ -476,6 +478,7 @@ URL: [url]', 'hu_HU' => 'Ungherese', 'id' => 'ID', 'identical_version' => 'La nuova versione è identica a quella attuale.', +'include_content' => '', 'include_documents' => 'Includi documenti', 'include_subdirectories' => 'Includi sottocartelle', 'index_converters' => 'Indice di conversione documenti', @@ -777,6 +780,7 @@ Cartella: [folder_path] Utente: [username] URL: [url]', 'review_deletion_email_subject' => '[sitename]: [name] - Richiesta di revisione cancellata', +'review_file' => '', 'review_group' => 'Gruppo revisori', 'review_log' => 'Rivedi log', 'review_request_email' => 'Richiesta di revisione', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index cc94f6db3..67363428d 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -84,6 +84,7 @@ URL: [url]', 'approval_deletion_email' => 'Goedkeuring verzoek verwijderd', 'approval_deletion_email_body' => '', 'approval_deletion_email_subject' => '', +'approval_file' => '', 'approval_group' => 'Goedkeuring Groep', 'approval_log' => 'Goedkeuring overzicht', 'approval_request_email' => 'Goedkeuring verzoek', @@ -386,6 +387,7 @@ Bovenliggende map: [folder_path] Gebruiker: [username] URL: [url]', 'expiry_changed_email_subject' => '[sitename]: [name] - Vervaldatum gewijzigd', +'export' => '', 'extension_manager' => 'Beheer uitbreidingen', 'february' => 'februari', 'file' => 'Bestand', @@ -464,6 +466,7 @@ URL: [url]', 'hu_HU' => 'Hongaars', 'id' => 'ID', 'identical_version' => 'Nieuwe versie is identiek aan de huidige versie', +'include_content' => '', 'include_documents' => 'Inclusief documenten', 'include_subdirectories' => 'Inclusief submappen', 'index_converters' => 'Index document conversie', @@ -752,6 +755,7 @@ URL: [url]', 'review_deletion_email' => 'Controle verzoek gewijzigd', 'review_deletion_email_body' => '', 'review_deletion_email_subject' => '', +'review_file' => '', 'review_group' => '[Controle] Groep', 'review_log' => 'Reviseer overzicht', 'review_request_email' => 'Controle verzoek', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index a540743d2..9950b4dc4 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -84,6 +84,7 @@ URL: [url]', 'approval_deletion_email' => 'Prośba o akceptację została usunięta', 'approval_deletion_email_body' => '', 'approval_deletion_email_subject' => '', +'approval_file' => '', 'approval_group' => 'Grupa akceptująca', 'approval_log' => 'Zatwierdź log', 'approval_request_email' => 'Prośba o akceptację', @@ -386,6 +387,7 @@ Folder nadrzędny: [folder_path] Użytkownik: [username] URL: [url]', 'expiry_changed_email_subject' => '[sitename]: [name] - Zmiana daty wygaśnięcia', +'export' => '', 'extension_manager' => '', 'february' => 'Luty', 'file' => 'Plik', @@ -464,6 +466,7 @@ URL: [url]', 'hu_HU' => 'Węgierski', 'id' => 'ID', 'identical_version' => 'Nowa wersja jest identyczna z obecną', +'include_content' => '', 'include_documents' => 'Uwzględnij dokumenty', 'include_subdirectories' => 'Uwzględnij podkatalogi', 'index_converters' => 'Konwersja indeksu dokumentów', @@ -746,6 +749,7 @@ URL: [url]', 'review_deletion_email' => 'Prośba o recenzję usunięta', 'review_deletion_email_body' => '', 'review_deletion_email_subject' => '', +'review_file' => '', 'review_group' => 'Grupa recenzentów', 'review_log' => 'Zobacz log', 'review_request_email' => 'Prośba i recenzję', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 9552b1c81..3e38cb147 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -84,6 +84,7 @@ URL: [url]', 'approval_deletion_email' => 'Solicitação de Aprovação eliminada', 'approval_deletion_email_body' => '', 'approval_deletion_email_subject' => '', +'approval_file' => '', 'approval_group' => 'Approval Group', 'approval_log' => 'Log de Aprovação', 'approval_request_email' => 'Solicitação de aprovação', @@ -392,6 +393,7 @@ Pasta mãe: [folder_path] Usuário: [username] URL: [url]', 'expiry_changed_email_subject' => '[sitename]: [name] - Data de validade mudou', +'export' => '', 'extension_manager' => 'Gerenciar extensões', 'february' => 'February', 'file' => 'Arquivo', @@ -470,6 +472,7 @@ URL: [url]', 'hu_HU' => 'Húngaro', 'id' => 'ID', 'identical_version' => 'Nova versão é idêntica à versão atual.', +'include_content' => '', 'include_documents' => 'Include documents', 'include_subdirectories' => 'Include subdirectories', 'index_converters' => 'Índice de conversão de documentos', @@ -758,6 +761,7 @@ URL: [url]', 'review_deletion_email' => 'Pedido de revisão eliminado', 'review_deletion_email_body' => '', 'review_deletion_email_subject' => '', +'review_file' => '', 'review_group' => 'Review Group', 'review_log' => 'Log de Revisão', 'review_request_email' => 'Pedido de revisão', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index 97a57b903..73ed5b942 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -89,6 +89,7 @@ Folder parinte: [folder_path] Utilizator: [username] URL: [url]', 'approval_deletion_email_subject' => '[sitename]: [name] - Cerere aprobare stearsa', +'approval_file' => '', 'approval_group' => 'Grup aprobare', 'approval_log' => 'Log aprobare', 'approval_request_email' => 'Cerere aprobare', @@ -398,6 +399,7 @@ Folder parinte: [folder_path] Utilizator: [username] URL: [url]', 'expiry_changed_email_subject' => '[sitename]: [name] - Data de expirare schimbată', +'export' => '', 'extension_manager' => 'Gestionați extensiile', 'february' => 'Februarie', 'file' => 'Fișier', @@ -476,6 +478,7 @@ URL: [url]', 'hu_HU' => 'Ungureste', 'id' => 'ID', 'identical_version' => 'Noua versiune este identică cu versiunea curentă.', +'include_content' => '', 'include_documents' => 'Include documente', 'include_subdirectories' => 'Include subfoldere', 'index_converters' => 'Indexare conversie documente', @@ -777,6 +780,7 @@ Folder parinte: [folder_path] Utilizator: [username] URL: [url]', 'review_deletion_email_subject' => '[sitename]: [name] - Cerere de revizuire eliminata', +'review_file' => '', 'review_group' => 'Grup revizuire', 'review_log' => 'Log revizuire', 'review_request_email' => 'Cerere de revizuire', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index 9ada8e022..97c5f5657 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -84,6 +84,7 @@ URL: [url]', 'approval_deletion_email' => 'Запрос на утверждение удалён', 'approval_deletion_email_body' => '', 'approval_deletion_email_subject' => '', +'approval_file' => '', 'approval_group' => 'Утверждающая группа', 'approval_log' => '', 'approval_request_email' => 'Запрос на утверждение', @@ -386,6 +387,7 @@ URL: [url]', Пользователь: [username] URL: [url]', 'expiry_changed_email_subject' => '[sitename]: изменена дата истечения для «[name]»', +'export' => '', 'extension_manager' => 'Управление расширениями', 'february' => 'Февраль', 'file' => 'Файл', @@ -464,6 +466,7 @@ URL: [url]', 'hu_HU' => 'Hungarian', 'id' => 'Идентификатор', 'identical_version' => 'Новая версия идентична текущей.', +'include_content' => '', 'include_documents' => 'Включая документы', 'include_subdirectories' => 'Включая подкаталоги', 'index_converters' => 'Индексирование документов', @@ -750,6 +753,7 @@ URL: [url]', 'review_deletion_email' => 'Запрос на рецензию удалён', 'review_deletion_email_body' => '', 'review_deletion_email_subject' => '', +'review_file' => '', 'review_group' => 'Рецензирующая группа', 'review_log' => '', 'review_request_email' => 'Запрос на рецензию', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index fd1747659..e0170cca5 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/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 (458) +// Translators: Admin (462) $text = array( 'accept' => 'Prijať', @@ -80,6 +80,7 @@ $text = array( 'approval_deletion_email' => 'Poziadavka na schvalenie zmazana', 'approval_deletion_email_body' => '', 'approval_deletion_email_subject' => '', +'approval_file' => '', 'approval_group' => 'Skupina schválenia', 'approval_log' => '', 'approval_request_email' => 'Poziadavka na schvalenie', @@ -143,7 +144,7 @@ $text = array( 'backup_remove' => 'Odstrániť zálohu', 'backup_tools' => 'Zálohovacie nástroje', 'between' => 'medzi', -'bg_BG' => '', +'bg_BG' => 'Bulharsky', 'browse' => '', 'calendar' => 'Kalendár', 'calendar_week' => '', @@ -337,6 +338,7 @@ $text = array( 'expiry_changed_email' => 'Datum platnosti zmeneny', 'expiry_changed_email_body' => '', 'expiry_changed_email_subject' => '', +'export' => '', 'extension_manager' => '', 'february' => 'Február', 'file' => 'Súbor', @@ -395,6 +397,7 @@ $text = array( 'hu_HU' => 'Maďarčina', 'id' => 'ID', 'identical_version' => '', +'include_content' => '', 'include_documents' => 'Vrátane súborov', 'include_subdirectories' => 'Vrátane podzložiek', 'index_converters' => '', @@ -613,7 +616,7 @@ $text = array( 'removed_revispr' => '', 'removed_workflow_email_body' => '', 'removed_workflow_email_subject' => '', -'remove_marked_files' => '', +'remove_marked_files' => 'Zrušiť označenie súborov', 'repaired' => '', 'repairing_objects' => '', 'request_workflow_action_email_body' => '', @@ -630,6 +633,7 @@ $text = array( 'review_deletion_email' => 'Poziadavka na recenziu zmazana', 'review_deletion_email_body' => '', 'review_deletion_email_subject' => '', +'review_file' => '', 'review_group' => 'Skupina kontroly', 'review_log' => '', 'review_request_email' => 'Poziadavka na recenziu', @@ -1107,7 +1111,7 @@ $text = array( 'users_and_groups' => '', 'users_done_work' => '', 'user_exists' => 'Používateľ už existuje.', -'user_group_management' => '', +'user_group_management' => 'Správa užívateľov/skupín', 'user_image' => 'Obrázok', 'user_info' => 'Informácie o používateľovi', 'user_list' => 'Zoznam používateľov', @@ -1126,7 +1130,7 @@ $text = array( 'version_deleted_email_body' => '', 'version_deleted_email_subject' => '', 'version_info' => 'Informácie o verzii', -'view' => '', +'view' => 'Zobraziť', 'view_online' => 'Zobraziť online', 'warning' => 'Upozornenie', 'wednesday' => 'Streda', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 5e2a47cb4..bb760475d 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -84,6 +84,7 @@ URL: [url]', 'approval_deletion_email' => 'Begäran om godkännande har raderats', 'approval_deletion_email_body' => '', 'approval_deletion_email_subject' => '', +'approval_file' => '', 'approval_group' => 'Grupp av personer som godkänner', 'approval_log' => '', 'approval_request_email' => 'Begäran om godkännande', @@ -386,6 +387,7 @@ Dokument: [name] Användare: [username] URL: [url]', 'expiry_changed_email_subject' => '[sitename]: [name] - Utgångsdatum ändrat', +'export' => '', 'extension_manager' => 'Förvalta tillägg', 'february' => 'februari', 'file' => 'Dokumentinformation', @@ -464,6 +466,7 @@ URL: [url]', 'hu_HU' => 'ungerska', 'id' => 'ID', 'identical_version' => 'Ny version är lika med den aktuella versionen.', +'include_content' => '', 'include_documents' => 'Inkludera dokument', 'include_subdirectories' => 'Inkludera under-kataloger', 'index_converters' => 'Omvandling av indexdokument', @@ -745,6 +748,7 @@ URL: [url]', 'review_deletion_email' => 'Förfrågan om granskning borttagen', 'review_deletion_email_body' => '', 'review_deletion_email_subject' => '', +'review_file' => '', 'review_group' => 'Grupp som granskar', 'review_log' => '', 'review_request_email' => 'Förfrågan om granskning', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 6d0981539..81afd8e3b 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/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 (1003), aydin (83) +// Translators: Admin (1004), aydin (83) $text = array( 'accept' => 'Kabul', @@ -83,6 +83,7 @@ URL: [url]', 'approval_deletion_email' => 'Onay talebi silindi', 'approval_deletion_email_body' => '', 'approval_deletion_email_subject' => '', +'approval_file' => '', 'approval_group' => 'Onay Grubu', 'approval_log' => 'Onay Kayıtları', 'approval_request_email' => 'Onay talebi', @@ -164,7 +165,7 @@ URL: [url]', 'backup_remove' => 'Yedek dosyasını sil', 'backup_tools' => 'Yedekleme araçları', 'between' => 'arasında', -'bg_BG' => '', +'bg_BG' => 'Bulgarca', 'browse' => 'Tara', 'calendar' => 'Takvim', 'calendar_week' => 'Takvim haftası', @@ -392,6 +393,7 @@ Doküman: [name] Kullanıcı: [username] URL: [url]', 'expiry_changed_email_subject' => '[sitename]: [name] - Bitiş tarihi değişti', +'export' => '', 'extension_manager' => 'Uzantıları düzenle', 'february' => 'Şubat', 'file' => 'Dosya', @@ -470,6 +472,7 @@ URL: [url]', 'hu_HU' => 'Macarca', 'id' => 'ID', 'identical_version' => 'Yeni versiyon güncel versiyonla aynı.', +'include_content' => '', 'include_documents' => 'Dokümanları kapsa', 'include_subdirectories' => 'Alt klasörleri kapsa', 'index_converters' => 'Doküman dönüştürmeyi indeksle', @@ -761,6 +764,7 @@ URL: [url]', 'review_deletion_email' => 'Kontrol talebi silindi', 'review_deletion_email_body' => '', 'review_deletion_email_subject' => '', +'review_file' => '', 'review_group' => 'Kontrol grubu', 'review_log' => 'Kontrol kayıtları', 'review_request_email' => 'Kontrol talebi', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index d9c4b3668..a1521bd43 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -84,6 +84,7 @@ URL: [url]', 'approval_deletion_email' => '审核请求已被删除', 'approval_deletion_email_body' => '', 'approval_deletion_email_subject' => '', +'approval_file' => '', 'approval_group' => '审核组', 'approval_log' => '审批记录', 'approval_request_email' => '审核请求', @@ -343,6 +344,7 @@ URL: [url]', 'expiry_changed_email' => '到期日子已改变', 'expiry_changed_email_body' => '', 'expiry_changed_email_subject' => '', +'export' => '', 'extension_manager' => '', 'february' => '二 月', 'file' => '文件', @@ -401,6 +403,7 @@ URL: [url]', 'hu_HU' => '匈牙利语', 'id' => '序号', 'identical_version' => '', +'include_content' => '', 'include_documents' => '包含文档', 'include_subdirectories' => '包含子目录', 'index_converters' => '索引文件转换', @@ -636,6 +639,7 @@ URL: [url]', 'review_deletion_email' => '校对请求被删除', 'review_deletion_email_body' => '', 'review_deletion_email_subject' => '', +'review_file' => '', 'review_group' => '校对组', 'review_log' => '审阅记录', 'review_request_email' => '校对请求', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index e2f1163c5..2e161de9b 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -84,6 +84,7 @@ URL: [url]', 'approval_deletion_email' => '審核請求已被刪除', 'approval_deletion_email_body' => '', 'approval_deletion_email_subject' => '', +'approval_file' => '', 'approval_group' => '審核組', 'approval_log' => '審批記錄', 'approval_request_email' => '審核請求', @@ -341,6 +342,7 @@ URL: [url]', 'expiry_changed_email' => '到期日子已改變', 'expiry_changed_email_body' => '', 'expiry_changed_email_subject' => '', +'export' => '', 'extension_manager' => '', 'february' => '二 月', 'file' => '文件', @@ -399,6 +401,7 @@ URL: [url]', 'hu_HU' => '匈牙利語', 'id' => '序號', 'identical_version' => '', +'include_content' => '', 'include_documents' => '包含文檔', 'include_subdirectories' => '包含子目錄', 'index_converters' => '索引檔轉換', @@ -634,6 +637,7 @@ URL: [url]', 'review_deletion_email' => '校對請求被刪除', 'review_deletion_email_body' => '', 'review_deletion_email_subject' => '', +'review_file' => '', 'review_group' => '校對組', 'review_log' => '', 'review_request_email' => '校對請求', From 42ce9fa21bb2a582a45a9989c5e8b17f4b133360 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 17 Jun 2015 11:32:46 +0200 Subject: [PATCH 0217/2006] add value to checkbox for exporting content --- views/bootstrap/class.Search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 27b772e50..99ec24bf5 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -213,7 +213,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
    - + From 3ed43b0a856b2402c3dd18cce942e78eb3bea787 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 17 Jun 2015 12:21:25 +0200 Subject: [PATCH 0218/2006] fix take over of reviewer/approver from previous version --- views/bootstrap/class.CheckInDocument.php | 88 +++++++++++++---------- 1 file changed, 52 insertions(+), 36 deletions(-) diff --git a/views/bootstrap/class.CheckInDocument.php b/views/bootstrap/class.CheckInDocument.php index daba7eb15..5fe891951 100644 --- a/views/bootstrap/class.CheckInDocument.php +++ b/views/bootstrap/class.CheckInDocument.php @@ -236,14 +236,18 @@ function checkForm() __takeOverButton("GrpReviewer", $tmp); + } /* List all mandatory groups of reviewers */ if($res) { $tmp = array(); @@ -375,14 +383,18 @@ function checkForm() Date: Thu, 18 Jun 2015 13:49:52 +0200 Subject: [PATCH 0219/2006] subfolders and documents can be order by date and direction can be set --- SeedDMS_Core/Core/inc.ClassFolder.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index c97cd2be9..3f677f7e4 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -432,9 +432,10 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { * * @param string $orderby if set to 'n' the list is ordered by name, otherwise * it will be ordered by sequence + * @param string $dir direction of sorting (asc or desc) * @return array list of folder objects or false in case of an error */ - function getSubFolders($orderby="") { /* {{{ */ + function getSubFolders($orderby="", $dir="asc") { /* {{{ */ $db = $this->_dms->getDB(); if (!isset($this->_subFolders)) { @@ -442,6 +443,10 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { if ($orderby=="n") $queryStr .= " ORDER BY name"; elseif ($orderby=="s") $queryStr .= " ORDER BY sequence"; + elseif ($orderby=="d") $queryStr .= " ORDER BY date"; + if($dir == 'desc') + $queryStr .= " DESC"; + $resArr = $db->getResultArray($queryStr); if (is_bool($resArr) && $resArr == false) return false; @@ -612,15 +617,19 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { * * @param string $orderby if set to 'n' the list is ordered by name, otherwise * it will be ordered by sequence + * @param string $dir direction of sorting (asc or desc) * @return array list of documents or false in case of an error */ - function getDocuments($orderby="") { /* {{{ */ + function getDocuments($orderby="", $dir="asc") { /* {{{ */ $db = $this->_dms->getDB(); if (!isset($this->_documents)) { $queryStr = "SELECT * FROM tblDocuments WHERE folder = " . $this->_id; if ($orderby=="n") $queryStr .= " ORDER BY name"; elseif($orderby=="s") $queryStr .= " ORDER BY sequence"; + elseif($orderby=="d") $queryStr .= " ORDER BY date"; + if($dir == 'desc') + $queryStr .= " DESC"; $resArr = $db->getResultArray($queryStr); if (is_bool($resArr) && !$resArr) From ab72bb9f8c4bba94438461e5c15d021adc69c420 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 18 Jun 2015 17:28:32 +0200 Subject: [PATCH 0220/2006] check if keywords, name, comment was posted --- op/op.EditDocument.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/op/op.EditDocument.php b/op/op.EditDocument.php index a90235ba0..3fd1a3805 100644 --- a/op/op.EditDocument.php +++ b/op/op.EditDocument.php @@ -53,9 +53,9 @@ if($document->isLocked()) { } } -$name = $_POST["name"]; -$comment = $_POST["comment"]; -$keywords = $_POST["keywords"]; +$name = isset($_POST['name']) ? $_POST["name"] : ""; +$comment = isset($_POST['comment']) ? $_POST["comment"] : ""; +$keywords = isset($_POST["keywords"]) ? $_POST["keywords"] : ""; if(isset($_POST['categoryidform1'])) { $categories = explode(',', preg_replace('/[^0-9,]+/', '', $_POST["categoryidform1"])); } elseif(isset($_POST["categories"])) { From b96d75b97dd1dd3021962a7ff8f932542ad2a5f3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 18 Jun 2015 17:31:56 +0200 Subject: [PATCH 0221/2006] check if expires and sequence is set --- op/op.EditDocument.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/op/op.EditDocument.php b/op/op.EditDocument.php index 3fd1a3805..1d1d2ae67 100644 --- a/op/op.EditDocument.php +++ b/op/op.EditDocument.php @@ -63,7 +63,7 @@ if(isset($_POST['categoryidform1'])) { } else { $categories = array(); } -$sequence = $_POST["sequence"]; +$sequence = isset($_POST["sequence"]) ? $_POST["sequence"] : "keep"; $sequence = str_replace(',', '.', $_POST["sequence"]); if (!is_numeric($sequence)) { $sequence="keep"; @@ -180,7 +180,7 @@ if (($oldcomment = $document->getComment()) != $comment) { } $expires = false; -if ($_POST["expires"] != "false") { +if (isset($_POST["expires"]) && $_POST["expires"] != "false") { if($_POST["expdate"]) { $tmp = explode('-', $_POST["expdate"]); $expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]); From a0d0790a3422fe24a2863c4485d83bf6d36142fd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 18 Jun 2015 17:36:47 +0200 Subject: [PATCH 0222/2006] initialize return array --- SeedDMS_Core/Core/inc.ClassUser.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassUser.php b/SeedDMS_Core/Core/inc.ClassUser.php index 5b4ee1007..21655c602 100644 --- a/SeedDMS_Core/Core/inc.ClassUser.php +++ b/SeedDMS_Core/Core/inc.ClassUser.php @@ -1214,7 +1214,7 @@ class SeedDMS_Core_User { /* {{{ */ function getRevisionStatus($documentID=null, $version=null) { /* {{{ */ $db = $this->_dms->getDB(); - $status = array(); + $status = array("indstatus"=>array(), "grpstatus"=>array()); // See if the user is assigned as an individual revisor. $queryStr = "SELECT `tblDocumentRevisors`.*, `tblDocumentRevisionLog`.`status`, ". @@ -1231,7 +1231,6 @@ class SeedDMS_Core_User { /* {{{ */ if (is_bool($resArr) && $resArr === false) return false; if (count($resArr)>0) { - $status['indstatus'] = array(); foreach ($resArr as $res) { if($res['date']) { if(isset($status["indstatus"][$res['documentID']])) { @@ -1262,7 +1261,6 @@ class SeedDMS_Core_User { /* {{{ */ if (is_bool($resArr) && $resArr === false) return false; if (count($resArr)>0) { - $status['grpstatus'] = array(); foreach ($resArr as $res) { if(isset($status["grpstatus"][$res['documentID']])) { if($status["grpstatus"][$res['documentID']]['date'] < $res['date']) { From 8ee6d74613ce9cf5ebfd54f19ffe7a99d1b4b214 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 19 Jun 2015 12:47:30 +0200 Subject: [PATCH 0223/2006] setDefaultAccess() cleanly removes als notifiers without read access This failed because the first call of removeNotify() has invalidated the list of notifiers --- SeedDMS_Core/Core/inc.ClassFolder.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index 3f677f7e4..e58631c11 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -333,6 +333,14 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { return $this->_defaultAccess; } /* }}} */ + /** + * Set default access mode + * + * This method sets the default access mode and also removes all notifiers which + * will not have read access anymore. + * + * @param integer $mode access mode + */ function setDefaultAccess($mode) { /* {{{ */ $db = $this->_dms->getDB(); @@ -346,12 +354,18 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { // remove their subscription. if (empty($this->_notifyList)) $this->getNotifyList(); - foreach ($this->_notifyList["users"] as $u) { + + /* Make a copy of both notifier lists because removeNotify will empty + * $this->_notifyList and the second foreach will not work anymore. + */ + $nusers = $this->_notifyList["users"]; + $ngroups = $this->_notifyList["groups"]; + foreach ($nusers as $u) { if ($this->getAccessMode($u) < M_READ) { $this->removeNotify($u->getID(), true); } } - foreach ($this->_notifyList["groups"] as $g) { + foreach ($ngroups as $g) { if ($this->getGroupAccessMode($g) < M_READ) { $this->removeNotify($g->getID(), false); } From 5a0a034be368abd36d291905f92b2bf674076c53 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 19 Jun 2015 12:47:30 +0200 Subject: [PATCH 0224/2006] setDefaultAccess() cleanly removes als notifiers without read access This failed because the first call of removeNotify() has invalidated the list of notifiers From ee8ad500ce6ecc177879f2310eb8e9294fbf3329 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 19 Jun 2015 12:52:49 +0200 Subject: [PATCH 0225/2006] setDefaultAccess() propperly removes notifier without read access --- SeedDMS_Core/Core/inc.ClassDocument.php | 32 +++++++++++++++++-------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 58c6b7cdf..213eceab2 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -486,6 +486,14 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return $this->_defaultAccess; } /* }}} */ + /** + * Set default access mode + * + * This method sets the default access mode and also removes all notifiers which + * will not have read access anymore. + * + * @param integer $mode access mode + */ function setDefaultAccess($mode) { /* {{{ */ $db = $this->_dms->getDB(); @@ -497,18 +505,22 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ // If any of the notification subscribers no longer have read access, // remove their subscription. - if(isset($this->_notifyList["users"])) { - foreach ($this->_notifyList["users"] as $u) { - if ($this->getAccessMode($u) < M_READ) { - $this->removeNotify($u->getID(), true); - } + if (empty($this->_notifyList)) + $this->getNotifyList(); + + /* Make a copy of both notifier lists because removeNotify will empty + * $this->_notifyList and the second foreach will not work anymore. + */ + $nusers = $this->_notifyList["users"]; + $ngroups = $this->_notifyList["groups"]; + foreach ($this->_notifyList["users"] as $u) { + if ($this->getAccessMode($u) < M_READ) { + $this->removeNotify($u->getID(), true); } } - if(isset($this->_notifyList["groups"])) { - foreach ($this->_notifyList["groups"] as $g) { - if ($this->getGroupAccessMode($g) < M_READ) { - $this->removeNotify($g->getID(), false); - } + foreach ($ngroups as $g) { + if ($this->getGroupAccessMode($g) < M_READ) { + $this->removeNotify($g->getID(), false); } } From 75c8129185eac1fbff42a38667ec38890cb9f9a0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 19 Jun 2015 15:02:37 +0200 Subject: [PATCH 0226/2006] add cleanNotifyList() which removes users/groups with read access also adds an optional parameter $noclean to setDefaultAccess and setInheritAccess which keeps the methods from cleaning up the notifier list --- SeedDMS_Core/Core/inc.ClassDocument.php | 73 +++++++++++---------- SeedDMS_Core/Core/inc.ClassFolder.php | 84 ++++++++++++++----------- 2 files changed, 83 insertions(+), 74 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 213eceab2..61de039c0 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -493,8 +493,9 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ * will not have read access anymore. * * @param integer $mode access mode + * @param boolean $noclean set to true if notifier list shall not be clean up */ - function setDefaultAccess($mode) { /* {{{ */ + function setDefaultAccess($mode, $noclean="false") { /* {{{ */ $db = $this->_dms->getDB(); $queryStr = "UPDATE tblDocuments set defaultAccess = " . (int) $mode . " WHERE id = " . $this->_id; @@ -503,26 +504,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $this->_defaultAccess = $mode; - // If any of the notification subscribers no longer have read access, - // remove their subscription. - if (empty($this->_notifyList)) - $this->getNotifyList(); - - /* Make a copy of both notifier lists because removeNotify will empty - * $this->_notifyList and the second foreach will not work anymore. - */ - $nusers = $this->_notifyList["users"]; - $ngroups = $this->_notifyList["groups"]; - foreach ($this->_notifyList["users"] as $u) { - if ($this->getAccessMode($u) < M_READ) { - $this->removeNotify($u->getID(), true); - } - } - foreach ($ngroups as $g) { - if ($this->getGroupAccessMode($g) < M_READ) { - $this->removeNotify($g->getID(), false); - } - } + if(!$noclean) + self::cleanNotifyList(); return true; } /* }}} */ @@ -540,9 +523,10 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ * * @param boolean $inheritAccess set to true for setting and false for * unsetting inherited access mode + * @param boolean $noclean set to true if notifier list shall not be clean up * @return boolean true if operation was successful otherwise false */ - function setInheritAccess($inheritAccess) { /* {{{ */ + function setInheritAccess($inheritAccess, $noclean=false) { /* {{{ */ $db = $this->_dms->getDB(); $queryStr = "UPDATE tblDocuments SET inheritAccess = " . ($inheritAccess ? "1" : "0") . " WHERE id = " . $this->_id; @@ -551,22 +535,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $this->_inheritAccess = ($inheritAccess ? "1" : "0"); - // If any of the notification subscribers no longer have read access, - // remove their subscription. - if(isset($this->_notifyList["users"])) { - foreach ($this->_notifyList["users"] as $u) { - if ($this->getAccessMode($u) < M_READ) { - $this->removeNotify($u->getID(), true); - } - } - } - if(isset($this->_notifyList["groups"])) { - foreach ($this->_notifyList["groups"] as $g) { - if ($this->getGroupAccessMode($g) < M_READ) { - $this->removeNotify($g->getID(), false); - } - } - } + if(!$noclean) + self::cleanNotifyList(); return true; } /* }}} */ @@ -1252,6 +1222,33 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return $this->_notifyList; } /* }}} */ + /** + * Make sure only users/groups with read access are in the notify list + * + */ + function cleanNotifyList() { /* {{{ */ + // If any of the notification subscribers no longer have read access, + // remove their subscription. + if (empty($this->_notifyList)) + $this->getNotifyList(); + + /* Make a copy of both notifier lists because removeNotify will empty + * $this->_notifyList and the second foreach will not work anymore. + */ + $nusers = $this->_notifyList["users"]; + $ngroups = $this->_notifyList["groups"]; + foreach ($nusers as $u) { + if ($this->getAccessMode($u) < M_READ) { + $this->removeNotify($u->getID(), true); + } + } + foreach ($ngroups as $g) { + if ($this->getGroupAccessMode($g) < M_READ) { + $this->removeNotify($g->getID(), false); + } + } + } /* }}} */ + /** * Add a user/group to the notification list * This function does not check if the currently logged in user diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index e58631c11..70651ca96 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -340,8 +340,9 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { * will not have read access anymore. * * @param integer $mode access mode + * @param boolean $noclean set to true if notifier list shall not be clean up */ - function setDefaultAccess($mode) { /* {{{ */ + function setDefaultAccess($mode, $noclean=false) { /* {{{ */ $db = $this->_dms->getDB(); $queryStr = "UPDATE tblFolders set defaultAccess = " . (int) $mode . " WHERE id = " . $this->_id; @@ -350,33 +351,29 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { $this->_defaultAccess = $mode; - // If any of the notification subscribers no longer have read access, - // remove their subscription. - if (empty($this->_notifyList)) - $this->getNotifyList(); - - /* Make a copy of both notifier lists because removeNotify will empty - * $this->_notifyList and the second foreach will not work anymore. - */ - $nusers = $this->_notifyList["users"]; - $ngroups = $this->_notifyList["groups"]; - foreach ($nusers as $u) { - if ($this->getAccessMode($u) < M_READ) { - $this->removeNotify($u->getID(), true); - } - } - foreach ($ngroups as $g) { - if ($this->getGroupAccessMode($g) < M_READ) { - $this->removeNotify($g->getID(), false); - } - } + if(!$noclean) + self::cleanNotifyList(); return true; } /* }}} */ function inheritsAccess() { return $this->_inheritAccess; } - function setInheritAccess($inheritAccess) { /* {{{ */ + /** + * Set inherited access mode + * Setting inherited access mode will set or unset the internal flag which + * controls if the access mode is inherited from the parent folder or not. + * It will not modify the + * access control list for the current object. It will remove all + * notifications of users which do not even have read access anymore + * after setting or unsetting inherited access. + * + * @param boolean $inheritAccess set to true for setting and false for + * unsetting inherited access mode + * @param boolean $noclean set to true if notifier list shall not be clean up + * @return boolean true if operation was successful otherwise false + */ + function setInheritAccess($inheritAccess, $noclean=false) { /* {{{ */ $db = $this->_dms->getDB(); $inheritAccess = ($inheritAccess) ? "1" : "0"; @@ -387,20 +384,8 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { $this->_inheritAccess = $inheritAccess; - // If any of the notification subscribers no longer have read access, - // remove their subscription. - if (empty($this->_notifyList)) - $this->getNotifyList(); - foreach ($this->_notifyList["users"] as $u) { - if ($this->getAccessMode($u) < M_READ) { - $this->removeNotify($u->getID(), true); - } - } - foreach ($this->_notifyList["groups"] as $g) { - if ($this->getGroupAccessMode($g) < M_READ) { - $this->removeNotify($g->getID(), false); - } - } + if(!$noclean) + self::cleanNotifyList(); return true; } /* }}} */ @@ -1187,6 +1172,33 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { return $this->_notifyList; } /* }}} */ + /** + * Make sure only users/groups with read access are in the notify list + * + */ + function cleanNotifyList() { /* {{{ */ + // If any of the notification subscribers no longer have read access, + // remove their subscription. + if (empty($this->_notifyList)) + $this->getNotifyList(); + + /* Make a copy of both notifier lists because removeNotify will empty + * $this->_notifyList and the second foreach will not work anymore. + */ + $nusers = $this->_notifyList["users"]; + $ngroups = $this->_notifyList["groups"]; + foreach ($nusers as $u) { + if ($this->getAccessMode($u) < M_READ) { + $this->removeNotify($u->getID(), true); + } + } + foreach ($ngroups as $g) { + if ($this->getGroupAccessMode($g) < M_READ) { + $this->removeNotify($g->getID(), false); + } + } + } /* }}} */ + /* * Add a user/group to the notification list * This function does not check if the currently logged in user From 9643c12429541e9871d99851df3b41affec108ca Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 19 Jun 2015 15:04:25 +0200 Subject: [PATCH 0227/2006] log id and name of folder --- op/op.RemoveFolder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op/op.RemoveFolder.php b/op/op.RemoveFolder.php index 558492df2..3810e15b3 100644 --- a/op/op.RemoveFolder.php +++ b/op/op.RemoveFolder.php @@ -81,7 +81,7 @@ if ($notifier) { } } -add_log_line(); +add_log_line("?folderid=".$folderid."&name=".$foldername); header("Location:../out/out.ViewFolder.php?folderid=".$parent->getID()."&showtree=".$_POST["showtree"]); From 905bc9c1409e298c13d0fc6f01b5c0e14ae5ffcf Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 19 Jun 2015 15:24:19 +0200 Subject: [PATCH 0228/2006] add optional parameter cleasAccessList() will turn off removal of notification --- SeedDMS_Core/Core/inc.ClassDocument.php | 7 ++++++- SeedDMS_Core/Core/inc.ClassFolder.php | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 61de039c0..2cbe17c51 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -936,9 +936,10 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ /** * Delete all entries for this document from the access control list * + * @param boolean $noclean set to true if notifier list shall not be clean up * @return boolean true if operation was successful otherwise false */ - function clearAccessList() { /* {{{ */ + function clearAccessList($noclean=false) { /* {{{ */ $db = $this->_dms->getDB(); $queryStr = "DELETE FROM tblACLs WHERE targetType = " . T_DOCUMENT . " AND target = " . $this->_id; @@ -946,6 +947,10 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return false; unset($this->_accessList); + + if(!$noclean) + self::cleanNotifyList(); + return true; } /* }}} */ diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index 70651ca96..6ce59d007 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -955,9 +955,10 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { /** * Delete all entries for this folder from the access control list * + * @param boolean $noclean set to true if notifier list shall not be clean up * @return boolean true if operation was successful otherwise false */ - function clearAccessList() { /* {{{ */ + function clearAccessList($noclean=false) { /* {{{ */ $db = $this->_dms->getDB(); $queryStr = "DELETE FROM tblACLs WHERE targetType = " . T_FOLDER . " AND target = " . $this->_id; @@ -965,6 +966,10 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { return false; unset($this->_accessList); + + if(!$noclean) + self::cleanNotifyList(); + return true; } /* }}} */ From 28c39791dce6b02afed8c1ed034c6a808a11a3ab Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 23 Jun 2015 07:02:15 +0200 Subject: [PATCH 0229/2006] finfo returns only mimetype --- op/op.AddDocument.php | 6 +++--- op/op.UpdateDocument.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php index 6bdb2bebb..23479e4ab 100644 --- a/op/op.AddDocument.php +++ b/op/op.AddDocument.php @@ -240,10 +240,10 @@ if($settings->_dropFolderDir) { if($_FILES["userfile"]['error'][0] != 0) $_FILES["userfile"] = array(); } - $finfo = finfo_open(FILEINFO_MIME); - $mimetype = explode(';', finfo_file($finfo, $fullfile)); + $finfo = finfo_open(FILEINFO_MIME_TYPE); + $mimetype = finfo_file($finfo, $fullfile); $_FILES["userfile"]['tmp_name'][] = $fullfile; - $_FILES["userfile"]['type'][] = $mimetype[0]; + $_FILES["userfile"]['type'][] = $mimetype; $_FILES["userfile"]['name'][] = $_POST["dropfolderfileform1"]; $_FILES["userfile"]['size'][] = filesize($fullfile); $_FILES["userfile"]['error'][] = 0; diff --git a/op/op.UpdateDocument.php b/op/op.UpdateDocument.php index 9e0bb2c22..ddf0caf57 100644 --- a/op/op.UpdateDocument.php +++ b/op/op.UpdateDocument.php @@ -77,10 +77,10 @@ if ($_FILES['userfile']['error'] == 0) { if($_POST['dropfolderfileform1']) { $fullfile = $settings->_dropFolderDir.'/'.$user->getLogin().'/'.$_POST["dropfolderfileform1"]; if(file_exists($fullfile)) { - $finfo = finfo_open(FILEINFO_MIME); - $mimetype = explode(';', finfo_file($finfo, $fullfile)); + $finfo = finfo_open(FILEINFO_MIME_TYPE); + $mimetype = finfo_file($finfo, $fullfile); $userfiletmp = $fullfile; - $userfiletype = $mimetype[0]; + $userfiletype = $mimetype; $userfilename= $_POST["dropfolderfileform1"]; } else { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); From b95f7ed91a7c420ed99226e7b994bc212f26c296 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 23 Jun 2015 07:44:47 +0200 Subject: [PATCH 0230/2006] new parameter overrideMimeType --- inc/inc.ClassSettings.php | 4 ++++ op/op.Settings.php | 1 + views/bootstrap/class.Settings.php | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index faaa56f0b..f058b559d 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -127,6 +127,8 @@ class Settings { /* {{{ */ var $_enableVersionModification = false; // enable/disable duplicate names of a document in a folder var $_enableDuplicateDocNames = true; + // override mimetype set by browser when uploading a file + var $_overrideMimeType = false; // enable/disable notification when added as a reviewer/approver var $_enableNotificationAppRev = true; // enable/disable notification of users/group who need to take action for @@ -509,6 +511,7 @@ class Settings { /* {{{ */ $this->_enableVersionDeletion = Settings::boolval($tab["enableVersionDeletion"]); $this->_enableVersionModification = Settings::boolval($tab["enableVersionModification"]); $this->_enableDuplicateDocNames = Settings::boolval($tab["enableDuplicateDocNames"]); + $this->_overrideMimeType = Settings::boolval($tab["overrideMimeType"]); // XML Path: /configuration/advanced/notification $node = $xml->xpath('/configuration/advanced/notification'); @@ -785,6 +788,7 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "enableVersionDeletion", $this->_enableVersionDeletion); $this->setXMLAttributValue($node, "enableVersionModification", $this->_enableVersionModification); $this->setXMLAttributValue($node, "enableDuplicateDocNames", $this->_enableDuplicateDocNames); + $this->setXMLAttributValue($node, "overrideMimeType", $this->_overrideMimeType); // XML Path: /configuration/advanced/notification $node = $this->getXMLNode($xml, '/configuration/advanced', 'notification'); diff --git a/op/op.Settings.php b/op/op.Settings.php index 34bac533e..32a7803ff 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -158,6 +158,7 @@ if ($action == "saveSettings") $settings->_enableVersionDeletion = getBoolValue("enableVersionDeletion"); $settings->_enableVersionModification = getBoolValue("enableVersionModification"); $settings->_enableDuplicateDocNames = getBoolValue("enableDuplicateDocNames"); + $settings->_overrideMimeType = getBoolValue("overrideMimeType"); // SETTINGS - ADVANCED - NOTIFICATION $settings->_enableOwnerNotification = getBoolValue("enableOwnerNotification"); diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 2bcb53478..282f92fc0 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -545,6 +545,10 @@ if(!is_writeable($settings->_configFilePath)) { + "> + + + +
    + + + +
    +
    printProtocol($latestContent, 'receipt'); ?> From cc1c4081bc2dfcad60be5363f36ce8f28e394541 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 24 Mar 2016 15:43:00 +0100 Subject: [PATCH 0444/2006] select user even in status S_LOG_ACCEPTED or S_LOG_REJECTED --- views/bootstrap/class.SetRevisors.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/views/bootstrap/class.SetRevisors.php b/views/bootstrap/class.SetRevisors.php index 88e8417f0..91623ee55 100644 --- a/views/bootstrap/class.SetRevisors.php +++ b/views/bootstrap/class.SetRevisors.php @@ -87,6 +87,8 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Bootstrap_Style { switch ($revisionIndex["i"][$usr->getID()]["status"]) { case S_LOG_WAITING: case S_LOG_SLEEPING: + case S_LOG_ACCEPTED: + case S_LOG_REJECTED: print ""; break; case S_LOG_USER_REMOVED: From 9fec5fd1c01ee8be21bee5f32694db0e2279f85b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 24 Mar 2016 15:57:10 +0100 Subject: [PATCH 0445/2006] use right translation phrase --- views/bootstrap/class.SetReviewersApprovers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.SetReviewersApprovers.php b/views/bootstrap/class.SetReviewersApprovers.php index d6c3aec1d..2e3ec63f5 100644 --- a/views/bootstrap/class.SetReviewersApprovers.php +++ b/views/bootstrap/class.SetReviewersApprovers.php @@ -124,7 +124,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Bootstrap_Style {
    :
    -
    :
    - Date: Thu, 24 Mar 2016 15:59:24 +0100 Subject: [PATCH 0446/2006] set missing variable from view --- views/bootstrap/class.CheckInDocument.php | 1 + 1 file changed, 1 insertion(+) diff --git a/views/bootstrap/class.CheckInDocument.php b/views/bootstrap/class.CheckInDocument.php index 62ec3ecc6..c81e67925 100644 --- a/views/bootstrap/class.CheckInDocument.php +++ b/views/bootstrap/class.CheckInDocument.php @@ -29,6 +29,7 @@ class SeedDMS_View_CheckInDocument extends SeedDMS_Bootstrap_Style { function js() { /* {{{ */ $strictformcheck = $this->params['strictformcheck']; + $dropfolderdir = $this->params['dropfolderdir']; header('Content-Type: application/javascript; charset=UTF-8'); ?> function checkForm() From 8139bebb6a05aed2a348fb8577d1952deff08fa0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 31 Mar 2016 11:34:00 +0200 Subject: [PATCH 0447/2006] add new tables Aros, Acos, ArosAcos to update script --- install/update-5.1.0/update-sqlite3.sql | 27 +++++++++++++++++++++ install/update-5.1.0/update.sql | 32 +++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/install/update-5.1.0/update-sqlite3.sql b/install/update-5.1.0/update-sqlite3.sql index 97b68cfe9..9ddf8ea10 100644 --- a/install/update-5.1.0/update-sqlite3.sql +++ b/install/update-5.1.0/update-sqlite3.sql @@ -111,6 +111,33 @@ DROP TABLE tblUsers; ALTER TABLE new_tblUsers RENAME TO tblUsers; +CREATE TABLE `tblAros` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `parent` INTEGER, + `model` TEXT NOT NULL, + `foreignid` INTEGER NOT NULL DEFAULT '0', + `alias` TEXT +) ; + +CREATE TABLE `tblAcos` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `parent` INTEGER, + `model` TEXT NOT NULL, + `foreignid` INTEGER NOT NULL DEFAULT '0', + `alias` TEXT +) ; + +CREATE TABLE `tblArosAcos` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `aro` INTEGER NOT NULL DEFAULT '0' REFERENCES `tblAros` (`id`) ON DELETE CASCADE, + `aco` INTEGER NOT NULL DEFAULT '0' REFERENCES `tblAcos` (`id`) ON DELETE CASCADE, + `create` INTEGER NOT NULL DEFAULT '-1', + `read` INTEGER NOT NULL DEFAULT '-1', + `update` INTEGER NOT NULL DEFAULT '-1', + `delete` INTEGER NOT NULL DEFAULT '-1', + UNIQUE (aco, aro) +) ; + UPDATE tblVersion set major=5, minor=1, subminor=0; COMMIT; diff --git a/install/update-5.1.0/update.sql b/install/update-5.1.0/update.sql index 3be9c3814..95b36d9bb 100644 --- a/install/update-5.1.0/update.sql +++ b/install/update-5.1.0/update.sql @@ -111,6 +111,38 @@ ALTER TABLE tblUsers CHANGE role role int(11) NOT NULL; UPDATE `tblUsers` SET role=3 WHERE role=0; ALTER TABLE tblUsers ADD CONSTRAINT `tblUsers_role` FOREIGN KEY (`role`) REFERENCES `tblRoles` (`id`); +CREATE TABLE `tblAros` ( + `id` int(11) NOT NULL auto_increment, + `parent` int(11), + `model` text NOT NULL, + `foreignid` int(11) NOT NULL DEFAULT '0', + `alias` varchar(255), + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE `tblAcos` ( + `id` int(11) NOT NULL auto_increment, + `parent` int(11), + `model` text NOT NULL, + `foreignid` int(11) NOT NULL DEFAULT '0', + `alias` varchar(255), + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE `tblArosAcos` ( + `id` int(11) NOT NULL auto_increment, + `aro` int(11) NOT NULL DEFAULT '0', + `aco` int(11) NOT NULL DEFAULT '0', + `create` tinyint(4) NOT NULL DEFAULT '-1', + `read` tinyint(4) NOT NULL DEFAULT '-1', + `update` tinyint(4) NOT NULL DEFAULT '-1', + `delete` tinyint(4) NOT NULL DEFAULT '-1', + PRIMARY KEY (`id`), + UNIQUE (aco, aro), + CONSTRAINT `tblArosAcos_acos` FOREIGN KEY (`aco`) REFERENCES `tblAcos` (`id`) ON DELETE CASCADE, + CONSTRAINT `tblArosAcos_aros` FOREIGN KEY (`aro`) REFERENCES `tblAros` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + UPDATE tblVersion set major=5, minor=1, subminor=0; COMMIT; From ba23fa9073207ce46ec9694a94fd4737a4280fa4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 7 Apr 2016 19:33:49 +0200 Subject: [PATCH 0448/2006] fix take over reviewers/approvers from last version, add field for members of a group --- views/bootstrap/class.CheckInDocument.php | 59 ++++++++++++++--------- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/views/bootstrap/class.CheckInDocument.php b/views/bootstrap/class.CheckInDocument.php index c81e67925..82696db10 100644 --- a/views/bootstrap/class.CheckInDocument.php +++ b/views/bootstrap/class.CheckInDocument.php @@ -31,6 +31,7 @@ class SeedDMS_View_CheckInDocument extends SeedDMS_Bootstrap_Style { $strictformcheck = $this->params['strictformcheck']; $dropfolderdir = $this->params['dropfolderdir']; header('Content-Type: application/javascript; charset=UTF-8'); + $this->printSelectPresetButtonJs(); ?> function checkForm() { @@ -71,25 +72,6 @@ $(document).ready(function() { - "> - -params['dms']; $user = $this->params['user']; @@ -260,7 +242,7 @@ $(document).ready( function() { } } if($tmp) { - $this->__takeOverButton("IndReviewer", $tmp); + $this->printSelectPresetButtonHtml("IndReviewer", $tmp); } /* List all mandatory reviewers */ if($res) { @@ -294,6 +276,20 @@ $(document).ready( function() { ?> +
    + + + - + + + + + + @@ -477,7 +488,7 @@ $(document).ready( function() { } } if($tmp) { - $this->__takeOverButton("GrpApprover", $tmp); + $this->printSelectPresetButtonHtml("GrpApprover", $tmp); } /* List all mandatory groups of approvers */ if($res) { From e3bc75da15c0f2359bcbe86285c7aa88e84c129b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 7 Apr 2016 19:34:42 +0200 Subject: [PATCH 0449/2006] check for $_POST["grpIndApprovers"] and $_POST["grpIndReviewers"] --- op/op.CheckInDocument.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/op/op.CheckInDocument.php b/op/op.CheckInDocument.php index f7e797ec1..78459d678 100644 --- a/op/op.CheckInDocument.php +++ b/op/op.CheckInDocument.php @@ -87,6 +87,16 @@ else $reviewers["g"][] = $grp; } } + // Retrieve the list of reviewer groups whose members become individual reviewers + if (isset($_POST["grpIndReviewers"])) { + foreach ($_POST["grpIndReviewers"] as $grp) { + if($group = $dms->getGroup($grp)) { + $members = $group->getUsers(); + foreach($members as $member) + $reviewers["i"][] = $member->getID(); + } + } + } } // Retrieve the list of individual approvers from the form. @@ -103,6 +113,16 @@ else $approvers["g"][] = $grp; } } + // Retrieve the list of reviewer groups whose members become individual approvers + if (isset($_POST["grpIndApprovers"])) { + foreach ($_POST["grpIndApprovers"] as $grp) { + if($group = $dms->getGroup($grp)) { + $members = $group->getUsers(); + foreach($members as $member) + $approvers["i"][] = $member->getID(); + } + } + } // add mandatory reviewers/approvers $docAccess = $folder->getReadAccessList($settings->_enableAdminRevApp, $settings->_enableOwnerRevApp); From 2caa65add6de806fa7f99031dd45c588dcc7d04e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 8 Apr 2016 12:54:25 +0200 Subject: [PATCH 0450/2006] replace phrase 'role' by 'type' --- views/bootstrap/class.RoleMgr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.RoleMgr.php b/views/bootstrap/class.RoleMgr.php index be2211a6c..00a77bd07 100644 --- a/views/bootstrap/class.RoleMgr.php +++ b/views/bootstrap/class.RoleMgr.php @@ -146,7 +146,7 @@ $(document).ready( function() { - + From 0a87820f9ae7bce810a865463757d0de4ca975c1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 8 Apr 2016 15:10:43 +0200 Subject: [PATCH 0451/2006] SeedDMS_Core_DocumentContent::getAccessMode() takes status into account --- SeedDMS_Core/Core/inc.ClassDocument.php | 82 +++++++++++++++++++++---- 1 file changed, 71 insertions(+), 11 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 8e876d928..403132a93 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -3066,21 +3066,81 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ * @return integer mode */ function getAccessMode($u) { /* {{{ */ - if(!$this->_workflow) - $this->getWorkflow(); + $dms = $this->_document->_dms; + $db = $dms->getDB(); - if($this->_workflow) { - if (!$this->_workflowState) - $this->getWorkflowState(); - $transitions = $this->_workflow->getNextTransitions($this->_workflowState); - foreach($transitions as $transition) { - if($this->triggerWorkflowTransitionIsAllowed($u, $transition)) - return M_READ; + /* If read access isn't further restricted by status, than grant read access */ + if(!$dms->noReadForStatus) + return M_READ; + + /* If the current status is not in list of status without read access, then grant read access */ + if(!in_array($this->getStatus(), $dms->noReadForStatus)) + return M_READ; + + /* At this point the current status is in the list of status without read access. + * The only way to still gain read access is, if the user is involved in the + * process, e.g. is a reviewer, approver or an active person in the workflow. + */ + switch($this->getStatus) { + case S_DRAFT_REV: + $status = $this->getReviewStatus(); + foreach ($status as $r) { + switch ($r["type"]) { + case 0: // Reviewer is an individual. + if($u->getId() == $r["required"]) + return M_READ; + break; + case 1: // Reviewer is a group. + $required = $dms->getGroup($r["required"]); + if (is_object($required) && $required->isMember($u)) + return M_READ; + break; + } } - return M_NONE; + break; + case S_DRAFT_APP: + $status = $this->getApprovalStatus(); + foreach ($status as $r) { + switch ($r["type"]) { + case 0: // Reviewer is an individual. + if($u->getId() == $r["required"]) + return M_READ; + break; + case 1: // Reviewer is a group. + $required = $dms->getGroup($r["required"]); + if (is_object($required) && $required->isMember($u)) + return M_READ; + break; + } + } + break; + case S_RELEASED: + break; + case S_IN_WORKFLOW: + if(!$this->_workflow) + $this->getWorkflow(); + + if($this->_workflow) { + if (!$this->_workflowState) + $this->getWorkflowState(); + $transitions = $this->_workflow->getNextTransitions($this->_workflowState); + foreach($transitions as $transition) { + if($this->triggerWorkflowTransitionIsAllowed($u, $transition)) + return M_READ; + } + } + break; + case S_IN_REVISION: + break; + case S_REJECTED: + break; + case S_OBSOLETE: + break; + case S_EXPIRED: + break; } - return M_READ; + return M_NONE; } /* }}} */ /** From 9786a5182225caa7812dc28311d15cc87778fa9c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Apr 2016 07:44:48 +0200 Subject: [PATCH 0452/2006] add variable noReadForStatus, method getLoggedInUser setting noReadForStatus will allow to check if a version may be accessible in its status --- SeedDMS_Core/Core/inc.ClassDMS.php | 38 ++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 92b57866c..d7f59a120 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -146,6 +146,13 @@ class SeedDMS_Core_DMS { */ public $viewOnlineFileTypes; + /** + * @var array $noReadForStatus list of status without read right + * online + * @access public + */ + public $noReadForStatus; + /** * @var string $version version of pear package * @access public @@ -231,6 +238,12 @@ class SeedDMS_Core_DMS { /** * Filter objects out which are not accessible in a given mode by a user. * + * This function can be used for documents and folders and calls + * {@link SeedDMS_Core_Folder::getAccessMode()} or + * {@link SeedDMS_Core_Document::getAccessMode()}. A document is also + * filtered out if it has no latest content, which can happen if access + * on documents in a certain state has been restricted. + * * @param array $objArr list of objects (either documents or folders) * @param object $user user for which access is checked * @param integer $minMode minimum access mode required @@ -242,8 +255,15 @@ class SeedDMS_Core_DMS { } $newArr = array(); foreach ($objArr as $obj) { - if ($obj->getAccessMode($user) >= $minMode) - array_push($newArr, $obj); + if ($obj->getAccessMode($user) >= $minMode) { + $dms = $obj->_dms; + if(get_class($obj) == $dms->getClassname('document')) { + if($obj->getLatestContent()) + array_push($newArr, $obj); + } else { + array_push($newArr, $obj); + } + } } return $newArr; } /* }}} */ @@ -358,6 +378,7 @@ class SeedDMS_Core_DMS { $this->forceRename = false; $this->enableConverting = false; $this->convertFileTypes = array(); + $this->noReadForStatus = array(); $this->classnames = array(); $this->classnames['folder'] = 'SeedDMS_Core_Folder'; $this->classnames['document'] = 'SeedDMS_Core_Document'; @@ -563,6 +584,19 @@ class SeedDMS_Core_DMS { $this->user = $user; } /* }}} */ + /** + * Get the logged in user + * + * If user authentication was done externally, this function can + * be used to tell the dms who is currently logged in. + * + * @return object $user + * + */ + function getLoggedInUser() { /* {{{ */ + return $this->user; + } /* }}} */ + /** * Return a document by its id * From 130c894a3552bb9d9ccfa476022569eb14211682 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Apr 2016 07:46:37 +0200 Subject: [PATCH 0453/2006] check if version is accessible all functions which return a document version (e.g. getLatestVersion()) will check if access has been restricted by setting SeedDMS_Core_DMS::noReadForStatus --- SeedDMS_Core/Core/inc.ClassDocument.php | 188 ++++++++++++++++++------ 1 file changed, 141 insertions(+), 47 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 2e43188f4..349b911a3 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -199,6 +199,16 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ */ protected $_sequence; + /** + * @var object temp. storage for latestcontent + */ + protected $_latestContent; + + /** + * @var array temp. storage for content + */ + protected $_content; + function __construct($id, $name, $comment, $date, $expires, $ownerID, $folderID, $inheritAccess, $defaultAccess, $locked, $keywords, $sequence) { /* {{{ */ parent::__construct($id); $this->_name = $name; @@ -214,6 +224,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $this->_sequence = $sequence; $this->_categories = array(); $this->_notifyList = array(); + $this->_latestContent = null; + $this->_content = null; } /* }}} */ public static function getInstance($id, $dms) { /* {{{ */ @@ -1560,8 +1572,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return false; } - unset($this->_content); - unset($this->_latestContent); + $this->_content = null; + $this->_latestContent = null; $content = $this->getLatestContent($contentID); // $content = new SeedDMS_Core_DocumentContent($contentID, $this, $version, $comment, $date, $user->getID(), $dir, $orgFileName, $fileType, $mimeType, $filesize, $checksum); if($workflow) @@ -1736,8 +1748,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return false; } - unset($this->_content); - unset($this->_latestContent); + $this->_content = null; + $this->_latestContent = null; $db->commitTransaction(); return true; @@ -1746,7 +1758,9 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ /** * Return all content elements of a document * - * This functions returns an array of content elements ordered by version + * This functions returns an array of content elements ordered by version. + * Version which are not accessible because of its status, will be filtered + * out. * * @return array list of objects of class SeedDMS_Core_DocumentContent */ @@ -1761,8 +1775,16 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $this->_content = array(); $classname = $this->_dms->getClassname('documentcontent'); - foreach ($resArr as $row) - array_push($this->_content, new $classname($row["id"], $this, $row["version"], $row["comment"], $row["date"], $row["createdBy"], $row["dir"], $row["orgFileName"], $row["fileType"], $row["mimeType"], $row['fileSize'], $row['checksum'], $row['revisiondate'])); + $user = $this->_dms->getLoggedInUser(); + foreach ($resArr as $row) { + $content = new $classname($row["id"], $this, $row["version"], $row["comment"], $row["date"], $row["createdBy"], $row["dir"], $row["orgFileName"], $row["fileType"], $row["mimeType"], $row['fileSize'], $row['checksum'], $row['revisiondate']); + if($user) { + if($content->getAccessMode($user) >= M_READ) + array_push($this->_content, $content); + } else { + array_push($this->_content, $content); + } + } } return $this->_content; @@ -1771,8 +1793,12 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ /** * Return the content element of a document with a given version number * + * This function will check if the version is accessible and return false + * if not. + * * @param integer $version version number of content element - * @return object object of class SeedDMS_Core_DocumentContent + * @return object/boolean object of class {@link SeedDMS_Core_DocumentContent} + * or false */ function getContentByVersion($version) { /* {{{ */ if (!is_numeric($version)) return false; @@ -1795,11 +1821,20 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $resArr = $resArr[0]; $classname = $this->_dms->getClassname('documentcontent'); - return new $classname($resArr["id"], $this, $resArr["version"], $resArr["comment"], $resArr["date"], $resArr["createdBy"], $resArr["dir"], $resArr["orgFileName"], $resArr["fileType"], $resArr["mimeType"], $resArr['fileSize'], $resArr['checksum'], $resArr['revisiondate']); + if($content = new $classname($resArr["id"], $this, $resArr["version"], $resArr["comment"], $resArr["date"], $resArr["createdBy"], $resArr["dir"], $resArr["orgFileName"], $resArr["fileType"], $resArr["mimeType"], $resArr['fileSize'], $resArr['checksum'], $resArr['revisiondate'])) { + $user = $this->_dms->getLoggedInUser(); + /* A user with write access on the document may always see the version */ + if($user && $content->getAccessMode($user) == M_NONE) + return false; + else + return $content; + } else { + return false; + } } /* }}} */ - function getLatestContent() { /* {{{ */ - if (!isset($this->_latestContent)) { + function __getLatestContent() { /* {{{ */ + if (!$this->_latestContent) { $db = $this->_dms->getDB(); $queryStr = "SELECT * FROM tblDocumentContent WHERE document = ".$this->_id." ORDER BY version DESC LIMIT 0,1"; $resArr = $db->getResultArray($queryStr); @@ -1815,6 +1850,52 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return $this->_latestContent; } /* }}} */ + /** + * Get the latest version of document + * + * This function returns the latest accessible version of a document. + * If content access has been restricted by setting + * {@link SeedDMS_Core_DMS::noReadForStatus} the function will go + * backwards in history until an accessible version is found. If none + * is found null will be returned. + * + * @return object object of class {@link SeedDMS_Core_DocumentContent} + */ + function getLatestContent() { /* {{{ */ + if (!$this->_latestContent) { + $db = $this->_dms->getDB(); + $queryStr = "SELECT * FROM tblDocumentContent WHERE document = ".$this->_id." ORDER BY version DESC"; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$res) + return false; + + $classname = $this->_dms->getClassname('documentcontent'); + $user = $this->_dms->getLoggedInUser(); + foreach ($resArr as $row) { + if (!$this->_latestContent) { + $content = new $classname($row["id"], $this, $row["version"], $row["comment"], $row["date"], $row["createdBy"], $row["dir"], $row["orgFileName"], $row["fileType"], $row["mimeType"], $row['fileSize'], $row['checksum'], $row['revisiondate']); + if($user) { + /* If the user may even write the document, then also allow to see all content. + * This is needed because the user could upload a new version + */ + if($content->getAccessMode($user) >= M_READ) { + $this->_latestContent = $content; + } + } else { + $this->_latestContent = $content; + } + } + } + } + + return $this->_latestContent; + } /* }}} */ + + /** + * Remove a certain version + * + * @param integer $version version number + */ function removeContent($version) { /* {{{ */ $db = $this->_dms->getDB(); @@ -3054,19 +3135,19 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ /** * Returns the access mode similar to a document - * There is no real access mode for document content, so this is more - * like a virtual access mode, derived from the status or workflow - * of the document content. The idea is to return an access mode - * M_NONE if the user is still in a workflow or under review/approval. - * In such a case only those user involved in the workflow/review/approval - * process should be allowed to see the document. This method could - * be called by any function that returns the content e.g. getLatestContent() - * It may as well be used by SeedDMS_Core_Document::getAccessMode() to - * prevent access on the whole document if there is just one version. - * The return value is planed to be either M_NONE or M_READ. * - * @param object $user - * @return integer mode + * There is no real access mode for document content, so this is more + * like a virtual access mode, derived from the status of the document + * content. The function checks if {@link SeedDMS_Core_DMS::noReadForStatus} + * contains the status of the version and returns M_NONE if it exists and + * the user is not involved in a workflow or review/approval. + * This method is called by all functions that returns the content e.g. + * {@link SeedDMS_Core_Document::getLatestContent()} + * It is also used by {@link SeedDMS_Core_Document::getAccessMode()} to + * prevent access on the whole document if there is no accessible version. + * + * @param object $u user + * @return integer either M_NONE or M_READ */ function getAccessMode($u) { /* {{{ */ $dms = $this->_document->_dms; @@ -3077,44 +3158,57 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return M_READ; /* If the current status is not in list of status without read access, then grant read access */ - if(!in_array($this->getStatus(), $dms->noReadForStatus)) + if(!in_array($this->getStatus()['status'], $dms->noReadForStatus)) return M_READ; + /* Administrators have unrestricted access */ + if ($u->isAdmin()) return M_READ; + + /* The owner of the document has unrestricted access */ + $owner = $this->_document->getOwner(); + if ($u->getID() == $owner->getID()) return M_READ; + + /* Read/Write access on the document will also grant access on the version */ + if($this->_document->getAccessMode($user) >= M_READWRITE) return M_READ; + /* At this point the current status is in the list of status without read access. * The only way to still gain read access is, if the user is involved in the * process, e.g. is a reviewer, approver or an active person in the workflow. */ - switch($this->getStatus) { + $s = $this->getStatus(); + switch($s['status']) { case S_DRAFT_REV: $status = $this->getReviewStatus(); foreach ($status as $r) { - switch ($r["type"]) { - case 0: // Reviewer is an individual. - if($u->getId() == $r["required"]) - return M_READ; - break; - case 1: // Reviewer is a group. - $required = $dms->getGroup($r["required"]); - if (is_object($required) && $required->isMember($u)) - return M_READ; - break; - } + if($r['status'] != -2) // Check if reviewer was removed + switch ($r["type"]) { + case 0: // Reviewer is an individual. + if($u->getId() == $r["required"]) + return M_READ; + break; + case 1: // Reviewer is a group. + $required = $dms->getGroup($r["required"]); + if (is_object($required) && $required->isMember($u)) + return M_READ; + break; + } } break; case S_DRAFT_APP: $status = $this->getApprovalStatus(); foreach ($status as $r) { - switch ($r["type"]) { - case 0: // Reviewer is an individual. - if($u->getId() == $r["required"]) - return M_READ; - break; - case 1: // Reviewer is a group. - $required = $dms->getGroup($r["required"]); - if (is_object($required) && $required->isMember($u)) - return M_READ; - break; - } + if($r['status'] != -2) // Check if approver was removed + switch ($r["type"]) { + case 0: // Reviewer is an individual. + if($u->getId() == $r["required"]) + return M_READ; + break; + case 1: // Reviewer is a group. + $required = $dms->getGroup($r["required"]); + if (is_object($required) && $required->isMember($u)) + return M_READ; + break; + } } break; case S_RELEASED: From be8be01ed533590efa32950cd343a6d04d109a6d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Apr 2016 07:54:22 +0200 Subject: [PATCH 0454/2006] check if getLatestContent() returns a version --- inc/inc.ClassAccessOperation.php | 121 +++++++++++++++++-------------- 1 file changed, 67 insertions(+), 54 deletions(-) diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index 0e350a951..0eb6f48ab 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -64,11 +64,12 @@ class SeedDMS_AccessOperation { */ function mayEditVersion($document) { /* {{{ */ if(get_class($document) == $this->dms->getClassname('document')) { - $version = $document->getLatestContent(); - if (!isset($this->settings->_editOnlineFileTypes) || !is_array($this->settings->_editOnlineFileTypes) || !in_array(strtolower($version->getFileType()), $this->settings->_editOnlineFileTypes)) - return false; - if ($document->getAccessMode($this->user) == M_ALL || $this->user->isAdmin()) { - return true; + if($latestContent = $document->getLatestContent()) { + if (!isset($this->settings->_editOnlineFileTypes) || !is_array($this->settings->_editOnlineFileTypes) || !in_array(strtolower($latestContent->getFileType()), $this->settings->_editOnlineFileTypes)) + return false; + if ($document->getAccessMode($this->user) == M_ALL || $this->user->isAdmin()) { + return true; + } } } return false; @@ -105,10 +106,11 @@ class SeedDMS_AccessOperation { */ function mayOverrideStatus($document) { /* {{{ */ if(get_class($document) == $this->dms->getClassname('document')) { - $latestContent = $document->getLatestContent(); - $status = $latestContent->getStatus(); - if ((($this->settings->_enableVersionModification && ($document->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]==S_DRAFT || $status["status"]==S_RELEASED || $status["status"]==S_OBSOLETE)) { - return true; + if($latestContent = $document->getLatestContent()) { + $status = $latestContent->getStatus(); + if ((($this->settings->_enableVersionModification && ($document->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]==S_DRAFT || $status["status"]==S_RELEASED || $status["status"]==S_OBSOLETE)) { + return true; + } } } return false; @@ -125,10 +127,11 @@ class SeedDMS_AccessOperation { */ function maySetReviewersApprovers($document) { /* {{{ */ if(get_class($document) == $this->dms->getClassname('document')) { - $latestContent = $document->getLatestContent(); - $status = $latestContent->getStatus(); - if ((($this->settings->_enableVersionModification && ($document->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status['status']==S_DRAFT || $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP && $this->settings->_workflowMode == 'traditional_only_approval')) { - return true; + if($latestContent = $document->getLatestContent()) { + $status = $latestContent->getStatus(); + if ((($this->settings->_enableVersionModification && ($document->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status['status']==S_DRAFT || $status["status"]==S_DRAFT_REV || $status["status"]==S_DRAFT_APP && $this->settings->_workflowMode == 'traditional_only_approval')) { + return true; + } } } return false; @@ -145,10 +148,11 @@ class SeedDMS_AccessOperation { */ function maySetRecipients($document) { /* {{{ */ if(get_class($document) == $this->dms->getClassname('document')) { - $latestContent = $document->getLatestContent(); - $status = $latestContent->getStatus(); - if ((($this->settings->_enableVersionModification && ($document->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]==S_RELEASED)) { - return true; + if($latestContent = $document->getLatestContent()) { + $status = $latestContent->getStatus(); + if ((($this->settings->_enableVersionModification && ($document->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]==S_RELEASED)) { + return true; + } } } return false; @@ -165,10 +169,11 @@ class SeedDMS_AccessOperation { */ function maySetRevisors($document) { /* {{{ */ if(get_class($document) == $this->dms->getClassname('document')) { - $latestContent = $document->getLatestContent(); - $status = $latestContent->getStatus(); - if ((($this->settings->_enableVersionModification && ($document->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]==S_RELEASED || $status["status"]==S_IN_REVISION)) { - return true; + if($latestContent = $document->getLatestContent()) { + $status = $latestContent->getStatus(); + if ((($this->settings->_enableVersionModification && ($document->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && ($status["status"]==S_RELEASED || $status["status"]==S_IN_REVISION)) { + return true; + } } } return false; @@ -185,10 +190,11 @@ class SeedDMS_AccessOperation { */ function maySetWorkflow($document) { /* {{{ */ if(get_class($document) == $this->dms->getClassname('document')) { - $latestContent = $document->getLatestContent(); - $workflow = $latestContent->getWorkflow(); - if ((($this->settings->_enableVersionModification && ($document->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && (!$workflow || ($workflow->getInitState()->getID() == $latestContent->getWorkflowState()->getID()))) { - return true; + if($latestContent = $document->getLatestContent()) { + $workflow = $latestContent->getWorkflow(); + if ((($this->settings->_enableVersionModification && ($document->getAccessMode($this->user) == M_ALL)) || $this->user->isAdmin()) && (!$workflow || ($workflow->getInitState()->getID() == $latestContent->getWorkflowState()->getID()))) { + return true; + } } } return false; @@ -202,10 +208,11 @@ class SeedDMS_AccessOperation { */ function maySetExpires($document) { /* {{{ */ if(get_class($document) == $this->dms->getClassname('document')) { - $latestContent = $document->getLatestContent(); - $status = $latestContent->getStatus(); - if ((($document->getAccessMode($this->user) == M_ALL) || $this->user->isAdmin()) && ($status["status"]!=S_OBSOLETE)) { - return true; + if($latestContent = $document->getLatestContent()) { + $status = $latestContent->getStatus(); + if ((($document->getAccessMode($this->user) == M_ALL) || $this->user->isAdmin()) && ($status["status"]!=S_OBSOLETE)) { + return true; + } } } return false; @@ -228,10 +235,11 @@ class SeedDMS_AccessOperation { return false; } } - $latestContent = $document->getLatestContent(); - $status = $latestContent->getStatus(); - if ((($this->settings->_enableVersionModification && ($document->getAccessMode($this->user) >= M_READWRITE)) || $this->user->isAdmin()) && ($status["status"]!=S_OBSOLETE)) { - return true; + if($latestContent = $document->getLatestContent()) { + $status = $latestContent->getStatus(); + if ((($this->settings->_enableVersionModification && ($document->getAccessMode($this->user) >= M_READWRITE)) || $this->user->isAdmin()) && ($status["status"]!=S_OBSOLETE)) { + return true; + } } } return false; @@ -248,11 +256,12 @@ class SeedDMS_AccessOperation { */ function mayEditAttributes($document) { /* {{{ */ if(get_class($document) == $this->dms->getClassname('document')) { - $latestContent = $document->getLatestContent(); - $status = $latestContent->getStatus(); - $workflow = $latestContent->getWorkflow(); - if ((($this->settings->_enableVersionModification && ($document->getAccessMode($this->user) >= M_READWRITE)) || $this->user->isAdmin()) && ($status["status"]==S_DRAFT_REV || ($workflow && $workflow->getInitState()->getID() == $latestContent->getWorkflowState()->getID()))) { - return true; + if($latestContent = $document->getLatestContent()) { + $status = $latestContent->getStatus(); + $workflow = $latestContent->getWorkflow(); + if ((($this->settings->_enableVersionModification && ($document->getAccessMode($this->user) >= M_READWRITE)) || $this->user->isAdmin()) && ($status["status"]==S_DRAFT_REV || ($workflow && $workflow->getInitState()->getID() == $latestContent->getWorkflowState()->getID()))) { + return true; + } } } return false; @@ -267,10 +276,11 @@ class SeedDMS_AccessOperation { */ function mayReview($document) { /* {{{ */ if(get_class($document) == $this->dms->getClassname('document')) { - $latestContent = $document->getLatestContent(); - $status = $latestContent->getStatus(); - if ($status["status"]!=S_OBSOLETE) { - return true; + if($latestContent = $document->getLatestContent()) { + $status = $latestContent->getStatus(); + if ($status["status"]!=S_OBSOLETE) { + return true; + } } } return false; @@ -286,10 +296,11 @@ class SeedDMS_AccessOperation { */ function mayApprove($document) { /* {{{ */ if(get_class($document) == $this->dms->getClassname('document')) { - $latestContent = $document->getLatestContent(); - $status = $latestContent->getStatus(); - if ($status["status"]!=S_OBSOLETE && $status["status"]!=S_DRAFT_REV && $status["status"]!=S_REJECTED) { - return true; + if($latestContent = $document->getLatestContent()) { + $status = $latestContent->getStatus(); + if ($status["status"]!=S_OBSOLETE && $status["status"]!=S_DRAFT_REV && $status["status"]!=S_REJECTED) { + return true; + } } } return false; @@ -304,10 +315,11 @@ class SeedDMS_AccessOperation { */ function mayReceipt($document) { /* {{{ */ if(get_class($document) == $this->dms->getClassname('document')) { - $latestContent = $document->getLatestContent(); - $status = $latestContent->getStatus(); - if ($status["status"]!=S_OBSOLETE) { - return true; + if($latestContent = $document->getLatestContent()) { + $status = $latestContent->getStatus(); + if ($status["status"]!=S_OBSOLETE) { + return true; + } } } return false; @@ -322,10 +334,11 @@ class SeedDMS_AccessOperation { */ function mayRevise($document) { /* {{{ */ if(get_class($document) == $this->dms->getClassname('document')) { - $latestContent = $document->getLatestContent(); - $status = $latestContent->getStatus(); - if ($status["status"]!=S_OBSOLETE) { - return true; + if($latestContent = $document->getLatestContent()) { + $status = $latestContent->getStatus(); + if ($status["status"]!=S_OBSOLETE) { + return true; + } } } return false; From fb73b9c92223fbf48287444f4a7d80ffd49d3f10 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Apr 2016 07:55:15 +0200 Subject: [PATCH 0455/2006] get $user from view in mainMenu() --- views/bootstrap/class.Bootstrap.php | 1 + 1 file changed, 1 insertion(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 0c0a3da42..02c42c3f0 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1605,6 +1605,7 @@ $(function() { */ function mainClipboard($clipboard, $previewer){ /* {{{ */ $dms = $this->params['dms']; + $user = $this->params['user']; $content = ''; $foldercount = $doccount = 0; if($clipboard['folders']) { From 3654906e9a31afae99b9434b2636a7ff0c68dc9d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Apr 2016 07:56:53 +0200 Subject: [PATCH 0456/2006] set $dms->noReadForStatus (still commented out) --- inc/inc.DBInit.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/inc.DBInit.php b/inc/inc.DBInit.php index 1519dd4e0..ad458f90f 100644 --- a/inc/inc.DBInit.php +++ b/inc/inc.DBInit.php @@ -56,6 +56,7 @@ $dms->setRootFolderID($settings->_rootFolderID); $dms->setMaxDirID($settings->_maxDirID); $dms->setEnableConverting($settings->_enableConverting); $dms->setViewOnlineFileTypes($settings->_viewOnlineFileTypes); +//$dms->noReadForStatus = array(S_DRAFT, S_DRAFT_REV/*, S_DRAFT_APP*/); if(isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) { From 50cf128471fa4536f1e49830d97370bc25d95cbe Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Apr 2016 08:48:12 +0200 Subject: [PATCH 0457/2006] replace phrase 'type' with 'role_type' --- views/bootstrap/class.RoleMgr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.RoleMgr.php b/views/bootstrap/class.RoleMgr.php index 00a77bd07..f807f8435 100644 --- a/views/bootstrap/class.RoleMgr.php +++ b/views/bootstrap/class.RoleMgr.php @@ -146,7 +146,7 @@ $(document).ready( function() { - + From 7a84ffee5e0d5a07e0b048a91c42b90d6dadddae Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Apr 2016 09:17:35 +0200 Subject: [PATCH 0458/2006] fix typo in description of extension --- ext/example/conf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/example/conf.php b/ext/example/conf.php index c6fd2ce56..931cc14a4 100644 --- a/ext/example/conf.php +++ b/ext/example/conf.php @@ -1,7 +1,7 @@ 'Example Extension', - 'description' => 'This sample extension demonstrate the use of various hooks', + 'description' => 'This sample extension demonstrates the use of various hooks', 'disable' => true, 'version' => '1.0.0', 'releasedate' => '2013-05-03', From 0511d06d6335d37847010435bee8d456e7559528 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Apr 2016 12:21:55 +0200 Subject: [PATCH 0459/2006] add field for access restrictions by document status --- SeedDMS_Core/Core/inc.ClassUser.php | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassUser.php b/SeedDMS_Core/Core/inc.ClassUser.php index 3a18a60b2..4f55bbc29 100644 --- a/SeedDMS_Core/Core/inc.ClassUser.php +++ b/SeedDMS_Core/Core/inc.ClassUser.php @@ -44,6 +44,13 @@ class SeedDMS_Core_Role { /* {{{ */ */ var $_role; + /** + * @var array list of status without access + * + * @access protected + */ + var $_noaccess; + /** * @var object reference to the dms instance this user belongs to * @@ -55,10 +62,11 @@ class SeedDMS_Core_Role { /* {{{ */ const role_admin = '1'; const role_guest = '2'; - function SeedDMS_Core_Role($id, $name, $role) { /* {{{ */ + function SeedDMS_Core_Role($id, $name, $role, $noaccess=array()) { /* {{{ */ $this->_id = $id; $this->_name = $name; $this->_role = $role; + $this->_noaccess = $noaccess; $this->_dms = $role; } /* }}} */ @@ -91,7 +99,7 @@ class SeedDMS_Core_Role { /* {{{ */ $resArr = $resArr[0]; - $role = new self($resArr["id"], $resArr["name"], $resArr["role"]); + $role = new self($resArr["id"], $resArr["name"], $resArr["role"], $resArr['noaccess'] ? explode(',', $resArr['noaccess']) : array()); $role->setDMS($dms); return $role; } /* }}} */ @@ -111,7 +119,7 @@ class SeedDMS_Core_Role { /* {{{ */ $roles = array(); for ($i = 0; $i < count($resArr); $i++) { - $role = new self($resArr[$i]["id"], $resArr[$i]["name"], $resArr[$i]["role"]); + $role = new self($resArr[$i]["id"], $resArr[$i]["name"], $resArr[$i]["role"], explode(',', $resArr[$i]['noaccess'])); $role->setDMS($dms); $roles[$i] = $role; } @@ -156,6 +164,19 @@ class SeedDMS_Core_Role { /* {{{ */ return true; } /* }}} */ + function getNoAccess() { return $this->_noaccess; } + + function setNoAccess($noaccess) { /* {{{ */ + $db = $this->_dms->getDB(); + + $queryStr = "UPDATE tblRoles SET noaccess = " . $db->qstr(implode(',',$noaccess)) . " WHERE id = " . $this->_id; + if (!$db->getResult($queryStr)) + return false; + + $this->_noaccess = $noaccess; + return true; + } /* }}} */ + /** * Delete role * From 6278dd8df364c596366c451ae9cba1689c027d3d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Apr 2016 12:22:36 +0200 Subject: [PATCH 0460/2006] set access restrictions by role --- inc/inc.Authentication.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/inc.Authentication.php b/inc/inc.Authentication.php index 5c1134dd6..9ff61afe4 100644 --- a/inc/inc.Authentication.php +++ b/inc/inc.Authentication.php @@ -92,6 +92,8 @@ $theme = $resArr["theme"]; $lang = $resArr["language"]; $dms->setUser($user); +$role = $user->getRole(); +$dms->noReadForStatus = $role->getNoAccess(); $notifier = new SeedDMS_NotificationService(); From 795eb1e028e56194f4dc23089e0149c0b6acce0d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Apr 2016 12:23:04 +0200 Subject: [PATCH 0461/2006] manage access restrictions --- op/op.RoleMgr.php | 2 ++ views/bootstrap/class.RoleMgr.php | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/op/op.RoleMgr.php b/op/op.RoleMgr.php index 73e0656b9..8b2080014 100644 --- a/op/op.RoleMgr.php +++ b/op/op.RoleMgr.php @@ -116,11 +116,13 @@ else if ($action == "editrole") { $name = $_POST["name"]; $role = preg_replace('/[^0-2]+/', '', $_POST["role"]); + $noaccess = isset($_POST['noaccess']) ? $_POST['noaccess'] : null; if ($editedRole->getName() != $name) $editedRole->setName($name); if ($editedRole->getRole() != $role) $editedRole->setRole($role); + $editedRole->setNoAccess($noaccess); $session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_edit_role'))); add_log_line(".php&action=editrole&roleid=".$roleid); diff --git a/views/bootstrap/class.RoleMgr.php b/views/bootstrap/class.RoleMgr.php index f807f8435..031d77238 100644 --- a/views/bootstrap/class.RoleMgr.php +++ b/views/bootstrap/class.RoleMgr.php @@ -149,6 +149,18 @@ $(document).ready( function() { +getRole() == SeedDMS_Core_Role::role_user) { + echo ""; + echo ""; + echo ""; + echo ""; + } +?> From 5bdc6fe3cca554dcc62d2f68f214987a6d814be7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Apr 2016 12:23:26 +0200 Subject: [PATCH 0462/2006] filter result by new access restrictions derived from status --- out/out.Search.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/out/out.Search.php b/out/out.Search.php index 8110dfc26..dd312a21b 100644 --- a/out/out.Search.php +++ b/out/out.Search.php @@ -143,9 +143,11 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSe foreach($hits as $hit) { if($tmp = $dms->getDocument($hit['document_id'])) { if($tmp->getAccessMode($user) >= M_READ) { - $tmp->verifyLastestContentExpriry(); - $entries[] = $tmp; - $dcount++; + if($tmp->getLatestContent()) { + $tmp->verifyLastestContentExpriry(); + $entries[] = $tmp; + $dcount++; + } } } } @@ -383,9 +385,11 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSe if($resArr['docs']) { foreach ($resArr['docs'] as $entry) { if ($entry->getAccessMode($user) >= M_READ) { - $entry->verifyLastestContentExpriry(); - $entries[] = $entry; - $dcount++; + if($entry->getLatestContent()) { + $entry->verifyLastestContentExpriry(); + $entries[] = $entry; + $dcount++; + } } } } From ece56944d825026a940bddaf8294dbb440a23c7b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Apr 2016 12:23:57 +0200 Subject: [PATCH 0463/2006] add new field noAccess in tblRoles --- install/create_tables-innodb.sql | 1 + install/create_tables-sqlite3.sql | 1 + install/update-5.1.0/update-sqlite3.sql | 1 + install/update-5.1.0/update.sql | 1 + 4 files changed, 4 insertions(+) diff --git a/install/create_tables-innodb.sql b/install/create_tables-innodb.sql index 4cf60c387..83af2822f 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -54,6 +54,7 @@ CREATE TABLE `tblRoles` ( `id` int(11) NOT NULL auto_increment, `name` varchar(50) default NULL, `role` smallint(1) NOT NULL default '0', + `noaccess` varchar(30) NOT NULL default '', PRIMARY KEY (`id`), UNIQUE (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/install/create_tables-sqlite3.sql b/install/create_tables-sqlite3.sql index 4241e437c..1bd57c948 100644 --- a/install/create_tables-sqlite3.sql +++ b/install/create_tables-sqlite3.sql @@ -51,6 +51,7 @@ CREATE TABLE `tblRoles` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` varchar(50) default NULL, `role` INTEGER NOT NULL default '0', + `noaccess` varchar(30) NOT NULL default '', UNIQUE (`name`) ) ; diff --git a/install/update-5.1.0/update-sqlite3.sql b/install/update-5.1.0/update-sqlite3.sql index 9ddf8ea10..6d136b90b 100644 --- a/install/update-5.1.0/update-sqlite3.sql +++ b/install/update-5.1.0/update-sqlite3.sql @@ -77,6 +77,7 @@ CREATE TABLE `tblRoles` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` varchar(50) default NULL, `role` INTEGER NOT NULL default '0', + `noaccess` varchar(30) NOT NULL default '', UNIQUE (`name`) ); diff --git a/install/update-5.1.0/update.sql b/install/update-5.1.0/update.sql index 95b36d9bb..a68b965e9 100644 --- a/install/update-5.1.0/update.sql +++ b/install/update-5.1.0/update.sql @@ -98,6 +98,7 @@ CREATE TABLE `tblRoles` ( `id` int(11) NOT NULL auto_increment, `name` varchar(50) default NULL, `role` smallint(1) NOT NULL default '0', + `noaccess` varchar(30) NOT NULL default '', PRIMARY KEY (`id`), UNIQUE (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; From f7118a6ac3963f50df79ec1f0478c4ad2b0514e4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Apr 2016 15:30:19 +0200 Subject: [PATCH 0464/2006] fix notes of 1.1.8 --- SeedDMS_Preview/package.xml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/SeedDMS_Preview/package.xml b/SeedDMS_Preview/package.xml index dac0947e3..ee7067f3a 100644 --- a/SeedDMS_Preview/package.xml +++ b/SeedDMS_Preview/package.xml @@ -23,16 +23,7 @@ GPL License -<<<<<<< HEAD -- Converters to create preview images are no longer fixed. Those which has been hardcoded before remain the predefined converters, but they can also be changed. -- command for creating the preview will be called with a given timeout -add method getFilesize() -timeout for external commands can be passed to contructor of SeedDMS_Preview_Previewer -check if object passed to createPreview(), hasPreview() is not null -set last parameter of stream_select() to 200000 micro sec. in case the timeout in sec. is set to 0 -======= pass variables to stream_select (required by php7) ->>>>>>> seeddms-5.0.x From daa4066c044571ad200876809965e2bf8c09de27 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Apr 2016 17:22:04 +0200 Subject: [PATCH 0465/2006] show access restrictions for all role types except admin --- views/bootstrap/class.RoleMgr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.RoleMgr.php b/views/bootstrap/class.RoleMgr.php index 031d77238..76e0ba1c1 100644 --- a/views/bootstrap/class.RoleMgr.php +++ b/views/bootstrap/class.RoleMgr.php @@ -150,7 +150,7 @@ $(document).ready( function() { getRole() == SeedDMS_Core_Role::role_user) { + if($currRole && $currRole->getRole() != SeedDMS_Core_Role::role_admin) { echo ""; echo ""; echo " - +
    "> Export: _enableDuplicateDocNames) echo "checked" ?> />
    :_overrideMimeType) echo "checked" ?> />
    +
    :
    +
    + +
    :
    @@ -329,7 +325,7 @@ $(document).ready( function() { } } if($tmp) { - $this->__takeOverButton("GrpReviewer", $tmp); + $this->printSelectPresetButtonHtml("GrpReviewer", $tmp); } /* List all mandatory groups of reviewers */ if($res) { @@ -407,7 +403,7 @@ $(document).ready( function() { } } if($tmp) { - $this->__takeOverButton("IndApprover", $tmp); + $this->printSelectPresetButtonHtml("IndApprover", $tmp); } /* List all mandatory approvers */ if($res) { @@ -441,7 +437,22 @@ $(document).ready( function() { } ?>
    +
    :
    +
    + +
    :
    ">
    ::
    ">
    ::
    :
    ".getMLText('restrict_access').""; + foreach(array(S_DRAFT_REV, S_DRAFT_APP, S_IN_WORKFLOW, S_REJECTED, S_RELEASED, S_IN_REVISION, S_DRAFT, S_OBSOLETE) as $status) { + echo "getNoAccess()) ? "checked" : "")."> ".getOverallStatusText($status)."
    "; + } + echo "
    ".getMLText('restrict_access').""; From d2b2bd0226d385ebc874e4ed856cdcb88d9fe99e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 Apr 2016 08:47:33 +0200 Subject: [PATCH 0466/2006] check() returns true/false again --- inc/inc.ClassAcl.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/inc/inc.ClassAcl.php b/inc/inc.ClassAcl.php index 5fbd7e8ed..27ff9691e 100644 --- a/inc/inc.ClassAcl.php +++ b/inc/inc.ClassAcl.php @@ -42,6 +42,15 @@ class SeedDMS_Acl { /* {{{ */ $this->_dms = $dms; } /* }}} */ + /** + * Check if Aro has access on Aco + * + * @param object $aro access request object + * @param object $aco access control object + * @return integer/boolean -1 if access is explictly denied, 1 if access + * is explictly allow, 0 if no access restrictions exists, false if + * an error occured. + */ public function check($aro, $aco) { /* {{{ */ $db = $this->_dms->getDB(); @@ -52,12 +61,12 @@ class SeedDMS_Acl { /* {{{ */ if (is_bool($resArr) && $resArr === false) return false; if (count($resArr) == 1) - return($resArr[0]['read'] == 1 ? true : false); + return((int) $resArr[0]['read']); $aco = $aco->getParent(); } - return false; + return 0; } /* }}} */ public function toggle($aro, $aco) { /* {{{ */ From e22ca653edc76e4b2a15720de7c4da618a9c7f72 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 Apr 2016 08:48:23 +0200 Subject: [PATCH 0467/2006] check_view_access() returns true/false and also takes admin role into account --- inc/inc.ClassAccessOperation.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index 0eb6f48ab..7303803a6 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -348,11 +348,16 @@ class SeedDMS_AccessOperation { * Check for access permission on view * * If the parameter $view is an array then each element is considered the - * name of a view and true will be returned if one is accesible. + * name of a view and true will be returned if one is accessible. + * Whether access is allowed also depends on the currently logged in user + * stored in the view object. If the user is an admin the access + * on a view must be explicitly disallowed. For regular users the access + * must be explicitly allowed. * * @param mixed $view Instanz of view, name of view or array of view names * @param string $get query parameters - * @return boolean true if access is allowed otherwise false + * @return boolean true if access is allowed, false if access is disallowed + * no specific access right is set, otherwise false */ function check_view_access($view, $get=array()) { /* {{{ */ if(!$this->settings->_advancedAcl) @@ -373,7 +378,8 @@ class SeedDMS_AccessOperation { $this->_aro = SeedDMS_Aro::getInstance($this->user->getRole(), $this->dms); foreach($scripts as $script) { $aco = SeedDMS_Aco::getInstance($scope.'/'.$script.'/'.$action, $this->dms); - if($acl->check($this->_aro, $aco)) + $ll = $acl->check($this->_aro, $aco); + if($ll === 1 && !$this->user->isAdmin() || $ll !== -1 && $this->user->isAdmin()) return true; } return false; From 4c15aa7c4923013acb7ce068e264afdbd60eab4b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 Apr 2016 08:49:32 +0200 Subject: [PATCH 0468/2006] check_access() doesn't check for admin anymore check_view_access() does it now --- inc/inc.ClassViewCommon.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index c0fb7ba81..00ecbe8f3 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -171,13 +171,30 @@ class SeedDMS_View_Common { * Check if the access on the view with given name or the current view itself * may be accessed. * + * The function behaves differently for admins and other users. For admins + * a view must be explitly disallowed for this function to return false. + * For other users access on a view must be explicitly allow for the this + * function to return true. + * * @param string|array $name name of view or list of view names * @return boolean true if access is allowed otherwise false */ protected function check_access($name='') { /* {{{ */ if(!$name) $name = $this; - return ((isset($this->params['user']) && $this->params['user']->isAdmin()) || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access($name))); + if(!isset($this->params['accessobject'])) + return false; + $access = $this->params['accessobject']->check_view_access($name); + return $access; + + if(isset($this->params['user']) && $this->params['user']->isAdmin()) { + if($access === -1) + return false; + else + return true; + } + + return ($access === 1); } /* }}} */ /** From 23e3011d8295fc806658696c7ba4eebbe2604954 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 Apr 2016 08:50:27 +0200 Subject: [PATCH 0469/2006] use access check --- out/out.Acl.php | 2 +- out/out.AdminTools.php | 2 +- out/out.AttributeMgr.php | 8 +++++--- out/out.BackupTools.php | 8 +++++--- out/out.Calendar.php | 9 +++++++-- out/out.Categories.php | 3 ++- out/out.Charts.php | 6 ++++-- out/out.CreateIndex.php | 8 +++++--- out/out.DefaultKeywords.php | 10 +++++++--- out/out.ExtensionMgr.php | 8 +++++--- out/out.GroupMgr.php | 3 ++- out/out.Hooks.php | 9 ++++++--- out/out.ImportFS.php | 8 +++++--- out/out.IndexInfo.php | 8 +++++--- out/out.Indexer.php | 8 +++++--- out/out.Info.php | 2 +- out/out.LogManagement.php | 11 ++++++++--- out/out.ObjectCheck.php | 3 ++- out/out.RemoveArchive.php | 7 ++++--- out/out.RemoveDump.php | 7 ++++--- out/out.RemoveFolderFiles.php | 7 ++++--- out/out.RemoveGroup.php | 7 ++++--- out/out.RemoveLog.php | 7 ++++--- out/out.RemoveUser.php | 7 ++++--- out/out.RemoveWorkflow.php | 7 ++++--- out/out.RemoveWorkflowFromDocument.php | 10 ++++------ out/out.RewindWorkflow.php | 10 ++++------ out/out.RoleMgr.php | 2 +- out/out.Settings.php | 9 ++++++--- out/out.Statistic.php | 9 ++++++--- out/out.Timeline.php | 8 +++++--- out/out.UserList.php | 3 ++- out/out.UsrMgr.php | 2 +- out/out.WorkflowActionsMgr.php | 7 ++++--- out/out.WorkflowMgr.php | 7 ++++--- out/out.WorkflowStatesMgr.php | 7 ++++--- 36 files changed, 145 insertions(+), 94 deletions(-) diff --git a/out/out.Acl.php b/out/out.Acl.php index 04efdb7bf..f6665ef48 100644 --- a/out/out.Acl.php +++ b/out/out.Acl.php @@ -28,7 +28,7 @@ include("../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, $user, $settings); -if (!$accessop->check_view_access($view, $_GET) && !$user->isAdmin()) { +if (!$accessop->check_view_access($view, $_GET)) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } diff --git a/out/out.AdminTools.php b/out/out.AdminTools.php index 4b02373c5..780a8946a 100644 --- a/out/out.AdminTools.php +++ b/out/out.AdminTools.php @@ -27,7 +27,7 @@ include("../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, $user, $settings); -if (!$accessop->check_view_access($view, $_GET) && !$user->isAdmin()) { +if (!$accessop->check_view_access($view, $_GET)) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } diff --git a/out/out.AttributeMgr.php b/out/out.AttributeMgr.php index 44d6748fb..d35029a79 100644 --- a/out/out.AttributeMgr.php +++ b/out/out.AttributeMgr.php @@ -32,7 +32,10 @@ include("../inc/inc.Authentication.php"); */ require_once("SeedDMS/Preview.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -44,8 +47,6 @@ if(isset($_GET['attrdefid']) && $_GET['attrdefid']) { $selattrdef = null; } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('attrdefs', $attrdefs); $view->setParam('selattrdef', $selattrdef); @@ -55,6 +56,7 @@ if($view) { $view->setParam('maxRecursiveCount', $settings->_maxRecursiveCount); $view->setParam('previewWidthList', $settings->_previewWidthList); $view->setParam('timeout', $settings->_cmdTimeout); + $view->setParam('accessobject', $accessop); $view($_GET); } diff --git a/out/out.BackupTools.php b/out/out.BackupTools.php index 25e4fb75d..dd861aabe 100644 --- a/out/out.BackupTools.php +++ b/out/out.BackupTools.php @@ -25,17 +25,19 @@ include("../inc/inc.Utils.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { if($settings->_backupDir && file_exists($settings->_backupDir)) $view->setParam('backupdir', $settings->_backupDir); else $view->setParam('backupdir', $settings->_contentDir); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.Calendar.php b/out/out.Calendar.php index f32994371..6a79e2e3c 100644 --- a/out/out.Calendar.php +++ b/out/out.Calendar.php @@ -25,6 +25,13 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../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, $user, $settings); +if (!$accessop->check_view_access($view, $_GET)) { + UI::exitError(getMLText("calendar"),getMLText("access_denied")); +} + if ($_GET["mode"]) $mode=$_GET["mode"]; // get required date else use current @@ -37,8 +44,6 @@ else $month = (int)date("m", $currDate); if (isset($_GET["day"])&&is_numeric($_GET["day"])) $day=$_GET["day"]; else $day = (int)date("d", $currDate); -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('mode', $mode); $view->setParam('year', $year); diff --git a/out/out.Categories.php b/out/out.Categories.php index 049e12163..5ea509876 100644 --- a/out/out.Categories.php +++ b/out/out.Categories.php @@ -29,7 +29,7 @@ include("../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, $user, $settings); -if (!$accessop->check_view_access($view, $_GET) && !$user->isAdmin()) { +if (!$accessop->check_view_access($view, $_GET)) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } @@ -44,5 +44,6 @@ if(isset($_GET['categoryid']) && $_GET['categoryid']) { if($view) { $view->setParam('categories', $categories); $view->setParam('selcategory', $selcat); + $view->setParam('accessobject', $accessop); $view($_GET); } diff --git a/out/out.Charts.php b/out/out.Charts.php index 56c8166ce..98b5f51b9 100644 --- a/out/out.Charts.php +++ b/out/out.Charts.php @@ -27,10 +27,11 @@ include("../inc/inc.Authentication.php"); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); - -if (!$user->isAdmin()) { +$accessop = new SeedDMS_AccessOperation($dms, $user, $settings); +if (!$accessop->check_view_access($view, $_GET)) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } + $rootfolder = $dms->getFolder($settings->_rootFolderID); $type = 'docsperuser'; @@ -50,6 +51,7 @@ if($view) { $view->setParam('rootfolder', $rootfolder); $view->setParam('type', $type); $view->setParam('data', $data); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.CreateIndex.php b/out/out.CreateIndex.php index 39bb6c176..6ea0380c8 100644 --- a/out/out.CreateIndex.php +++ b/out/out.CreateIndex.php @@ -29,7 +29,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -37,10 +40,9 @@ if(!$settings->_enableFullSearch) { UI::exitError(getMLText("admin_tools"),getMLText("fulltextsearch_disabled")); } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('enablefullsearch', $settings->_enableFullSearch); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.DefaultKeywords.php b/out/out.DefaultKeywords.php index fa5b616a4..d8b153ebc 100644 --- a/out/out.DefaultKeywords.php +++ b/out/out.DefaultKeywords.php @@ -26,7 +26,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -37,9 +40,10 @@ else $categories = $dms->getAllUserKeywordCategories($user->getID()); -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'categories'=>$categories, 'selcategoryid'=>$selcategoryid)); if($view) { + $view->setParam('categories', $categories); + $view->setParam('selcategoryid', $selcategoryid); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.ExtensionMgr.php b/out/out.ExtensionMgr.php index 11a0cc871..f5eb48963 100644 --- a/out/out.ExtensionMgr.php +++ b/out/out.ExtensionMgr.php @@ -25,17 +25,19 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } $v = new SeedDMS_Version; -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('httproot', $settings->_httpRoot); $view->setParam('version', $v); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.GroupMgr.php b/out/out.GroupMgr.php index 4fdd806b5..250a125e0 100644 --- a/out/out.GroupMgr.php +++ b/out/out.GroupMgr.php @@ -35,7 +35,7 @@ require_once("SeedDMS/Preview.php"); $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) && !$user->isAdmin()) { +if (!$accessop->check_view_access($view, $_GET)) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } @@ -64,5 +64,6 @@ if($view) { $view->setParam('previewWidthList', $settings->_previewWidthList); $view->setParam('workflowmode', $settings->_workflowMode); $view->setParam('timeout', $settings->_cmdTimeout); + $view->setParam('accessobject', $accessop); $view($_GET); } diff --git a/out/out.Hooks.php b/out/out.Hooks.php index 63870eb9e..ac452281d 100644 --- a/out/out.Hooks.php +++ b/out/out.Hooks.php @@ -24,13 +24,16 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'settings'=>$settings)); if($view) { + $view->setParam('settings', $settings); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.ImportFS.php b/out/out.ImportFS.php index ff9a44ded..8b352cd17 100644 --- a/out/out.ImportFS.php +++ b/out/out.ImportFS.php @@ -23,13 +23,15 @@ include("../inc/inc.Language.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'dropfolderdir'=>$settings->_dropFolderDir)); if($view) { + $view->setParam('dropfolderdir', $settings->_dropFolderDir); $view($_GET); exit; } diff --git a/out/out.IndexInfo.php b/out/out.IndexInfo.php index 34e1f6367..15aaca03d 100644 --- a/out/out.IndexInfo.php +++ b/out/out.IndexInfo.php @@ -28,7 +28,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -41,12 +44,11 @@ if(!$index) { UI::exitError(getMLText("admin_tools"),getMLText("no_fulltextindex")); } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('luceneclassdir', $settings->_luceneClassDir); $view->setParam('lucenedir', $settings->_luceneDir); $view->setParam('index', $index); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.Indexer.php b/out/out.Indexer.php index 89e549e35..43ea6af13 100644 --- a/out/out.Indexer.php +++ b/out/out.Indexer.php @@ -29,7 +29,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -64,8 +67,6 @@ else { } $folder = $dms->getFolder($folderid); -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('index', $index); $view->setParam('indexconf', $indexconf); @@ -73,6 +74,7 @@ if($view) { $view->setParam('folder', $folder); $view->setParam('converters', $settings->_converters['fulltext']); $view->setParam('timeout', $settings->_cmdTimeout); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.Info.php b/out/out.Info.php index d32d5d338..a41cf366d 100644 --- a/out/out.Info.php +++ b/out/out.Info.php @@ -30,7 +30,7 @@ include("../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, $user, $settings); -if (!$accessop->check_view_access($view, $_GET) && !$user->isAdmin()) { +if (!$accessop->check_view_access($view, $_GET)) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } diff --git a/out/out.LogManagement.php b/out/out.LogManagement.php index 599094ba6..7e483ba55 100644 --- a/out/out.LogManagement.php +++ b/out/out.LogManagement.php @@ -25,7 +25,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -35,9 +38,11 @@ else $logname=NULL; if (isset($_GET["mode"])) $mode=$_GET["mode"]; else $mode='web'; -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'logname'=>$logname, 'mode'=>$mode, 'contentdir'=>$settings->_contentDir)); if($view) { + $view->setParam('logname', $logname); + $view->setParam('mode', $mode); + $view->setParam('contentdir', $settings->_contentDir); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.ObjectCheck.php b/out/out.ObjectCheck.php index d1868c44d..f3a682e4f 100644 --- a/out/out.ObjectCheck.php +++ b/out/out.ObjectCheck.php @@ -31,7 +31,7 @@ include("../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, $user, $settings); -if (!$accessop->check_view_access($view, $_GET) && !$user->isAdmin()) { +if (!$accessop->check_view_access($view, $_GET)) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } @@ -81,6 +81,7 @@ if($view) { $view->setParam('setchecksum', $setchecksum); $view->setParam('repair', $repair); $view->setParam('rootfolder', $rootfolder); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.RemoveArchive.php b/out/out.RemoveArchive.php index 2d11942f3..d8bc7b1d0 100644 --- a/out/out.RemoveArchive.php +++ b/out/out.RemoveArchive.php @@ -24,7 +24,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -34,8 +37,6 @@ if (!isset($_GET["arkname"]) || !file_exists($settings->_contentDir.$_GET["arkna $arkname = $_GET["arkname"]; -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('archive', $arkname); $view($_GET); diff --git a/out/out.RemoveDump.php b/out/out.RemoveDump.php index 7b182bf87..6d32bf837 100644 --- a/out/out.RemoveDump.php +++ b/out/out.RemoveDump.php @@ -24,7 +24,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -34,8 +37,6 @@ if (!isset($_GET["dumpname"]) || !file_exists($settings->_contentDir.$_GET["dump $dumpname = $_GET["dumpname"]; -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('dumpfile', $dumpname); $view($_GET); diff --git a/out/out.RemoveFolderFiles.php b/out/out.RemoveFolderFiles.php index c9a1eab0b..e201426a0 100644 --- a/out/out.RemoveFolderFiles.php +++ b/out/out.RemoveFolderFiles.php @@ -24,7 +24,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -38,8 +41,6 @@ if (!is_object($folder)) { UI::exitError(getMLText("admin_tools"),getMLText("invalid_folder_id")); } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('folder', $folder); $view($_GET); diff --git a/out/out.RemoveGroup.php b/out/out.RemoveGroup.php index d995d1893..8f3c4b48a 100644 --- a/out/out.RemoveGroup.php +++ b/out/out.RemoveGroup.php @@ -26,7 +26,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -39,8 +42,6 @@ if (!is_object($group)) { UI::exitError(getMLText("rm_group"),getMLText("invalid_group_id")); } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('group', $group); $view($_GET); diff --git a/out/out.RemoveLog.php b/out/out.RemoveLog.php index 5b4202a3f..5d579ca47 100644 --- a/out/out.RemoveLog.php +++ b/out/out.RemoveLog.php @@ -24,7 +24,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -48,8 +51,6 @@ foreach($lognames as $file) { } } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('lognames', $lognames); $view->setParam('mode', $mode); diff --git a/out/out.RemoveUser.php b/out/out.RemoveUser.php index 8717bf430..214b7e1d6 100644 --- a/out/out.RemoveUser.php +++ b/out/out.RemoveUser.php @@ -26,7 +26,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -49,8 +52,6 @@ if ($rmuser->getID()==$user->getID()) { $allusers = $dms->getAllUsers($settings->_sortUsersInList); -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('rmuser', $rmuser); $view->setParam('allusers', $allusers); diff --git a/out/out.RemoveWorkflow.php b/out/out.RemoveWorkflow.php index 77da1890d..6f7ffbc6c 100644 --- a/out/out.RemoveWorkflow.php +++ b/out/out.RemoveWorkflow.php @@ -27,7 +27,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -40,8 +43,6 @@ if (!is_object($workflow)) { UI::exitError(getMLText("workflow_title"),getMLText("invalid_workflow_id")); } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('workflow', $workflow); $view($_GET); diff --git a/out/out.RemoveWorkflowFromDocument.php b/out/out.RemoveWorkflowFromDocument.php index 52729944b..ae841a829 100644 --- a/out/out.RemoveWorkflowFromDocument.php +++ b/out/out.RemoveWorkflowFromDocument.php @@ -28,7 +28,10 @@ include("../inc/inc.ClassUI.php"); include("../inc/inc.ClassAccessOperation.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -59,11 +62,6 @@ if (!is_object($workflow)) { $folder = $document->getFolder(); -/* Create object for checking access to certain operations */ -$accessop = new SeedDMS_AccessOperation($dms, $user, $settings); - -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('folder', $folder); $view->setParam('document', $document); diff --git a/out/out.RewindWorkflow.php b/out/out.RewindWorkflow.php index 52729944b..ae841a829 100644 --- a/out/out.RewindWorkflow.php +++ b/out/out.RewindWorkflow.php @@ -28,7 +28,10 @@ include("../inc/inc.ClassUI.php"); include("../inc/inc.ClassAccessOperation.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -59,11 +62,6 @@ if (!is_object($workflow)) { $folder = $document->getFolder(); -/* Create object for checking access to certain operations */ -$accessop = new SeedDMS_AccessOperation($dms, $user, $settings); - -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('folder', $folder); $view->setParam('document', $document); diff --git a/out/out.RoleMgr.php b/out/out.RoleMgr.php index 1873fde98..1c720d2a8 100644 --- a/out/out.RoleMgr.php +++ b/out/out.RoleMgr.php @@ -29,7 +29,7 @@ include("../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, $user, $settings); -if (!$accessop->check_view_access($view, $_GET) && !$user->isAdmin()) { +if (!$accessop->check_view_access($view, $_GET)) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } diff --git a/out/out.Settings.php b/out/out.Settings.php index 99fe2025e..271f089ac 100644 --- a/out/out.Settings.php +++ b/out/out.Settings.php @@ -24,7 +24,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -32,9 +35,9 @@ if (!$user->isAdmin()) { if(!trim($settings->_encryptionKey)) $settings->_encryptionKey = md5(uniqid()); -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'settings'=>$settings, 'currenttab'=>(isset($_REQUEST['currenttab']) ? $_REQUEST['currenttab'] : ''))); if($view) { + $view->setParam('settings', $settings); + $view->setParam('currenttab', (isset($_REQUEST['currenttab']) ? $_REQUEST['currenttab'] : '')); $view($_GET); exit; } diff --git a/out/out.Statistic.php b/out/out.Statistic.php index 7c390d1c0..22861debc 100644 --- a/out/out.Statistic.php +++ b/out/out.Statistic.php @@ -25,14 +25,17 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } $rootfolder = $dms->getFolder($settings->_rootFolderID); -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'rootfolder'=>$rootfolder)); if($view) { + $view->setParam('rootfolder', $rootfolder); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.Timeline.php b/out/out.Timeline.php index e3f993870..a4760d9e3 100644 --- a/out/out.Timeline.php +++ b/out/out.Timeline.php @@ -30,7 +30,10 @@ include("../inc/inc.Authentication.php"); */ require_once("SeedDMS/Preview.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } $rootfolder = $dms->getFolder($settings->_rootFolderID); @@ -53,8 +56,6 @@ if(isset($_GET['version']) && $_GET['version'] && is_numeric($_GET['version'])) } else $content = null; -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('fromdate', isset($_GET['fromdate']) ? $_GET['fromdate'] : ''); $view->setParam('todate', isset($_GET['todate']) ? $_GET['todate'] : ''); @@ -65,6 +66,7 @@ if($view) { $view->setParam('previewWidthList', $settings->_previewWidthList); $view->setParam('previewWidthDetail', $settings->_previewWidthDetail); $view->setParam('timeout', $settings->_cmdTimeout); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.UserList.php b/out/out.UserList.php index f95547e96..6d9e7e34d 100644 --- a/out/out.UserList.php +++ b/out/out.UserList.php @@ -28,7 +28,7 @@ include("../inc/inc.ClassPasswordStrength.php"); $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) && !$user->isAdmin()) { +if (!$accessop->check_view_access($view, $_GET)) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } @@ -39,6 +39,7 @@ if($view) { $view->setParam('httproot', $settings->_httpRoot); $view->setParam('quota', $settings->_quota); $view->setParam('pwdexpiration', $settings->_passwordExpiration); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.UsrMgr.php b/out/out.UsrMgr.php index 2a5688f20..dc8160101 100644 --- a/out/out.UsrMgr.php +++ b/out/out.UsrMgr.php @@ -29,7 +29,7 @@ include("../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, $user, $settings); -if (!$accessop->check_view_access($view, $_GET) && !$user->isAdmin()) { +if (!$accessop->check_view_access($view, $_GET)) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } diff --git a/out/out.WorkflowActionsMgr.php b/out/out.WorkflowActionsMgr.php index 60b509d79..fa1307649 100644 --- a/out/out.WorkflowActionsMgr.php +++ b/out/out.WorkflowActionsMgr.php @@ -27,7 +27,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -42,8 +45,6 @@ if (is_bool($workflowactions)) { UI::exitError(getMLText("admin_tools"),getMLText("internal_error")); } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('allworkflowactions', $workflowactions); $view->setParam('selworkflowaction', $selworkflowaction); diff --git a/out/out.WorkflowMgr.php b/out/out.WorkflowMgr.php index aac3249ae..bdfbcab3d 100644 --- a/out/out.WorkflowMgr.php +++ b/out/out.WorkflowMgr.php @@ -27,7 +27,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -47,8 +50,6 @@ if(isset($_GET['workflowid']) && $_GET['workflowid']) { $selworkflow = null; } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('selworkflow', $selworkflow); $view->setParam('allworkflows', $workflows); diff --git a/out/out.WorkflowStatesMgr.php b/out/out.WorkflowStatesMgr.php index c8de1f7c7..4380a3737 100644 --- a/out/out.WorkflowStatesMgr.php +++ b/out/out.WorkflowStatesMgr.php @@ -27,7 +27,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); -if (!$user->isAdmin()) { +$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("admin_tools"),getMLText("access_denied")); } @@ -37,8 +40,6 @@ if(isset($_GET['workflowstateid']) && $_GET['workflowstateid']) { $selworkflowstate = null; } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('selworkflowstate', $selworkflowstate); $view($_GET); From e527a6d1769b33321b840af71e95e3a8ef59b77c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 Apr 2016 08:51:03 +0200 Subject: [PATCH 0470/2006] fix access check and add new debug menu item --- views/bootstrap/class.Bootstrap.php | 60 ++++++++++++++++++----------- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 02c42c3f0..ebfb54343 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -406,7 +406,7 @@ $(document).ready(function () { echo "
      \n"; // echo "
    • params['rootfolderid']."\">".getMLText("content")."
    • \n"; // echo "
    • params['rootfolderid']."\">".getMLText("search")."
    • \n"; - if ($this->params['enablecalendar']) echo "
    • params['calendardefaultview']."\">".getMLText("calendar")."
    • \n"; + if ($this->params['enablecalendar'] && $this->check_access('Calendar')) echo "
    • params['calendardefaultview']."\">".getMLText("calendar")."
    • \n"; if ($this->check_access('AdminTools')) echo "
    • ".getMLText("admin_tools")."
    • \n"; if($this->params['enablehelp']) { $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); @@ -680,15 +680,15 @@ $(document).ready(function () { echo "
    • \n"; echo " ".getMLText("user_group_management")." \n"; echo "
        \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('UsrMgr'))) + if ($this->check_access('UsrMgr')) echo "
      • ".getMLText("user_management")."
      • \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('RoleMgr'))) + if ($this->check_access('RoleMgr')) echo "
      • ".getMLText("role_management")."
      • \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('GroupMgr'))) + if ($this->check_access('GroupMgr')) echo "
      • ".getMLText("group_management")."
      • \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('UserList'))) + if ($this->check_access('UserList')) echo "
      • ".getMLText("user_list")."
      • \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('Acl'))) + if ($this->check_access('Acl')) echo "
      • ".getMLText("access_control")."
      • \n"; echo "
      \n"; echo "
    • \n"; @@ -700,18 +700,18 @@ $(document).ready(function () { echo "
    • \n"; echo " ".getMLText("definitions")." \n"; echo "
        \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('DefaultKeywords'))) + if ($this->check_access('DefaultKeywords')) echo "
      • ".getMLText("global_default_keywords")."
      • \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('Categories'))) + if ($this->check_access('Categories')) echo "
      • ".getMLText("global_document_categories")."
      • \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('AttributeMgr'))) + if ($this->check_access('AttributeMgr')) echo "
      • ".getMLText("global_attributedefinitions")."
      • \n"; if($this->params['workflowmode'] == 'advanced') { - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('WorkflowMgr'))) + if ($this->check_access('WorkflowMgr')) echo "
      • ".getMLText("global_workflows")."
      • \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('WorkflowStatesMgr'))) + if ($this->check_access('WorkflowStatesMgr')) echo "
      • ".getMLText("global_workflow_states")."
      • \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('WorkflowActionsMgr'))) + if ($this->check_access('WorkflowActionsMgr')) echo "
      • ".getMLText("global_workflow_actions")."
      • \n"; } echo "
      \n"; @@ -725,11 +725,11 @@ $(document).ready(function () { echo "
    • \n"; echo " ".getMLText("fullsearch")." \n"; echo "
        \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('Indexer'))) + if ($this->check_access('Indexer')) echo "
      • ".getMLText("update_fulltext_index")."
      • \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('CreateIndex'))) + if ($this->check_access('CreateIndex')) echo "
      • ".getMLText("create_fulltext_index")."
      • \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('IndexInfo'))) + if ($this->check_access('IndexInfo')) echo "
      • ".getMLText("fulltext_info")."
      • \n"; echo "
      \n"; echo "
    • \n"; @@ -742,10 +742,10 @@ $(document).ready(function () { echo "
    • \n"; echo " ".getMLText("backup_log_management")." \n"; echo "
        \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('BackupTools'))) + if ($this->check_access('BackupTools')) echo "
      • ".getMLText("backup_tools")."
      • \n"; if ($this->params['logfileenable']) - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('LogManagement'))) + if ($this->check_access('LogManagement')) echo "
      • ".getMLText("log_management")."
      • \n"; echo "
      \n"; echo "
    • \n"; @@ -757,23 +757,37 @@ $(document).ready(function () { echo "
    • \n"; echo " ".getMLText("misc")." \n"; echo "
        \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('Statistic'))) + if ($this->check_access('Statistic')) echo "
      • ".getMLText("folders_and_documents_statistic")."
      • \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('Charts'))) + if ($this->check_access('Charts')) echo "
      • ".getMLText("charts")."
      • \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('Timeline'))) + if ($this->check_access('Timeline')) echo "
      • ".getMLText("timeline")."
      • \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('ObjectCheck'))) + if ($this->check_access('ObjectCheck')) echo "
      • ".getMLText("objectcheck")."
      • \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('ExtensionMgr'))) + if ($this->check_access('ImportFS')) + echo "
      • ".getMLText("importfs")."
      • \n"; + if ($this->check_access('ExtensionMgr')) echo "
      • ".getMLText("extension_manager")."
      • \n"; - if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('Info'))) + if ($this->check_access('Info')) echo "
      • ".getMLText("version_info")."
      • \n"; echo "
      \n"; echo "
    • \n"; echo "
    \n"; } + if($this->check_access(array('Hooks'))) { + echo " \n"; + } + echo "
      \n"; echo "
    \n"; echo "\n"; From 46602c744b9809bb7cf337760aefbf23778cfb75 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 Apr 2016 08:51:34 +0200 Subject: [PATCH 0471/2006] check for access on RemoveGroup --- views/bootstrap/class.GroupMgr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.GroupMgr.php b/views/bootstrap/class.GroupMgr.php index f04581e39..951e19309 100644 --- a/views/bootstrap/class.GroupMgr.php +++ b/views/bootstrap/class.GroupMgr.php @@ -165,7 +165,7 @@ $(document).ready( function() { ?> check_access('RemoveGroup')) { ?> From 46b36ba7e5b5cdfca5447073293109236d04bf9e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 Apr 2016 08:51:57 +0200 Subject: [PATCH 0472/2006] check for access on RemoveUser --- views/bootstrap/class.UserList.php | 3 ++- views/bootstrap/class.UsrMgr.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.UserList.php b/views/bootstrap/class.UserList.php index 1ccd3ff2f..931f7e3fc 100644 --- a/views/bootstrap/class.UserList.php +++ b/views/bootstrap/class.UserList.php @@ -106,7 +106,8 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style { echo ""; echo ""; diff --git a/views/bootstrap/class.UsrMgr.php b/views/bootstrap/class.UsrMgr.php index 30c4b77cb..6b4560857 100644 --- a/views/bootstrap/class.UsrMgr.php +++ b/views/bootstrap/class.UsrMgr.php @@ -185,7 +185,7 @@ $(document).ready( function() { ?>
    "; echo "
    "; - echo "getID()."\"> "; + echo "getID()."\"> "; + if ($this->check_access('RemoveUser')) echo "getID()."\">"; echo "
    "; echo "
    getID(), $undeluserids)) { + if($currUser && !in_array($currUser->getID(), $undeluserids) && $this->check_access('RemoveUser')) { ?> From a3e0f6eb7d71c82d4d2cf422786fff15eaafaecc Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 Apr 2016 08:56:51 +0200 Subject: [PATCH 0473/2006] fix inclusion of files --- out/out.ImportFS.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/out/out.ImportFS.php b/out/out.ImportFS.php index 8b352cd17..ab071388a 100644 --- a/out/out.ImportFS.php +++ b/out/out.ImportFS.php @@ -17,9 +17,10 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. include("../inc/inc.Settings.php"); -include("../inc/inc.DBInit.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"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); From 64470891ba56f1fa264bec862d051657f6826580 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 Apr 2016 10:53:57 +0200 Subject: [PATCH 0474/2006] set accessobject for view --- out/out.ImportFS.php | 1 + 1 file changed, 1 insertion(+) diff --git a/out/out.ImportFS.php b/out/out.ImportFS.php index ab071388a..8dff5cccd 100644 --- a/out/out.ImportFS.php +++ b/out/out.ImportFS.php @@ -33,6 +33,7 @@ if (!$accessop->check_view_access($view, $_GET)) { if($view) { $view->setParam('dropfolderdir', $settings->_dropFolderDir); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } From e96e94d471ba9677ab279492c5208b99bd890980 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 Apr 2016 10:54:12 +0200 Subject: [PATCH 0475/2006] use translated strings --- views/bootstrap/class.Hooks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Hooks.php b/views/bootstrap/class.Hooks.php index b3c50af14..2e16594d7 100644 --- a/views/bootstrap/class.Hooks.php +++ b/views/bootstrap/class.Hooks.php @@ -39,7 +39,7 @@ class SeedDMS_View_Hooks extends SeedDMS_Bootstrap_Style { echo "
    \n"; echo ""; - echo "\n"; + echo "\n"; echo ""; echo ""; foreach(array('controller', 'view') as $type) { @@ -71,7 +71,7 @@ class SeedDMS_View_Hooks extends SeedDMS_Bootstrap_Style { $this->globalNavigation(); $this->contentStart(); $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); - $this->contentHeading("Hooks"); + $this->contentHeading(getMLText("list_hooks")); self::list_hooks(); From b80cb91d542f36255dacc398883f6b24d029e09c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 Apr 2016 18:29:21 +0200 Subject: [PATCH 0476/2006] check if parameter of setNoAccess() is set before using it --- SeedDMS_Core/Core/inc.ClassUser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassUser.php b/SeedDMS_Core/Core/inc.ClassUser.php index 4f55bbc29..1f77848b6 100644 --- a/SeedDMS_Core/Core/inc.ClassUser.php +++ b/SeedDMS_Core/Core/inc.ClassUser.php @@ -169,7 +169,7 @@ class SeedDMS_Core_Role { /* {{{ */ function setNoAccess($noaccess) { /* {{{ */ $db = $this->_dms->getDB(); - $queryStr = "UPDATE tblRoles SET noaccess = " . $db->qstr(implode(',',$noaccess)) . " WHERE id = " . $this->_id; + $queryStr = "UPDATE tblRoles SET noaccess = " . $db->qstr($noaccess ? implode(',',$noaccess) : '') . " WHERE id = " . $this->_id; if (!$db->getResult($queryStr)) return false; From 94682fb0ffc53686b91faefdf0a40567e43b5f83 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 Apr 2016 18:29:58 +0200 Subject: [PATCH 0477/2006] copy code from check_view_access() to check_controller_access() --- inc/inc.ClassAccessOperation.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index 7303803a6..303b72ff2 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -414,7 +414,8 @@ class SeedDMS_AccessOperation { $this->_aro = SeedDMS_Aro::getInstance($this->user->getRole(), $this->dms); foreach($scripts as $script) { $aco = SeedDMS_Aco::getInstance($scope.'/'.$script.'/'.$action, $this->dms); - if($acl->check($this->_aro, $aco)) + $ll = $acl->check($this->_aro, $aco); + if($ll === 1 && !$this->user->isAdmin() || $ll !== -1 && $this->user->isAdmin()) return true; } return false; From caf1501c89fae6af1853f20bcbb83d90999e98b8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 Apr 2016 18:30:54 +0200 Subject: [PATCH 0478/2006] add mehtod __invoke() --- inc/inc.ClassControllerCommon.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/inc/inc.ClassControllerCommon.php b/inc/inc.ClassControllerCommon.php index 308872d43..cff8df973 100644 --- a/inc/inc.ClassControllerCommon.php +++ b/inc/inc.ClassControllerCommon.php @@ -41,6 +41,24 @@ class SeedDMS_Controller_Common { $this->errormsg = ''; } + /** + * Call methods with name in $get['action'] + * + * @params array $get $_GET or $_POST variables + * @return mixed return value of called method + */ + function __invoke($get=array()) { + if(isset($get['action']) && $get['action']) { + if(method_exists($this, $get['action'])) { + return $this->{$get['action']}(); + } else { + echo "Missing action '".$get['action']."'"; + return false; + } + } else + return $this->run(); + } + function setParams($params) { $this->params = $params; } From 7e24402671a9d09505a8ca88ef3c3a3c62186b3e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 Apr 2016 18:31:28 +0200 Subject: [PATCH 0479/2006] place code into controller --- controllers/class.RoleMgr.php | 56 ++++++++++++++++ op/op.RoleMgr.php | 121 +++++++++++++++++----------------- 2 files changed, 116 insertions(+), 61 deletions(-) create mode 100644 controllers/class.RoleMgr.php diff --git a/controllers/class.RoleMgr.php b/controllers/class.RoleMgr.php new file mode 100644 index 000000000..fa11b08c0 --- /dev/null +++ b/controllers/class.RoleMgr.php @@ -0,0 +1,56 @@ + + * @copyright Copyright (C) 2010-2013 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Class which does the busines logic for role manager + * + * @category DMS + * @package SeedDMS + * @author Uwe Steinmann + * @copyright Copyright (C) 2010-2013 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_Controller_RoleMgr extends SeedDMS_Controller_Common { + + public function run() { + } + + public function addrole() { + $dms = $this->params['dms']; + $name = $this->params['name']; + $role = $this->params['role']; + + return($dms->addRole($name, $role)); + } + + public function removerole() { + $roleobj = $this->params['roleobj']; + return $roleobj->remove(); + } + + public function editrole() { + $dms = $this->params['dms']; + $name = $this->params['name']; + $role = $this->params['role']; + $roleobj = $this->params['roleobj']; + $noaccess = $this->params['noaccess']; + + if ($roleobj->getName() != $name) + $roleobj->setName($name); + if ($roleobj->getRole() != $role) + $roleobj->setRole($role); + $roleobj->setNoAccess($noaccess); + + return true; + } +} diff --git a/op/op.RoleMgr.php b/op/op.RoleMgr.php index 8b2080014..2bfa947f2 100644 --- a/op/op.RoleMgr.php +++ b/op/op.RoleMgr.php @@ -27,51 +27,29 @@ include("../inc/inc.Init.php"); include("../inc/inc.Extension.php"); include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); +include("../inc/inc.ClassController.php"); include("../inc/inc.Authentication.php"); -include("../inc/inc.ClassPasswordStrength.php"); -if (!$user->isAdmin()) { +$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); +$controller = Controller::factory($tmp[1]); +$accessop = new SeedDMS_AccessOperation($dms, $user, $settings); +if (!$accessop->check_controller_access($controller, $_POST)) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } if (isset($_POST["action"])) $action=$_POST["action"]; else $action=NULL; -// add new role --------------------------------------------------------- -if ($action == "addrole") { - - /* Check if the form data comes for a trusted request */ - if(!checkFormKey('addrole')) { - UI::exitError(getMLText("admin_tools"),getMLText("invalid_request_token")); - } +if(!in_array($action, array('addrole', 'removerole', 'editrole'))) + UI::exitError(getMLText("admin_tools"),getMLText("unknown_command")); - $name = $_POST["name"]; - $role = preg_replace('/[^0-2]+/', '', $_POST["role"]); - - if (is_object($dms->getRoleByName($name))) { - UI::exitError(getMLText("admin_tools"),getMLText("role_exists")); - } - - $newRole = $dms->addRole($name, $role); - if ($newRole) { - } - else UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); - - $roleid=$newRole->getID(); - - $session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_add_role'))); - - add_log_line(".php&action=addrole&name=".$name); +/* Check if the form data comes for a trusted request */ +if(!checkFormKey($action)) { + UI::exitError(getMLText("admin_tools"),getMLText("invalid_request_token")); } -// delete role ------------------------------------------------------------ -else if ($action == "removerole") { - - /* Check if the form data comes for a trusted request */ - if(!checkFormKey('removerole')) { - UI::exitError(getMLText("admin_tools"),getMLText("invalid_request_token")); - } - +$roleid = 0; +if(in_array($action, array('removerole', 'editrole'))) { if (isset($_POST["roleid"])) { $roleid = $_POST["roleid"]; } @@ -80,16 +58,52 @@ else if ($action == "removerole") { UI::exitError(getMLText("admin_tools"),getMLText("invalid_role_id")); } - $roleToRemove = $dms->getRole($roleid); - if (!is_object($roleToRemove)) { + $roleobj = $dms->getRole($roleid); + + if (!is_object($roleobj)) { UI::exitError(getMLText("admin_tools"),getMLText("invalid_role_id")); } - if (!$roleToRemove->remove()) { + $controller->setParam('roleobj', $roleobj); +} + +// add new role --------------------------------------------------------- +if ($action == "addrole") { + + $name = $_POST["name"]; + $role = preg_replace('/[^0-2]+/', '', $_POST["role"]); + + if (is_object($dms->getRoleByName($name))) { + UI::exitError(getMLText("admin_tools"),getMLText("role_exists")); + } + + if ($role === '') { + UI::exitError(getMLText("admin_tools"),getMLText("missing_role_type")); + } + + $controller->setParam('name', $name); + $controller->setParam('role', $role); + + $newRole = $controller($_POST); + if ($newRole) { + } + else UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); + + $roleid=$newRole->getID(); + + $session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_add_role'))); + + add_log_line(".php&action=".$action."&name=".$name); +} + +// delete role ------------------------------------------------------------ +else if ($action == "removerole") { + + if (!$controller($_POST)) { UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); } - add_log_line(".php&action=removerole&roleid=".$roleid); + add_log_line(".php&action=".$action."&roleid=".$roleid); $session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_rm_role'))); $roleid=-1; @@ -98,36 +112,21 @@ else if ($action == "removerole") { // modify role ------------------------------------------------------------ else if ($action == "editrole") { - /* Check if the form data comes for a trusted request */ - if(!checkFormKey('editrole')) { - UI::exitError(getMLText("admin_tools"),getMLText("invalid_request_token")); - } - - if (!isset($_POST["roleid"]) || !is_numeric($_POST["roleid"]) || intval($_POST["roleid"])<1) { - UI::exitError(getMLText("admin_tools"),getMLText("invalid_role_id")); - } - - $roleid=$_POST["roleid"]; - $editedRole = $dms->getRole($roleid); - - if (!is_object($editedRole)) { - UI::exitError(getMLText("admin_tools"),getMLText("invalid_role_id")); - } - $name = $_POST["name"]; $role = preg_replace('/[^0-2]+/', '', $_POST["role"]); $noaccess = isset($_POST['noaccess']) ? $_POST['noaccess'] : null; - if ($editedRole->getName() != $name) - $editedRole->setName($name); - if ($editedRole->getRole() != $role) - $editedRole->setRole($role); - $editedRole->setNoAccess($noaccess); + $controller->setParam('name', $name); + $controller->setParam('role', $role); + $controller->setParam('noaccess', $noaccess); + + if (!$controller($_POST)) { + UI::exitError(getMLText("admin_tools"),getMLText("error_occured")); + } $session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_edit_role'))); - add_log_line(".php&action=editrole&roleid=".$roleid); + add_log_line(".php&action=".$action."&roleid=".$roleid); } -else UI::exitError(getMLText("admin_tools"),getMLText("unknown_command")); header("Location:../out/out.RoleMgr.php?roleid=".$roleid); From 87231513614d536c224f26b1e9c0a5a35a69f8dd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 13 Apr 2016 18:31:42 +0200 Subject: [PATCH 0480/2006] check for access rights on controller actions --- views/bootstrap/class.RoleMgr.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.RoleMgr.php b/views/bootstrap/class.RoleMgr.php index 76e0ba1c1..08beeb2e1 100644 --- a/views/bootstrap/class.RoleMgr.php +++ b/views/bootstrap/class.RoleMgr.php @@ -111,9 +111,10 @@ $(document).ready( function() { function showRoleForm($currRole) { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; + $accessop = $this->params['accessobject']; $roles = $this->params['allroles']; - if($currRole && !$currRole->isUsed()) { + if($currRole && !$currRole->isUsed() && $accessop->check_controller_access('RoleMgr', array('action'=>'removerole'))) { ?> @@ -160,11 +161,15 @@ $(document).ready( function() { echo ""; echo ""; } + if($currRole && $accessop->check_controller_access('RoleMgr', array('action'=>'editrole')) || !$currRole && $accessop->check_controller_access('RoleMgr', array('action'=>'addrole'))) { ?> +
    TypeName of hookName of classFile
    ".getMLText('type_of_hook')."".getMLText('hook_name')."".getMLText('class_name')."".getMLText('file')."
    params['dms']; $user = $this->params['user']; + $accessop = $this->params['accessobject']; $selrole = $this->params['selrole']; $roles = $this->params['allroles']; @@ -189,7 +195,9 @@ $(document).ready( function() { : "; print "\n\n"; + print "\n"; print "\n"; print "\n"; print "\n"; @@ -75,6 +83,14 @@ class SeedDMS_View_CheckOutSummary extends SeedDMS_Bootstrap_Style { } print "\n"; + $previewer->createPreview($version); + print ""; print ""; print ""; print ""; diff --git a/views/bootstrap/class.ReceiptSummary.php b/views/bootstrap/class.ReceiptSummary.php index 516fd6f9a..06014a48b 100644 --- a/views/bootstrap/class.ReceiptSummary.php +++ b/views/bootstrap/class.ReceiptSummary.php @@ -34,6 +34,13 @@ class SeedDMS_View_ReceiptSummary extends SeedDMS_Bootstrap_Style { function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; + $cachedir = $this->params['cachedir']; + $previewwidth = $this->params['previewWidthList']; + $previewconverters = $this->params['previewconverters']; + $timeout = $this->params['timeout']; + + $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); + $previewer->setConverters($previewconverters); $this->htmlStartPage(getMLText("my_documents")); $this->globalNavigation(); @@ -66,6 +73,7 @@ class SeedDMS_View_ReceiptSummary extends SeedDMS_Bootstrap_Style { if ($printheader){ print "
    ".getMLText("name")."".getMLText("owner")."".getMLText("status")."
    "; + if($previewer->hasPreview($version)) { + print "getID()."&version=".$version->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($version->getMimeType())."\">"; + } else { + print "getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">"; + } + print "".htmlspecialchars($document->getName())."".htmlspecialchars($owner->getFullName())."".getOverallStatusText($st["status"])."
    "; print "\n\n"; + print "\n"; print "\n"; print "\n"; print "\n"; @@ -77,6 +85,14 @@ class SeedDMS_View_ReceiptSummary extends SeedDMS_Bootstrap_Style { } print "\n"; + $previewer->createPreview($version); + print ""; print ""; print ""; print ""; diff --git a/views/bootstrap/class.ReviewSummary.php b/views/bootstrap/class.ReviewSummary.php index 95a3dd819..1c0b531d8 100644 --- a/views/bootstrap/class.ReviewSummary.php +++ b/views/bootstrap/class.ReviewSummary.php @@ -36,9 +36,11 @@ class SeedDMS_View_ReviewSummary extends SeedDMS_Bootstrap_Style { $user = $this->params['user']; $cachedir = $this->params['cachedir']; $previewwidth = $this->params['previewWidthList']; + $previewconverters = $this->params['previewconverters']; $timeout = $this->params['timeout']; $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); + $previewer->setConverters($previewconverters); $this->htmlStartPage(getMLText("my_documents")); $this->globalNavigation(); diff --git a/views/bootstrap/class.TransmittalMgr.php b/views/bootstrap/class.TransmittalMgr.php index 52d2320f9..8a79b829c 100644 --- a/views/bootstrap/class.TransmittalMgr.php +++ b/views/bootstrap/class.TransmittalMgr.php @@ -230,9 +230,9 @@ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { $cachedir = $this->params['cachedir']; $previewwidth = $this->params['previewWidthList']; $previewconverters = $this->params['previewconverters']; + $timeout = $this->params['timeout']; - $db = $dms->getDB(); - $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth); + $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); $previewer->setConverters($previewconverters); $this->htmlAddHeader(''."\n", 'js'); From 4f70b6822b081a0a1f53156239c6c5607acd1bfd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 15 Apr 2016 15:16:07 +0200 Subject: [PATCH 0483/2006] fix typo --- op/op.CreateDump.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op/op.CreateDump.php b/op/op.CreateDump.php index 25c2fbf21..ceab734ab 100644 --- a/op/op.CreateDump.php +++ b/op/op.CreateDump.php @@ -33,7 +33,7 @@ if (!$user->isAdmin()) { if($settings->_backupDir && file_exists($settings->_backupDir)) $basedir = $settings->_backupDir; else - $basedir = $setting->_contentDir; + $basedir = $settings->_contentDir; $v = new SeedDMS_Version; $dump_name = $basedir.date('Y-m-d\TH:i:s')."_".$v->_number.".sql"; From 4e2313d387ba276bf60284217646111506d8cff6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 18 Apr 2016 13:13:16 +0200 Subject: [PATCH 0484/2006] pass instance of Access Operation to view --- out/out.AddDocument.php | 7 +++++-- out/out.AddSubFolder.php | 7 +++++-- out/out.EditEvent.php | 7 +++++-- out/out.EditFolder.php | 7 +++++-- out/out.FolderAccess.php | 7 +++++-- out/out.FolderNotify.php | 2 ++ out/out.MoveFolder.php | 7 +++++-- out/out.RemoveFolder.php | 7 +++++-- out/out.Search.php | 11 ++++++++++- out/out.UserDefaultKeywords.php | 7 +++++-- out/out.ViewEvent.php | 6 ++++-- 11 files changed, 56 insertions(+), 19 deletions(-) diff --git a/out/out.AddDocument.php b/out/out.AddDocument.php index 2e522237a..f47e92968 100644 --- a/out/out.AddDocument.php +++ b/out/out.AddDocument.php @@ -27,6 +27,10 @@ include("../inc/inc.Language.php"); include("../inc/inc.ClassUI.php"); include("../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, $user, $settings); + if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) { UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); } @@ -60,8 +64,6 @@ if($settings->_libraryFolder) { $libfolder = null; } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('folder', $folder); $view->setParam('strictformcheck', $settings->_strictFormCheck); @@ -75,6 +77,7 @@ if($view) { $view->setParam('presetexpiration', $settings->_presetExpirationDate); $view->setParam('sortusersinlist', $settings->_sortUsersInList); $view->setParam('orderby', $settings->_sortFoldersDefault); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.AddSubFolder.php b/out/out.AddSubFolder.php index 0f9e14ff2..e5a1264a8 100644 --- a/out/out.AddSubFolder.php +++ b/out/out.AddSubFolder.php @@ -28,6 +28,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../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, $user, $settings); + if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) { UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); } @@ -40,12 +44,11 @@ if ($folder->getAccessMode($user) < M_READWRITE) { UI::exitError(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName()))),getMLText("access_denied")); } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('folder', $folder); $view->setParam('strictformcheck', $settings->_strictFormCheck); $view->setParam('orderby', $settings->_sortFoldersDefault); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.EditEvent.php b/out/out.EditEvent.php index 3372a0afe..0add550cc 100644 --- a/out/out.EditEvent.php +++ b/out/out.EditEvent.php @@ -25,6 +25,10 @@ include("../inc/inc.ClassUI.php"); include("../inc/inc.Calendar.php"); include("../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, $user, $settings); + if ($user->isGuest()) { UI::exitError(getMLText("edit_event"),getMLText("access_denied")); } @@ -42,11 +46,10 @@ if (($user->getID()!=$event["userID"])&&(!$user->isAdmin())){ UI::exitError(getMLText("edit_event"),getMLText("access_denied")); } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('event', $event); $view->setParam('strictformcheck', $settings->_strictFormCheck); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.EditFolder.php b/out/out.EditFolder.php index 1639784f7..a8b9c49fb 100644 --- a/out/out.EditFolder.php +++ b/out/out.EditFolder.php @@ -26,6 +26,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../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, $user, $settings); + if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) { UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); } @@ -41,14 +45,13 @@ if ($folder->getAccessMode($user) < M_READWRITE) { $attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_folder, SeedDMS_Core_AttributeDefinition::objtype_all)); -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('folder', $folder); $view->setParam('attrdefs', $attrdefs); $view->setParam('strictformcheck', $settings->_strictFormCheck); $view->setParam('rootfolderid', $settings->_rootFolderID); $view->setParam('orderby', $settings->_sortFoldersDefault); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.FolderAccess.php b/out/out.FolderAccess.php index ae2a92d70..4198fa458 100644 --- a/out/out.FolderAccess.php +++ b/out/out.FolderAccess.php @@ -27,6 +27,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../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, $user, $settings); + if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) { UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); } @@ -43,13 +47,12 @@ if ($folder->getAccessMode($user) < M_ALL) { $allUsers = $dms->getAllUsers(); $allGroups = $dms->getAllGroups(); -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('folder', $folder); $view->setParam('allusers', $allUsers); $view->setParam('allgroups', $allGroups); $view->setParam('rootfolderid', $settings->_rootFolderID); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.FolderNotify.php b/out/out.FolderNotify.php index 410c4f77c..e20a32356 100644 --- a/out/out.FolderNotify.php +++ b/out/out.FolderNotify.php @@ -29,6 +29,7 @@ include("../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, $user, $settings); if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) { UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); @@ -51,6 +52,7 @@ if($view) { $view->setParam('allusers', $allUsers); $view->setParam('allgroups', $allGroups); $view->setParam('strictformcheck', $settings->_strictFormCheck); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.MoveFolder.php b/out/out.MoveFolder.php index bf49b8c49..479761eae 100644 --- a/out/out.MoveFolder.php +++ b/out/out.MoveFolder.php @@ -27,6 +27,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../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, $user, $settings); + if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) { UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); } @@ -62,11 +66,10 @@ if(isset($_GET['targetid']) && $_GET['targetid']) { $target = null; } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('folder', $folder); $view->setParam('target', $target); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.RemoveFolder.php b/out/out.RemoveFolder.php index fef49f7b9..c14adf041 100644 --- a/out/out.RemoveFolder.php +++ b/out/out.RemoveFolder.php @@ -26,6 +26,10 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../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, $user, $settings); + if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) { UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); } @@ -44,10 +48,9 @@ if ($folder->getAccessMode($user) < M_ALL) { UI::exitError(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName()))),getMLText("access_denied")); } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('folder', $folder); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.Search.php b/out/out.Search.php index dd312a21b..d02920bb9 100644 --- a/out/out.Search.php +++ b/out/out.Search.php @@ -444,8 +444,17 @@ if(count($entries) == 1) { } } else { $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); - $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'query'=>$query, 'searchhits'=>$entries, 'totalpages'=>$totalPages, 'pagenumber'=>$pageNumber, 'searchtime'=>$searchTime, 'urlparams'=>$_GET, 'cachedir'=>$settings->_cacheDir)); + $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); + $accessop = new SeedDMS_AccessOperation($dms, $user, $settings); if($view) { + $view->setParam('accessobject', $accessop); + $view->setParam('query', $query); + $view->setParam('searchhits', $entries); + $view->setParam('totalpages', $totalPages); + $view->setParam('pagenumber', $pageNumber); + $view->setParam('searchtime', $searchTime); + $view->setParam('urlparams', $_GET); + $view->setParam('cachedir', $settings->_cacheDir); $view->setParam('totaldocs', $dcount /*resArr['totalDocs']*/); $view->setParam('totalfolders', $fcount /*resArr['totalFolders']*/); $view->setParam('fullsearch', (isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSearch) ? true : false); diff --git a/out/out.UserDefaultKeywords.php b/out/out.UserDefaultKeywords.php index f2d2e44d0..751431286 100644 --- a/out/out.UserDefaultKeywords.php +++ b/out/out.UserDefaultKeywords.php @@ -25,16 +25,19 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../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, $user, $settings); + if ($user->isGuest()) { UI::exitError(getMLText("edit_default_keywords"),getMLText("access_denied")); } $categories = $dms->getAllUserKeywordCategories($user->getID()); -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('categories', $categories); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.ViewEvent.php b/out/out.ViewEvent.php index 495ec9d4d..37fa590a1 100644 --- a/out/out.ViewEvent.php +++ b/out/out.ViewEvent.php @@ -25,6 +25,9 @@ include("../inc/inc.ClassUI.php"); include("../inc/inc.Calendar.php"); include("../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, $user, $settings); if (!isset($_GET["id"])){ UI::exitError(getMLText("event_details"),getMLText("error_occured")); } @@ -34,10 +37,9 @@ if (is_bool($event)&&!$event){ UI::exitError(getMLText("event_details"),getMLText("error_occured")); } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('event', $event); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } From 2188babab8f9ac9d6d744fbb9c9cac7d2aa274b4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 18 Apr 2016 13:21:56 +0200 Subject: [PATCH 0485/2006] move js from html into dynamic js file --- views/bootstrap/class.Search.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 94151dd7d..c34ee5a59 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -49,7 +49,14 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { function js() { /* {{{ */ header('Content-Type: application/javascript'); - +?> +$(document).ready( function() { + $('#export').on('click', function(e) { + e.preventDefault(); + window.location.href = $(this).attr('href')+'&includecontent='+($('#includecontent').prop('checked') ? '1' : '0'); + }); +}); +printFolderChooserJs("form1"); $this->printDeleteFolderButtonJs(); $this->printDeleteDocumentButtonJs(); @@ -252,14 +259,6 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
    ".getMLText("name")."".getMLText("owner")."".getMLText("status")."
    "; + if($previewer->hasPreview($version)) { + print "getID()."&version=".$version->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($version->getMimeType())."\">"; + } else { + print "getMimeIcon($version->getFileType())."\" title=\"".htmlspecialchars($version->getMimeType())."\">"; + } + print "".htmlspecialchars($document->getName())."".htmlspecialchars($owner->getFullName())."".getOverallStatusText($st["status"]).""> Export
    - From 8c77b0734c196d15df4389bab8b1bf688fdda7cf Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 18 Apr 2016 20:51:32 +0200 Subject: [PATCH 0486/2006] add hook to set extra columns, fix column counting if approval or review does not exists --- inc/inc.ClassDownloadMgr.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/inc/inc.ClassDownloadMgr.php b/inc/inc.ClassDownloadMgr.php index 7589f3f6b..55308ccbf 100644 --- a/inc/inc.ClassDownloadMgr.php +++ b/inc/inc.ClassDownloadMgr.php @@ -39,13 +39,21 @@ class SeedDMS_Download_Mgr { */ protected $items; + /** + * @var array $extracols list of arrays with extra columns per item + * @access protected + */ + protected $extracols; + function __construct($tmpdir = '') { $this->tmpdir = $tmpdir; $this->items = array(); + $this->extracols = array(); } - public function addItem($item) { /* {{{ */ + public function addItem($item, $extracols) { /* {{{ */ $this->items[$item->getID()] = $item; + $this->extracols[$item->getID()] = $extracols; } /* }}} */ public function createToc($file) { /* {{{ */ @@ -113,9 +121,9 @@ class SeedDMS_Download_Mgr { $sheet->setCellValueByColumnAndRow($tcol++, $l, getReviewStatusText($r["status"])); $l++; } - $col = $tcol; $l--; } + $col += 4; if($approvalStatus) { foreach ($approvalStatus as $r) { switch ($r["type"]) { @@ -144,9 +152,13 @@ class SeedDMS_Download_Mgr { $sheet->setCellValueByColumnAndRow($tcol++, $k, getApprovalStatusText($r["status"])); $k++; } - $col = $tcol; $k--; } + $col += 4; + if(isset($this->extracols[$item->getID()]) && $this->extracols[$item->getID()]) { + foreach($this->extracols[$item->getID()] as $column) + $sheet->setCellValueByColumnAndRow($col++, $i, $column); + } $i = max($l, $k); $i++; } From 8d8f3e51fba574012f4788c6cdb71f08d32f888d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 18 Apr 2016 20:53:00 +0200 Subject: [PATCH 0487/2006] move excel export into view --- out/out.Search.php | 131 +++++++++++-------------------- views/bootstrap/class.Search.php | 51 +++++++++++- 2 files changed, 95 insertions(+), 87 deletions(-) diff --git a/out/out.Search.php b/out/out.Search.php index d02920bb9..c4c847b9f 100644 --- a/out/out.Search.php +++ b/out/out.Search.php @@ -360,7 +360,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSe $pageNumber = (int) $_GET["pg"]; } elseif (!strcasecmp($_GET["pg"], "all")) { - // $limit = 0; + $pageNumber = "all"; } } @@ -393,99 +393,58 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSe } } } - if(isset($_GET['export']) && $_GET['export']) { - include("../inc/inc.ClassDownloadMgr.php"); - $downmgr = new SeedDMS_Download_Mgr(); - foreach($entries as $entry) { - if(get_class($entry) == $dms->getClassname('document')) { - $downmgr->addItem($entry->getLatestContent()); - } - } - $filename = tempnam('/tmp', ''); - if(isset($_GET['includecontent']) && $_GET['includecontent']) { - $downmgr->createArchive($filename); - header("Content-Transfer-Encoding: binary"); - header("Content-Length: " . filesize($filename)); - header("Content-Disposition: attachment; filename=\"export-" .date('Y-m-d') . ".zip\""); - header("Content-Type: application/zip"); - header("Cache-Control: must-revalidate"); - } else { - $downmgr->createToc($filename); - header("Content-Transfer-Encoding: binary"); - header("Content-Length: " . filesize($filename)); - header("Content-Disposition: attachment; filename=\"export-" .date('Y-m-d') . ".xls\""); - header("Content-Type: application/vnd.ms-excel"); - header("Cache-Control: must-revalidate"); - } - - readfile($filename); - unlink($filename); - exit; - } $totalPages = (int) (count($entries)/$limit); if(count($entries)%$limit) $totalPages++; - if (!isset($_GET["pg"]) || strcasecmp($_GET["pg"], "all")) - $entries = array_slice($entries, ($pageNumber-1)*$limit, $limit); // }}} } // -------------- Output results -------------------------------------------- -if(count($entries) == 1) { - $entry = $entries[0]; - if(get_class($entry) == $dms->getClassname('document')) { - header('Location: ../out/out.ViewDocument.php?documentid='.$entry->getID()); - exit; - } elseif(get_class($entry) == $dms->getClassname('folder')) { - header('Location: ../out/out.ViewFolder.php?folderid='.$entry->getID()); - exit; - } -} else { - $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($view) { - $view->setParam('accessobject', $accessop); - $view->setParam('query', $query); - $view->setParam('searchhits', $entries); - $view->setParam('totalpages', $totalPages); - $view->setParam('pagenumber', $pageNumber); - $view->setParam('searchtime', $searchTime); - $view->setParam('urlparams', $_GET); - $view->setParam('cachedir', $settings->_cacheDir); - $view->setParam('totaldocs', $dcount /*resArr['totalDocs']*/); - $view->setParam('totalfolders', $fcount /*resArr['totalFolders']*/); - $view->setParam('fullsearch', (isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSearch) ? true : false); - $view->setParam('mode', isset($mode) ? $mode : ''); - $view->setParam('defaultsearchmethod', $settings->_defaultSearchMethod); - $view->setParam('resultmode', isset($resultmode) ? $resultmode : ''); - $view->setParam('searchin', isset($searchin) ? $searchin : array()); - $view->setParam('startfolder', isset($startFolder) ? $startFolder : null); - $view->setParam('owner', $owner); - $view->setParam('startdate', isset($startdate) ? $startdate : array()); - $view->setParam('stopdate', isset($stopdate) ? $stopdate : array()); - $view->setParam('expstartdate', isset($expstartdate) ? $expstartdate : array()); - $view->setParam('expstopdate', isset($expstopdate) ? $expstopdate : array()); - $view->setParam('creationdate', isset($creationdate) ? $creationdate : ''); - $view->setParam('expirationdate', isset($expirationdate) ? $expirationdate: ''); - $view->setParam('status', isset($status) ? $status : array()); - $view->setParam('categories', isset($categories) ? $categories : ''); - $view->setParam('attributes', isset($attributes) ? $attributes : ''); - $attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_document, SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_folder, SeedDMS_Core_AttributeDefinition::objtype_all)); - $view->setParam('attrdefs', $attrdefs); - $allCats = $dms->getDocumentCategories(); - $view->setParam('allcategories', $allCats); - $allUsers = $dms->getAllUsers($settings->_sortUsersInList); - $view->setParam('allusers', $allUsers); - $view->setParam('workflowmode', $settings->_workflowMode); - $view->setParam('enablefullsearch', $settings->_enableFullSearch); - $view->setParam('previewWidthList', $settings->_previewWidthList); - $view->setParam('previewconverters', $settings->_converters['preview']); - $view->setParam('timeout', $settings->_cmdTimeout); - $view($_GET); - exit; - } +$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($view) { + $view->setParam('accessobject', $accessop); + $view->setParam('query', $query); + $view->setParam('searchhits', $entries); + $view->setParam('totalpages', $totalPages); + $view->setParam('pagenumber', $pageNumber); + $view->setParam('limit', $limit); + $view->setParam('searchtime', $searchTime); + $view->setParam('urlparams', $_GET); + $view->setParam('cachedir', $settings->_cacheDir); + $view->setParam('totaldocs', $dcount /*resArr['totalDocs']*/); + $view->setParam('totalfolders', $fcount /*resArr['totalFolders']*/); + $view->setParam('fullsearch', (isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSearch) ? true : false); + $view->setParam('mode', isset($mode) ? $mode : ''); + $view->setParam('defaultsearchmethod', $settings->_defaultSearchMethod); + $view->setParam('resultmode', isset($resultmode) ? $resultmode : ''); + $view->setParam('searchin', isset($searchin) ? $searchin : array()); + $view->setParam('startfolder', isset($startFolder) ? $startFolder : null); + $view->setParam('owner', $owner); + $view->setParam('startdate', isset($startdate) ? $startdate : array()); + $view->setParam('stopdate', isset($stopdate) ? $stopdate : array()); + $view->setParam('expstartdate', isset($expstartdate) ? $expstartdate : array()); + $view->setParam('expstopdate', isset($expstopdate) ? $expstopdate : array()); + $view->setParam('creationdate', isset($creationdate) ? $creationdate : ''); + $view->setParam('expirationdate', isset($expirationdate) ? $expirationdate: ''); + $view->setParam('status', isset($status) ? $status : array()); + $view->setParam('categories', isset($categories) ? $categories : ''); + $view->setParam('attributes', isset($attributes) ? $attributes : ''); + $attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_document, SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_folder, SeedDMS_Core_AttributeDefinition::objtype_all)); + $view->setParam('attrdefs', $attrdefs); + $allCats = $dms->getDocumentCategories(); + $view->setParam('allcategories', $allCats); + $allUsers = $dms->getAllUsers($settings->_sortUsersInList); + $view->setParam('allusers', $allUsers); + $view->setParam('workflowmode', $settings->_workflowMode); + $view->setParam('enablefullsearch', $settings->_enableFullSearch); + $view->setParam('previewWidthList', $settings->_previewWidthList); + $view->setParam('previewconverters', $settings->_converters['preview']); + $view->setParam('timeout', $settings->_cmdTimeout); + $view($_GET); + exit; } ?> diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index c34ee5a59..1a26f9223 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -62,12 +62,47 @@ $(document).ready( function() { $this->printDeleteDocumentButtonJs(); } /* }}} */ + function export() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $entries = $this->params['searchhits']; + + include("../inc/inc.ClassDownloadMgr.php"); + $downmgr = new SeedDMS_Download_Mgr(); + foreach($entries as $entry) { + if(get_class($entry) == $dms->getClassname('document')) { + $extracols = $this->callHook('extraDownloadColumns', $entry); + $downmgr->addItem($entry->getLatestContent(), $extracols); + } + } + $filename = tempnam('/tmp', ''); + if(isset($_GET['includecontent']) && $_GET['includecontent']) { + $downmgr->createArchive($filename); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($filename)); + header("Content-Disposition: attachment; filename=\"export-" .date('Y-m-d') . ".zip\""); + header("Content-Type: application/zip"); + header("Cache-Control: must-revalidate"); + } else { + $downmgr->createToc($filename); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($filename)); + header("Content-Disposition: attachment; filename=\"export-" .date('Y-m-d') . ".xls\""); + header("Content-Type: application/vnd.ms-excel"); + header("Cache-Control: must-revalidate"); + } + + readfile($filename); + unlink($filename); + } /* }}} */ + function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $fullsearch = $this->params['fullsearch']; $totaldocs = $this->params['totaldocs']; $totalfolders = $this->params['totalfolders']; + $limit = $this->params['limit']; $attrdefs = $this->params['attrdefs']; $allCats = $this->params['allcategories']; $allUsers = $this->params['allusers']; @@ -99,6 +134,20 @@ $(document).ready( function() { $previewconverters = $this->params['previewconverters']; $timeout = $this->params['timeout']; + if(count($entries) == 1) { + $entry = $entries[0]; + if(get_class($entry) == $dms->getClassname('document')) { + header('Location: ../out/out.ViewDocument.php?documentid='.$entry->getID()); + exit; + } elseif(get_class($entry) == $dms->getClassname('folder')) { + header('Location: ../out/out.ViewFolder.php?folderid='.$entry->getID()); + exit; + } + } + + if ($pageNumber != 'all') + $entries = array_slice($entries, ($pageNumber-1)*$limit, $limit); + $this->htmlAddHeader(''."\n", 'js'); $this->htmlStartPage(getMLText("search_results")); @@ -256,7 +305,7 @@ $(document).ready( function() {
    "> Export"> Export
    From 4590a14de1fb430acae7b1ee7f894f93288861e4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 20 Apr 2016 09:01:20 +0200 Subject: [PATCH 0488/2006] fix html_link(), link attributes can't be added --- inc/inc.ClassViewCommon.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index 00ecbe8f3..791586658 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -229,7 +229,8 @@ class SeedDMS_View_Common { $url = $this->html_url($view, $urlparams); $tag = "$v) + $tag .= " ".$k."=\"".$v."\""; $tag .= ">".($hsc ? htmlspecialchars($link) : $link).""; return $tag; } /* }}} */ From 5912354f098a89671220fefd2aac0255ac13b1c0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 20 Apr 2016 09:01:59 +0200 Subject: [PATCH 0489/2006] set accessobject in view --- out/out.Settings.php | 1 + 1 file changed, 1 insertion(+) diff --git a/out/out.Settings.php b/out/out.Settings.php index 271f089ac..7446e6e3f 100644 --- a/out/out.Settings.php +++ b/out/out.Settings.php @@ -38,6 +38,7 @@ if(!trim($settings->_encryptionKey)) if($view) { $view->setParam('settings', $settings); $view->setParam('currenttab', (isset($_REQUEST['currenttab']) ? $_REQUEST['currenttab'] : '')); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } From ae3c5faef5e0f1fc254812c9b2af7141b644d405 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 20 Apr 2016 09:02:30 +0200 Subject: [PATCH 0490/2006] use html_link() --- views/bootstrap/class.GroupMgr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.GroupMgr.php b/views/bootstrap/class.GroupMgr.php index 951e19309..2438f17e7 100644 --- a/views/bootstrap/class.GroupMgr.php +++ b/views/bootstrap/class.GroupMgr.php @@ -169,7 +169,7 @@ $(document).ready( function() { ?> - + html_link('RemoveGroup', array('groupid'=>$group->getID()), array('class'=>'btn'), ' '.getMLText("rm_group"), false); ?> Date: Wed, 20 Apr 2016 09:02:57 +0200 Subject: [PATCH 0491/2006] user html_url() and html_link() --- views/bootstrap/class.UserList.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.UserList.php b/views/bootstrap/class.UserList.php index 931f7e3fc..339829b94 100644 --- a/views/bootstrap/class.UserList.php +++ b/views/bootstrap/class.UserList.php @@ -56,7 +56,7 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style { echo ""; echo ""; if ($currUser->hasImage()) - print ""; + print "html_url('UserImage', array('userid'=>$currUser->getId()))."\" >"; echo ""; echo ""; echo htmlspecialchars($currUser->getFullName())." (".htmlspecialchars($currUser->getLogin()).")
    "; @@ -105,11 +105,12 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style { } echo ""; echo ""; - echo "
    "; - echo "getID()."\"> "; - if ($this->check_access('RemoveUser')) - echo "getID()."\">"; - echo "
    "; + if($this->check_access(array('UsrMgr', 'RemoveUser'))) { + echo "
    "; + echo $this->html_link('UsrMgr', array('userid'=>$currUser->getID()), array(), '', false); + echo $this->html_link('RemoveUser', array('userid'=>$currUser->getID()), array(), '', false); + echo "
    "; + } echo ""; echo ""; } From dccb4c476a32c61d19bf98607347ca0e76f8464f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 20 Apr 2016 09:03:15 +0200 Subject: [PATCH 0492/2006] use html_url() for image --- views/bootstrap/class.UsrMgr.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.UsrMgr.php b/views/bootstrap/class.UsrMgr.php index 6b4560857..e241b0a37 100644 --- a/views/bootstrap/class.UsrMgr.php +++ b/views/bootstrap/class.UsrMgr.php @@ -189,7 +189,7 @@ $(document).ready( function() { ?> - + html_link('RemoveUser', array('userid'=>$currUser->getID()), array('class'=>'btn'), ' '.getMLText("rm_user"), false); ?> hasImage()) - print ""; + print "html_url('UserImage', array('userid'=>$currUser->getId()))."\" >"; else printMLText("no_user_image"); ?> From 9999f6d57c62cc6d13938540a67bdfb3ce4d0cdd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 20 Apr 2016 15:45:53 +0200 Subject: [PATCH 0493/2006] include missing files, set accessobject for view --- out/out.EditOnline.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/out/out.EditOnline.php b/out/out.EditOnline.php index d911bf87b..4e6d70969 100644 --- a/out/out.EditOnline.php +++ b/out/out.EditOnline.php @@ -20,14 +20,19 @@ include("../inc/inc.Settings.php"); include("../inc/inc.LogInit.php"); -include("../inc/inc.DBInit.php"); include("../inc/inc.Language.php"); +include("../inc/inc.Init.php"); +include("../inc/inc.Extension.php"); +include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.ClassAccessOperation.php"); include("../inc/inc.Authentication.php"); -$documentid = $_GET["documentid"]; +$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); +$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); +$accessop = new SeedDMS_AccessOperation($dms, $user, $settings); +$documentid = $_GET["documentid"]; if (!isset($documentid) || !is_numeric($documentid) || intval($documentid)<1) { UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); } @@ -72,13 +77,8 @@ if (!isset($settings->_editOnlineFileTypes) || !is_array($settings->_editOnlineF } */ -/* Create object for checking access to certain operations */ -$accessop = new SeedDMS_AccessOperation($dms, $user, $settings); - $folder = $document->getFolder(); -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('document', $document); $view->setParam('version', $content); From ae1bbffc64ab1f425e762c6d9914365ceaa3df4f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 20 Apr 2016 15:46:36 +0200 Subject: [PATCH 0494/2006] fix link to out.EditOnline.php and out.RemoveVersion.php --- views/bootstrap/class.ViewDocument.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index be6cb87d5..e66cbade9 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -524,13 +524,13 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print ""; print ""; print "
      "; if($accessop->mayEditVersion($document)) { - print "
    • getVersion()."\">".getMLText("edit_version")."
    • "; + print "
    • ".$this->html_link('EditOnline', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("edit_version"), false, true)."
    • "; } /* Only admin has the right to remove version in any case or a regular * user if enableVersionDeletion is on */ if($accessop->mayRemoveVersion($document)) { - print "
    • getVersion()."\">".getMLText("rm_version")."
    • "; + print "
    • ".$this->html_link('RemoveVersion', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("rm_version"), false, true)."
    • "; } if($accessop->mayOverrideStatus($document)) { - print "
    • ".getMLText("change_status")."
    • "; + print "
    • ".$this->html_link('OverrideContentStatus', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_status"), false, true)."
    • "; } if($accessop->maySetRecipients($document)) { - print "
    • ".getMLText("change_recipients")."
    • "; + print "
    • ".$this->html_link('SetRecipients', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_recipients"), false, true)."
    • "; } if($accessop->maySetRevisors($document)) { - print "
    • ".getMLText("change_revisors")."
    • "; + print "
    • ".$this->html_link('SetRevisors', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_revisors"), false, true)."
    • "; } if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { // Allow changing reviewers/approvals only if not reviewed if($accessop->maySetReviewersApprovers($document)) { - print "
    • ".getMLText("change_assignments")."
    • "; + print "
    • ".$this->html_link('SetReviewersApprovers', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_assignments"), false, true)."
    • "; } } else { if($accessop->maySetWorkflow($document)) { if(!$workflow) { - print "
    • ".getMLText("set_workflow")."
    • "; + print "
    • ".$this->html_link('SetWorkflow', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("set_workflow"), false, true)."
    • "; } } } /* if($accessop->maySetExpires($document)) { - print "
    • ".getMLText("set_expiry")."
    • "; + print "
    • ".$this->html_link('SetExpires', array('documentid'=>$documentid), array(), "".getMLText("set_expiry"), false, true)."
    • "; } */ if($dms->getAllTransmittals($user)) { - print "
    • getVersion()."\">".getMLText("add_to_transmittal")."
    • "; + print "
    • ".$this->html_link('AddToTransmittal', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("add_to_transmittal"), false, true)."
    • "; } if($accessop->mayEditComment($document)) { - print "
    • getVersion()."\">".getMLText("edit_comment")."
    • "; + print "
    • ".$this->html_link('EditComment', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("edit_comment"), false, true)."
    • "; } if($accessop->mayEditAttributes($document)) { - print "
    • getVersion()."\">".getMLText("edit_attributes")."
    • "; + print "
    • ".$this->html_link('EditAttributes', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("edit_attributes"), false, true)."
    • "; } - //print "
    • ".getMLText("versioning_info")."
    • "; + //print "
    • ".$this->html_link('Download', array('documentid'=>$documentid, 'vfile'=>1), array(), "".getMLText("versioning_info"), false, true)."
    • "; print "
    "; echo ""; @@ -686,9 +686,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if($accessop->mayReview($document)) { if ($is_reviewer && $r["status"]==0) { - print "
  • getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-mini\">".getMLText("add_review")."
  • "; + print "
  • ".$this->html_link('ReviewDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'reviewid'=>$r['reviewID']), array('class'=>'btn btn-mini'), getMLText("add_review"), false, true)."
  • "; }else if (($updateUser==$user)&&(($r["status"]==1)||($r["status"]==-1))&&(!$document->hasExpired())){ - print "
  • getVersion()."&reviewid=".$r['reviewID']."\" class=\"btn btn-mini\">".getMLText("edit")."
  • "; + print "
  • ".$this->html_link('ReviewDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'reviewid'=>$r['reviewID']), array('class'=>'btn btn-mini'), getMLText("edit"), false, true)."
  • "; } } @@ -755,9 +755,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if($accessop->mayApprove($document)) { if ($is_approver && $a['status'] == 0 /*$status["status"]==S_DRAFT_APP*/) { - print "
  • getVersion()."&approveid=".$a['approveID']."\">".getMLText("add_approval")."
  • "; + print "
  • ".$this->html_link('ApproveDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'approveid'=>$a['approveID']), array('class'=>'btn btn-mini'), getMLText("add_approval"), false, true)."
  • "; }else if (($updateUser==$user)&&(($a["status"]==1)||($a["status"]==-1))&&(!$document->hasExpired())){ - print "
  • getVersion()."&approveid=".$a['approveID']."\">".getMLText("edit")."
  • "; + print "
  • ".$this->html_link('ApproveDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'approveid'=>$a['approveID']), array('class'=>'btn btn-mini'), getMLText("edit"), false, true)."
  • "; } } @@ -1040,9 +1040,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if($accessop->mayReceipt($document)) { if ($is_recipient && $r["status"]==0) { - print "
  • getVersion()."&receiptid=".$r['receiptID']."\" class=\"btn btn-mini\">".getMLText("add_receipt")."
  • "; + print "
  • ".$this->html_link('ReceiptDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'receiptid'=>$r['receiptID']), array('class'=>'btn btn-mini'), getMLText("add_receipt"), false, true)."
  • "; }else if (($updateUser==$user)&&(($r["status"]==1)||($r["status"]==-1))&&(!$document->hasExpired())){ - print "
  • getVersion()."&receiptid=".$r['receiptID']."\" class=\"btn btn-mini\">".getMLText("edit")."
  • "; + print "
  • ".$this->html_link('ReceiptDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'receiptid'=>$r['receiptID']), array('class'=>'btn btn-mini'), getMLText("edit"), false, true)."
  • "; } } @@ -1150,9 +1150,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if($accessop->mayRevise($document)) { if ($is_recipient && $r["status"]==0) { - print "
  • getVersion()."&revisionid=".$r['revisionID']."\" class=\"btn btn-mini\">".getMLText("add_revision")."
  • "; + print "
  • ".$this->html_link('ReviseDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'revisionid'=>$r['revisionID']), array('class'=>'btn btn-mini'), getMLText("add_revision"), false, true)."
  • "; } elseif (($updateUser==$user)&&(($r["status"]==1)||($r["status"]==-1))&&(!$document->hasExpired())){ - print "
  • getVersion()."&revisionid=".$r['revisionID']."\" class=\"btn btn-mini\">".getMLText("edit")."
  • "; + print "
  • ".$this->html_link('ReviseDocument', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion(), 'revisionid'=>$r['revisionID']), array('class'=>'btn btn-mini'), getMLText("edit"), false, true)."
  • "; } } @@ -1261,15 +1261,15 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { * user if enableVersionDeletion is on */ if($accessop->mayRemoveVersion($document)) { - print "
  • getVersion()."\">".getMLText("rm_version")."
  • "; + print "
  • ".$this->html_link('RemoveVersion', array('documentid'=>$documentid, 'version'=>$version->getVersion()), array(), "".getMLText("rm_version"), false, true)."
  • "; } if($accessop->mayEditComment($document)) { - print "
  • getID()."&version=".$version->getVersion()."\">".getMLText("edit_comment")."
  • "; + print "
  • ".$this->html_link('EditComment', array('documentid'=>$documentid, 'version'=>$version->getVersion()), array(), "".getMLText("edit_comment"), false, true)."
  • "; } if($accessop->mayEditAttributes($document)) { - print "
  • getID()."&version=".$latestContent->getVersion()."\">".getMLText("edit_attributes")."
  • "; + print "
  • ".$this->html_link('EditAttributes', array('documentid'=>$documentid, 'version'=>$version->getVersion()), array(), "".getMLText("edit_attributes"), false, true)."
  • "; } - print "
  • ".getMLText("details")."
  • "; + print "
  • ".$this->html_link('DocumentVersionDetail', array('documentid'=>$documentid, 'version'=>$version->getVersion()), array(), "".getMLText("details"), false, true)."
  • "; print ""; print "\n\n"; } @@ -1351,7 +1351,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { else printMLText("no_attached_files"); if ($document->getAccessMode($user) >= M_READWRITE){ - print "\n"; + print "
    • ".$this->html_link('AddFile', array('documentid'=>$documentid), array('class'=>'btn'), getMLText("add"), false, true)."
    \n"; } $this->contentContainerEnd(); ?> From aee1ff2fcb2e35348105bf859e1d3080cb3651cc Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 21 Apr 2016 13:32:37 +0200 Subject: [PATCH 0498/2006] inform notifier of new document too --- op/op.AddDocument.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php index c8aebc69e..42a8e5487 100644 --- a/op/op.AddDocument.php +++ b/op/op.AddDocument.php @@ -394,7 +394,8 @@ for ($file_num=0;$file_numgetNotifyList(); + $notifyList1 = $folder->getNotifyList(); + $notifyList2 = $document->getNotifyList(); $subject = "new_document_email_subject"; $message = "new_document_email_body"; @@ -408,8 +409,12 @@ for ($file_num=0;$file_num_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID(); $params['sitename'] = $settings->_siteName; $params['http_root'] = $settings->_httpRoot; - $notifier->toList($user, $notifyList["users"], $subject, $message, $params); - foreach ($notifyList["groups"] as $grp) { + $notifier->toList($user, $notifyList1["users"], $subject, $message, $params); + foreach ($notifyList1["groups"] as $grp) { + $notifier->toGroup($user, $grp, $subject, $message, $params); + } + $notifier->toList($user, $notifyList2["users"], $subject, $message, $params); + foreach ($notifyList2["groups"] as $grp) { $notifier->toGroup($user, $grp, $subject, $message, $params); } From 20c0abf69d8af937ec9deefca811cc66a09da453 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 21 Apr 2016 15:33:57 +0200 Subject: [PATCH 0499/2006] add missing attribute 'target' to converters this needs to be done when updating from 5.0.x to 5.1.x --- inc/inc.ClassSettings.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 6cd27fba2..3ec7ff2f7 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -843,7 +843,7 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "smtpPassword", $this->_smtpPassword); // XML Path: /configuration/advanced/display - $this->getXMLNode($xml, '/configuration', 'advanced'); + $advnode = $this->getXMLNode($xml, '/configuration', 'advanced'); $node = $this->getXMLNode($xml, '/configuration/advanced', 'display'); $this->setXMLAttributValue($node, "siteDefaultPage", $this->_siteDefaultPage); $this->setXMLAttributValue($node, "rootFolderID", $this->_rootFolderID); @@ -889,6 +889,12 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "maxExecutionTime", $this->_maxExecutionTime); $this->setXMLAttributValue($node, "cmdTimeout", $this->_cmdTimeout); + /* Check if there is still a converters list with a target attribute */ + $node = $xml->xpath('/configuration/advanced/converters[count(@*)=0]'); + if (count($node)>0) { + $this->setXMLAttributValue($node[0], 'target', 'fulltext'); + } + // XML Path: /configuration/advanced/converters foreach($this->_converters as $type=>$converters) { foreach($this->_converters[$type] as $mimeType => $cmd) { @@ -907,6 +913,10 @@ class Settings { /* {{{ */ } else { if(trim($cmd)) { $nodeParent = $xml->xpath('/configuration/advanced/converters[@target="'.$type.'"]'); + if(count($nodeParent) == 0) { + $nodeParent = array($advnode->addChild("converters")); + $this->setXMLAttributValue($nodeParent[0], 'target', $type); + } $node = $nodeParent[0]->addChild("converter"); $node[0] = $cmd; $this->setXMLAttributValue($node, 'mimeType', $mimeType); From 037646537b7371dbf586df6923135e61267838d4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 21 Apr 2016 16:00:16 +0200 Subject: [PATCH 0500/2006] set version to 5.1.0, use btn instead of plain link --- install/install.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/install.php b/install/install.php index 1e550d647..c09f667e8 100644 --- a/install/install.php +++ b/install/install.php @@ -118,7 +118,7 @@ function fileExistsInIncludePath($file) { /* {{{ */ * Load default settings + set */ define("SEEDDMS_INSTALL", "on"); -define("SEEDDMS_VERSION", "5.0.2"); +define("SEEDDMS_VERSION", "5.1.0"); require_once('../inc/inc.ClassSettings.php'); @@ -362,7 +362,7 @@ if ($action=="setSettings") { if(file_exists('update-'.$updatedir.'/update.txt')) { print "

    Please read the comments on updating this version. Read now

    "; } - print "

    Run the update script.

    "; + print "

    Run the update script.

    "; } } } else { From 35c8e5763338b2cae39a70e80e1a84dcbbb49238 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 21 Apr 2016 16:00:46 +0200 Subject: [PATCH 0501/2006] don't drop old table tblUsers, just rename it dropping it, always issues an error 'database locked' --- install/update-5.1.0/update-sqlite3.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/update-5.1.0/update-sqlite3.sql b/install/update-5.1.0/update-sqlite3.sql index 6d136b90b..9ddf1f026 100644 --- a/install/update-5.1.0/update-sqlite3.sql +++ b/install/update-5.1.0/update-sqlite3.sql @@ -108,7 +108,7 @@ CREATE TABLE `new_tblUsers` ( INSERT INTO new_tblUsers SELECT * FROM tblUsers; -DROP TABLE tblUsers; +ALTER TABLE tblUsers RENAME TO old_tblUsers; ALTER TABLE new_tblUsers RENAME TO tblUsers; From d0ef7f42381326350b3ceb05da3327bd87ada3ed Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 21 Apr 2016 16:01:38 +0200 Subject: [PATCH 0502/2006] convert to bootstrap --- install/update.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/install/update.php b/install/update.php index afc7e3e46..05fedca03 100644 --- a/install/update.php +++ b/install/update.php @@ -33,11 +33,13 @@ if (!file_exists($configDir."/ENABLE_INSTALL_TOOL")) { exit; } -$theme = "blue"; +$theme = "bootstrap"; require_once("../inc/inc.Language.php"); require_once("../inc/inc.ClassUI.php"); UI::htmlStartPage('Database update'); +UI::globalBanner(); +UI::contentStart(); UI::contentHeading("SeedDMS Installation for version ".$_GET['version']); UI::contentContainerStart(); @@ -77,7 +79,7 @@ if($rec = $res->fetch(PDO::FETCH_ASSOC)) { echo $query."
    "; if(false === $db->exec($query)) { $e = $db->ErrorInfo(); - $errorMsg .= $e[2] . "
    "; + $errorMsg .= $query.": ".$e[2] . "
    "; } } } @@ -98,12 +100,13 @@ if($rec = $res->fetch(PDO::FETCH_ASSOC)) { } else { echo $errorMsg; } - echo "

    Go back to installation and recheck.

    "; + echo "

    Go back to installation and recheck.

    "; } else { echo "

    Could not determine database schema version.

    "; } $db = null; UI::contentContainerEnd(); +UI::contentEnd(); UI::htmlEndPage(); ?> From cc685141e979e55f1f39cfcca765e14742cb85f1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 21 Apr 2016 17:19:28 +0200 Subject: [PATCH 0503/2006] fix wrong variable name --- 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 349b911a3..864a0d913 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -3169,7 +3169,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if ($u->getID() == $owner->getID()) return M_READ; /* Read/Write access on the document will also grant access on the version */ - if($this->_document->getAccessMode($user) >= M_READWRITE) return M_READ; + if($this->_document->getAccessMode($u) >= M_READWRITE) return M_READ; /* At this point the current status is in the list of status without read access. * The only way to still gain read access is, if the user is involved in the From 823e7bf76ec3890d5038facc71a83ef74d9913ab Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 21 Apr 2016 17:19:58 +0200 Subject: [PATCH 0504/2006] better handling of access rights if advanced access rights are turn off check_view_access() returns true for admins and false otherwise --- inc/inc.ClassAccessOperation.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index b350e8b69..d5e2d5732 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -360,8 +360,12 @@ class SeedDMS_AccessOperation { * no specific access right is set, otherwise false */ function check_view_access($view, $get=array()) { /* {{{ */ - if(!$this->settings->_advancedAcl) - return true; + if(!$this->settings->_advancedAcl) { + if($this->user->isAdmin()) + return true; + else + return false; + } if(is_string($view)) { $scripts = array($view); } elseif(is_array($view)) { From e1926ed2176929cd8b572f56626ad6df57b8fe65 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 22 Apr 2016 08:21:18 +0200 Subject: [PATCH 0505/2006] add more documentation --- inc/inc.ClassAccessOperation.php | 7 +++++-- inc/inc.ClassViewCommon.php | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index d5e2d5732..cd6acdbca 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -348,14 +348,17 @@ class SeedDMS_AccessOperation { * Check for access permission on view * * If the parameter $view is an array then each element is considered the - * name of a view and true will be returned if one is accessible. + * name of a view and true will be returned if one of them is accessible. * Whether access is allowed also depends on the currently logged in user * stored in the view object. If the user is an admin the access * on a view must be explicitly disallowed. For regular users the access * must be explicitly allowed. * + * If advanced access control is turn off, this function will always return + * true for admins and false for other users. + * * @param mixed $view Instanz of view, name of view or array of view names - * @param string $get query parameters + * @param string $get query parameters possible containing the element 'action' * @return boolean true if access is allowed, false if access is disallowed * no specific access right is set, otherwise false */ diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index c5d199a6b..42dab1cf2 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -171,10 +171,10 @@ class SeedDMS_View_Common { * Check if the access on the view with given name or the current view itself * may be accessed. * - * The function behaves differently for admins and other users. For admins - * a view must be explitly disallowed for this function to return false. - * For other users access on a view must be explicitly allow for the this - * function to return true. + * The function requires the parameter 'accessobject' to be available in the + * view, because it calls SeedDMS_AccessOperation::check_view_access() + * to check access rights. If the the optional $name is not set the + * current view is used. * * @param string|array $name name of view or list of view names * @return boolean true if access is allowed otherwise false From d63b36f3bfea9d3d575a55584ee44fc55d3cb5d7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 22 Apr 2016 08:21:44 +0200 Subject: [PATCH 0506/2006] no need to check explicitly for admin, check_view_access() is enough --- views/bootstrap/class.AdminTools.php | 42 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/views/bootstrap/class.AdminTools.php b/views/bootstrap/class.AdminTools.php index 8b92d3039..19a5619c2 100644 --- a/views/bootstrap/class.AdminTools.php +++ b/views/bootstrap/class.AdminTools.php @@ -47,33 +47,33 @@ class SeedDMS_View_AdminTools extends SeedDMS_Bootstrap_Style { ?>
    -check_view_access('UsrMgr') || $user->isAdmin()) { ?> +check_view_access('UsrMgr')) { ?>
    -check_view_access('GroupMgr') || $user->isAdmin()) { ?> +check_view_access('GroupMgr')) { ?>
    -check_view_access('RoleMgr') || $user->isAdmin()) { ?> +check_view_access('RoleMgr')) { ?>
    -check_view_access('BackupTools') || $user->isAdmin()) { ?> +check_view_access('BackupTools')) { ?>
    check_view_access('LogManagement') || $user->isAdmin())) + if ($logfileenable && ($accessop->check_view_access('LogManagement'))) echo "
    ".getMLText("log_management")."
    "; ?>
    -check_view_access('DefaultKeywords') || $user->isAdmin()) { ?> +check_view_access('DefaultKeywords')) { ?>
    -check_view_access('Categories') || $user->isAdmin()) { ?> +check_view_access('Categories')) { ?>
    -check_view_access('AttributeMgr') || $user->isAdmin()) { ?> +check_view_access('AttributeMgr')) { ?>
    @@ -81,13 +81,13 @@ class SeedDMS_View_AdminTools extends SeedDMS_Bootstrap_Style { if($this->params['workflowmode'] == 'advanced') { ?>
    -check_view_access('WorkflowMgr') || $user->isAdmin()) { ?> +check_view_access('WorkflowMgr')) { ?>
    -check_view_access('WorkflowStatesMgr') || $user->isAdmin()) { ?> +check_view_access('WorkflowStatesMgr')) { ?>
    -check_view_access('WorkflowActionsMgr') || $user->isAdmin()) { ?> +check_view_access('WorkflowActionsMgr')) { ?>
    @@ -96,13 +96,13 @@ class SeedDMS_View_AdminTools extends SeedDMS_Bootstrap_Style { if($enablefullsearch) { ?>
    -check_view_access('Indexer') || $user->isAdmin()) { ?> +check_view_access('Indexer')) { ?>
    -check_view_access('CreateIndex') || $user->isAdmin()) { ?> +check_view_access('CreateIndex')) { ?>
    -check_view_access('IndexInfo') || $user->isAdmin()) { ?> +check_view_access('IndexInfo')) { ?>
    @@ -110,27 +110,27 @@ class SeedDMS_View_AdminTools extends SeedDMS_Bootstrap_Style { } ?>
    -check_view_access('Statistic') || $user->isAdmin()) { ?> +check_view_access('Statistic')) { ?>
    -check_view_access('Charts') || $user->isAdmin()) { ?> +check_view_access('Charts')) { ?>
    -check_view_access('ObjectCheck') || $user->isAdmin()) { ?> +check_view_access('ObjectCheck')) { ?>
    -check_view_access('Timeline') || $user->isAdmin()) { ?> +check_view_access('Timeline')) { ?>
    -check_view_access('Settings') || $user->isAdmin()) { ?> +check_view_access('Settings')) { ?>
    -check_view_access('ExtensionMgr') || $user->isAdmin()) { ?> +check_view_access('ExtensionMgr')) { ?>
    -check_view_access('Info') || $user->isAdmin()) { ?> +check_view_access('Info')) { ?>
    From bc6f641eb3d8fe13bc379fa7bf170bfe293f733f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 22 Apr 2016 08:22:19 +0200 Subject: [PATCH 0507/2006] add more access checks for action 'info' and 'form' --- views/bootstrap/class.AttributeMgr.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.AttributeMgr.php b/views/bootstrap/class.AttributeMgr.php index cd4a3b011..ac0a7fdbc 100644 --- a/views/bootstrap/class.AttributeMgr.php +++ b/views/bootstrap/class.AttributeMgr.php @@ -306,12 +306,16 @@ $(document).ready( function() { ?>
    -
    getID()."\"" : "") ?>>
    +check_view_access($this, array('action'=>'info'))) { ?> +
    getID()."\"" : "") ?>>
    +
    +check_view_access($this, array('action'=>'form'))) { ?>
    getID()."\"" : "") ?>>
    +
    From 088a146888f56b131dfab7ac4182a0fa4d92d6d4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 22 Apr 2016 08:22:50 +0200 Subject: [PATCH 0508/2006] add more access checks, fixed html --- views/bootstrap/class.GroupMgr.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/views/bootstrap/class.GroupMgr.php b/views/bootstrap/class.GroupMgr.php index 2438f17e7..7b1838e0e 100644 --- a/views/bootstrap/class.GroupMgr.php +++ b/views/bootstrap/class.GroupMgr.php @@ -257,6 +257,7 @@ $(document).ready( function() { function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; + $accessop = $this->params['accessobject']; $selgroup = $this->params['selgroup']; $allUsers = $this->params['allusers']; $allGroups = $this->params['allgroups']; @@ -284,18 +285,22 @@ $(document).ready( function() { ?>
    -
    getID()."\"" : "") ?>>
    +check_view_access($this, array('action'=>'info'))) { ?> +
    getID()."\"" : "") ?>>
    +
    -
    -
    getID()."\"" : "") ?>>
    -
    +
    +check_view_access($this, array('action'=>'form'))) { ?> +
    getID()."\"" : "") ?>>
    + +
    +
    contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ From 7e3535ad1ac0d343b183861fd4640d36800c4426 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 22 Apr 2016 08:23:15 +0200 Subject: [PATCH 0509/2006] add more access checks for actions 'info' and 'form' --- views/bootstrap/class.RoleMgr.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.RoleMgr.php b/views/bootstrap/class.RoleMgr.php index 08beeb2e1..d19c6b8a1 100644 --- a/views/bootstrap/class.RoleMgr.php +++ b/views/bootstrap/class.RoleMgr.php @@ -205,14 +205,19 @@ $(document).ready( function() { ?>
    -
    getID()."\"" : "") ?>>
    +check_view_access($this, array('action'=>'info'))) { ?> +
    getID()."\"" : "") ?>>
    +
    +check_view_access($this, array('action'=>'form'))) { ?>
    getID()."\"" : "") ?>>
    +
    +
    contentEnd(); From 0d3ff8a2d4a32d42c76c1d8a15a3be66b01e471b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 22 Apr 2016 08:23:37 +0200 Subject: [PATCH 0510/2006] add access check for action 'form', no need to check for admin --- views/bootstrap/class.UsrMgr.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.UsrMgr.php b/views/bootstrap/class.UsrMgr.php index e241b0a37..337d6841f 100644 --- a/views/bootstrap/class.UsrMgr.php +++ b/views/bootstrap/class.UsrMgr.php @@ -520,14 +520,16 @@ $(document).ready( function() { ?> -check_view_access($this, array('action'=>'info')) || $user->isAdmin()) { ?> -
    getID()."\"" : "") ?>>
    +check_view_access($this, array('action'=>'info'))) { ?> +
    getID()."\"" : "") ?>>
    +check_view_access($this, array('action'=>'form'))) { ?>
    getID()."\"" : "") ?>>
    +
    From c6121ff201ec546477f3ad84398b61b6c7081abe Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 22 Apr 2016 12:25:26 +0200 Subject: [PATCH 0511/2006] do not issue an error if access on library folder is forbitten just disable the upload from the library folder --- out/out.AddDocument.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/out/out.AddDocument.php b/out/out.AddDocument.php index f47e92968..eb805c5d9 100644 --- a/out/out.AddDocument.php +++ b/out/out.AddDocument.php @@ -58,7 +58,8 @@ if($settings->_libraryFolder) { } if ($libfolder->getAccessMode($user) < M_READ) { - UI::exitError(getMLText("folder_title", array("foldername" => htmlspecialchars($libfolder->getName()))), getMLText("access_denied")); + $libfolder = null; +// UI::exitError(getMLText("folder_title", array("foldername" => htmlspecialchars($libfolder->getName()))), getMLText("access_denied")); } } else { $libfolder = null; From 281c4baeb34c0525e22f43c65fb17668b1019700 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 22 Apr 2016 12:30:02 +0200 Subject: [PATCH 0512/2006] some reorganization of code --- out/out.UpdateDocument.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/out/out.UpdateDocument.php b/out/out.UpdateDocument.php index 99e5bfd38..e6f65986e 100644 --- a/out/out.UpdateDocument.php +++ b/out/out.UpdateDocument.php @@ -28,6 +28,10 @@ include("../inc/inc.ClassUI.php"); include("../inc/inc.ClassAccessOperation.php"); include("../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, $user, $settings); + if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) { UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id")); } @@ -57,11 +61,6 @@ if($settings->_quota > 0) { $folder = $document->getFolder(); -/* Create object for checking access to certain operations */ -$accessop = new SeedDMS_AccessOperation($dms, $user, $settings); - -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('folder', $folder); $view->setParam('document', $document); From 35d7a70adeff5a097305010782337443c315f494 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 22 Apr 2016 12:57:39 +0200 Subject: [PATCH 0513/2006] header for additional columns can be set --- inc/inc.ClassDownloadMgr.php | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/inc/inc.ClassDownloadMgr.php b/inc/inc.ClassDownloadMgr.php index 55308ccbf..b91cec988 100644 --- a/inc/inc.ClassDownloadMgr.php +++ b/inc/inc.ClassDownloadMgr.php @@ -48,9 +48,15 @@ class SeedDMS_Download_Mgr { function __construct($tmpdir = '') { $this->tmpdir = $tmpdir; $this->items = array(); + $this->header = array('Dokumenten-Nr.', 'Dokumentenname', 'Dateiname', 'Status', 'Int. Version', 'Prüfer', 'Prüfdatum', 'Prüfkommentar', 'Prüfstatus', 'Freigeber', 'Freigabedatum', 'Freigabekommentar', 'Freigabestatus'); $this->extracols = array(); + $this->extraheader = array(); } + public function addHeader($extraheader) { /* {{{ */ + $this->extraheader = $extraheader; + } /* }}} */ + public function addItem($item, $extracols) { /* {{{ */ $this->items[$item->getID()] = $item; $this->extracols[$item->getID()] = $extracols; @@ -64,19 +70,10 @@ class SeedDMS_Download_Mgr { $i = 1; $col = 0; - $sheet->setCellValueByColumnAndRow($col++, $i, 'Dokumenten-Nr.'); - $sheet->setCellValueByColumnAndRow($col++, $i, 'Dokumentenname'); - $sheet->setCellValueByColumnAndRow($col++, $i, 'Dateiname'); - $sheet->setCellValueByColumnAndRow($col++, $i, 'Status'); - $sheet->setCellValueByColumnAndRow($col++, $i, 'Int. Version'); - $sheet->setCellValueByColumnAndRow($col++, $i, 'Prüfer'); - $sheet->setCellValueByColumnAndRow($col++, $i, 'Prüfdatum'); - $sheet->setCellValueByColumnAndRow($col++, $i, 'Prüfkommentar'); - $sheet->setCellValueByColumnAndRow($col++, $i, 'Prüfstatus'); - $sheet->setCellValueByColumnAndRow($col++, $i, 'Freigeber'); - $sheet->setCellValueByColumnAndRow($col++, $i, 'Freigabedatum'); - $sheet->setCellValueByColumnAndRow($col++, $i, 'Freigabekommentar'); - $sheet->setCellValueByColumnAndRow($col++, $i, 'Freigabestatus'); + foreach($this->header as $h) + $sheet->setCellValueByColumnAndRow($col++, $i, $h); + foreach($this->extraheader as $h) + $sheet->setCellValueByColumnAndRow($col++, $i, $h); $i++; foreach($items as $item) { $document = $item->getDocument(); From 92ab26d547da55cb00c70886e4224c0ee5a03056 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 22 Apr 2016 12:58:28 +0200 Subject: [PATCH 0514/2006] call hook extraDownloadHeader --- views/bootstrap/class.Search.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 1a26f9223..9c462d15b 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -69,6 +69,8 @@ $(document).ready( function() { include("../inc/inc.ClassDownloadMgr.php"); $downmgr = new SeedDMS_Download_Mgr(); + if($extraheader = $this->callHook('extraDownloadHeader')) + $downmgr->addHeader($extraheader); foreach($entries as $entry) { if(get_class($entry) == $dms->getClassname('document')) { $extracols = $this->callHook('extraDownloadColumns', $entry); From ad95fdecd9a881adc723af848d64a601787e377e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 26 Apr 2016 18:12:36 +0200 Subject: [PATCH 0515/2006] add comment the getAccessMode() doesn't work in any case --- 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 864a0d913..56fc96a14 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -3146,6 +3146,9 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ * It is also used by {@link SeedDMS_Core_Document::getAccessMode()} to * prevent access on the whole document if there is no accessible version. * + * FIXME: This function only works propperly if $u is the currently logged in + * user, because noReadForStatus will be set for this user. + * * @param object $u user * @return integer either M_NONE or M_READ */ From f87a3ce570b80375a5ec210a350bea1cd3d03bf8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 26 Apr 2016 18:14:12 +0200 Subject: [PATCH 0516/2006] fix line indenting --- op/op.Ajax.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/op/op.Ajax.php b/op/op.Ajax.php index 53e9cb517..b43e85881 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -484,7 +484,8 @@ switch($command) { $revisions = array(); $resArr = $dms->getDocumentList('AppRevByMe', $user); if($resArr) { - foreach ($resArr as $res) { if($res["status"]==S_DRAFT_REV) + foreach ($resArr as $res) { + if($res["status"]==S_DRAFT_REV) $reviews[] = $res['id']; if($res["status"]==S_DRAFT_APP) $approvals[] = $res['id']; From 6b2d4a4b754534ed804e6c7ca0bc59b9d4e85c4c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 26 Apr 2016 18:14:38 +0200 Subject: [PATCH 0517/2006] set dms in view early, check for access on latest content --- out/out.ViewDocument.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/out/out.ViewDocument.php b/out/out.ViewDocument.php index b59b09853..c198aa03f 100644 --- a/out/out.ViewDocument.php +++ b/out/out.ViewDocument.php @@ -35,7 +35,7 @@ include("../inc/inc.Authentication.php"); require_once("SeedDMS/Preview.php"); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1]); +$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); $accessop = new SeedDMS_AccessOperation($dms, $user, $settings); if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) { @@ -53,6 +53,11 @@ if ($document->getAccessMode($user) < M_READ) { $view->exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); } +/* Could be that the advanced access rights prohibit access on the content */ +if (!$document->getLatestContent()) { + $view->exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); +} + /* Recalculate the status of a document and reload the page if the status * has changed. A status change may occur if the document has expired in * the mean time @@ -69,8 +74,6 @@ if ($document->checkForDueRevisionWorkflow($user)){ } if($view) { - $view->setParam('dms', $dms); - $view->setParam('user', $user); $view->setParam('folder', $folder); $view->setParam('document', $document); $view->setParam('accessobject', $accessop); From 99e52d68f4b3e63787cd849766bfa8ff3a063380 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 26 Apr 2016 18:15:06 +0200 Subject: [PATCH 0518/2006] check if version is accessible don't use the latest version but the version that needs to be reviewed, approved, revised, ... --- views/bootstrap/class.MyDocuments.php | 499 +++++++++++++------------- 1 file changed, 258 insertions(+), 241 deletions(-) diff --git a/views/bootstrap/class.MyDocuments.php b/views/bootstrap/class.MyDocuments.php index 7987c38e8..12e26e0e6 100644 --- a/views/bootstrap/class.MyDocuments.php +++ b/views/bootstrap/class.MyDocuments.php @@ -113,22 +113,23 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { $printheader=false; } - print "\n"; - $latestContent = $document->getLatestContent(); - $previewer->createPreview($latestContent); - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + if($content = $document->getContentByVersion($st['version'])) { + print "\n"; + $previewer->createPreview($content); + print ""; + if($previewer->hasPreview($content)) { + print "getID()."&version=".$content->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } else { + print "getMimeIcon($content->getFileType())."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } + print ""; + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"]).""; + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"]).""; + print "".$st["version"].""; + print "".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) .""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; } - print ""; - print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"]).""; - print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"]).""; - print "".$st["version"].""; - print "".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) .""; - print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; - print "\n"; } } foreach ($reviewStatus["grpstatus"] as $st) { @@ -151,22 +152,23 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { $printheader=false; } - print "\n"; - $latestContent = $document->getLatestContent(); - $previewer->createPreview($latestContent); - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + if($content = $document->getContentByVersion($st['version'])) { + print "\n"; + $previewer->createPreview($content); + print ""; + if($previewer->hasPreview($content)) { + print "getID()."&version=".$content->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } else { + print "getMimeIcon($content->getFileType())."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } + print ""; + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"]).""; + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"]).""; + print "".$st["version"].""; + print "".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]).""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; } - print ""; - print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"]).""; - print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"]).""; - print "".$st["version"].""; - print "".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]).""; - print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; - print "\n"; } } if (!$printheader){ @@ -201,22 +203,23 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { $printheader=false; } - print "\n"; - $latestContent = $document->getLatestContent(); - $previewer->createPreview($latestContent); - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + if($content = $document->getContentByVersion($st['version'])) { + print "\n"; + $previewer->createPreview($content); + print ""; + if($previewer->hasPreview($content)) { + print "getID()."&version=".$content->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } else { + print "getMimeIcon($content->getFileType())."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } + print ""; + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"]).""; + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"]).""; + print "".$st["version"].""; + print "".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]).""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; } - print ""; - print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"]).""; - print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"]).""; - print "".$st["version"].""; - print "".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]).""; - print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; - print "\n"; } } foreach ($approvalStatus["grpstatus"] as $st) { @@ -236,22 +239,24 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { print "\n\n\n"; $printheader=false; } - print "\n"; - $latestContent = $document->getLatestContent(); - $previewer->createPreview($latestContent); - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + + if($content = $document->getContentByVersion($st['version'])) { + print "\n"; + $previewer->createPreview($content); + print ""; + if($previewer->hasPreview($content)) { + print "getID()."&version=".$content->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } else { + print "getMimeIcon($content->getFileType())."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } + print ""; + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"]).""; + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"]).""; + print "".$st["version"].""; + print "".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]).""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; } - print ""; - print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"]).""; - print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"]).""; - print "".$st["version"].""; - print "".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]).""; - print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; - print "\n"; } } if (!$printheader){ @@ -310,22 +315,23 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { } } - print "\n"; - $latestContent = $document->getLatestContent(); - $previewer->createPreview($latestContent); - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + if($content = $document->getContentByVersion($res['version'])) { + print "\n"; + $previewer->createPreview($content); + print ""; + if($previewer->hasPreview($content)) { + print "getID()."&version=".$content->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } else { + print "getMimeIcon($content->getFileType())."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } + print ""; + print "" . htmlspecialchars($res["name"]) . "\n"; + print "".getOverallStatusText($res["status"]).""; + print "".$res["version"].""; + print "".$res["statusDate"]." ".htmlspecialchars($res["statusName"]).""; + print "".(!$res["expires"] ? "-":getReadableDate($res["expires"])).""; + print "\n"; } - print ""; - print "" . htmlspecialchars($res["name"]) . "\n"; - print "".getOverallStatusText($res["status"]).""; - print "".$res["version"].""; - print "".$res["statusDate"]." ".htmlspecialchars($res["statusName"]).""; - print "".(!$res["expires"] ? "-":getReadableDate($res["expires"])).""; - print "\n"; } print ""; @@ -390,22 +396,23 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { $printheader=false; } - print "\n"; - $latestContent = $document->getLatestContent(); - $previewer->createPreview($latestContent); - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + if($content = $document->getContentByVersion($st['version'])) { + print "\n"; + $previewer->createPreview($content); + print ""; + if($previewer->hasPreview($content)) { + print "getID()."&version=".$content->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } else { + print "getMimeIcon($content->getFileType())."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } + print ""; + print "".htmlspecialchars($docIdx[$st["document"]][$st["version"]]["name"]).""; + print "".htmlspecialchars($docIdx[$st["document"]][$st["version"]]["ownerName"]).""; + print "".$st["version"].""; + print "".$st["date"]." ". htmlspecialchars($docIdx[$st["document"]][$st["version"]]["statusName"]) .""; + print "".(!$docIdx[$st["document"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["document"]][$st["version"]]["expires"])).""; + print "\n"; } - print ""; - print "".htmlspecialchars($docIdx[$st["document"]][$st["version"]]["name"]).""; - print "".htmlspecialchars($docIdx[$st["document"]][$st["version"]]["ownerName"]).""; - print "".$st["version"].""; - print "".$st["date"]." ". htmlspecialchars($docIdx[$st["document"]][$st["version"]]["statusName"]) .""; - print "".(!$docIdx[$st["document"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["document"]][$st["version"]]["expires"])).""; - print "\n"; } } foreach ($workflowStatus["g"] as $st) { @@ -428,22 +435,23 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { $printheader=false; } - print "\n"; - $latestContent = $document->getLatestContent(); - $previewer->createPreview($latestContent); - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + if($content = $document->getContentByVersion($st['version'])) { + print "\n"; + $previewer->createPreview($content); + print ""; + if($previewer->hasPreview($content)) { + print "getID()."&version=".$content->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } else { + print "getMimeIcon($content->getFileType())."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } + print ""; + print "".htmlspecialchars($docIdx[$st["document"]][$st["version"]]["name"]).""; + print "".htmlspecialchars($docIdx[$st["document"]][$st["version"]]["ownerName"]).""; + print "".$st["version"].""; + print "".$st["date"]." ". htmlspecialchars($docIdx[$st["document"]][$st["version"]]["statusName"]).""; + print "".(!$docIdx[$st["document"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["document"]][$st["version"]]["expires"])).""; + print "\n"; } - print ""; - print "".htmlspecialchars($docIdx[$st["document"]][$st["version"]]["name"]).""; - print "".htmlspecialchars($docIdx[$st["document"]][$st["version"]]["ownerName"]).""; - print "".$st["version"].""; - print "".$st["date"]." ". htmlspecialchars($docIdx[$st["document"]][$st["version"]]["statusName"]).""; - print "".(!$docIdx[$st["document"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["document"]][$st["version"]]["expires"])).""; - print "\n"; } } if (!$printheader){ @@ -487,22 +495,23 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { } } - print "\n"; - $latestContent = $document->getLatestContent(); - $previewer->createPreview($latestContent); - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + if($content = $document->getContentByVersion($res['version'])) { + print "\n"; + $previewer->createPreview($content); + print ""; + if($previewer->hasPreview($content)) { + print "getID()."&version=".$content->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } else { + print "getMimeIcon($content->getFileType())."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } + print ""; + print "" . htmlspecialchars($res["name"]) . "\n"; + print "".getOverallStatusText($res["status"]).""; + print "".$res["version"].""; + print "".$res["statusDate"]." ".htmlspecialchars($res["statusName"]).""; + print "".(!$res["expires"] ? "-":getReadableDate($res["expires"])).""; + print "\n"; } - print ""; - print "" . htmlspecialchars($res["name"]) . "\n"; - print "".getOverallStatusText($res["status"]).""; - print "".$res["version"].""; - print "".$res["statusDate"]." ".htmlspecialchars($res["statusName"]).""; - print "".(!$res["expires"] ? "-":getReadableDate($res["expires"])).""; - print "\n"; } print ""; @@ -561,22 +570,23 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { $printheader=false; } - print "\n"; - $latestContent = $document->getLatestContent(); - $previewer->createPreview($latestContent); - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + if($content = $document->getContentByVersion($st['version'])) { + print "\n"; + $previewer->createPreview($content); + print ""; + if($previewer->hasPreview($content)) { + print "getID()."&version=".$content->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } else { + print "getMimeIcon($content->getFileType())."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } + print ""; + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"]).""; + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"]).""; + print "".$st["version"].""; + print "".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) .""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; } - print ""; - print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"]).""; - print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"]).""; - print "".$st["version"].""; - print "".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) .""; - print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; - print "\n"; } } foreach ($revisionStatus["grpstatus"] as $st) { @@ -598,22 +608,23 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { $printheader=false; } - print "\n"; - $latestContent = $document->getLatestContent(); - $previewer->createPreview($latestContent); - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + if($content = $document->getContentByVersion($st['version'])) { + print "\n"; + $previewer->createPreview($content); + print ""; + if($previewer->hasPreview($content)) { + print "getID()."&version=".$content->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } else { + print "getMimeIcon($content->getFileType())."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } + print ""; + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"]).""; + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"]).""; + print "".$st["version"].""; + print "".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]).""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; } - print ""; - print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"]).""; - print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"]).""; - print "".$st["version"].""; - print "".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]).""; - print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; - print "\n"; } } if (!$printheader){ @@ -677,22 +688,23 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { $printheader=false; } - print "\n"; - $latestContent = $document->getLatestContent(); - $previewer->createPreview($latestContent); - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + if($content = $document->getContentByVersion($st['version'])) { + print "\n"; + $previewer->createPreview($content); + print ""; + if($previewer->hasPreview($content)) { + print "getID()."&version=".$content->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } else { + print "getMimeIcon($content->getFileType())."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } + print ""; + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"]).""; + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"]).""; + print "".$st["version"].""; + print "".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) .""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; } - print ""; - print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"]).""; - print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"]).""; - print "".$st["version"].""; - print "".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]) .""; - print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; - print "\n"; } } foreach ($receiptStatus["grpstatus"] as $st) { @@ -714,22 +726,23 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { $printheader=false; } - print "\n"; - $latestContent = $document->getLatestContent(); - $previewer->createPreview($latestContent); - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + if($content = $document->getContentByVersion($st['version'])) { + print "\n"; + $previewer->createPreview($content); + print ""; + if($previewer->hasPreview($content)) { + print "getID()."&version=".$content->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } else { + print "getMimeIcon($content->getFileType())."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } + print ""; + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"]).""; + print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"]).""; + print "".$st["version"].""; + print "".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]).""; + print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; + print "\n"; } - print ""; - print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["name"]).""; - print "".htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["ownerName"]).""; - print "".$st["version"].""; - print "".$st["date"]." ". htmlspecialchars($docIdx[$st["documentID"]][$st["version"]]["statusName"]).""; - print "".(!$docIdx[$st["documentID"]][$st["version"]]["expires"] ? "-":getReadableDate($docIdx[$st["documentID"]][$st["version"]]["expires"])).""; - print "\n"; } } if (!$printheader){ @@ -782,22 +795,23 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { } } - print "\n"; - $latestContent = $document->getLatestContent(); - $previewer->createPreview($latestContent); - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + if($content = $document->getContentByVersion($res['version'])) { + print "\n"; + $previewer->createPreview($content); + print ""; + if($previewer->hasPreview($content)) { + print "getID()."&version=".$content->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } else { + print "getMimeIcon($content->getFileType())."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } + print ""; + print "" . htmlspecialchars($res["name"]) . "\n"; + print "".getOverallStatusText($res["status"]).""; + print "".$res["version"].""; + print "".$res["statusDate"]." ".htmlspecialchars($res["statusName"]).""; + print "".(!$res["expires"] ? "-":getReadableDate($res["expires"])).""; + print "\n"; } - print ""; - print "" . htmlspecialchars($res["name"]) . "\n"; - print "".getOverallStatusText($res["status"]).""; - print "".$res["version"].""; - print "".$res["statusDate"]." ".htmlspecialchars($res["statusName"]).""; - print "".(!$res["expires"] ? "-":getReadableDate($res["expires"])).""; - print "\n"; } print ""; @@ -837,22 +851,23 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { } } - print "\n"; - $latestContent = $document->getLatestContent(); - $previewer->createPreview($latestContent); - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + if($content = $document->getContentByVersion($res['version'])) { + print "\n"; + $previewer->createPreview($content); + print ""; + if($previewer->hasPreview($content)) { + print "getID()."&version=".$content->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } else { + print "getMimeIcon($content->getFileType())."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } + print ""; + print "" . htmlspecialchars($res["name"]) . "\n"; + print "".getOverallStatusText($res["status"]).""; + print "".$res["version"].""; + print "".$res["statusDate"]." ".htmlspecialchars($res["statusName"]).""; + print "".(!$res["expires"] ? "-":getReadableDate($res["expires"])).""; + print "\n"; } - print ""; - print "" . htmlspecialchars($res["name"]) . "\n"; - print "".getOverallStatusText($res["status"]).""; - print "".$res["version"].""; - print "".$res["statusDate"]." ".htmlspecialchars($res["statusName"]).""; - print "".(!$res["expires"] ? "-":getReadableDate($res["expires"])).""; - print "\n"; } print ""; @@ -894,22 +909,23 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { } } - print "\n"; - $latestContent = $document->getLatestContent(); - $previewer->createPreview($latestContent); - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + if($content = $document->getContentByVersion($res['version'])) { + print "\n"; + $previewer->createPreview($content); + print ""; + if($previewer->hasPreview($content)) { + print "getID()."&version=".$content->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } else { + print "getMimeIcon($content->getFileType())."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } + print ""; + print "" . htmlspecialchars($res["name"]) . "\n"; + print "".getOverallStatusText($res["status"]).""; + print "".$res["version"].""; + print "".$res["statusDate"]." ".htmlspecialchars($res["statusName"]).""; + print "".(!$res["expires"] ? "-":getReadableDate($res["expires"])).""; + print "\n"; } - print ""; - print "" . htmlspecialchars($res["name"]) . "\n"; - print "".getOverallStatusText($res["status"]).""; - print "".$res["version"].""; - print "".$res["statusDate"]." ".htmlspecialchars($res["statusName"]).""; - print "".(!$res["expires"] ? "-":getReadableDate($res["expires"])).""; - print "\n"; } print ""; @@ -956,23 +972,24 @@ class SeedDMS_View_MyDocuments extends SeedDMS_Bootstrap_Style { } } - print "\n"; - $latestContent = $document->getLatestContent(); - $previewer->createPreview($latestContent); - print ""; - if($previewer->hasPreview($latestContent)) { - print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + if($content = $document->getContentByVersion($res['version'])) { + print "\n"; + $previewer->createPreview($content); + print ""; + if($previewer->hasPreview($content)) { + print "getID()."&version=".$content->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } else { + print "getMimeIcon($content->getFileType())."\" title=\"".htmlspecialchars($content->getMimeType())."\">"; + } + print ""; + print "" . htmlspecialchars($res["name"]) . "\n"; + print "".getOverallStatusText($res["status"]).""; + print "".$res["version"].""; + print "".$res["statusDate"]." ". htmlspecialchars($res["statusName"]).""; + //print "".(!$res["expires"] ? getMLText("does_not_expire"):getReadableDate($res["expires"])).""; + print "".(!$res["expires"] ? "-":getReadableDate($res["expires"])).""; + print "\n"; } - print ""; - print "" . htmlspecialchars($res["name"]) . "\n"; - print "".getOverallStatusText($res["status"]).""; - print "".$res["version"].""; - print "".$res["statusDate"]." ". htmlspecialchars($res["statusName"]).""; - //print "".(!$res["expires"] ? getMLText("does_not_expire"):getReadableDate($res["expires"])).""; - print "".(!$res["expires"] ? "-":getReadableDate($res["expires"])).""; - print "\n"; } print ""; } From 51ca23085aaef863f171ca14141e0e8f4933d7f0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 26 Apr 2016 18:16:24 +0200 Subject: [PATCH 0519/2006] fix some html markup --- views/bootstrap/class.ViewDocument.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 845fb01de..eb6dcc648 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -502,7 +502,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } } } - print "\n"; + print "\n"; // print "".htmlspecialchars($latestContent->getComment()).""; @@ -693,7 +693,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } print "\n"; - print "\n\n"; + print "\n"; } } @@ -763,7 +763,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print ""; print "\n"; - print "\n\n"; + print "\n"; } } @@ -1047,7 +1047,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } print "\n"; - print "\n\n"; + print "\n"; } ?> @@ -1157,7 +1157,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } print "\n"; - print "\n\n"; + print "\n"; } ?> @@ -1329,7 +1329,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "
  • ".getMLText("uploaded_by")." getEmail()."\">".htmlspecialchars($responsibleUser->getFullName())."
  • "; print "
  • ".getLongReadableDate($file->getDate())."
  • "; - + print ""; print "".htmlspecialchars($file->getComment()).""; print "\n"; @@ -336,9 +338,12 @@ $(document).ready(function () { echo "
      \n"; if (!$this->params['user']->isGuest()) { $menuitems = array(); - $menuitems['my_documents'] = array('link'=>"../out/out.MyDocuments.php?inProcess=1", 'label'=>'my_documents'); - $menuitems['my_account'] = array('link'=>"../out/out.MyAccount.php", 'label'=>'my_account'); - $menuitems['my_transmittals'] = array('link'=>"../out/out.TransmittalMgr.php", 'label'=>'my_transmittals'); + if ($this->check_access('MyDocuments')) + $menuitems['my_documents'] = array('link'=>"../out/out.MyDocuments.php", 'label'=>'my_documents'); + if ($this->check_access('MyAccount')) + $menuitems['my_account'] = array('link'=>"../out/out.MyAccount.php", 'label'=>'my_account'); + if ($this->check_access('TransmittalMgr')) + $menuitems['my_transmittals'] = array('link'=>"../out/out.TransmittalMgr.php", 'label'=>'my_transmittals'); $hookObjs = $this->getHookObjects('SeedDMS_View_Bootstrap'); foreach($hookObjs as $hookObj) { if (method_exists($hookObj, 'userMenuItems')) { @@ -661,7 +666,7 @@ $(document).ready(function () { private function myDocumentsNavigationBar() { /* {{{ */ - echo "".getMLText("my_documents")."\n"; + echo "".getMLText("my_documents")."\n"; echo "
      \n"; echo "
        \n"; @@ -2440,6 +2445,7 @@ mayscript> protected function printProtocol($latestContent, $type="") { /* {{{ */ $dms = $this->params['dms']; $document = $latestContent->getDocument(); + $accessop = $this->params['accessobject']; ?> From 2d199cae8dc9a6527856262f50a8de38aa0de94c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 22 Aug 2016 06:28:29 +0200 Subject: [PATCH 0596/2006] use ajax for loading parts of page --- views/bootstrap/class.TransmittalMgr.php | 205 +++++++++++++++-------- 1 file changed, 134 insertions(+), 71 deletions(-) diff --git a/views/bootstrap/class.TransmittalMgr.php b/views/bootstrap/class.TransmittalMgr.php index 8a79b829c..e7979ed54 100644 --- a/views/bootstrap/class.TransmittalMgr.php +++ b/views/bootstrap/class.TransmittalMgr.php @@ -36,6 +36,14 @@ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { $this->printDeleteDocumentButtonJs(); $this->printDeleteItemButtonJs(); $this->printUpdateItemButtonJs(); +?> +$(document).ready( function() { + $('body').on('click', '.selecttransmittal', function(ev){ + ev.preventDefault(); + $('div.ajax').trigger('update', {transmittalid: $(ev.currentTarget).data('transmittalid')}); + }); +}); +getID(); $content = ''; - $content .= ''; + $content .= ''; if($return) return $content; else @@ -55,11 +63,12 @@ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { return ''; } /* }}} */ - function printUpdateItemButtonJs(){ /* {{{ */ + protected function printUpdateItemButtonJs(){ /* {{{ */ echo " $(document).ready(function () { $('body').on('click', 'a.update-transmittalitem-btn', function(ev){ id = $(ev.currentTarget).attr('rel'); + transmittalid = $(ev.currentTarget).attr('transmittal'); confirmmsg = $(ev.currentTarget).attr('confirmmsg'); msg = $(ev.currentTarget).attr('msg'); formtoken = '".createFormKey('updatetransmittalitem')."'; @@ -67,11 +76,17 @@ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { \"label\" : \" ".getMLText("update_transmittalitem")."\", \"class\" : \"btn-danger\", \"callback\": function() { - $.get('../op/op.Ajax.php', - { command: 'updatetransmittalitem', id: id, formtoken: formtoken }, - function(data) { + $.ajax('../op/op.TransmittalMgr.php', { + type:'POST', + async:true, + dataType:'json', + data: { + action: 'updatetransmittalitem', + id: id, + formtoken: formtoken + }, + success: function(data) { if(data.success) { - $('#table-row-document-'+id).hide('slow'); noty({ text: msg, type: 'success', @@ -80,6 +95,7 @@ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { theme: 'defaultTheme', timeout: 1500, }); + $('div.ajax').trigger('update', {transmittalid: transmittalid}); } else { noty({ text: data.message, @@ -90,9 +106,8 @@ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { timeout: 3500, }); } - }, - 'json' - ); + } + }); } }, { \"label\" : \"".getMLText("cancel")."\", @@ -115,7 +130,7 @@ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { * @param boolean $return return html instead of printing it * @return string html content if $return is true, otherwise an empty string */ - function printDeleteItemButton($item, $msg, $return=false){ /* {{{ */ + protected function printDeleteItemButton($item, $msg, $return=false){ /* {{{ */ $itemid = $item->getID(); $content = ''; $content .= ''; @@ -126,7 +141,7 @@ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { return ''; } /* }}} */ - function printDeleteItemButtonJs(){ /* {{{ */ + protected function printDeleteItemButtonJs(){ /* {{{ */ echo " $(document).ready(function () { $('body').on('click', 'a.delete-transmittalitem-btn', function(ev){ @@ -138,11 +153,18 @@ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { \"label\" : \" ".getMLText("rm_transmittalitem")."\", \"class\" : \"btn-danger\", \"callback\": function() { - $.get('../op/op.Ajax.php', - { command: 'removetransmittalitem', id: id, formtoken: formtoken }, - function(data) { + $.ajax('../op/op.TransmittalMgr.php', { + type:'POST', + async:true, + dataType:'json', + data: { + action: 'removetransmittalitem', + id: id, + formtoken: formtoken + }, + success: function(data) { if(data.success) { - $('#table-row-document-'+id).hide('slow'); + $('#table-row-transmittalitem-'+id).hide('slow'); noty({ text: msg, type: 'success', @@ -162,8 +184,7 @@ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { }); } }, - 'json' - ); + }); } }, { \"label\" : \"".getMLText("cancel")."\", @@ -176,9 +197,10 @@ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { "; } /* }}} */ - function showTransmittalForm($transmittal) { /* {{{ */ + protected function showTransmittalForm($transmittal) { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; + $accessop = $this->params['accessobject']; ?>
        check_controller_access('TransmittalMgr', array('action'=>'removetransmittal'))) { ?> @@ -214,75 +236,44 @@ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { +check_controller_access('TransmittalMgr', array('action'=>'edittransmittal')) || !$currRole && $accessop->check_controller_access('TransmittalMgr', array('action'=>'addtransmittal'))) { +?> +
        : ">
        params['seltransmittal']; + + $this->showTransmittalForm($seltransmittal); + } /* }}} */ + + function form() { /* {{{ */ + $seltransmittal = $this->params['seltransmittal']; + + $this->showTransmittalForm($seltransmittal); + } /* }}} */ + + protected function showTransmittalItems($seltransmittal) { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; - $seltransmittal = $this->params['seltransmittal']; + $accessop = $this->params['accessobject']; $cachedir = $this->params['cachedir']; $previewwidth = $this->params['previewWidthList']; $previewconverters = $this->params['previewconverters']; - $timeout = $this->params['timeout']; $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); $previewer->setConverters($previewconverters); - $this->htmlAddHeader(''."\n", 'js'); - - $this->htmlStartPage(getMLText("my_transmittals")); - $this->globalNavigation(); - $this->contentStart(); - $this->pageNavigation(getMLText("my_transmittals"), "my_documents"); - $this->contentHeading(getMLText("my_transmittals")); -?> -
        -
        -contentContainerStart(); - - $transmittals = $dms->getAllTransmittals($user); - - if ($transmittals){ - print ""; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; - foreach($transmittals as $transmittal) { - print "\n"; - print ""; - print ""; - $items = $transmittal->getItems(); - print ""; - print ""; - print "\n"; - } - print "\n
        ".getMLText("name")."".getMLText("comment")."".getMLText("transmittal_size")."
        ".$transmittal->getName()."".$transmittal->getComment()."".count($items)." (".SeedDMS_Core_File::format_filesize($transmittal->getSize()).")"; - print ""; - print "
        \n"; - } - - $this->contentContainerEnd(); -?> -
        -
        -contentContainerStart(); - $this->showTransmittalForm($seltransmittal); - $this->contentContainerEnd(); - if($seltransmittal) { $items = $seltransmittal->getItems(); if($items) { @@ -318,6 +309,78 @@ class SeedDMS_View_TransmittalMgr extends SeedDMS_Bootstrap_Style { print "getID()."\">".getMLText('download').""; } } + } /* }}} */ + + function items() { /* {{{ */ + $seltransmittal = $this->params['seltransmittal']; + + $this->showTransmittalItems($seltransmittal); + } /* }}} */ + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $accessop = $this->params['accessobject']; + $seltransmittal = $this->params['seltransmittal']; + $cachedir = $this->params['cachedir']; + $timeout = $this->params['timeout']; + + $this->htmlAddHeader(''."\n", 'js'); + + $this->htmlStartPage(getMLText("my_transmittals")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("my_transmittals"), "my_documents"); + $this->contentHeading(getMLText("my_transmittals")); +?> +
        +
        +contentContainerStart(); + + $transmittals = $dms->getAllTransmittals($user); + + if ($transmittals){ + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + foreach($transmittals as $transmittal) { + print "\n"; + print ""; + print ""; + $items = $transmittal->getItems(); + print ""; + print ""; + print "\n"; + } + print "\n
        ".getMLText("name")."".getMLText("comment")."".getMLText("transmittal_size")."
        ".$transmittal->getName()."".$transmittal->getComment()."".count($items)." (".SeedDMS_Core_File::format_filesize($transmittal->getSize()).")"; + print ""; + print "
        \n"; + } + + $this->contentContainerEnd(); +?> +
        +
        +check_view_access($this, array('action'=>'form'))) { + $this->contentContainerStart(); +?> +
        getID()."\"" : "") ?>>
        +contentContainerEnd(); + } + if($accessop->check_view_access($this, array('action'=>'items'))) { +?> +
        getID()."\"" : "") ?>>
        +
        From a2bde8fd6b08166b2209e3a5f01f636708228287 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 22 Aug 2016 06:29:50 +0200 Subject: [PATCH 0597/2006] access check for AddToTransmittal --- views/bootstrap/class.ViewDocument.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 88548f2e5..40e2753f0 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -1300,6 +1300,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if($accessop->mayRemoveVersion($document)) { print "
      • ".$this->html_link('RemoveVersion', array('documentid'=>$documentid, 'version'=>$version->getVersion()), array(), "".getMLText("rm_version"), false, true)."
      • "; } + if($this->check_access('AddToTransmittal')) + print "
      • ".$this->html_link('AddToTransmittal', array('documentid'=>$documentid, 'version'=>$version->getVersion()), array(), "".getMLText("add_to_transmittal"), false, true)."
      • "; if($accessop->mayEditComment($document)) { print "
      • ".$this->html_link('EditComment', array('documentid'=>$documentid, 'version'=>$version->getVersion()), array(), "".getMLText("edit_comment"), false, true)."
      • "; } From c8121afed183e657cd4d4741f61f0685fcb4d74e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 22 Aug 2016 06:30:38 +0200 Subject: [PATCH 0598/2006] make transmittal,document,version unique in tblTransmittalItem --- install/create_tables-innodb.sql | 2 +- install/create_tables-sqlite3.sql | 2 +- install/update-5.1.0/update-sqlite3.sql | 2 +- install/update-5.1.0/update.sql | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install/create_tables-innodb.sql b/install/create_tables-innodb.sql index d14d46f8a..9d5991ead 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -843,7 +843,7 @@ CREATE TABLE `tblTransmittalItems` ( `version` smallint(5) unsigned NOT NULL default '0', `date` datetime NOT NULL, PRIMARY KEY (`id`), - UNIQUE (document, version), + UNIQUE (transmittal, document, version), CONSTRAINT `tblTransmittalItems_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, CONSTRAINT `tblTransmittalItem_transmittal` FOREIGN KEY (`transmittal`) REFERENCES `tblTransmittals` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/install/create_tables-sqlite3.sql b/install/create_tables-sqlite3.sql index fc3486a5d..1ea5bf56e 100644 --- a/install/create_tables-sqlite3.sql +++ b/install/create_tables-sqlite3.sql @@ -729,7 +729,7 @@ CREATE TABLE `tblTransmittalItems` ( `document` INTEGER default NULL REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, `version` INTEGER unsigned NOT NULL default '0', `date` TEXT NOT NULL, - UNIQUE (document, version) + UNIQUE (transmittal, document, version) ); -- -------------------------------------------------------- diff --git a/install/update-5.1.0/update-sqlite3.sql b/install/update-5.1.0/update-sqlite3.sql index 0afe6f5a5..f38565f01 100644 --- a/install/update-5.1.0/update-sqlite3.sql +++ b/install/update-5.1.0/update-sqlite3.sql @@ -72,7 +72,7 @@ CREATE TABLE `tblTransmittalItems` ( `document` INTEGER default NULL REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, `version` INTEGER unsigned NOT NULL default '0', `date` TEXT NOT NULL, - UNIQUE (document, version) + UNIQUE (transmittal, document, version) ); CREATE TABLE `tblRoles` ( diff --git a/install/update-5.1.0/update.sql b/install/update-5.1.0/update.sql index 34c5571cc..1dadf78db 100644 --- a/install/update-5.1.0/update.sql +++ b/install/update-5.1.0/update.sql @@ -102,7 +102,7 @@ CREATE TABLE `tblTransmittalItems` ( `version` smallint(5) unsigned NOT NULL default '0', `date` datetime NOT NULL, PRIMARY KEY (`id`), - UNIQUE (document, version), + UNIQUE (transmittal, document, version), CONSTRAINT `tblTransmittalItems_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, CONSTRAINT `tblTransmittalItem_transmittal` FOREIGN KEY (`transmittal`) REFERENCES `tblTransmittals` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; From 34ce80eb3d809e693fb7a6e577a9e415bf1d5a94 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 22 Aug 2016 17:00:52 +0200 Subject: [PATCH 0599/2006] do not redirect if session ended and it is an ajax call --- inc/inc.Authentication.php | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/inc/inc.Authentication.php b/inc/inc.Authentication.php index 8c314f585..ecdf35d81 100644 --- a/inc/inc.Authentication.php +++ b/inc/inc.Authentication.php @@ -24,19 +24,25 @@ if (!strncmp("/op", $refer, 3)) { } else { $refer = urlencode($refer); } + +/* Check if this is a ajax call. In that case do not redirect to any page */ +$isajax = isset($_GET['action']) && ($_GET['action'] != 'show'); + if (!isset($_COOKIE["mydms_session"])) { if($settings->_enableGuestLogin && $settings->_enableGuestAutoLogin) { require_once("../inc/inc.ClassSession.php"); $session = new SeedDMS_Session($db); if(!$dms_session = $session->create(array('userid'=>$settings->_guestID, 'theme'=>$settings->_theme, 'lang'=>$settings->_language))) { - header("Location: " . $settings->_httpRoot . "out/out.Login.php?referuri=".$refer); + if(!$isajax) + header("Location: " . $settings->_httpRoot . "out/out.Login.php?referuri=".$refer); exit; } $resArr = $session->load($dms_session); } elseif($settings->_autoLoginUser) { require_once("../inc/inc.ClassSession.php"); if(!($user = $dms->getUser($settings->_autoLoginUser))/* || !$user->isGuest()*/) { - header("Location: " . $settings->_httpRoot . "out/out.Login.php?referuri=".$refer); + if(!$isajax) + header("Location: " . $settings->_httpRoot . "out/out.Login.php?referuri=".$refer); exit; } $theme = $user->getTheme(); @@ -51,12 +57,14 @@ if (!isset($_COOKIE["mydms_session"])) { } $session = new SeedDMS_Session($db); if(!$dms_session = $session->create(array('userid'=>$user->getID(), 'theme'=>$theme, 'lang'=>$lang))) { - header("Location: " . $settings->_httpRoot . "out/out.Login.php?referuri=".$refer); + if(!$isajax) + header("Location: " . $settings->_httpRoot . "out/out.Login.php?referuri=".$refer); exit; } $resArr = $session->load($dms_session); } else { - header("Location: " . $settings->_httpRoot . "out/out.Login.php?referuri=".$refer); + if(!$isajax) + header("Location: " . $settings->_httpRoot . "out/out.Login.php?referuri=".$refer); exit; } } else { @@ -65,7 +73,8 @@ if (!isset($_COOKIE["mydms_session"])) { $session = new SeedDMS_Session($db); if(!$resArr = $session->load($dms_session)) { setcookie("mydms_session", $dms_session, time()-3600, $settings->_httpRoot); //delete cookie - header("Location: " . $settings->_httpRoot . "out/out.Login.php?referuri=".$refer); + if(!$isajax) + header("Location: " . $settings->_httpRoot . "out/out.Login.php?referuri=".$refer); exit; } } @@ -77,7 +86,8 @@ $session->updateAccess($dms_session); $user = $dms->getUser($resArr["userID"]); if (!is_object($user)) { setcookie("mydms_session", $dms_session, time()-3600, $settings->_httpRoot); //delete cookie - header("Location: " . $settings->_httpRoot . "out/out.Login.php?referuri=".$refer); + if(!$isajax) + header("Location: " . $settings->_httpRoot . "out/out.Login.php?referuri=".$refer); exit; } @@ -126,6 +136,10 @@ if(file_exists($settings->_rootDir . "view/".$theme."/languages/" . $lang . "/la include $settings->_rootDir . "view/".$theme."/languages/" . $lang . "/lang.inc"; } +/* if this is a ajax call, then exit early as the rest of the script is irrelevant */ +if($isajax) + return; + /* Check if password needs to be changed because it expired. If it needs * to be changed redirect to out/out.ForcePasswordChange.php. Do this * check only if password expiration is turned on, we are not on the From 3fbfadeebd5fbaeb51a099a7361ab504340c6207 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 22 Aug 2016 17:01:53 +0200 Subject: [PATCH 0600/2006] add optional parameter $plain to exitError() if set, the resulting html will only be a html fragment to be embedded in a page --- inc/inc.ClassUI.php | 4 ++-- views/bootstrap/class.Bootstrap.php | 22 +++++++++++++--------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/inc/inc.ClassUI.php b/inc/inc.ClassUI.php index e849055d1..da6989de2 100644 --- a/inc/inc.ClassUI.php +++ b/inc/inc.ClassUI.php @@ -128,12 +128,12 @@ class UI extends UI_Default { return $themes; } /* }}} */ - static function exitError($pagetitle, $error) { + static function exitError($pagetitle, $error, $noexit=false, $plain=false) { global $theme, $dms; $tmp = 'ErrorDlg'; $view = UI::factory($theme, $tmp); $view->setParam('dms', $dms); - $view->exitError($pagetitle, $error); + $view->exitError($pagetitle, $error, $noexit, $plain); } } diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 3242ab7c8..8977230a8 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1438,20 +1438,24 @@ $('#clearfilename').click(function(ev) { echo "
        \n"; } /* }}} */ - function exitError($pagetitle, $error, $noexit=false) { /* {{{ */ - - $this->htmlStartPage($pagetitle); - $this->globalNavigation(); - $this->contentStart(); + function exitError($pagetitle, $error, $noexit=false, $plain=false) { /* {{{ */ + + if(!$plain) { + $this->htmlStartPage($pagetitle); + $this->globalNavigation(); + $this->contentStart(); + } print "
        "; print "

        ".getMLText('error')."!

        "; print htmlspecialchars($error); print "
        "; - print "
        "; - - $this->contentEnd(); - $this->htmlEndPage(); + if(!$plain) { + print "
        "; + + $this->contentEnd(); + $this->htmlEndPage(); + } // add_log_line(" UI::exitError error=".$error." pagetitle=".$pagetitle, PEAR_LOG_ERR); From 58e52856b2800fdcab6cfc88dffbb912ceb34294 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 22 Aug 2016 17:02:56 +0200 Subject: [PATCH 0601/2006] remove removeitem(), get $timeout from view in items() --- views/bootstrap/class.TransmittalMgr.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/views/bootstrap/class.TransmittalMgr.php b/views/bootstrap/class.TransmittalMgr.php index e7979ed54..541e1dd04 100644 --- a/views/bootstrap/class.TransmittalMgr.php +++ b/views/bootstrap/class.TransmittalMgr.php @@ -251,12 +251,6 @@ $(document).ready( function() { params['seltransmittal']; - - $this->showTransmittalForm($seltransmittal); - } /* }}} */ - function form() { /* {{{ */ $seltransmittal = $this->params['seltransmittal']; @@ -268,6 +262,7 @@ $(document).ready( function() { $user = $this->params['user']; $accessop = $this->params['accessobject']; $cachedir = $this->params['cachedir']; + $timeout = $this->params['timeout']; $previewwidth = $this->params['previewWidthList']; $previewconverters = $this->params['previewconverters']; @@ -322,8 +317,6 @@ $(document).ready( function() { $user = $this->params['user']; $accessop = $this->params['accessobject']; $seltransmittal = $this->params['seltransmittal']; - $cachedir = $this->params['cachedir']; - $timeout = $this->params['timeout']; $this->htmlAddHeader(''."\n", 'js'); From 8b9d4b98d58a42bf5e87a364ff2ac0e9a9e7cea0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 22 Aug 2016 17:03:29 +0200 Subject: [PATCH 0602/2006] set parameter $plain for exitError() in case of an ajax call --- out/out.GroupMgr.php | 7 ++++--- out/out.TransmittalMgr.php | 7 ++----- out/out.UsrMgr.php | 9 +++++---- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/out/out.GroupMgr.php b/out/out.GroupMgr.php index 73a05a382..0bbf8de49 100644 --- a/out/out.GroupMgr.php +++ b/out/out.GroupMgr.php @@ -27,21 +27,22 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); +$isajax = isset($_GET['action']) && ($_GET['action'] == 'info' || $_GET['action'] == 'form'); $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("admin_tools"),getMLText("access_denied")); + UI::exitError(getMLText("admin_tools"),getMLText("access_denied"), false, $isajax); } $allUsers = $dms->getAllUsers($settings->_sortUsersInList); if (is_bool($allUsers)) { - UI::exitError(getMLText("admin_tools"),getMLText("internal_error")); + UI::exitError(getMLText("admin_tools"),getMLText("internal_error"), false, $isajax); } $allGroups = $dms->getAllGroups(); if (is_bool($allGroups)) { - UI::exitError(getMLText("admin_tools"),getMLText("internal_error")); + UI::exitError(getMLText("admin_tools"),getMLText("internal_error"), false, $isajax); } if(isset($_GET['groupid']) && $_GET['groupid']) { diff --git a/out/out.TransmittalMgr.php b/out/out.TransmittalMgr.php index 31892e2d3..b43453423 100644 --- a/out/out.TransmittalMgr.php +++ b/out/out.TransmittalMgr.php @@ -31,15 +31,12 @@ include("../inc/inc.Authentication.php"); */ require_once("SeedDMS/Preview.php"); +$isajax = isset($_GET['action']) && ($_GET['action'] == 'items' || $_GET['action'] == 'form'); $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("my_transmittals"),getMLText("access_denied")); -} - -if ($user->isGuest()) { - UI::exitError(getMLText("my_transmittals"),getMLText("access_denied")); + UI::exitError(getMLText("my_transmittals"),getMLText("access_denied"), false, $isajax); } if(isset($_GET['transmittalid']) && $_GET['transmittalid']) { diff --git a/out/out.UsrMgr.php b/out/out.UsrMgr.php index 54d5f6317..6ba535a25 100644 --- a/out/out.UsrMgr.php +++ b/out/out.UsrMgr.php @@ -27,26 +27,27 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); +$isajax = isset($_GET['action']) && ($_GET['action'] == 'info' || $_GET['action'] == 'form'); $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("admin_tools"),getMLText("access_denied")); + UI::exitError(getMLText("admin_tools"),getMLText("access_denied"), false, $isajax); } $users = $dms->getAllUsers($settings->_sortUsersInList); if (is_bool($users)) { - UI::exitError(getMLText("admin_tools"),getMLText("internal_error")); + UI::exitError(getMLText("admin_tools"),getMLText("internal_error"), false, $isajax); } $groups = $dms->getAllGroups(); if (is_bool($groups)) { - UI::exitError(getMLText("admin_tools"),getMLText("internal_error")); + UI::exitError(getMLText("admin_tools"),getMLText("internal_error"), false, $isajax); } $roles = $dms->getAllRoles(); if (is_bool($roles)) { - UI::exitError(getMLText("admin_tools"),getMLText("internal_error")); + UI::exitError(getMLText("admin_tools"),getMLText("internal_error"), false, $isajax); } if(isset($_GET['userid']) && $_GET['userid']) { From d4e6732eebd06ca62180b6fa568fb5d08589d0fa Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 22 Aug 2016 17:17:43 +0200 Subject: [PATCH 0603/2006] add entry for 5.1.1 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 584a8f23c..59fef7cac 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ - set timeout for ajax call 'mytasks' from 200ms to 1000ms - use a similar layout for document list on the ViewDocument page - add RSS feef of timeline +- put more operations under access control -------------------------------------------------------------------------------- Changes in version 5.1.0 From 9604a4548d411d3079c96a69bccfc4872f7cb78c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 31 Aug 2016 08:54:04 +0200 Subject: [PATCH 0604/2006] add field layoutdata to tblWorkflows will store the layout of a workflow for rendering a graph --- install/create_tables-innodb.sql | 1 + install/create_tables-sqlite3.sql | 3 ++- install/update-5.1.0/update-sqlite3.sql | 2 ++ install/update-5.1.0/update.sql | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/install/create_tables-innodb.sql b/install/create_tables-innodb.sql index 9d5991ead..c20fe34ff 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -704,6 +704,7 @@ CREATE TABLE tblWorkflows ( `id` int(11) NOT NULL auto_increment, `name` text NOT NULL, `initstate` int(11) NOT NULL, + `layoutdata` text NOT NULL, PRIMARY KEY (`id`), CONSTRAINT `tblWorkflow_initstate` FOREIGN KEY (`initstate`) REFERENCES `tblWorkflowStates` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/install/create_tables-sqlite3.sql b/install/create_tables-sqlite3.sql index 1ea5bf56e..209141c11 100644 --- a/install/create_tables-sqlite3.sql +++ b/install/create_tables-sqlite3.sql @@ -615,7 +615,8 @@ CREATE TABLE tblWorkflowActions ( CREATE TABLE tblWorkflows ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` text NOT NULL, - `initstate` INTEGER NOT NULL REFERENCES `tblWorkflowStates` (`id`) ON DELETE CASCADE + `initstate` INTEGER NOT NULL REFERENCES `tblWorkflowStates` (`id`) ON DELETE CASCADE, + `layoutdata` text NOT NULL ) ; -- -------------------------------------------------------- diff --git a/install/update-5.1.0/update-sqlite3.sql b/install/update-5.1.0/update-sqlite3.sql index f38565f01..ed4c5bdb7 100644 --- a/install/update-5.1.0/update-sqlite3.sql +++ b/install/update-5.1.0/update-sqlite3.sql @@ -4,6 +4,8 @@ ALTER TABLE `tblDocumentContent` ADD COLUMN `revisiondate` TEXT NOT NULL; ALTER TABLE `tblUsers` ADD COLUMN `secret` varchar(50) default NULL; +ALTER TABLE `tblWorkflows` ADD COLUMN `layoutdata` text default NULL; + CREATE TABLE `tblUserSubstitutes` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `user` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, diff --git a/install/update-5.1.0/update.sql b/install/update-5.1.0/update.sql index 1dadf78db..00ee28724 100644 --- a/install/update-5.1.0/update.sql +++ b/install/update-5.1.0/update.sql @@ -16,6 +16,8 @@ ALTER TABLE `tblDocumentReviewLog` CHANGE `date` `date` datetime NOT NULL; ALTER TABLE `tblDocumentStatusLog` CHANGE `date` `date` datetime NOT NULL; +ALTER TABLE `tblWorkflows` ADD COLUMN `layoutdata` text default NULL AFTER `initstate`; + CREATE TABLE `tblUserSubstitutes` ( `id` int(11) NOT NULL auto_increment, `user` int(11) default null, From 4d6ce5114afb984e52fd5bdc86180ba4fc8fd487 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 31 Aug 2016 10:11:18 +0200 Subject: [PATCH 0605/2006] add operation for saving workflow layout (not ready yet) --- op/op.WorkflowMgr.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/op/op.WorkflowMgr.php b/op/op.WorkflowMgr.php index c7a239a6c..382ec2f7c 100644 --- a/op/op.WorkflowMgr.php +++ b/op/op.WorkflowMgr.php @@ -133,7 +133,28 @@ else if ($action == "editworkflow") { $editedWorkflow->setInitState($state); add_log_line(".php&action=editworkflow&workflowid=".$workflowid); +} +// save workflow graph for rendering ----------------------------------------- +else if ($action == "setrenderdata") { + if (!isset($_POST["workflowid"]) || !is_numeric($_POST["workflowid"]) || intval($_POST["workflowid"])<1) { + echo json_encode(array('success'=>false, 'message'=>getMLText("invalid_workflow_id"))); + exit; + } + + $workflowid=$_POST["workflowid"]; + $workflow = $dms->getWorkflow($workflowid); + + if (!is_object($workflow)) { + echo json_encode(array('success'=>false, 'message'=>getMLText("invalid_workflow_id"))); + exit; + } + + $data = $_POST["data"]; + + header('Content-Type: application/json'); + echo json_encode(array('success'=>true, 'message'=>getMLText("workflow_layoutdata_saved"))); + exit; } else UI::exitError(getMLText("admin_tools"),getMLText("unknown_command")); From d64747ddeff2a0a05b8314c4f35cd5e5529e3a7c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 31 Aug 2016 10:11:46 +0200 Subject: [PATCH 0606/2006] add code for saving and redrawing layout --- views/bootstrap/class.WorkflowGraph.php | 48 +++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.WorkflowGraph.php b/views/bootstrap/class.WorkflowGraph.php index 974e55bea..8000e0cad 100644 --- a/views/bootstrap/class.WorkflowGraph.php +++ b/views/bootstrap/class.WorkflowGraph.php @@ -96,6 +96,8 @@ var cy = cytoscape({ { selector: 'edge', style: { + 'content': 'data(name)', + 'text-wrap': 'wrap', 'width': 4, 'curve-style': 'bezier', 'target-arrow-shape': 'triangle', @@ -109,6 +111,30 @@ var cy = cytoscape({ ); +function save_handler(evt) { +// console.log(JSON.stringify(cy.json().elements)); + $.ajax('../op/op.WorkflowMgr.php', { + type:"POST", + async:true, + dataType:"json", + data: { + action: 'setrenderdata', + workflowid: workflow->getID(); ?>, + data: JSON.stringify(cy.json().elements) + }, + success: function(data, textStatus) { + noty({ + text: data.message, + type: data.success ? 'success' : 'error', + dismissQueue: true, + layout: 'topRight', + theme: 'defaultTheme', + timeout: 1500, + }); + } + }); +}; + cy.on('free', 'node', function(evt) { $('#png').attr('src', cy.png({'full': true})); }); @@ -116,8 +142,20 @@ cy.on('free', 'node', function(evt) { if(!$renderdata) $this->printGraph(); ?> - cy.layout({ name: '', condense: true }); -$('#png').attr('src', cy.png({'full': true})); + cy.layout({ name: '', condense: true, ready: function() {$('#png').attr('src', cy.png({'full': true}))} }); +// $('#png').attr('src', cy.png({'full': true})); + +$(document).ready(function() { + $('body').on('click', '#savelayout', function(ev){ + ev.preventDefault(); + save_handler(); + }); + $('body').on('click', '#setlayout', function(ev){ + ev.preventDefault(); + var element = $(this); + cy.layout({name: element.data('layout'), ready: function() {$('#png').attr('src', cy.png({'full': true}))}}); + }); +}); htmlAddHeader(' ', 'css'); $this->htmlStartPage(getMLText("admin_tools")); @@ -252,6 +292,10 @@ body {padding: 0px;} ?>
        +
        + + +
        contentContainerEnd(); if(method_exists($this, 'js')) From 84a65f0f32de764874c5dfaf5cfb74bd4b38f6ac Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 31 Aug 2016 11:54:15 +0200 Subject: [PATCH 0607/2006] implemented saving of layout data for workflows --- SeedDMS_Core/Core/inc.ClassDMS.php | 4 ++-- SeedDMS_Core/Core/inc.ClassWorkflow.php | 24 +++++++++++++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 41abec788..dc69de3be 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -2315,7 +2315,7 @@ class SeedDMS_Core_DMS { $initstate = $this->getWorkflowState($resArr[0]['initstate']); - $workflow = new SeedDMS_Core_Workflow($resArr[0]["id"], $resArr[0]["name"], $initstate); + $workflow = new SeedDMS_Core_Workflow($resArr[0]["id"], $resArr[0]["name"], $initstate, $resArr[0]["layoutdata"]); $workflow->setDMS($this); return $workflow; @@ -2341,7 +2341,7 @@ class SeedDMS_Core_DMS { $initstate = $this->getWorkflowState($resArr[0]['initstate']); - $workflow = new SeedDMS_Core_Workflow($resArr[0]["id"], $resArr[0]["name"], $initstate); + $workflow = new SeedDMS_Core_Workflow($resArr[0]["id"], $resArr[0]["name"], $initstate, $resArr[0]["layoutdata"]); $workflow->setDMS($this); return $workflow; diff --git a/SeedDMS_Core/Core/inc.ClassWorkflow.php b/SeedDMS_Core/Core/inc.ClassWorkflow.php index 284011f6b..956bbfbfd 100644 --- a/SeedDMS_Core/Core/inc.ClassWorkflow.php +++ b/SeedDMS_Core/Core/inc.ClassWorkflow.php @@ -42,6 +42,13 @@ class SeedDMS_Core_Workflow { /* {{{ */ */ var $_initstate; + /** + * @var data for rendering graph + * + * @access protected + */ + var $_layoutdata; + /** * @var name of the workflow state * @@ -56,10 +63,11 @@ class SeedDMS_Core_Workflow { /* {{{ */ */ var $_dms; - function __construct($id, $name, $initstate) { /* {{{ */ + function __construct($id, $name, $initstate, $layoutdata) { /* {{{ */ $this->_id = $id; $this->_name = $name; $this->_initstate = $initstate; + $this->_layoutdata = $layoutdata; $this->_transitions = null; $this->_dms = null; } /* }}} */ @@ -98,6 +106,20 @@ class SeedDMS_Core_Workflow { /* {{{ */ return true; } /* }}} */ + function getLayoutData() { return $this->_layoutdata; } + + function setLayoutData($newdata) { /* {{{ */ + $db = $this->_dms->getDB(); + + $queryStr = "UPDATE tblWorkflows SET layoutdata = ".$db->qstr($newdata)." WHERE id = " . $this->_id; + $res = $db->getResult($queryStr); + if (!$res) + return false; + + $this->_layoutdata = $newdata; + return true; + } /* }}} */ + function getTransitions() { /* {{{ */ $db = $this->_dms->getDB(); From bdd0dd65826f15a3c79b7b7a922b07101cac80ad Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 31 Aug 2016 11:54:51 +0200 Subject: [PATCH 0608/2006] add saving and reloading layout data --- op/op.WorkflowMgr.php | 2 + views/bootstrap/class.WorkflowGraph.php | 63 +++++++++++++++---------- 2 files changed, 40 insertions(+), 25 deletions(-) diff --git a/op/op.WorkflowMgr.php b/op/op.WorkflowMgr.php index 382ec2f7c..bfbcc6d86 100644 --- a/op/op.WorkflowMgr.php +++ b/op/op.WorkflowMgr.php @@ -152,6 +152,8 @@ else if ($action == "setrenderdata") { $data = $_POST["data"]; + $workflow->setLayoutData($data); + header('Content-Type: application/json'); echo json_encode(array('success'=>true, 'message'=>getMLText("workflow_layoutdata_saved"))); exit; diff --git a/views/bootstrap/class.WorkflowGraph.php b/views/bootstrap/class.WorkflowGraph.php index 92623a1ce..77b7b3acc 100644 --- a/views/bootstrap/class.WorkflowGraph.php +++ b/views/bootstrap/class.WorkflowGraph.php @@ -35,7 +35,16 @@ class SeedDMS_View_WorkflowGraph extends SeedDMS_Bootstrap_Style { $this->workflow = $this->params['workflow']; header('Content-Type: application/javascript; charset=UTF-8'); - $renderdata = ''; + $renderdata = $this->workflow->getLayoutData(); + if($renderdata) { + $positions = array(); + $data = json_decode($renderdata); + foreach($data->nodes as $node) { + if($node->group == 'nodes') { + $positions[$node->data->id] = $node->position; + } + } + } ?> var cy = cytoscape({ container: document.getElementById('canvas'), @@ -106,7 +115,7 @@ var cy = cytoscape({ 'curve-style': 'bezier' } }] - + } ); @@ -139,11 +148,9 @@ cy.on('free', 'node', function(evt) { $('#png').attr('src', cy.png({'full': true})); }); printGraph(); + $this->printGraph($positions); ?> - cy.layout({ name: '', condense: true, ready: function() {$('#png').attr('src', cy.png({'full': true}))} }); -// $('#png').attr('src', cy.png({'full': true})); + cy.layout({ name: '', ready: function() {$('#png').attr('src', cy.png({'full': true}))} }); $(document).ready(function() { $('body').on('click', '#savelayout', function(ev){ @@ -159,7 +166,7 @@ $(document).ready(function() { workflow->getTransitions(); if($transitions) { @@ -198,13 +205,15 @@ $(document).ready(function() { foreach($transgroups as $transgroup) { $gnames[] = $transgroup->getGroup()->getName(); } + $nodeid = "A".$transition->getID()."-".$action->getID(); echo "cy.add({ - data: { - id: 'A".$transition->getID()."-".$action->getID()."', - name: \"".str_replace('"', "\\\"", $action->getName()).($unames ? "\\n(".str_replace('"', "\\\"", implode(", ", $unames)).")" : '').($gnames ? "\\n(".str_replace('"', "\\\"", implode(", ", $gnames)).")" : '')."\" - }, - classes: 'action' - });\n"; + data: { + id: '".$nodeid."', + name: \"".str_replace('"', "\\\"", $action->getName()).($unames ? "\\n(".str_replace('"', "\\\"", implode(", ", $unames)).")" : '').($gnames ? "\\n(".str_replace('"', "\\\"", implode(", ", $gnames)).")" : '')."\" + },".(isset($positions[$nodeid]) ? " + position: {x: ".$positions[$nodeid]->x.", y: ".$positions[$nodeid]->y."}," : "")." + classes: 'action' +});\n"; } if(!isset($this->states[$state->getID()])) { @@ -212,24 +221,28 @@ $(document).ready(function() { $initstate = ''; if($state == $this->workflow->getInitState()) $initstate = getMLText('workflow_initstate'); + $nodeid = "S".$state->getID(); echo "cy.add({ - data: { - id: 'S".$state->getID()."', - name: \"".str_replace('"', "\\\"", $state->getName()."\\n".$initstate)."\" - }, - classes: 'state ".($state == $this->workflow->getInitState() ? 'init' : '')."' - });\n"; + data: { + id: '".$nodeid."', + name: \"".str_replace('"', "\\\"", $state->getName()."\\n".$initstate)."\" + },".(isset($positions[$nodeid]) ? " + position: {x: ".$positions[$nodeid]->x.", y: ".$positions[$nodeid]->y."}," : "")." + classes: 'state ".($state == $this->workflow->getInitState() ? 'init' : '')."' +});\n"; } if(!isset($this->states[$nextstate->getID()])) { $this->states[$nextstate->getID()] = $nextstate; $docstatus = $nextstate->getDocumentStatus(); + $nodeid = "S".$nextstate->getID(); echo "cy.add({ - data: { - id: 'S".$nextstate->getID()."', - name: '".str_replace('"', "\\\"", $nextstate->getName())/*.($docstatus == S_RELEASED || $docstatus == S_REJECTED ? "\\n(".getOverallStatusText($docstatus).")" : '')*/."' - }, - classes: 'state".($docstatus == S_RELEASED ? ' released' : ($docstatus == S_REJECTED ? ' rejected' : ''))."' - });\n"; + data: { + id: '".$nodeid."', + name: '".str_replace('"', "\\\"", $nextstate->getName())/*.($docstatus == S_RELEASED || $docstatus == S_REJECTED ? "\\n(".getOverallStatusText($docstatus).")" : '')*/."' + },".(isset($positions[$nodeid]) ? " + position: {x: ".$positions[$nodeid]->x.", y: ".$positions[$nodeid]->y."}," : "")." + classes: 'state".($docstatus == S_RELEASED ? ' released' : ($docstatus == S_REJECTED ? ' rejected' : ''))."' +});\n"; } } From e272d26f300a49e0d8299435f0c969fc8f7a8213 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 5 Sep 2016 10:05:16 +0200 Subject: [PATCH 0609/2006] add access check --- out/out.WorkflowGraph.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/out/out.WorkflowGraph.php b/out/out.WorkflowGraph.php index 47362bdca..e03c0a9ac 100644 --- a/out/out.WorkflowGraph.php +++ b/out/out.WorkflowGraph.php @@ -27,6 +27,13 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../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, $user, $settings); +if (!$accessop->check_view_access($view, $_GET)) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + $workflow = $dms->getWorkflow($_GET['workflow']); if (is_bool($workflow)) { UI::exitError(getMLText("admin_tools"),getMLText("internal_error")); @@ -50,12 +57,11 @@ if(isset($_GET['transitions']) && $_GET['transitions']) { } } -$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); -$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { $view->setParam('workflow', $workflow); $view->setParam('transitions', $transitions); $view->setParam('document', $document); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } From f768ad63f00637044758b3796ac7df679bc428ac Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 5 Sep 2016 10:05:37 +0200 Subject: [PATCH 0610/2006] pass accessobj to view --- out/out.WorkflowActionsMgr.php | 1 + out/out.WorkflowMgr.php | 1 + out/out.WorkflowStatesMgr.php | 1 + 3 files changed, 3 insertions(+) diff --git a/out/out.WorkflowActionsMgr.php b/out/out.WorkflowActionsMgr.php index 9948325a7..936097249 100644 --- a/out/out.WorkflowActionsMgr.php +++ b/out/out.WorkflowActionsMgr.php @@ -48,6 +48,7 @@ if (is_bool($workflowactions)) { if($view) { $view->setParam('allworkflowactions', $workflowactions); $view->setParam('selworkflowaction', $selworkflowaction); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.WorkflowMgr.php b/out/out.WorkflowMgr.php index 1d731d496..6f5496a90 100644 --- a/out/out.WorkflowMgr.php +++ b/out/out.WorkflowMgr.php @@ -54,6 +54,7 @@ if($view) { $view->setParam('selworkflow', $selworkflow); $view->setParam('allworkflows', $workflows); $view->setParam('allworkflowstates', $workflowstates); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } diff --git a/out/out.WorkflowStatesMgr.php b/out/out.WorkflowStatesMgr.php index b71d3751e..43a8f5077 100644 --- a/out/out.WorkflowStatesMgr.php +++ b/out/out.WorkflowStatesMgr.php @@ -42,6 +42,7 @@ if(isset($_GET['workflowstateid']) && $_GET['workflowstateid']) { if($view) { $view->setParam('selworkflowstate', $selworkflowstate); + $view->setParam('accessobject', $accessop); $view($_GET); exit; } From 75ce06c128689e7a2972ba000ae0194c77eb1abb Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 5 Sep 2016 10:05:54 +0200 Subject: [PATCH 0611/2006] check if workflow graph may be shown --- views/bootstrap/class.ViewDocument.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 243cb1129..5ea92d48e 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -833,7 +833,10 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
        "; - echo "
        "; + if ($this->check_access('WorkflowGraph')) + echo "
        "; + else + echo "
        "; $this->contentContainerStart(); if($user->isAdmin()) { if(SeedDMS_Core_DMS::checkIfEqual($workflow->getInitState(), $latestContent->getWorkflowState())) { @@ -1007,11 +1010,13 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } $this->contentContainerEnd(); echo "
        "; - echo "
        "; + if ($this->check_access('WorkflowGraph')) { + echo "
        "; ?> "; + echo "
        "; + } echo "
        "; ?>
        From 1fb6305380c7cfb87eb9f6f8714648a69adf348c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 6 Sep 2016 07:49:16 +0200 Subject: [PATCH 0612/2006] use translation for 'Save layout' --- views/bootstrap/class.WorkflowGraph.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.WorkflowGraph.php b/views/bootstrap/class.WorkflowGraph.php index f2922c01f..92ef3fe92 100644 --- a/views/bootstrap/class.WorkflowGraph.php +++ b/views/bootstrap/class.WorkflowGraph.php @@ -382,7 +382,7 @@ div.buttons #zoom {margin: 3px; _float: right;}
        - +
        From 93f3153903219a3d62eb20d3d4826684f2dab62d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 6 Sep 2016 12:30:39 +0200 Subject: [PATCH 0613/2006] fix entry for 5.1.1 --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index cbedc600f..1d44474b2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,7 @@ -------------------------------------------------------------------------------- Changes in version 5.1.1 -------------------------------------------------------------------------------- -- merge changes from 5.0.4 +- merge changes up to 5.0.6 - add two factor authentication based on google authenticator - set timeout for ajax call 'mytasks' from 200ms to 1000ms - use a similar layout for document list on the ViewDocument page From 86b1a562c113bb80a1abbca47655fca45dc31f6a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 15 Sep 2016 21:39:38 +0200 Subject: [PATCH 0614/2006] set text fields to default null --- install/create_tables-innodb.sql | 2 +- install/create_tables-sqlite3.sql | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install/create_tables-innodb.sql b/install/create_tables-innodb.sql index c20fe34ff..d79c64020 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -704,7 +704,7 @@ CREATE TABLE tblWorkflows ( `id` int(11) NOT NULL auto_increment, `name` text NOT NULL, `initstate` int(11) NOT NULL, - `layoutdata` text NOT NULL, + `layoutdata` text default NULL, PRIMARY KEY (`id`), CONSTRAINT `tblWorkflow_initstate` FOREIGN KEY (`initstate`) REFERENCES `tblWorkflowStates` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/install/create_tables-sqlite3.sql b/install/create_tables-sqlite3.sql index 209141c11..ac939edf1 100644 --- a/install/create_tables-sqlite3.sql +++ b/install/create_tables-sqlite3.sql @@ -73,7 +73,7 @@ CREATE TABLE `tblUsers` ( `comment` text NOT NULL, `role` INTEGER NOT NULL REFERENCES `tblRoles` (`id`), `hidden` INTEGER NOT NULL default '0', - `pwdExpiration` TEXT NOT NULL, + `pwdExpiration` TEXT default NULL, `loginfailures` INTEGER NOT NULL default '0', `disabled` INTEGER NOT NULL default '0', `quota` INTEGER, @@ -251,7 +251,7 @@ CREATE TABLE `tblDocumentContent` ( `mimeType` varchar(70) NOT NULL default '', `fileSize` INTEGER, `checksum` char(32), - `revisiondate` TEXT NOT NULL, + `revisiondate` TEXT default NULL, UNIQUE (`document`,`version`) ) ; @@ -616,7 +616,7 @@ CREATE TABLE tblWorkflows ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` text NOT NULL, `initstate` INTEGER NOT NULL REFERENCES `tblWorkflowStates` (`id`) ON DELETE CASCADE, - `layoutdata` text NOT NULL + `layoutdata` text default NULL ) ; -- -------------------------------------------------------- From 6ba36e2cae03453ca9f6a853612cf686d7a9b1d1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 15 Sep 2016 21:40:19 +0200 Subject: [PATCH 0615/2006] dump roles --- utils/xmldump.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/utils/xmldump.php b/utils/xmldump.php index cfb447aa4..84e8e81ed 100644 --- a/utils/xmldump.php +++ b/utils/xmldump.php @@ -100,6 +100,7 @@ if(isset($options['skip-root'])) { $statistic = array( 'documents'=>0, 'folders'=>0, + 'roles'=>0, 'users'=>0, 'groups'=>0, 'attributedefinitions'=>0, @@ -477,6 +478,24 @@ $dms->setRootFolderID($settings->_rootFolderID); echo "\n"; echo "getDBVersion(), 1, 3))."\" date=\"".date('Y-m-d H:i:s')."\">\n"; +/* Dump roles {{{ */ +if(!$sections || in_array('roles', $sections)) { +$roles = $dms->getAllRoles(); +if($roles) { + echo "\n"; + foreach ($roles as $role) { + echo " getId()."\">\n"; + echo " ".wrapWithCData($role->getName())."\n"; + echo " ".$role->getRole()."\n"; + echo " ".implode(',', $role->getNoAccess())."\n"; + echo " \n"; + $statistic['roles']++; + } + echo "\n"; +} +} +/* }}} */ + /* Dump users {{{ */ if(!$sections || in_array('users', $sections)) { $users = $dms->getAllUsers(); @@ -491,7 +510,7 @@ if($users) { echo " ".wrapWithCData($user->getComment())."\n"; echo " ".$user->getLanguage()."\n"; echo " ".$user->getTheme()."\n"; - echo " ".$user->getRole()."\n"; + echo " ".$user->getRole()->getID()."\n"; echo " ".$user->isHidden()."\n"; echo " ".$user->isDisabled()."\n"; echo " ".$user->getPwdExpiration()."\n"; @@ -682,6 +701,7 @@ if($workflows) { echo " getID()."\">\n"; echo " ".$workflow->getName()."\n"; echo " ".$workflow->getInitState()->getID()."\n"; + echo " ".wrapWithCData($workflow->getLayoutData())."\n"; if($transitions = $workflow->getTransitions()) { echo " \n"; foreach($transitions as $transition) { From 42ac18d962c61abcff684954a7e6652594e98f9f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 15 Sep 2016 21:40:38 +0200 Subject: [PATCH 0616/2006] import roles --- utils/xmlimport.php | 87 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 73 insertions(+), 14 deletions(-) diff --git a/utils/xmlimport.php b/utils/xmlimport.php index 54ed34a4a..eee7a8468 100644 --- a/utils/xmlimport.php +++ b/utils/xmlimport.php @@ -72,6 +72,15 @@ function insert_user($user) { /* {{{ */ if($debug) print_r($user); + $roleobj = null; + if(isset($user['attributes']['role']) && $user['attributes']['role']) { + if(array_key_exists($user['attributes']['role'], $objmap['roles'])) { + if(!$roleobj = $dms->getRole($objmap['roles'][$user['attributes']['role']])) { + $logger->warn("Role ".$user['attributes']['role']." cannot be found"); + } + } + } + if ($newUser = $dms->getUserByLogin($user['attributes']['login'])) { $logger->info("User '".$user['attributes']['login']."' already exists"); } else { @@ -84,7 +93,7 @@ function insert_user($user) { /* {{{ */ $user['attributes']['language'], $user['attributes']['theme'], $user['attributes']['comment'], - $user['attributes']['role'], + $roleobj, $user['attributes']['hidden'], $user['attributes']['disabled'], $user['attributes']['pwdexpiration']); @@ -111,14 +120,14 @@ function insert_user($user) { /* {{{ */ } /* }}} */ function set_homefolders() { /* {{{ */ - global $dms, $debug, $defaultUser, $users, $objmap; + global $logger, $dms, $debug, $defaultUser, $users, $objmap; foreach($users as $user) { if(isset($user['attributes']['homefolder']) && $user['attributes']['homefolder']) { if(array_key_exists($user['id'], $objmap['users'])) { $userobj = $dms->getUser($objmap['users'][$user['id']]); if(!array_key_exists((int) $user['attributes']['homefolder'], $objmap['folders'])) { - echo "Warning: homefolder ".$user['attributes']['homefolder']." cannot be found\n"; + $logger->warning("Homefolder ".$user['attributes']['homefolder']." cannot be found"); } else { $userobj->setHomeFolder($objmap['folders'][(int) $user['attributes']['homefolder']]); } @@ -172,6 +181,34 @@ function insert_group($group) { /* {{{ */ return $newGroup; } /* }}} */ +function insert_role($role) { /* {{{ */ + global $logger, $dms, $debug, $objmap, $sections, $users; + + if($debug) print_r($role); + + if ($newRole = $dms->getRoleByName($role['attributes']['name'])) { + $logger->info("Role already exists"); + } else { + if(in_array('roles', $sections)) { + $newRole = $dms->addRole($role['attributes']['name'], $role['attributes']['role']); + if($newRole) { + $logger->info("Added role '".$role['attributes']['name']."'"); + if(!empty($role['attributes']['noaccess'])) { + $newRole->setNoAccess(explode(',', $role['attributes']['noaccess'])); + } + } else { + $logger->err("Could not add role"); + return false; + } + } else { + $newRole = null; + } + } + if($newRole) + $objmap['roles'][$role['id']] = $newRole->getID(); + return $newRole; +} /* }}} */ + function insert_attributedefinition($attrdef) { /* {{{ */ global $logger, $dms, $debug, $objmap, $sections; @@ -277,6 +314,8 @@ function insert_workflow($workflow) { /* {{{ */ } else { $logger->info("Added workflow '".$workflow['attributes']['name']."'"); } + if(!empty($workflow['layoutdata'])) + $newWorkflow->setLayoutData($workflow['layoutdata']); if($workflow['transitions']) { foreach($workflow['transitions'] as $transition) { if(!$state = $dms->getWorkflowState($objmap['workflowstates'][(int) $transition['attributes']['startstate']])) { @@ -853,33 +892,33 @@ function insert_folder($folder) { /* {{{ */ } /* }}} */ function insert_transmittal($transmittal) { /* {{{ */ - global $dms, $debug, $objmap, $sections; + global $logger, $dms, $debug, $objmap, $sections; - if(1||$debug) print_r($transmittal); + if($debug) print_r($transmittal); if(!array_key_exists((int) $transmittal['attributes']['owner'], $objmap['users'])) { - echo "Error: owner of transmittal cannot be found\n"; + $logger->err( "Owner of transmittal cannot be found"); return false; } $owner = $dms->getUser($objmap['users'][(int) $transmittal['attributes']['owner']]); if(in_array('transmittals', $sections)) { if(!$newTransmittal = $dms->addTransmittal($transmittal['attributes']['name'], $transmittal['attributes']['comment'], $owner)) { - echo "Error: could not add transmittal\n"; + $logger->err("Could not add transmittal"); return false; } foreach($transmittal['items'] as $item) { if(!array_key_exists((int) $item['attributes']['document'], $objmap['documents'])) { - echo "Warning: document mapping of transmittal item cannot be found\n"; + $logger->warning("Document mapping of transmittal item cannot be found"); } else { if($document = $dms->getDocument($objmap['documents'][(int) $item['attributes']['document']])) { if($content = $document->getContentByVersion((int) $item['attributes']['version'])) { $newTransmittal->addContent($content); } else { - echo "Warning: document version of transmittal item cannot be found\n"; + $logger->warning("Document version of transmittal item cannot be found"); } } else { - echo "Warning: document of transmittal item cannot be found\n"; + $logger->warning("Document of transmittal item cannot be found"); } } } @@ -972,7 +1011,7 @@ function set_mandatory() { /* {{{ */ } /* }}} */ function startElement($parser, $name, $attrs) { /* {{{ */ - global $logger, $dms, $noversioncheck, $elementstack, $objmap, $cur_user, $cur_group, $cur_folder, $cur_document, $cur_version, $cur_statuslog, $cur_workflowlog, $cur_approval, $cur_approvallog, $cur_review, $cur_reviewlog, $cur_attrdef, $cur_documentcat, $cur_keyword, $cur_keywordcat, $cur_file, $cur_link, $cur_workflow, $cur_workflowtransition, $cur_workflowaction, $cur_workflowstate, $cur_transition, $cur_transmittal, $cur_transmittalitem; + global $logger, $dms, $noversioncheck, $elementstack, $objmap, $cur_user, $cur_group, $cur_folder, $cur_document, $cur_version, $cur_statuslog, $cur_workflowlog, $cur_approval, $cur_approvallog, $cur_review, $cur_reviewlog, $cur_attrdef, $cur_documentcat, $cur_keyword, $cur_keywordcat, $cur_file, $cur_link, $cur_workflow, $cur_workflowtransition, $cur_workflowaction, $cur_workflowstate, $cur_transition, $cur_transmittal, $cur_transmittalitem, $cur_role; $parent = end($elementstack); array_push($elementstack, array('name'=>$name, 'attributes'=>$attrs)); @@ -1044,6 +1083,14 @@ function startElement($parser, $name, $attrs) { /* {{{ */ $cur_transition['groups'][] = (int) $attrs['ID']; } break; + case "ROLE": + $first = $elementstack[1]; + if($first['name'] == 'ROLES') { + $cur_role = array(); + $cur_role['id'] = (int) $attrs['ID']; + $cur_role['attributes'] = array(); + } + break; case "TRANSMITTAL": $cur_transmittal = array(); $cur_transmittal['id'] = (int) $attrs['ID']; @@ -1152,6 +1199,8 @@ function startElement($parser, $name, $attrs) { /* {{{ */ $cur_user['attributes'][$attrs['NAME']] = ''; } elseif($parent['name'] == 'GROUP') { $cur_group['attributes'][$attrs['NAME']] = ''; + } elseif($parent['name'] == 'ROLE') { + $cur_role['attributes'][$attrs['NAME']] = ''; } elseif($parent['name'] == 'KEYWORD') { $cur_keyword['attributes'][$attrs['NAME']] = ''; } elseif($parent['name'] == 'ATTRIBUTEDEFINITION') { @@ -1330,7 +1379,7 @@ function startElement($parser, $name, $attrs) { /* {{{ */ } /* }}} */ function endElement($parser, $name) { /* {{{ */ - global $logger, $dms, $sections, $rootfolder, $objmap, $elementstack, $users, $groups, $links,$cur_user, $cur_group, $cur_folder, $cur_document, $cur_version, $cur_statuslog, $cur_approval, $cur_approvallog, $cur_review, $cur_reviewlog, $cur_attrdef, $cur_documentcat, $cur_keyword, $cur_keywordcat, $cur_file, $cur_link, $cur_workflow, $cur_workflowlog, $cur_workflowtransition, $cur_workflowaction, $cur_workflowstate, $cur_transition, $cur_transmittal, $cur_transmittalitem; + global $logger, $dms, $sections, $rootfolder, $objmap, $elementstack, $users, $groups, $links,$cur_user, $cur_group, $cur_folder, $cur_document, $cur_version, $cur_statuslog, $cur_approval, $cur_approvallog, $cur_review, $cur_reviewlog, $cur_attrdef, $cur_documentcat, $cur_keyword, $cur_keywordcat, $cur_file, $cur_link, $cur_workflow, $cur_workflowlog, $cur_workflowtransition, $cur_workflowaction, $cur_workflowstate, $cur_transition, $cur_transmittal, $cur_transmittalitem, $cur_role; array_pop($elementstack); $parent = end($elementstack); @@ -1379,6 +1428,9 @@ function endElement($parser, $name) { /* {{{ */ insert_group($cur_group); } break; + case 'ROLE': + insert_role($cur_role); + break; case 'ATTRIBUTEDEFINITION': insert_attributedefinition($cur_attrdef); break; @@ -1463,7 +1515,7 @@ function endElement($parser, $name) { /* {{{ */ } /* }}} */ function characterData($parser, $data) { /* {{{ */ - global $elementstack, $objmap, $cur_user, $cur_group, $cur_folder, $cur_document, $cur_version, $cur_statuslog, $cur_approval, $cur_approvallog, $cur_review, $cur_reviewlog, $cur_attrdef, $cur_documentcat, $cur_keyword, $cur_keywordcat, $cur_file, $cur_link, $cur_workflow, $cur_workflowlog, $cur_workflowtransition, $cur_workflowaction, $cur_workflowstate, $cur_transition, $cur_transmittal, $cur_transmittalitem; + global $elementstack, $objmap, $cur_user, $cur_group, $cur_folder, $cur_document, $cur_version, $cur_statuslog, $cur_approval, $cur_approvallog, $cur_review, $cur_reviewlog, $cur_attrdef, $cur_documentcat, $cur_keyword, $cur_keywordcat, $cur_file, $cur_link, $cur_workflow, $cur_workflowlog, $cur_workflowtransition, $cur_workflowaction, $cur_workflowstate, $cur_transition, $cur_transmittal, $cur_transmittalitem, $cur_role; $current = end($elementstack); $parent = prev($elementstack); @@ -1551,6 +1603,12 @@ function characterData($parser, $data) { /* {{{ */ else $cur_group['attributes'][$current['attributes']['NAME']] = $data; break; + case 'ROLE': + if(isset($cur_role['attributes'][$current['attributes']['NAME']])) + $cur_role['attributes'][$current['attributes']['NAME']] .= $data; + else + $cur_role['attributes'][$current['attributes']['NAME']] = $data; + break; case 'ATTRIBUTEDEFINITION': if(isset($cur_attrdef['attributes'][$current['attributes']['NAME']])) $cur_attrdef['attributes'][$current['attributes']['NAME']] .= $data; @@ -1730,7 +1788,7 @@ if(isset($options['no-version-check'])) { $noversioncheck = true; } -$sections = array('documents', 'folders', 'groups', 'users', 'keywordcategories', 'documentcategories', 'attributedefinitions', 'workflows', 'transmittals'); +$sections = array('documents', 'folders', 'groups', 'users', 'roles', 'keywordcategories', 'documentcategories', 'attributedefinitions', 'workflows', 'transmittals'); if(isset($options['sections'])) { $sections = explode(',', $options['sections']); } @@ -1799,6 +1857,7 @@ set_mandatory(); set_homefolders(); +print_r($objmap); if($exportmapping) { if($fp = fopen($exportmapping, 'w')) { fputcsv($fp, array('object type', 'old id', 'new id')); From da616fd4ed38326ff584c5b5c5945ca029a86f93 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 16 Sep 2016 06:37:30 +0200 Subject: [PATCH 0617/2006] take out print_r --- utils/xmlimport.php | 1 - 1 file changed, 1 deletion(-) diff --git a/utils/xmlimport.php b/utils/xmlimport.php index aa53b616a..8afd7600b 100644 --- a/utils/xmlimport.php +++ b/utils/xmlimport.php @@ -1870,7 +1870,6 @@ set_mandatory(); set_homefolders(); -print_r($objmap); if($exportmapping) { if($fp = fopen($exportmapping, 'w')) { fputcsv($fp, array('object type', 'old id', 'new id')); From 5c558601c738b3386389ed7e6540c887c8a8bc0b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 16 Sep 2016 12:48:20 +0200 Subject: [PATCH 0618/2006] set same date fields to default null --- install/create_tables-innodb.sql | 4 ++-- install/create_tables-sqlite3.sql | 4 ++-- install/update-5.1.0/update-sqlite3.sql | 4 ++-- install/update-5.1.0/update.sql | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/install/create_tables-innodb.sql b/install/create_tables-innodb.sql index d79c64020..3cf592221 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -825,7 +825,7 @@ CREATE TABLE `tblTransmittals` ( `name` text NOT NULL, `comment` text NOT NULL, `userID` int(11) NOT NULL default '0', - `date` datetime NOT NULL, + `date` datetime default NULL, `public` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), CONSTRAINT `tblTransmittals_user` FOREIGN KEY (`userID`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE @@ -842,7 +842,7 @@ CREATE TABLE `tblTransmittalItems` ( `transmittal` int(11) NOT NULL DEFAULT '0', `document` int(11) default NULL, `version` smallint(5) unsigned NOT NULL default '0', - `date` datetime NOT NULL, + `date` datetime default NULL, PRIMARY KEY (`id`), UNIQUE (transmittal, document, version), CONSTRAINT `tblTransmittalItems_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, diff --git a/install/create_tables-sqlite3.sql b/install/create_tables-sqlite3.sql index ac939edf1..5ef61ce2c 100644 --- a/install/create_tables-sqlite3.sql +++ b/install/create_tables-sqlite3.sql @@ -714,7 +714,7 @@ CREATE TABLE tblTransmittals ( `name` text NOT NULL, `comment` text NOT NULL, `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, - `date` TEXT NOT NULL, + `date` TEXT default NULL, `public` INTEGER NOT NULL default '0' ); @@ -729,7 +729,7 @@ CREATE TABLE `tblTransmittalItems` ( `transmittal` INTEGER NOT NULL DEFAULT '0' REFERENCES `tblTransmittals` (`id`) ON DELETE CASCADE, `document` INTEGER default NULL REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, `version` INTEGER unsigned NOT NULL default '0', - `date` TEXT NOT NULL, + `date` TEXT default NULL, UNIQUE (transmittal, document, version) ); diff --git a/install/update-5.1.0/update-sqlite3.sql b/install/update-5.1.0/update-sqlite3.sql index ed4c5bdb7..71bf8930d 100644 --- a/install/update-5.1.0/update-sqlite3.sql +++ b/install/update-5.1.0/update-sqlite3.sql @@ -64,7 +64,7 @@ CREATE TABLE tblTransmittals ( `name` text NOT NULL, `comment` text NOT NULL, `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, - `date` TEXT NOT NULL, + `date` TEXT default NULL, `public` INTEGER NOT NULL default '0' ); @@ -73,7 +73,7 @@ CREATE TABLE `tblTransmittalItems` ( `transmittal` INTEGER NOT NULL DEFAULT '0' REFERENCES `tblTransmittals` (`id`) ON DELETE CASCADE, `document` INTEGER default NULL REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, `version` INTEGER unsigned NOT NULL default '0', - `date` TEXT NOT NULL, + `date` TEXT default NULL, UNIQUE (transmittal, document, version) ); diff --git a/install/update-5.1.0/update.sql b/install/update-5.1.0/update.sql index 00ee28724..7a9534665 100644 --- a/install/update-5.1.0/update.sql +++ b/install/update-5.1.0/update.sql @@ -91,7 +91,7 @@ CREATE TABLE `tblTransmittals` ( `name` text NOT NULL, `comment` text NOT NULL, `userID` int(11) NOT NULL default '0', - `date` datetime NOT NULL, + `date` datetime default NULL, `public` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), CONSTRAINT `tblTransmittals_user` FOREIGN KEY (`userID`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE @@ -102,7 +102,7 @@ CREATE TABLE `tblTransmittalItems` ( `transmittal` int(11) NOT NULL DEFAULT '0', `document` int(11) default NULL, `version` smallint(5) unsigned NOT NULL default '0', - `date` datetime NOT NULL, + `date` datetime default NULL, PRIMARY KEY (`id`), UNIQUE (transmittal, document, version), CONSTRAINT `tblTransmittalItems_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, From 839b5f72f6c5be30034746fc5c78fed9c15a1b0b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 16 Sep 2016 12:48:43 +0200 Subject: [PATCH 0619/2006] fix import of transmittal items --- utils/xmlimport.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/utils/xmlimport.php b/utils/xmlimport.php index 5611ccb52..466508baa 100644 --- a/utils/xmlimport.php +++ b/utils/xmlimport.php @@ -962,6 +962,7 @@ function insert_transmittal($transmittal) { /* {{{ */ if(in_array('transmittals', $sections)) { if(!$newTransmittal = $dms->addTransmittal($transmittal['attributes']['name'], $transmittal['attributes']['comment'], $owner)) { $logger->err("Could not add transmittal"); + $logger->debug($dms->getDB()->getErrorMsg()); return false; } foreach($transmittal['items'] as $item) { @@ -985,7 +986,7 @@ function insert_transmittal($transmittal) { /* {{{ */ if($newTransmittal) $objmap['transmittals'][$transmittal['id']] = $newTransmittal->getID(); - return $newCategory; + return $newTransmittal; } /* }}} */ function resolve_links() { /* {{{ */ @@ -1155,7 +1156,7 @@ function startElement($parser, $name, $attrs) { /* {{{ */ $cur_transmittal['attributes'] = array(); $cur_transmittal['items'] = array(); break; - case "TRANSMITTALITEM": + case "ITEM": $cur_transmittalitem = array(); $cur_transmittalitem['id'] = (int) $attrs['ID']; $cur_transmittalitem['attributes'] = array(); @@ -1269,7 +1270,7 @@ function startElement($parser, $name, $attrs) { /* {{{ */ $cur_link['attributes'][$attrs['NAME']] = ''; } elseif($parent['name'] == 'TRANSMITTAL') { $cur_transmittal['attributes'][$attrs['NAME']] = ''; - } elseif($parent['name'] == 'TRANSMITTALITEM') { + } elseif($parent['name'] == 'ITEM') { $cur_transmittalitem['attributes'][$attrs['NAME']] = ''; } elseif($parent['name'] == 'WORKFLOW') { $cur_workflow['attributes'][$attrs['NAME']] = ''; @@ -1513,7 +1514,7 @@ function endElement($parser, $name) { /* {{{ */ $cur_document['links'][] = $cur_link; } break; - case "TRANSMITTALITEM": + case "ITEM": $cur_transmittal['items'][] = $cur_transmittalitem; break; case 'TRANSMITTAL': @@ -1709,7 +1710,7 @@ function characterData($parser, $data) { /* {{{ */ else $cur_transmittal['attributes'][$current['attributes']['NAME']] = $data; break; - case 'TRANSMITTALITEM': + case 'ITEM': if(isset($cur_transmittalitem['attributes'][$current['attributes']['NAME']])) $cur_transmittalitem['attributes'][$current['attributes']['NAME']] .= $data; else From 19d4d84e58e49e5cf102f948d665bd464fe740e8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 22 Sep 2016 08:47:20 +0200 Subject: [PATCH 0620/2006] set model in tblAcos because it may not be null --- inc/inc.ClassAcl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/inc.ClassAcl.php b/inc/inc.ClassAcl.php index 27ff9691e..2ea97a3f8 100644 --- a/inc/inc.ClassAcl.php +++ b/inc/inc.ClassAcl.php @@ -296,7 +296,7 @@ class SeedDMS_Aco extends SeedDMS_AroAco{ /* {{{ */ if (is_bool($resArr) && $resArr === false) return null; if (count($resArr) == 0) { - $queryStr = "INSERT INTO tblAcos (parent, alias) VALUES (".$parentid.",".$db->qstr($part).")"; + $queryStr = "INSERT INTO tblAcos (parent, alias, model) VALUES (".$parentid.",".$db->qstr($part).", '')"; if (!$db->getResult($queryStr)) return null; $id = $db->getInsertID(); From 159aa0963679e6b50dd952c25afdff3c599ea6d8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 22 Sep 2016 08:48:09 +0200 Subject: [PATCH 0621/2006] dump acos, aros --- utils/xmldump.php | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/utils/xmldump.php b/utils/xmldump.php index 324e430af..f35fe092f 100644 --- a/utils/xmldump.php +++ b/utils/xmldump.php @@ -1,5 +1,6 @@ getDBVersion(), 1, 3))." /* Dump roles {{{ */ if(!$sections || in_array('roles', $sections)) { + /** + * Show tree of acos + * + */ + function aco_tree($aro=null, $aco=null, $indent='') { /* {{{ */ + $tchildren = $aco->getChildren(); + $html = ''; + if($tchildren) { + foreach($tchildren as $child) { + if($child->getPermission($aro)) { + $html .= $indent."getID()."\" alias=\"".$child->getAlias()."\">\n"; + $html .= $indent." ".((int) $child->getPermission($aro))."\n"; + //$html .= $indent." ".$child->getAlias()."\n"; + //$html .= $indent." ".($aro ? $aro->getID() : 0)."\n"; + if($thtml = aco_tree($aro, $child, $indent.' ')) { + $html .= $thtml; + } + $html .= $indent."\n"; + } else { + if($thtml = aco_tree($aro, $child, $indent.' ')) { + $html .= $indent."getID()."\" alias=\"".$child->getAlias()."\">\n"; + //$html .= $indent." ".$child->getAlias()."\n"; + $html .= $thtml; + $html .= $indent."\n"; + } + } + } + } + return $html; + } /* }}} */ + $roles = $dms->getAllRoles(); if($roles) { echo "\n"; @@ -490,6 +522,22 @@ if($roles) { echo " ".wrapWithCData($role->getName())."\n"; echo " ".$role->getRole()."\n"; echo " ".implode(',', $role->getNoAccess())."\n"; + $aro = SeedDMS_Aro::getInstance($role, $dms); + if($acos = SeedDMS_Aco::getRoot($dms)) { + foreach($acos as $aco) { + echo " getID()."\" alias=\"".$aco->getAlias()."\">\n"; + if($aco->getPermission($aro)) { + echo " ".((int) $aco->getPermission($aro))."\n"; +// echo " ".$aco->getAlias()."\n"; +// echo " ".($aro ? $aro->getID() : 0)."\n"; + } else { +// echo " ".$aco->getAlias()."\n"; + } + if($html = aco_tree($aro, $aco, ' ')) + echo $html; + echo " \n"; + } + } echo " \n"; $statistic['roles']++; } @@ -746,6 +794,7 @@ if($folder) { /* }}} */ /* Dump transmittals {{{ */ +if(!$sections || in_array('transmittals', $sections)) { $transmittals = $dms->getAllTransmittals(); if($transmittals) { echo "\n"; @@ -771,6 +820,7 @@ if($transmittals) { } echo "\n"; } +} /* }}} */ /* Dump statistics {{{ */ From df63e1bb7e97ab80bd26855f4b9e2cb3b3a70895 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 22 Sep 2016 08:48:28 +0200 Subject: [PATCH 0622/2006] insert acos and aros --- utils/xmlimport.php | 48 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/utils/xmlimport.php b/utils/xmlimport.php index 98b05c01d..510284121 100644 --- a/utils/xmlimport.php +++ b/utils/xmlimport.php @@ -1,5 +1,6 @@ err("Could not add role"); return false; } + if($aro = SeedDMS_Aro::getInstance($newRole, $dms)) { + $logger->info("Added aro"); + if($role['acos']) { + $acl = new SeedDMS_Acl($dms); + foreach($role['acos'] as $alias=>$perm) { + if($aco = SeedDMS_Aco::getInstance($alias, $dms)) { + $logger->info("Added aco with alias '".$alias."'"); + if(isset($perm['attributes']['permission'])) { + if($acl->add($aro, $aco, $perm['attributes']['permission'])) { + } + } + } else { + $logger->err("Could not add Aco"); + return false; + } + } + } + } else { + $logger->err("Could not add Aro"); + return false; + } } else { $newRole = null; } @@ -1022,7 +1044,7 @@ function set_mandatory() { /* {{{ */ } /* }}} */ function startElement($parser, $name, $attrs) { /* {{{ */ - global $logger, $dms, $noversioncheck, $elementstack, $objmap, $cur_user, $cur_group, $cur_folder, $cur_document, $cur_version, $cur_statuslog, $cur_workflowlog, $cur_approval, $cur_approvallog, $cur_review, $cur_reviewlog, $cur_attrdef, $cur_documentcat, $cur_keyword, $cur_keywordcat, $cur_file, $cur_link, $cur_workflow, $cur_workflowtransition, $cur_workflowaction, $cur_workflowstate, $cur_transition, $cur_transmittal, $cur_transmittalitem, $cur_role; + global $logger, $dms, $noversioncheck, $elementstack, $objmap, $cur_user, $cur_group, $cur_folder, $cur_document, $cur_version, $cur_statuslog, $cur_workflowlog, $cur_approval, $cur_approvallog, $cur_review, $cur_reviewlog, $cur_attrdef, $cur_documentcat, $cur_keyword, $cur_keywordcat, $cur_file, $cur_link, $cur_workflow, $cur_workflowtransition, $cur_workflowaction, $cur_workflowstate, $cur_transition, $cur_transmittal, $cur_transmittalitem, $cur_role, $cur_acopath, $cur_acos; $parent = end($elementstack); array_push($elementstack, array('name'=>$name, 'attributes'=>$attrs)); @@ -1094,12 +1116,19 @@ function startElement($parser, $name, $attrs) { /* {{{ */ $cur_transition['groups'][] = (int) $attrs['ID']; } break; + case "ACO": + array_push($cur_acopath, $attrs['ALIAS']); + $cur_acos[implode('/', $cur_acopath)] = array(); + break; case "ROLE": $first = $elementstack[1]; if($first['name'] == 'ROLES') { $cur_role = array(); $cur_role['id'] = (int) $attrs['ID']; $cur_role['attributes'] = array(); + $cur_role['acos'] = array(); + $cur_acopath = array(); + $cur_acos = array(); } break; case "TRANSMITTAL": @@ -1212,6 +1241,8 @@ function startElement($parser, $name, $attrs) { /* {{{ */ $cur_group['attributes'][$attrs['NAME']] = ''; } elseif($parent['name'] == 'ROLE') { $cur_role['attributes'][$attrs['NAME']] = ''; + } elseif($parent['name'] == 'ACO') { + $cur_acos[implode('/', $cur_acopath)]['attributes'][$attrs['NAME']] = ''; } elseif($parent['name'] == 'KEYWORD') { $cur_keyword['attributes'][$attrs['NAME']] = ''; } elseif($parent['name'] == 'ATTRIBUTEDEFINITION') { @@ -1390,7 +1421,7 @@ function startElement($parser, $name, $attrs) { /* {{{ */ } /* }}} */ function endElement($parser, $name) { /* {{{ */ - global $logger, $dms, $sections, $rootfolder, $objmap, $elementstack, $users, $groups, $links,$cur_user, $cur_group, $cur_folder, $cur_document, $cur_version, $cur_statuslog, $cur_approval, $cur_approvallog, $cur_review, $cur_reviewlog, $cur_attrdef, $cur_documentcat, $cur_keyword, $cur_keywordcat, $cur_file, $cur_link, $cur_workflow, $cur_workflowlog, $cur_workflowtransition, $cur_workflowaction, $cur_workflowstate, $cur_transition, $cur_transmittal, $cur_transmittalitem, $cur_role; + global $logger, $dms, $sections, $rootfolder, $objmap, $elementstack, $users, $groups, $links,$cur_user, $cur_group, $cur_folder, $cur_document, $cur_version, $cur_statuslog, $cur_approval, $cur_approvallog, $cur_review, $cur_reviewlog, $cur_attrdef, $cur_documentcat, $cur_keyword, $cur_keywordcat, $cur_file, $cur_link, $cur_workflow, $cur_workflowlog, $cur_workflowtransition, $cur_workflowaction, $cur_workflowstate, $cur_transition, $cur_transmittal, $cur_transmittalitem, $cur_role, $cur_acopath, $cur_acos; array_pop($elementstack); $parent = end($elementstack); @@ -1439,7 +1470,11 @@ function endElement($parser, $name) { /* {{{ */ insert_group($cur_group); } break; + case 'ACO': + array_pop($cur_acopath); + break; case 'ROLE': + $cur_role['acos'] = $cur_acos; insert_role($cur_role); break; case 'ATTRIBUTEDEFINITION': @@ -1526,7 +1561,7 @@ function endElement($parser, $name) { /* {{{ */ } /* }}} */ function characterData($parser, $data) { /* {{{ */ - global $elementstack, $objmap, $cur_user, $cur_group, $cur_folder, $cur_document, $cur_version, $cur_statuslog, $cur_approval, $cur_approvallog, $cur_review, $cur_reviewlog, $cur_attrdef, $cur_documentcat, $cur_keyword, $cur_keywordcat, $cur_file, $cur_link, $cur_workflow, $cur_workflowlog, $cur_workflowtransition, $cur_workflowaction, $cur_workflowstate, $cur_transition, $cur_transmittal, $cur_transmittalitem, $cur_role; + global $elementstack, $objmap, $cur_user, $cur_group, $cur_folder, $cur_document, $cur_version, $cur_statuslog, $cur_approval, $cur_approvallog, $cur_review, $cur_reviewlog, $cur_attrdef, $cur_documentcat, $cur_keyword, $cur_keywordcat, $cur_file, $cur_link, $cur_workflow, $cur_workflowlog, $cur_workflowtransition, $cur_workflowaction, $cur_workflowstate, $cur_transition, $cur_transmittal, $cur_transmittalitem, $cur_role, $cur_acopath, $cur_acos; $current = end($elementstack); $parent = prev($elementstack); @@ -1620,6 +1655,12 @@ function characterData($parser, $data) { /* {{{ */ else $cur_role['attributes'][$current['attributes']['NAME']] = $data; break; + case 'ACO': + if(isset($cur_acos[implode('/', $cur_acopath)]['attributes'][$current['attributes']['NAME']])) + $cur_acos[implode('/', $cur_acopath)]['attributes'][$current['attributes']['NAME']] .= $data; + else + $cur_acos[implode('/', $cur_acopath)]['attributes'][$current['attributes']['NAME']] = $data; + break; case 'ATTRIBUTEDEFINITION': if(isset($cur_attrdef['attributes'][$current['attributes']['NAME']])) $cur_attrdef['attributes'][$current['attributes']['NAME']] .= $data; @@ -1833,6 +1874,7 @@ if($defaultuserid) { $defaultUser = null; } +$users = array(); $elementstack = array(); $objmap = array( 'attributedefs' => array(), From e932c3efd5da510bf26f0282242bcaef820bb336 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 27 Sep 2016 17:50:30 +0200 Subject: [PATCH 0623/2006] allow admins and owner as revisor and reciepent --- views/bootstrap/class.SetRecipients.php | 2 +- views/bootstrap/class.SetRevisors.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.SetRecipients.php b/views/bootstrap/class.SetRecipients.php index ddfd9df7f..2516094d5 100644 --- a/views/bootstrap/class.SetRecipients.php +++ b/views/bootstrap/class.SetRecipients.php @@ -47,7 +47,7 @@ class SeedDMS_View_SetRecipients extends SeedDMS_Bootstrap_Style { $this->contentHeading(getMLText("change_recipients")); // Retrieve a list of all users and groups that have receipt privileges. - $docAccess = $document->getReadAccessList(); + $docAccess = $document->getReadAccessList(true, true); // Retrieve list of currently assigned recipients, along with // their latest status. diff --git a/views/bootstrap/class.SetRevisors.php b/views/bootstrap/class.SetRevisors.php index 91623ee55..9f706cfa3 100644 --- a/views/bootstrap/class.SetRevisors.php +++ b/views/bootstrap/class.SetRevisors.php @@ -47,7 +47,7 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Bootstrap_Style { $this->contentHeading(getMLText("change_assignments")); // Retrieve a list of all users and groups that have revision privileges. - $docAccess = $document->getReadAccessList(); + $docAccess = $document->getReadAccessList(true, true); // Retrieve list of currently assigned revisors, along with // their latest status. From 4219559450791d1d08f2a919c4ebe2aa6d1b3f6e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 28 Sep 2016 14:09:03 +0200 Subject: [PATCH 0624/2006] get doc list ReviewByMe and ApproveByMe instead of AppRevByMe --- op/op.Ajax.php | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/op/op.Ajax.php b/op/op.Ajax.php index 5b735e2e4..09585f5be 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -527,13 +527,16 @@ switch($command) { $approvals = array(); $receipts = array(); $revisions = array(); - $resArr = $dms->getDocumentList('AppRevByMe', $user); + $resArr = $dms->getDocumentList('ApproveByMe', $user); if($resArr) { foreach ($resArr as $res) { - if($res["status"]==S_DRAFT_REV) - $reviews[] = $res['id']; - if($res["status"]==S_DRAFT_APP) - $approvals[] = $res['id']; + $approvals[] = $res['id']; + } + } + $resArr = $dms->getDocumentList('ReviewByMe', $user); + if($resArr) { + foreach ($resArr as $res) { + $reviews[] = $res['id']; } } $resArr = $dms->getDocumentList('ReceiptByMe', $user); @@ -859,13 +862,16 @@ switch($command) { $approvals = array(); $receipts = array(); $revisions = array(); - $resArr = $dms->getDocumentList('AppRevByMe', $user); + $resArr = $dms->getDocumentList('ApproveByMe', $user); if($resArr) { foreach ($resArr as $res) { - if($res["status"]==S_DRAFT_REV) - $reviews[] = array('id'=>$res['id'], 'name'=>$res['name']); - elseif($res["status"]==S_DRAFT_APP) - $approvals[] = array('id'=>$res['id'], 'name'=>$res['name']); + $approvals[] = array('id'=>$res['id'], 'name'=>$res['name']); + } + } + $resArr = $dms->getDocumentList('ReviewByMe', $user); + if($resArr) { + foreach ($resArr as $res) { + $reviews[] = array('id'=>$res['id'], 'name'=>$res['name']); } } $resArr = $dms->getDocumentList('ReceiptByMe', $user); From b8e3e2d0920033e15c30be144ac1774012d4a194 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 28 Sep 2016 20:20:38 +0200 Subject: [PATCH 0625/2006] add $norequire as optional parameter to printAttributeEditField() needed for search for, where fields are not required --- views/bootstrap/class.Bootstrap.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index dae521b7f..c8351e37c 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1292,7 +1292,7 @@ $('#acceptkeywords').click(function(ev) { getType()) { case SeedDMS_Core_AttributeDefinition::type_boolean: echo "getId()."]\" value=\"0\" />"; @@ -1316,7 +1316,7 @@ $('#acceptkeywords').click(function(ev) { } else { echo "\""; } - echo "".($attrdef->getMinValues() > 0 ? ' required' : '').">"; + echo "".((!$norequire && $attrdef->getMinValues() > 0) ? ' required' : '').">"; if(!$attrdef->getMultipleValues()) { echo ""; } @@ -1335,9 +1335,9 @@ $('#acceptkeywords').click(function(ev) { } else { $objvalue = $attribute ? (is_object($attribute) ? $attribute->getValue() : $attribute) : ''; if(strlen($objvalue) > 80) { - echo ""; + echo ""; } else { - echo "getId()."]\" value=\"".htmlspecialchars($objvalue)."\"".($attrdef->getMinValues() > 0 ? ' required' : '').($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_int ? ' data-rule-digits="true"' : '')." />"; + echo "getId()."]\" value=\"".htmlspecialchars($objvalue)."\"".((!$norequire && $attrdef->getMinValues() > 0) ? ' required' : '').($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_int ? ' data-rule-digits="true"' : '')." />"; } } break; From be9f9873420f8b871b68bd73ce3fe07369634036 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 28 Sep 2016 20:22:16 +0200 Subject: [PATCH 0626/2006] search for documents with missing receptions --- SeedDMS_Core/Core/inc.ClassDMS.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index c34df05d8..73d55ea1a 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -1117,7 +1117,7 @@ class SeedDMS_Core_DMS { * @param expirationenddate array search for documents expiring before this date * @return array containing the elements total and docs */ - function search($query, $limit=0, $offset=0, $logicalmode='AND', $searchin=array(), $startFolder=null, $owner=null, $status = array(), $creationstartdate=array(), $creationenddate=array(), $modificationstartdate=array(), $modificationenddate=array(), $categories=array(), $attributes=array(), $mode=0x3, $expirationstartdate=array(), $expirationenddate=array()) { /* {{{ */ + function search($query, $limit=0, $offset=0, $logicalmode='AND', $searchin=array(), $startFolder=null, $owner=null, $status = array(), $creationstartdate=array(), $creationenddate=array(), $modificationstartdate=array(), $modificationenddate=array(), $categories=array(), $attributes=array(), $mode=0x3, $expirationstartdate=array(), $expirationenddate=array(), $missingreception=false) { /* {{{ */ // Split the search string into constituent keywords. $tkeys=array(); if (strlen($query)>0) { @@ -1430,6 +1430,8 @@ class SeedDMS_Core_DMS { "LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentStatus`.`version` AND `ttcontentid`.`document` = `tblDocumentStatus`.`documentID` ". "LEFT JOIN `tblDocumentLocks` ON `tblDocuments`.`id`=`tblDocumentLocks`.`document` ". "LEFT JOIN `tblDocumentCategory` ON `tblDocuments`.`id`=`tblDocumentCategory`.`documentID` ". + "LEFT JOIN `tblDocumentRecipients` ON `tblDocuments`.`id`=`tblDocumentRecipients`.`documentID` ". + "LEFT JOIN `tblDocumentReceiptLog` ON `tblDocumentRecipients`.`receiptID`=`tblDocumentReceiptLog`.`receiptID` ". "WHERE `ttstatid`.`maxLogID`=`tblDocumentStatusLog`.`statusLogID` ". "AND `ttcontentid`.`maxVersion` = `tblDocumentContent`.`version`"; @@ -1460,6 +1462,9 @@ class SeedDMS_Core_DMS { $searchQuery .= " AND `tblDocumentStatusLog`.`status` IN (".implode(',', $status).")"; } + if($missingreception) + $searchQuery .= " AND `tblDocumentReceiptLog`.`status`=0"; + if($searchKey || $searchOwner || $searchCategories || $searchCreateDate || $searchExpirationDate || $searchAttributes || $status) { // Count the number of rows that the search will produce. $resArr = $this->db->getResultArray("SELECT COUNT(*) AS num FROM (SELECT DISTINCT `tblDocuments`.id ".$searchQuery.") a"); From 7937f730317e1e5788e2259a92b2fb884ec5fafe Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 28 Sep 2016 20:22:42 +0200 Subject: [PATCH 0627/2006] pass $missingreception to view --- out/out.Search.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/out/out.Search.php b/out/out.Search.php index 74a96d7d5..847977b70 100644 --- a/out/out.Search.php +++ b/out/out.Search.php @@ -313,6 +313,11 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSe $status[] = S_EXPIRED; } + $missingreception = false; + if (isset($_GET["missingreception"])){ + $missingreception = true; + } + /* Do not search for folders if result shall be filtered by status. * If this is not done, unexplainable results will be delivered. * e.g. a search for expired documents of a given user will list @@ -362,7 +367,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSe // ---------------- Start searching ----------------------------------------- $startTime = getTime(); - $resArr = $dms->search($query, 0, 0 /*$limit, ($pageNumber-1)*$limit*/, $mode, $searchin, $startFolder, $owner, $status, $creationdate ? $startdate : array(), $creationdate ? $stopdate : array(), array(), array(), $categories, $attributes, $resultmode, $expirationdate ? $expstartdate : array(), $expirationdate ? $expstopdate : array()); + $resArr = $dms->search($query, 0, 0 /*$limit, ($pageNumber-1)*$limit*/, $mode, $searchin, $startFolder, $owner, $status, $creationdate ? $startdate : array(), $creationdate ? $stopdate : array(), array(), array(), $categories, $attributes, $resultmode, $expirationdate ? $expstartdate : array(), $expirationdate ? $expstopdate : array(), $missingreception); $searchTime = getTime() - $startTime; $searchTime = round($searchTime, 2); @@ -439,6 +444,7 @@ if($view) { $view->setParam('previewWidthList', $settings->_previewWidthList); $view->setParam('previewconverters', $settings->_converters['preview']); $view->setParam('timeout', $settings->_cmdTimeout); + $view->setParam('missingreception', $missingreception); $view($_GET); exit; } From 9746c85ce54b6d956d11bd64371defb4ce8bea10 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 28 Sep 2016 20:22:59 +0200 Subject: [PATCH 0628/2006] add search paramter for documents with missing reception --- views/bootstrap/class.Search.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 251eea83c..50cb8463b 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -140,6 +140,7 @@ $(document).ready( function() { $previewwidth = $this->params['previewWidthList']; $previewconverters = $this->params['previewconverters']; $timeout = $this->params['timeout']; + $missingreception = $this->params['missingreception']; if(count($entries) == 1) { $entry = $entries[0]; @@ -258,7 +259,7 @@ $(document).ready( function() { ?> getName()); ?>: - printAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : null) ?> + printAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : null, 'attributes', true) ?> +: + + + + + :
      "; print "
        "; - if($accessop->mayEditVersion($document)) { - print "
      • ".$this->html_link('EditOnline', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("edit_version"), false, true)."
      • "; - } + if($this->check_access('EditOnline')) + if($accessop->mayEditVersion($document)) { + print "
      • ".$this->html_link('EditOnline', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("edit_version"), false, true)."
      • "; + } /* Only admin has the right to remove version in any case or a regular * user if enableVersionDeletion is on */ - if($accessop->mayRemoveVersion($document)) { - print "
      • ".$this->html_link('RemoveVersion', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("rm_version"), false, true)."
      • "; - } - if($accessop->mayOverrideStatus($document)) { - print "
      • ".$this->html_link('OverrideContentStatus', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_status"), false, true)."
      • "; - } - if($accessop->maySetRecipients($document)) { - print "
      • ".$this->html_link('SetRecipients', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_recipients"), false, true)."
      • "; - } - if($accessop->maySetRevisors($document)) { - print "
      • ".$this->html_link('SetRevisors', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_revisors"), false, true)."
      • "; - } + if($this->check_access('RemoveVersion')) + if($accessop->mayRemoveVersion($document)) { + print "
      • ".$this->html_link('RemoveVersion', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("rm_version"), false, true)."
      • "; + } + if($this->check_access('OverrideContentStatus')) + if($accessop->mayOverrideStatus($document)) { + print "
      • ".$this->html_link('OverrideContentStatus', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_status"), false, true)."
      • "; + } + if($this->check_access('SetRecipients')) + if($accessop->maySetRecipients($document)) { + print "
      • ".$this->html_link('SetRecipients', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_recipients"), false, true)."
      • "; + } + if($this->check_access('SetRevisors')) + if($accessop->maySetRevisors($document)) { + print "
      • ".$this->html_link('SetRevisors', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_revisors"), false, true)."
      • "; + } if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { // Allow changing reviewers/approvals only if not reviewed - if($accessop->maySetReviewersApprovers($document)) { - print "
      • ".$this->html_link('SetReviewersApprovers', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_assignments"), false, true)."
      • "; - } - } else { - if($accessop->maySetWorkflow($document)) { - if(!$workflow) { - print "
      • ".$this->html_link('SetWorkflow', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("set_workflow"), false, true)."
      • "; + if($this->check_access('SetReviewersApprovers')) + if($accessop->maySetReviewersApprovers($document)) { + print "
      • ".$this->html_link('SetReviewersApprovers', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_assignments"), false, true)."
      • "; + } + } else { + if($this->check_access('SetWorkflow')) + if($accessop->maySetWorkflow($document)) { + if(!$workflow) { + print "
      • ".$this->html_link('SetWorkflow', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("set_workflow"), false, true)."
      • "; + } } - } } /* if($accessop->maySetExpires($document)) { print "
      • ".$this->html_link('SetExpires', array('documentid'=>$documentid), array(), "".getMLText("set_expiry"), false, true)."
      • "; } */ - if($dms->getAllTransmittals($user)) { - if($this->check_access('AddToTransmittal')) - print "
      • ".$this->html_link('AddToTransmittal', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("add_to_transmittal"), false, true)."
      • "; - } - if($accessop->mayEditComment($document)) { - print "
      • ".$this->html_link('EditComment', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("edit_comment"), false, true)."
      • "; - } - if($accessop->mayEditAttributes($document)) { - print "
      • ".$this->html_link('EditAttributes', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("edit_attributes"), false, true)."
      • "; - } + if($this->check_access('AddToTransmittal')) + if($dms->getAllTransmittals($user)) { + if($this->check_access('AddToTransmittal')) + print "
      • ".$this->html_link('AddToTransmittal', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("add_to_transmittal"), false, true)."
      • "; + } + if($this->check_access('EditComment')) + if($accessop->mayEditComment($document)) { + print "
      • ".$this->html_link('EditComment', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("edit_comment"), false, true)."
      • "; + } + if($this->check_access('EditAttributes')) + if($accessop->mayEditAttributes($document)) { + print "
      • ".$this->html_link('EditAttributes', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("edit_attributes"), false, true)."
      • "; + } //print "
      • ".$this->html_link('Download', array('documentid'=>$documentid, 'vfile'=>1), array(), "".getMLText("versioning_info"), false, true)."
      • "; From 87bbb6bf444ef32940dd1ec541caad0b8de83b61 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 9 Nov 2016 19:54:53 +0100 Subject: [PATCH 0660/2006] use orig file, set filename in utf-8 --- controllers/class.ViewOnline.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/class.ViewOnline.php b/controllers/class.ViewOnline.php index 0475286b1..4ddb7688d 100644 --- a/controllers/class.ViewOnline.php +++ b/controllers/class.ViewOnline.php @@ -34,7 +34,8 @@ class SeedDMS_Controller_ViewOnline extends SeedDMS_Controller_Common { if(!$this->callHook('version')) { header("Content-Type: " . $content->getMimeType()); if (!isset($settings->_viewOnlineFileTypes) || !is_array($settings->_viewOnlineFileTypes) || !in_array(strtolower($content->getFileType()), $settings->_viewOnlineFileTypes)) { - header("Content-Disposition: filename=\"" . $document->getName().$content->getFileType()) . "\""; + $efilename = rawurlencode($content->getOriginalFileName()); + header("Content-Disposition: filename=\"" . $efilename . "\"; filename*=UTF-8''".$efilename); } header("Content-Length: " . filesize($dms->contentDir . $content->getPath())); header("Expires: 0"); From 3ddd24c7cd206e1cf9e3edc3f221ba3e17e59a71 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 11 Nov 2016 16:19:42 +0100 Subject: [PATCH 0661/2006] add expired status to list of status without access --- views/bootstrap/class.RoleMgr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.RoleMgr.php b/views/bootstrap/class.RoleMgr.php index 4e68b5e45..aaa40f0ee 100644 --- a/views/bootstrap/class.RoleMgr.php +++ b/views/bootstrap/class.RoleMgr.php @@ -154,7 +154,7 @@ $(document).ready( function() { echo ""; echo "".getMLText('restrict_access').""; echo ""; - foreach(array(S_DRAFT_REV, S_DRAFT_APP, S_IN_WORKFLOW, S_REJECTED, S_RELEASED, S_IN_REVISION, S_DRAFT, S_OBSOLETE) as $status) { + foreach(array(S_DRAFT_REV, S_DRAFT_APP, S_IN_WORKFLOW, S_REJECTED, S_RELEASED, S_IN_REVISION, S_DRAFT, S_EXPIRED, S_OBSOLETE) as $status) { echo "getNoAccess()) ? "checked" : "")."> ".getOverallStatusText($status)."
        "; } echo ""; From 106f849e825b66cd1010b5a64f8f5bd567361d02 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 11 Nov 2016 16:20:10 +0100 Subject: [PATCH 0662/2006] minor documentation fix --- SeedDMS_Core/Core/inc.ClassDMS.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index e9eb8344f..23e5f37ea 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -734,7 +734,7 @@ class SeedDMS_Core_DMS { * І have already taken care of. * @param string $param3 sort list by this field * @param string $param4 order direction - * @return array list of documents + * @return array list of documents records */ function getDocumentList($listtype, $param1=null, $param2=false, $param3='', $param4='') { /* {{{ */ /* The following query will get all documents and lots of additional @@ -1043,6 +1043,11 @@ class SeedDMS_Core_DMS { if (is_bool($resArr) && !$resArr) { return false; } + /* + $documents = array(); + foreach($resArr as $row) + $documents[] = $this->getDocument($row["id"]); + */ } else { return array(); } From 718762d2841d90bbe3916f295e588b48ddb6102a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 14 Nov 2016 08:38:12 +0100 Subject: [PATCH 0663/2006] check for access on document in mytasks and view->menutasks (Ticket #88) previously documents where listed, even if the user had no access --- op/op.Ajax.php | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/op/op.Ajax.php b/op/op.Ajax.php index a10f5d1e3..15122911d 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -535,25 +535,37 @@ switch($command) { $resArr = $dms->getDocumentList('ApproveByMe', $user); if($resArr) { foreach ($resArr as $res) { - $approvals[] = $res['id']; + $document = $dms->getDocument($res["id"]); + if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { + $approvals[] = $res['id']; + } } } $resArr = $dms->getDocumentList('ReviewByMe', $user); if($resArr) { foreach ($resArr as $res) { - $reviews[] = $res['id']; + $document = $dms->getDocument($res["id"]); + if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { + $reviews[] = $res['id']; + } } } $resArr = $dms->getDocumentList('ReceiptByMe', $user); if($resArr) { foreach ($resArr as $res) { - $receipts[] = $res['id']; + $document = $dms->getDocument($res["id"]); + if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { + $receipts[] = $res['id']; + } } } $resArr = $dms->getDocumentList('ReviseByMe', $user); if($resArr) { foreach ($resArr as $res) { - $revisions[] = $res['id']; + $document = $dms->getDocument($res["id"]); + if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { + $revisions[] = $res['id']; + } } } $content = $view->menuTasks(array('review'=>$reviews, 'approval'=>$approvals, 'receipt'=>$receipts, 'revision'=>$revisions)); @@ -871,25 +883,37 @@ switch($command) { $resArr = $dms->getDocumentList('ApproveByMe', $user); if($resArr) { foreach ($resArr as $res) { - $approvals[] = array('id'=>$res['id'], 'name'=>$res['name']); + $document = $dms->getDocument($res["id"]); + if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { + $approvals[] = array('id'=>$res['id'], 'name'=>$res['name']); + } } } $resArr = $dms->getDocumentList('ReviewByMe', $user); if($resArr) { foreach ($resArr as $res) { - $reviews[] = array('id'=>$res['id'], 'name'=>$res['name']); + $document = $dms->getDocument($res["id"]); + if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { + $reviews[] = array('id'=>$res['id'], 'name'=>$res['name']); + } } } $resArr = $dms->getDocumentList('ReceiptByMe', $user); if($resArr) { foreach ($resArr as $res) { - $receipts[] = array('id'=>$res['id'], 'name'=>$res['name']); + $document = $dms->getDocument($res["id"]); + if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { + $receipts[] = array('id'=>$res['id'], 'name'=>$res['name']); + } } } $resArr = $dms->getDocumentList('ReviseByMe', $user); if($resArr) { foreach ($resArr as $res) { - $revisions[] = array('id'=>$res['id'], 'name'=>$res['name']); + $document = $dms->getDocument($res["id"]); + if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { + $revisions[] = array('id'=>$res['id'], 'name'=>$res['name']); + } } } header('Content-Type: application/json'); From 7db1703477d866ab4c02d4ffd627e89fb27777df Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 16 Nov 2016 11:39:13 +0100 Subject: [PATCH 0664/2006] forget to create field secret when change table tblUsers --- install/update-5.1.0/update-sqlite3.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/install/update-5.1.0/update-sqlite3.sql b/install/update-5.1.0/update-sqlite3.sql index 71bf8930d..c982e592f 100644 --- a/install/update-5.1.0/update-sqlite3.sql +++ b/install/update-5.1.0/update-sqlite3.sql @@ -107,6 +107,7 @@ CREATE TABLE `new_tblUsers` ( `disabled` INTEGER NOT NULL default '0', `quota` INTEGER, `homefolder` INTEGER default NULL REFERENCES `tblFolders` (`id`), + `secret` varchar(50) default NULL, UNIQUE (`login`) ); From 6cb5dec1a9d8fd9c1756f837e8834bcf4e908818 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 22 Nov 2016 17:58:28 +0100 Subject: [PATCH 0665/2006] fix search for documents with reception acknowledgement --- SeedDMS_Core/Core/inc.ClassDMS.php | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 23e5f37ea..4834542f1 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -1422,9 +1422,14 @@ class SeedDMS_Core_DMS { // Construct the SQL query that will be used to search the database. // - if (!$this->db->createTemporaryTable("ttcontentid") || !$this->db->createTemporaryTable("ttstatid") || !$this->db->createTemporaryTable("ttreceiptid")) { + if (!$this->db->createTemporaryTable("ttcontentid") || !$this->db->createTemporaryTable("ttstatid")) { return false; } + if($reception) { + if (!$this->db->createTemporaryTable("ttreceiptid")) { + return false; + } + } $searchQuery = "FROM `tblDocumentContent` ". "LEFT JOIN `tblDocuments` ON `tblDocuments`.`id` = `tblDocumentContent`.`document` ". @@ -1470,8 +1475,26 @@ class SeedDMS_Core_DMS { $searchQuery .= " AND `tblDocumentStatusLog`.`status` IN (".implode(',', $status).")"; } - if($reception) - $searchQuery .= " AND `tblDocumentReceiptLog`.`status` IN (".implode(',', $reception).")"; + if($reception) { + $searchReception = array(); + /* still waiting for users/groups to acknownledge reception */ + if(in_array("missingaction", $reception)) + $searchReception[] = "b.`status` IN (0)"; + /* document has not been acknowledeged by at least one user/group */ + if(in_array("hasrejection", $reception)) + $searchReception[] = "b.`status` IN (-1)"; + /* document has been acknowledeged by at least one user/group */ + if(in_array("hasacknowledge", $reception)) + $searchReception[] = "b.`status` IN (1)"; + /* document has been acknowledeged by all users/groups !!! not working !!! */ + if(in_array("completeacknowledge", $reception)) + $searchReception[] = "b.`status` NOT IN (-1, 0)"; + if($searchReception) { + $searchQuery .= " AND EXISTS (SELECT NULL FROM `tblDocumentRecipients` a LEFT JOIN `tblDocumentReceiptLog` b ON a.`receiptID`=b.`receiptID` LEFT JOIN `ttreceiptid` c ON c.`maxLogID` = b.`receiptLogID` WHERE "; + $searchQuery .= "c.`maxLogID`=b.`receiptLogID` AND `tblDocuments`.`id` = a.`documentID` "; + $searchQuery .= "AND (".implode(' OR ', $searchReception)."))"; + } + } if($searchKey || $searchOwner || $searchCategories || $searchCreateDate || $searchExpirationDate || $searchAttributes || $status || $reception) { // Count the number of rows that the search will produce. From e21e897468577ba45af0532d63b80414b0b0016b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 22 Nov 2016 17:58:59 +0100 Subject: [PATCH 0666/2006] use keywords for different searches for document reception --- views/bootstrap/class.Search.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index ef669c166..70877fb47 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -373,16 +373,14 @@ $(document).ready( function() { - : - - - + + + - : From 8b1b9fdb2a3462e6e27334ae52d0e1ee70ad1a15 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 4 Jan 2017 17:14:45 +0100 Subject: [PATCH 0667/2006] set $dms in preview() --- 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 5e05e2e8a..d4fda9bfd 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -313,6 +313,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } /* }}} */ function preview() { /* {{{ */ + $dms = $this->params['dms']; $document = $this->params['document']; $timeout = $this->params['timeout']; $showfullpreview = $this->params['showFullPreview']; From b5f8e9efcc882da14e00f9ebe639c817d0f7fef6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 4 Jan 2017 17:23:59 +0100 Subject: [PATCH 0668/2006] readd [post|pre]PreviewDocument hooks --- views/bootstrap/class.ViewDocument.php | 43 ++++++++++++++++---------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index d4fda9bfd..d365d952d 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -323,36 +323,47 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { return; $accessop = $this->params['accessobject']; - if($accessop->check_controller_access('Download', array('action'=>'version'))) { $latestContent = $document->getLatestContent(); - switch($latestContent->getMimeType()) { - case 'audio/mpeg': - case 'audio/mp3': - case 'audio/ogg': - case 'audio/wav': - $this->contentHeading(getMLText("preview")); + $txt = $this->callHook('preDocumentPreview', $latestContent); + if(is_string($txt)) + echo $txt; + else { + switch($latestContent->getMimeType()) { + case 'audio/mpeg': + case 'audio/mp3': + case 'audio/ogg': + case 'audio/wav': + $this->contentHeading(getMLText("preview")); ?> contentHeading(getMLText("preview")); + break; + case 'application/pdf': + $this->contentHeading(getMLText("preview")); ?> contentHeading(getMLText("preview")); + break; + case 'image/svg+xml': + $this->contentHeading(getMLText("preview")); ?> callHook('additionalDocumentPreview', $latestContent); + if(is_string($txt)) + echo $txt; + break; + } } + $txt = $this->callHook('postDocumentPreview', $latestContent); + if(is_string($txt)) + echo $txt; + if($converttopdf) { $pdfpreviewer = new SeedDMS_Preview_PdfPreviewer($cachedir, $timeout); if($pdfpreviewer->hasConverter($latestContent->getMimeType())) { From fbb91c9c3000a17f6b9beca7ea094aa42a1c6317 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 4 Jan 2017 18:08:18 +0100 Subject: [PATCH 0669/2006] use form controls --- views/bootstrap/class.SetRevisors.php | 49 +++++++++++++++++---------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/views/bootstrap/class.SetRevisors.php b/views/bootstrap/class.SetRevisors.php index 2a2add9fb..06ea7cb21 100644 --- a/views/bootstrap/class.SetRevisors.php +++ b/views/bootstrap/class.SetRevisors.php @@ -70,18 +70,24 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Bootstrap_Style { contentContainerStart(); ?> -
        + contentSubHeading(getMLText("update_revisors"));?> -
        :
        - - - - +
        + +
        + + + + +
        +
        -
        :
        - - + +
      + -
      :
      - getID()])) { @@ -131,13 +141,18 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Bootstrap_Style { } } ?> - + + + -

      - - -"> -

      + + +
      + +
      + "> +
      +
      contentContainerEnd(); From 72535081d6fd6021466dd9d94860a4efb2db17f2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 9 Jan 2017 08:58:37 +0100 Subject: [PATCH 0670/2006] check for return value of mytasks api call do nothing if data is null --- styles/bootstrap/application.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index 1d0178610..d94f36c89 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -998,15 +998,17 @@ $(document).ready(function() { /* {{{ */ dataType: "json", data: {command: 'mytasks'}, success: function(data) { - if(approval_count != data.data.approval.length || - review_count != data.data.review.length || - receipt_count != data.data.receipt.length || - revision_count != data.data.revision.length) { - $("#menu-tasks > ul > li").html('Loading').hide().load('../op/op.Ajax.php?command=view&view=menutasks').fadeIn('500') - approval_count = data.data.approval.length; - review_count = data.data.review.length; - receipt_count = data.data.receipt.length; - revision_count = data.data.revision.length; + if(data) { + if(approval_count != data.data.approval.length || + review_count != data.data.review.length || + receipt_count != data.data.receipt.length || + revision_count != data.data.revision.length) { + $("#menu-tasks > ul > li").html('Loading').hide().load('../op/op.Ajax.php?command=view&view=menutasks').fadeIn('500') + approval_count = data.data.approval.length; + review_count = data.data.review.length; + receipt_count = data.data.receipt.length; + revision_count = data.data.revision.length; + } } }, timeout: 1000 From fae159a5f33b0412ba7a76b03cab1524f03cc074 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 9 Jan 2017 21:33:45 +0100 Subject: [PATCH 0671/2006] set name of file in zip file to 'docid'-'version'-'docname' (Closes #95) --- inc/inc.ClassDownloadMgr.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassDownloadMgr.php b/inc/inc.ClassDownloadMgr.php index b91cec988..770a874e7 100644 --- a/inc/inc.ClassDownloadMgr.php +++ b/inc/inc.ClassDownloadMgr.php @@ -184,7 +184,15 @@ class SeedDMS_Download_Mgr { foreach($this->items as $item) { $document = $item->getDocument(); $dms = $document->_dms; - $zip->addFile($dms->contentDir.$item->getPath(), utf8_decode($prefixdir."/".$document->getID()."-".$item->getOriginalFileName())); + $ext = pathinfo($document->getName(), PATHINFO_EXTENSION); + $oext = pathinfo($item->getOriginalFileName(), PATHINFO_EXTENSION); + if($ext == $oext) + $filename = preg_replace('/[^A-Za-z0-9_.-]/', '_', $document->getName()); + else { + $filename = preg_replace('/[^A-Za-z0-9_-]/', '_', $document->getName()).'.'.$oext; + } + $filename = $prefixdir."/".$document->getID().'-'.$item->getVersion().'-'.$filename; //$lc->getOriginalFileName(); + $zip->addFile($dms->contentDir.$item->getPath(), utf8_decode($filename)); } $zip->addFile($file, $prefixdir."/metadata.xls"); From 5584cedce33baa26c2d84486d2b7e74ffb5d3957 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 10 Jan 2017 06:36:45 +0100 Subject: [PATCH 0672/2006] fix validation if just file from library is given --- views/bootstrap/class.AddDocument.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index c5d485cb6..933c97847 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -77,9 +77,14 @@ $(document).ready(function() { }); jQuery.validator.addMethod("alternatives", function(value, element, params) { - if(value == '' && params.val() == '') - return false; - return true; + if(value != '') + return true; + var valid = false; + $.each(params, function( index, value ) { + if(params.val != '') + valid = true + }); + return valid; }, ""); $("#form1").validate({ invalidHandler: function(e, validator) { @@ -94,10 +99,10 @@ $(document).ready(function() { }, rules: { 'userfile[]': { - alternatives: $('#dropfolderfileform1') + alternatives: [$('#dropfolderfileform1'), $('#choosedocsearch')] }, dropfolderfileform1: { - alternatives: $(".btn-file input") + alternatives: [$(".btn-file input"), $('#choosedocsearch')] } }, messages: { From b27b8ba7fd5f177017d2a89eac8d73df354963fe Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 10 Jan 2017 06:58:07 +0100 Subject: [PATCH 0673/2006] check access rights in controller, not before --- controllers/class.AddDocument.php | 4 +++- op/op.AddDocument.php | 6 ++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/controllers/class.AddDocument.php b/controllers/class.AddDocument.php index 271982b3b..3c0c8ebbf 100644 --- a/controllers/class.AddDocument.php +++ b/controllers/class.AddDocument.php @@ -86,10 +86,12 @@ class SeedDMS_Controller_AddDocument extends SeedDMS_Controller_Common { } /* Check if additional notification shall be added */ foreach($notificationusers as $notuser) { + if($document->getAccessMode($user) >= M_READ) $res = $document->addNotify($notuser->getID(), true); } foreach($notificationgroups as $notgroup) { - $res = $document->addNotify($notgroup->getID(), false); + if($document->getGroupAccessMode($notgroup) >= M_READ) + $res = $document->addNotify($notgroup->getID(), false); } if(!$this->callHook('postAddDocument', $document)) { diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php index f6d16a63f..3890e49eb 100644 --- a/op/op.AddDocument.php +++ b/op/op.AddDocument.php @@ -299,8 +299,7 @@ if(!empty($_POST['notification_users'])) { foreach($_POST['notification_users'] as $notuserid) { $notuser = $dms->getUser($notuserid); if($notuser) { - if($document->getAccessMode($user) >= M_READ) - $notusers[] = $notuser; + $notusers[] = $notuser; } } } @@ -309,8 +308,7 @@ if(!empty($_POST['notification_groups'])) { foreach($_POST['notification_groups'] as $notgroupid) { $notgroup = $dms->getGroup($notgroupid); if($notgroup) { - if($document->getGroupAccessMode($notgroup) >= M_READ) - $notgroups[] = $notgroup; + $notgroups[] = $notgroup; } } } From 05f1919e3cabdfffc2617aa5dd621bb16de47b1d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 10 Jan 2017 08:45:21 +0100 Subject: [PATCH 0674/2006] set Content-Disposition even if file type not in list of online file types --- controllers/class.ViewOnline.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/class.ViewOnline.php b/controllers/class.ViewOnline.php index c95ac0f6e..65d5a8d44 100644 --- a/controllers/class.ViewOnline.php +++ b/controllers/class.ViewOnline.php @@ -33,8 +33,10 @@ class SeedDMS_Controller_ViewOnline extends SeedDMS_Controller_Common { case "version": if(null === $this->callHook('version')) { header("Content-Type: " . $content->getMimeType()); + $efilename = rawurlencode($content->getOriginalFileName()); if (!isset($settings->_viewOnlineFileTypes) || !is_array($settings->_viewOnlineFileTypes) || !in_array(strtolower($content->getFileType()), $settings->_viewOnlineFileTypes)) { - $efilename = rawurlencode($content->getOriginalFileName()); + header("Content-Disposition: attachment; filename=\"" . $efilename . "\"; filename*=UTF-8''".$efilename); + } else { header("Content-Disposition: filename=\"" . $efilename . "\"; filename*=UTF-8''".$efilename); } header("Content-Length: " . filesize($dms->contentDir . $content->getPath())); From 47f43a47bafc9388fbb9e8e35620320fb47818c0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 10 Jan 2017 09:23:27 +0100 Subject: [PATCH 0675/2006] fix validation of alternative file upload/import fields --- views/bootstrap/class.AddDocument.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index b76cb6c9e..d8d1f67f9 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -81,7 +81,7 @@ $(document).ready(function() { return true; var valid = false; $.each(params, function( index, value ) { - if(params.val != '') + if(value.val() != '' && typeof value.val() != 'undefined') valid = true }); return valid; @@ -113,7 +113,6 @@ $(document).ready(function() { errorPlacement: function( error, element ) { if ( element.is( ":file" ) ) { error.appendTo( element.parent().parent().parent()); -console.log(element); } else { error.appendTo( element.parent()); } From 2d2ebdc887bfa943212dc07840e0dcebd55443bf Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 10 Jan 2017 21:25:15 +0100 Subject: [PATCH 0676/2006] add ordering to all list in getDocumentList() --- SeedDMS_Core/Core/inc.ClassDMS.php | 85 +++++++++++++++++++++++++----- 1 file changed, 73 insertions(+), 12 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 4834542f1..ac7b72200 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -809,6 +809,12 @@ class SeedDMS_Core_DMS { break; // }}} case 'ReviewByMe': // Documents I have to review {{{ $user = $param1; + $orderby = $param3; + if($param4 == 'desc') + $orderdir = 'DESC'; + else + $orderdir = 'ASC'; + // Get document list for the current user. $reviewStatus = $user->getReviewStatus(); @@ -834,14 +840,25 @@ class SeedDMS_Core_DMS { if (strlen($docCSV)>0) { $queryStr .= "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_EXPIRED.") ". - "AND `tblDocuments`.`id` IN (" . $docCSV . ") ". - "ORDER BY `statusDate` DESC"; + "AND `tblDocuments`.`id` IN (" . $docCSV . ") "; + //$queryStr .= "ORDER BY `statusDate` DESC"; + if ($orderby=='e') $queryStr .= "ORDER BY `expires`"; + else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`"; + else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; + else $queryStr .= "ORDER BY `name`"; + $queryStr .= " ".$orderdir; } else { $queryStr = ''; } break; // }}} case 'ApproveByMe': // Documents I have to approve {{{ $user = $param1; + $orderby = $param3; + if($param4 == 'desc') + $orderdir = 'DESC'; + else + $orderdir = 'ASC'; + // Get document list for the current user. $approvalStatus = $user->getApprovalStatus(); @@ -867,8 +884,13 @@ class SeedDMS_Core_DMS { if (strlen($docCSV)>0) { $queryStr .= "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_APP.", ".S_EXPIRED.") ". - "AND `tblDocuments`.`id` IN (" . $docCSV . ") ". - "ORDER BY `statusDate` DESC"; + "AND `tblDocuments`.`id` IN (" . $docCSV . ") "; + //$queryStr .= "ORDER BY `statusDate` DESC"; + if ($orderby=='e') $queryStr .= "ORDER BY `expires`"; + else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`"; + else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; + else $queryStr .= "ORDER BY `name`"; + $queryStr .= " ".$orderdir; } else { $queryStr = ''; } @@ -907,6 +929,12 @@ class SeedDMS_Core_DMS { break; // }}} case 'ReviseByMe': // Documents I have to receipt {{{ $user = $param1; + $orderby = $param3; + if($param4 == 'desc') + $orderdir = 'DESC'; + else + $orderdir = 'ASC'; + // Get document list for the current user. $revisionStatus = $user->getRevisionStatus(); @@ -929,8 +957,13 @@ class SeedDMS_Core_DMS { } if (strlen($docCSV)>0) { - $queryStr .= "AND `tblDocuments`.`id` IN (" . $docCSV . ") ". - "ORDER BY `statusDate` DESC"; + $queryStr .= "AND `tblDocuments`.`id` IN (" . $docCSV . ") "; + //$queryStr .= "ORDER BY `statusDate` DESC"; + if ($orderby=='e') $queryStr .= "ORDER BY `expires`"; + else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`"; + else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; + else $queryStr .= "ORDER BY `name`"; + $queryStr .= " ".$orderdir; } else { $queryStr = ''; } @@ -987,14 +1020,33 @@ class SeedDMS_Core_DMS { break; // }}} case 'RejectOwner': // Documents that has been rejected and I'm owning {{{ $user = $param1; + $orderby = $param3; + if($param4 == 'desc') + $orderdir = 'DESC'; + else + $orderdir = 'ASC'; $queryStr .= "AND `tblDocuments`.`owner` = '".$user->getID()."' ". - "AND `tblDocumentStatusLog`.`status` IN (".S_REJECTED.") ". - "ORDER BY `statusDate` DESC"; + "AND `tblDocumentStatusLog`.`status` IN (".S_REJECTED.") "; + //$queryStr .= "ORDER BY `statusDate` DESC"; + if ($orderby=='e') $queryStr .= "ORDER BY `expires`"; + else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`"; + else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; + else $queryStr .= "ORDER BY `name`"; + $queryStr .= " ".$orderdir; break; // }}} case 'LockedByMe': // Documents locked by me {{{ $user = $param1; - $queryStr .= "AND `tblDocumentLocks`.`userID` = '".$user->getID()."' ". - "ORDER BY `statusDate` DESC"; + $orderby = $param3; + if($param4 == 'desc') + $orderdir = 'DESC'; + else + $orderdir = 'ASC'; + $queryStr .= "AND `tblDocumentLocks`.`userID` = '".$user->getID()."' "; + if ($orderby=='e') $queryStr .= "ORDER BY `expires`"; + else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`"; + else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; + else $queryStr .= "ORDER BY `name`"; + $queryStr .= " ".$orderdir; break; // }}} case 'WorkflowOwner': // Documents waiting for workflow trigger I'm owning {{{ $user = $param1; @@ -1018,6 +1070,11 @@ class SeedDMS_Core_DMS { break; // }}} case 'CheckedOutByMe': // Documents I have checked out {{{ $user = $param1; + $orderby = $param3; + if($param4 == 'desc') + $orderdir = 'DESC'; + else + $orderdir = 'ASC'; $qs = 'SELECT document FROM tblDocumentCheckOuts WHERE userID='.$user->getID(); $ra = $this->db->getResultArray($qs); @@ -1030,8 +1087,12 @@ class SeedDMS_Core_DMS { } if ($docs) { - $queryStr .= "AND `tblDocuments`.`id` IN (" . implode(',', $docs) . ") ". - "ORDER BY `statusDate` DESC"; + $queryStr .= "AND `tblDocuments`.`id` IN (" . implode(',', $docs) . ") "; + if ($orderby=='e') $queryStr .= "ORDER BY `expires`"; + else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`"; + else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; + else $queryStr .= "ORDER BY `name`"; + $queryStr .= " ".$orderdir; } else { $queryStr = ''; } From 7a721ee84f1e4736a347a5e53d3c88a50d7fd5ee Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 10 Jan 2017 21:25:45 +0100 Subject: [PATCH 0677/2006] make all list sortable by fields in header --- views/bootstrap/class.MyDocuments.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/views/bootstrap/class.MyDocuments.php b/views/bootstrap/class.MyDocuments.php index c0260137c..e4b1805a7 100644 --- a/views/bootstrap/class.MyDocuments.php +++ b/views/bootstrap/class.MyDocuments.php @@ -120,6 +120,8 @@ $(document).ready( function() { $this->contentHeading(getMLText("documents_to_review")); if($resArr) { + $this->printList($resArr, $previewer, 'listReviews'); + /* print ""; print "\n\n"; print "\n"; @@ -142,6 +144,7 @@ $(document).ready( function() { } echo "\n
      \n"; + */ } else { printMLText("no_docs_to_review"); } @@ -170,6 +173,8 @@ $(document).ready( function() { } $this->contentHeading(getMLText("documents_to_approve")); if($resArr) { + $this->printList($resArr, $previewer, 'listApprovals'); + /* print ""; print "\n\n"; print "\n"; @@ -192,6 +197,7 @@ $(document).ready( function() { } echo "\n
      \n"; + */ } else { printMLText("no_docs_to_approve"); } @@ -403,7 +409,7 @@ $(document).ready( function() { $this->contentHeading(getMLText("documents_to_revise")); if($resArr) { - $this->printList($resArr, $previewer); + $this->printList($resArr, $previewer, 'listRevisions'); } else { printMLText("no_docs_to_revise"); } @@ -432,7 +438,7 @@ $(document).ready( function() { $this->contentHeading(getMLText("documents_to_receipt")); if($resArr) { - $this->printList($resArr, $previewer); + $this->printList($resArr, $previewer, 'listReceipts'); } else { printMLText("no_docs_to_receipt"); } @@ -465,7 +471,7 @@ $(document).ready( function() { $this->contentHeading(getMLText("documents_user_rejected")); if ($resArr) { - $this->printList($resArr, $previewer); + $this->printList($resArr, $previewer, 'listRejects'); } else printMLText("no_docs_rejected"); @@ -495,7 +501,7 @@ $(document).ready( function() { $this->contentHeading(getMLText("documents_locked_by_you")); if ($resArr) { - $this->printList($resArr, $previewer); + $this->printList($resArr, $previewer, 'listLockedDocs'); } else printMLText("no_docs_locked"); @@ -525,7 +531,7 @@ $(document).ready( function() { $this->contentHeading(getMLText("documents_checked_out_by_you")); if ($resArr) { - $this->printList($resArr, $previewer); + $this->printList($resArr, $previewer, 'listCheckedoutDocs'); } else printMLText("no_docs_checked_out"); } /* }}} */ From 66e6cec4465347c46d511ee9477ee125abf67e08 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 11 Jan 2017 17:49:21 +0100 Subject: [PATCH 0678/2006] add filter for status 'S_DRAFT' --- out/out.Search.php | 3 +++ views/bootstrap/class.Search.php | 1 + 2 files changed, 4 insertions(+) diff --git a/out/out.Search.php b/out/out.Search.php index 7f0802a5f..7835c7922 100644 --- a/out/out.Search.php +++ b/out/out.Search.php @@ -289,6 +289,9 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSe // status $status = array(); + if (isset($_GET["draft"])){ + $status[] = S_DRAFT; + } if (isset($_GET["pendingReview"])){ $status[] = S_DRAFT_REV; } diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 70877fb47..425f124a4 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -359,6 +359,7 @@ $(document).ready( function() { : + From 32da91d1456195b916ca5f761f9e51bf5c389dd4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 11 Jan 2017 18:08:16 +0100 Subject: [PATCH 0679/2006] add item to 5.1.2 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index e04c82033..b2f76d8e0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Changes in version 5.1.2 -------------------------------------------------------------------------------- - merge changes up to 5.0.9 +- filter documents by status 'draft' on search page -------------------------------------------------------------------------------- Changes in version 5.1.1 From ba621af162c2c6fe80b78c2b6f12fd257676b1d3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 11 Jan 2017 18:17:52 +0100 Subject: [PATCH 0680/2006] update tasks in menu only if logged in --- styles/bootstrap/application.js | 4 ---- views/bootstrap/class.Bootstrap.php | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index d94f36c89..1c093c2ac 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -1015,8 +1015,4 @@ $(document).ready(function() { /* {{{ */ }); timeOutId = setTimeout(checkTasks, 10000); } -$(document).ready(function() { -//$("#menu-tasks > ul > li").checkTasks(); - checkTasks(); -}); diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 0ce613c71..2c3d38d4b 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -133,6 +133,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo ''."\n"; echo ''."\n"; echo ''."\n"; + if(isset($this->params['user']) && $this->params['user']) { + $this->addFooterJS('checkTasks();'); + } if($this->footerjs) { $jscode = "$(document).ready(function () {\n"; foreach($this->footerjs as $script) { From e562ad14cd1bd8954a32f383c493449900f1f67c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 17 Jan 2017 10:16:23 +0100 Subject: [PATCH 0681/2006] take out link to network drive The URL doesn't contain the username anymore --- views/bootstrap/class.UsrMgr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.UsrMgr.php b/views/bootstrap/class.UsrMgr.php index d843058b2..a54b43831 100644 --- a/views/bootstrap/class.UsrMgr.php +++ b/views/bootstrap/class.UsrMgr.php @@ -138,7 +138,7 @@ $(document).ready( function() { $session = array_shift($sessions); echo "".getMLText('lastaccess')."".getLongReadableDate($session->getLastAccess())."\n"; } - echo "".getMLText('network_drive')."_httpRoot.'checkout/'.preg_replace('/[^A-Za-z0-9_-]/', '', $seluser->getLogin())."\">".preg_replace('/[^A-Za-z0-9_-]/', '', $seluser->getLogin())."\n"; + // echo "".getMLText('network_drive')."_httpRoot.'checkout/'.preg_replace('/[^A-Za-z0-9_-]/', '', $seluser->getLogin())."\">".preg_replace('/[^A-Za-z0-9_-]/', '', $seluser->getLogin())."\n"; echo ""; if($user->isAdmin() && $seluser->getID() != $user->getID()) From ba4a6558b418c79258b265278984ffa23aff2f54 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 17 Jan 2017 13:44:19 +0100 Subject: [PATCH 0682/2006] add new document list ReceiveOwner, list docs with revision in AppRevOwner --- SeedDMS_Core/Core/inc.ClassDMS.php | 34 ++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 8d8fe20f4..65785a018 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -1016,7 +1016,7 @@ class SeedDMS_Core_DMS { $queryStr = ''; } break; // }}} - case 'AppRevOwner': // Documents waiting for review/approval I'm owning {{{ + case 'AppRevOwner': // Documents waiting for review/approval/revision I'm owning {{{ $user = $param1; $orderby = $param3; if($param4 == 'desc') @@ -1024,7 +1024,7 @@ class SeedDMS_Core_DMS { else $orderdir = 'ASC'; $queryStr .= "AND `tblDocuments`.`owner` = '".$user->getID()."' ". - "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.") "; + "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.", ".S_IN_REVISION.") "; if ($orderby=='e') $queryStr .= "ORDER BY `expires`"; else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`"; else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; @@ -1034,6 +1034,36 @@ class SeedDMS_Core_DMS { // "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.") ". // "ORDER BY `statusDate` DESC"; break; // }}} + case 'ReceiveOwner': // Documents waiting for reception I'm owning {{{ + $user = $param1; + $orderby = $param3; + if($param4 == 'desc') + $orderdir = 'DESC'; + else + $orderdir = 'ASC'; + + $qs = 'SELECT DISTINCT documentID FROM `tblDocumentRecipients` LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion` = `tblDocumentRecipients`.`version` AND `ttcontentid`.`document` = `tblDocumentRecipients`.`documentID`'; + $ra = $this->db->getResultArray($qs); + if (is_bool($ra) && !$ra) { + return false; + } + $docs = array(); + foreach($ra as $d) { + $docs[] = $d['documentID']; + } + + if ($docs) { + $queryStr .= "AND `tblDocuments`.`id` IN (" . implode(',', $docs) . ") "; + $queryStr .= "AND `tblDocuments`.`owner` = '".$user->getID()."'"; + if ($orderby=='e') $queryStr .= "ORDER BY `expires`"; + else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`"; + else if ($orderby=='s') $queryStr .= "ORDER BY `status`"; + else $queryStr .= "ORDER BY `name`"; + $queryStr .= " ".$orderdir; + } else { + $queryStr = ''; + } + break; // }}} case 'RejectOwner': // Documents that has been rejected and I'm owning {{{ $user = $param1; $orderby = $param3; From 520a783407f2412a1e23af1bf4c965def61cfd31 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 17 Jan 2017 13:44:57 +0100 Subject: [PATCH 0683/2006] add list listReceiveOwner(), group lists in sections --- views/bootstrap/class.MyDocuments.php | 45 +++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.MyDocuments.php b/views/bootstrap/class.MyDocuments.php index e4b1805a7..f08778eac 100644 --- a/views/bootstrap/class.MyDocuments.php +++ b/views/bootstrap/class.MyDocuments.php @@ -252,6 +252,36 @@ $(document).ready( function() { } } /* }}} */ + function listReceiveOwner() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $orderby = $this->params['orderby']; + $orderdir = $this->params['orderdir']; + $cachedir = $this->params['cachedir']; + $showtree = $this->params['showtree']; + $previewwidth = $this->params['previewWidthList']; + $previewconverters = $this->params['previewconverters']; + $timeout = $this->params['timeout']; + + $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); + $previewer->setConverters($previewconverters); + + /* Get list of documents owned by current user */ + $resArr = $dms->getDocumentList('ReceiveOwner', $user, false, $orderby, $orderdir); + if (is_bool($resArr) && !$resArr) { + $this->contentHeading(getMLText("warning")); + $this->contentContainer(getMLText("internal_error_exit")); + $this->htmlEndPage(); + exit; + } + + $this->contentHeading(getMLText("documents_user_reception")); + if($resArr) { + $this->printList($resArr, $previewer, 'listReveiveOwner'); + } + else printMLText("empty_notify_list"); + } /* }}} */ + function listMyDocs() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; @@ -559,12 +589,22 @@ $(document).ready( function() { echo '
      '; echo '
      '; + $this->contentHeading(getMLText("my_documents")); echo ''; + $this->contentHeading(getMLText("tasks")); + echo ''; + $this->contentHeading(getMLText("misc")); + echo '
      +
      +
      + +
      + + + -
      + - - - - - - - - - - - - - -
      :
      : +
      + +
      + +
      +
      +
      + +
      -
      - - '/> - - +
      +
      +
      + +
      + + '/> + + Date: Tue, 17 Jan 2017 20:40:42 +0100 Subject: [PATCH 0692/2006] use popupbox to show comments of document reception --- views/bootstrap/class.Bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index c9594912f..e353b889b 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2169,7 +2169,7 @@ $(document).ready( function() {
      ".($rstat['-1'] ? $rstat['-1']."/".$totalreceipts : '')."
      "; if($allcomments) - $content .= implode('
      ', $allcomments); + $content .= $this->printPopupBox('kkkk', implode('
      ', $allcomments), true); } $content .= ""; // $content .= "".$version.""; From 4baa37b2d902d3ecb0c10f1914f260ab9aa1d857 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 08:30:11 +0100 Subject: [PATCH 0693/2006] use translated text for comments popupbox --- views/bootstrap/class.Bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 17ef148ca..cbba93e53 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2169,7 +2169,7 @@ $(document).ready( function() {
      ".($rstat['-1'] ? $rstat['-1']."/".$totalreceipts : '')."
      "; if($allcomments) - $content .= $this->printPopupBox('kkkk', implode('
      ', $allcomments), true); + $content .= $this->printPopupBox(getMLText('comments'), implode('
      ', $allcomments), true); } $content .= ""; // $content .= "".$version.""; From e6e14fb37a6a8bce6d6ba1c25c0cd7ad50685cd5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 08:45:27 +0100 Subject: [PATCH 0694/2006] show comments of reception seperated by decline/aknowledge --- views/bootstrap/class.Bootstrap.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index cbba93e53..d7cf903cb 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2156,20 +2156,18 @@ $(document).ready( function() { } if($owner->getID() == $user->getID() && $receiptStatus = $latestContent->getReceiptStatus()) { $rstat = array('-1'=>0, '0'=>0, '1'=>0, '-2'=>0); - $allcomments = array(); + $allcomments = array('-1'=>array(), '1'=>array()); foreach ($receiptStatus as $r) { $rstat[''.$r['status']]++; if($r['comment']) - $allcomments[] = $r['comment']; + $allcomments[''.$r['status']][] = htmlspecialchars($r['comment']); } $totalreceipts = $rstat['-1'] + $rstat['0'] + $rstat['1']; $content .= ";
      -
      ".($rstat['1'] ? $rstat['1']."/".$totalreceipts : '')."
      -
      ".($rstat['-1'] ? $rstat['-1']."/".$totalreceipts : '')."
      +
      ".($rstat['1'] ? $rstat['1']."/".$totalreceipts : '').($allcomments['1'] ? " ".$this->printPopupBox('', implode('
      ', $allcomments['1']), true) : "")."
      +
      ".($rstat['-1'] ? $rstat['-1']."/".$totalreceipts : '').($allcomments['-1'] ? " ".$this->printPopupBox('', implode('
      ', $allcomments['-1']), true) : "")."
      "; - if($allcomments) - $content .= $this->printPopupBox(getMLText('comments'), implode('
      ', $allcomments), true); } $content .= ""; // $content .= "".$version.""; From 17b72a9d0c000a1d363fd8ab6d15dd2fbe22cc1d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 08:46:43 +0100 Subject: [PATCH 0695/2006] add entry to 5.1.2 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 87a215088..4988bcb53 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ - list of documents to look at now contains documents in revision - add list of documents waiting for reception on MyDocuments page - group document lists on MyDocuments page into three sections +- show progressbar and comments for reception of document in documentlist -------------------------------------------------------------------------------- Changes in version 5.1.1 From 16342981ebd2f6bae17b2e916ba7bae0f88454b7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 11:00:38 +0100 Subject: [PATCH 0696/2006] output progressbar only if receipts are available --- views/bootstrap/class.Bootstrap.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index d7cf903cb..3d6c6c5e3 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2163,11 +2163,13 @@ $(document).ready( function() { $allcomments[''.$r['status']][] = htmlspecialchars($r['comment']); } $totalreceipts = $rstat['-1'] + $rstat['0'] + $rstat['1']; - $content .= "; + if($totalreceipts) { + $content .= ";
      ".($rstat['1'] ? $rstat['1']."/".$totalreceipts : '').($allcomments['1'] ? " ".$this->printPopupBox('', implode('
      ', $allcomments['1']), true) : "")."
      ".($rstat['-1'] ? $rstat['-1']."/".$totalreceipts : '').($allcomments['-1'] ? " ".$this->printPopupBox('', implode('
      ', $allcomments['-1']), true) : "")."
      "; + } } $content .= ""; // $content .= "".$version.""; From 825c4378a0613201d5cd6f1868d4d7356601bb51 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 11:08:17 +0100 Subject: [PATCH 0697/2006] add latest version 5.1.2 which somehow got lost --- SeedDMS_Core/package.xml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 4450cf615..287a7fa15 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -12,11 +12,11 @@ uwe@steinmann.cx yes - 2016-11-08 + 2017-01-18 - 5.0.9 - 5.0.9 + 5.1.2 + 5.1.2 stable @@ -24,7 +24,7 @@ GPL License -- all changes from 5.0.8 merged +- all changes from 5.0.9 merged @@ -1278,6 +1278,22 @@ SeedDMS_Core_DMS::getNotificationsByUser() are deprecated - all changes from 4.3.31 merged + + 2016-11-08 + + + 5.0.9 + 5.0.9 + + + stable + stable + + GPL License + +- all changes from 4.3.32 merged + + 2016-03-09 From 6513642efb983c20e74e94da60ed9e028be39ede Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 11:39:29 +0100 Subject: [PATCH 0698/2006] change order of lists in section 'tasks' has now same order like tasks in the header menu --- views/bootstrap/class.MyDocuments.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.MyDocuments.php b/views/bootstrap/class.MyDocuments.php index 00ac681aa..78f844ae2 100644 --- a/views/bootstrap/class.MyDocuments.php +++ b/views/bootstrap/class.MyDocuments.php @@ -574,10 +574,10 @@ $(document).ready( function() { $resArr = $dms->getDocumentList('WorkflowByMe', $user); echo '
    • '.count($resArr).''.getMLText("documents_to_process").'
    • '; } - $resArr = $dms->getDocumentList('ReviseByMe', $user); - echo '
    • '.count($resArr).''.getMLText("documents_to_revise").'
    • '; $resArr = $dms->getDocumentList('ReceiptByMe', $user); echo '
    • '.count($resArr).''.getMLText("documents_to_receipt").'
    • '; + $resArr = $dms->getDocumentList('ReviseByMe', $user); + echo '
    • '.count($resArr).''.getMLText("documents_to_revise").'
    • '; echo '
    '; $this->contentHeading(getMLText("misc")); echo '"; echo ""; diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 188fa7d18..ccf1423f8 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -1070,7 +1070,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo "
  • »
  • "; } if ($totalPages>1) { - echo "
  • ".getMLText("all_pages")."
  • "; + echo "
  • ".getMLText("all_pages")."
  • "; } echo ""; echo ""; From 94d6dd051133daa4b6a8ff2f5ec7d2c3dfdbd466 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 18 Sep 2022 12:44:20 +0200 Subject: [PATCH 1573/2006] some more documentation of method --- 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 ec6cac8e6..3f941829f 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -4608,6 +4608,9 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ /** * Get the current revision status of the document content * The revision status is a list of revisions + * If $limit is 1 it will return just the last log entry for each + * revisor. + * Keep in mind that a revision log may contain repeating revisions. * * @param integer $limit maximum number of records per revisor * @return array list of revisions From 3721fcfc22132fd65d8055ddd95e188d7b207fc6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 18 Sep 2022 12:44:56 +0200 Subject: [PATCH 1574/2006] check for documents with missing revision date --- out/out.ObjectCheck.php | 12 +++++++++++- views/bootstrap/class.ObjectCheck.php | 21 +++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/out/out.ObjectCheck.php b/out/out.ObjectCheck.php index 3d4ce0a41..fc22c2612 100644 --- a/out/out.ObjectCheck.php +++ b/out/out.ObjectCheck.php @@ -109,16 +109,17 @@ foreach(array('review', 'approval', 'receipt', 'revision') as $process) { } } $docsinrevision = array(); +$docsmissingrevsiondate = array(); if(!isset($_GET['action']) || $_GET['action'] == 'listDocsInRevisionNoAccess') { $tmprevs = $dms->getDocumentsInRevision(); foreach($tmprevs as $rev) { if($doc = $dms->getDocument($rev['documentID'])) { + $content = $doc->getContentByVersion($rev['version']); $isdisabled = false; if($rev['type'] == 0) { $ruser = $dms->getUser($rev['required']); $isdisabled = $ruser->isDisabled(); $mode = $doc->getAccessMode($ruser); - $content = $doc->getContentByVersion($rev['version']); $cmode = $content->getAccessMode($ruser); } elseif($rev['type'] == 1) { $rgroup = $dms->getGroup($rev['required']); @@ -130,6 +131,14 @@ foreach($tmprevs as $rev) { */ if($mode < M_READ || $cmode < M_READ || $isdisabled) $docsinrevision[] = $doc; + + /* If a document has a sleeping revisor then it must have a + * revision date, otherwise the revision will never be started. + */ + if($rev['status'] == S_LOG_SLEEPING) { + if(!$content->getRevisionDate()) + $docsmissingrevsiondate[] = $doc; + } } } } @@ -228,6 +237,7 @@ if($view) { $view->setParam('wrongfiletypeversions', $wrongfiletypeversions); $view->setParam('duplicateversions', $duplicateversions); $view->setParam('docsinrevision', $docsinrevision); + $view->setParam('docsmissingrevsiondate', $docsmissingrevsiondate); $view->setParam('docsinreception', $docsinreception); $view->setParam('processwithoutusergroup', $processwithoutusergroup); $view->setParam('unlink', $unlink); diff --git a/views/bootstrap/class.ObjectCheck.php b/views/bootstrap/class.ObjectCheck.php index ad38b5cd8..b21860e09 100644 --- a/views/bootstrap/class.ObjectCheck.php +++ b/views/bootstrap/class.ObjectCheck.php @@ -452,6 +452,26 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { } } /* }}} */ + function listDocsWithMissingRevisionDate() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $docsmissingrevsiondate = $this->params['docsmissingrevsiondate']; + $cachedir = $this->params['cachedir']; + $previewwidth = $this->params['previewWidthList']; + $previewconverters = $this->params['previewConverters']; + $timeout = $this->params['timeout']; + + $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); + $previewer->setConverters($previewconverters); + + $this->contentHeading(getMLText("docs_with_missing_revision_date")); + + if($docsmissingrevsiondate) { + $this->printList($docsmissingrevsiondate, $previewer); + } + } /* }}} */ + function listDocsInReceptionNoAccess() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; @@ -629,6 +649,7 @@ $(document).ready( function() { $menuitems[] = array('label'=>getMLText('duplicate_content'), 'badge'=>count($duplicateversions), 'attributes'=>array(array('data-href', "#duplicate_content"), array('data-action', "listDuplicateContent"))); $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"))); foreach(array('review', 'approval', 'receipt', 'revision') as $process) { foreach(array('user', 'group') as $ug) { $menuitems[] = array('label'=>getMLText($process."s_without_".$ug), 'badge'=>count($processwithoutusergroup[$process][$ug]), 'attributes'=>array(array('data-href', "#".$process.'_without_'.$ug), array('data-action', "list".ucfirst($process).'Without'.ucfirst($ug)))); From c2a8b4bbc6f57f3d4f0815d55abfd988a30518e6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 18 Sep 2022 12:45:40 +0200 Subject: [PATCH 1575/2006] getDocumentsInRevision() also returns status of revision log --- SeedDMS_Core/Core/inc.ClassDMS.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 82003811d..dabf91d7e 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -3827,19 +3827,23 @@ class SeedDMS_Core_DMS { } /* }}} */ /** - * Return all documents waiting for or in revision + * Return all documents revisors waiting for a revision to start (sleeping) + * or are required to revise the document (waiting) * - * This function retrieves all documents and its version which are waiting for + * This function retrieves all revisors which are waiting for * revision or already in revision + * Note: the name of the method is somewhat misleading, because it + * does not return documents but just database records from table + * tblDocumentRevisors and tblDocumentRevisionLog * - * @return object instance of {@link SeedDMS_Core_DocumentContent} or false + * @return array list of revisors or false in case of an error */ function getDocumentsInRevision() { /* {{{ */ if (!$this->db->createTemporaryTable("ttrevisionid") || !$this->db->createTemporaryTable("ttcontentid")) { return false; } $queryStr = - "SELECT `tblDocumentRevisors`.* FROM `tblDocumentRevisors` LEFT JOIN `ttrevisionid` ON `tblDocumentRevisors`.`revisionID` = `ttrevisionid`.`revisionID` LEFT JOIN `tblDocumentRevisionLog` ON `ttrevisionid`.`maxLogID` = `tblDocumentRevisionLog`.`revisionLogID` LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion`=`tblDocumentRevisors`.`version` AND `ttcontentid`.`document`=`tblDocumentRevisors`.`documentID` WHERE `tblDocumentRevisionLog`.`status` in (0, -3) AND `ttcontentid`.`maxVersion` IS NOT NULL"; + "SELECT `tblDocumentRevisors`.*, `tblDocumentRevisionLog`.`status` FROM `tblDocumentRevisors` LEFT JOIN `ttrevisionid` ON `tblDocumentRevisors`.`revisionID` = `ttrevisionid`.`revisionID` LEFT JOIN `tblDocumentRevisionLog` ON `ttrevisionid`.`maxLogID` = `tblDocumentRevisionLog`.`revisionLogID` LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion`=`tblDocumentRevisors`.`version` AND `ttcontentid`.`document`=`tblDocumentRevisors`.`documentID` WHERE `tblDocumentRevisionLog`.`status` in (".S_LOG_WAITING.", ".S_LOG_SLEEPING.") AND `ttcontentid`.`maxVersion` IS NOT NULL"; $resArr = $this->db->getResultArray($queryStr); return $resArr; From 3e2e8e2591a697d9eb299bd972d292af2f236e3d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 18 Sep 2022 12:52:04 +0200 Subject: [PATCH 1576/2006] getDocumentsInReception() returns status, though it should be 0 --- SeedDMS_Core/Core/inc.ClassDMS.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index dabf91d7e..19ff51606 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -3820,7 +3820,7 @@ class SeedDMS_Core_DMS { return false; } $queryStr = - "SELECT `tblDocumentRecipients`.* FROM `tblDocumentRecipients` LEFT JOIN `ttreceiptid` ON `tblDocumentRecipients`.`receiptID` = `ttreceiptid`.`receiptID` LEFT JOIN `tblDocumentReceiptLog` ON `ttreceiptid`.`maxLogID` = `tblDocumentReceiptLog`.`receiptLogID` LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion`=`tblDocumentRecipients`.`version` AND `ttcontentid`.`document`=`tblDocumentRecipients`.`documentID` WHERE `tblDocumentReceiptLog`.`status`=0 AND `ttcontentid`.`maxVersion` IS NOT NULL"; + "SELECT `tblDocumentRecipients`.*, `tblDocumentReceiptLog`.`status` FROM `tblDocumentRecipients` LEFT JOIN `ttreceiptid` ON `tblDocumentRecipients`.`receiptID` = `ttreceiptid`.`receiptID` LEFT JOIN `tblDocumentReceiptLog` ON `ttreceiptid`.`maxLogID` = `tblDocumentReceiptLog`.`receiptLogID` LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion`=`tblDocumentRecipients`.`version` AND `ttcontentid`.`document`=`tblDocumentRecipients`.`documentID` WHERE `tblDocumentReceiptLog`.`status`=0 AND `ttcontentid`.`maxVersion` IS NOT NULL"; $resArr = $this->db->getResultArray($queryStr); return $resArr; From 43e114101ae3784439fcfd6aa327222b728c3cc3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 18 Sep 2022 12:53:05 +0200 Subject: [PATCH 1577/2006] issue msg if there are revisors in state 'sleeping' but no revision date --- views/bootstrap/class.ViewDocument.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 3a3c7134d..eaebf2a5a 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -1744,19 +1744,13 @@ $(document).ready( function() { $status = $latestContent->getStatus(); if($status['status'] == S_RELEASED) { if($latestContent->getRevisionDate()) { -?> -
    - getReadableDate($latestContent->getRevisionDate()))); -?> -
    -warningMsg(getMLText('revise_document_on', array('date' => getReadableDate($latestContent->getRevisionDate())))); + } else { + $this->errorMsg(getMLText('no_revision_date')); } - } /*elseif($status['status'] != S_IN_REVISION) { -?> -
    -infoMsg(getMLText('no_revision_planed')); + } // $this->contentContainerStart(); print "\n"; From ff1c29561f3a8097b681a06bcb5f9b9eb8443227 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 18 Sep 2022 12:54:53 +0200 Subject: [PATCH 1578/2006] update notes and release date --- SeedDMS_Core/package.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 6df7aaac2..a3e640b24 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -12,7 +12,7 @@ uwe@steinmann.cx yes - 2022-08-31 + 2022-09-18 6.0.20 @@ -25,6 +25,7 @@ GPL License - all changes from 5.1.27 merged +- SeedDMЅ_Core_DMS::getDocumentsInRevision() returns status from revision log From d9e6472fffc5daff021d60abfec262e37e99ff4f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 18 Sep 2022 13:41:20 +0200 Subject: [PATCH 1579/2006] propperly check for action listDocsWithMissingRevisionDate --- out/out.ObjectCheck.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/out/out.ObjectCheck.php b/out/out.ObjectCheck.php index fc22c2612..a616165cc 100644 --- a/out/out.ObjectCheck.php +++ b/out/out.ObjectCheck.php @@ -110,7 +110,7 @@ foreach(array('review', 'approval', 'receipt', 'revision') as $process) { } $docsinrevision = array(); $docsmissingrevsiondate = array(); -if(!isset($_GET['action']) || $_GET['action'] == 'listDocsInRevisionNoAccess') { +if(!isset($_GET['action']) || $_GET['action'] == 'listDocsWithMissingRevisionDate') { $tmprevs = $dms->getDocumentsInRevision(); foreach($tmprevs as $rev) { if($doc = $dms->getDocument($rev['documentID'])) { From 3add16e06af26e19ec5b8890b4ad3ec7c678e562 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 18 Sep 2022 13:42:22 +0200 Subject: [PATCH 1580/2006] use conversion manager for all lists --- views/bootstrap/class.ObjectCheck.php | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.ObjectCheck.php b/views/bootstrap/class.ObjectCheck.php index b21860e09..d6e2aa46f 100644 --- a/views/bootstrap/class.ObjectCheck.php +++ b/views/bootstrap/class.ObjectCheck.php @@ -437,13 +437,17 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { $user = $this->params['user']; $folder = $this->params['folder']; $docsinrevision = $this->params['docsinrevision']; + $conversionmgr = $this->params['conversionmgr']; $cachedir = $this->params['cachedir']; $previewwidth = $this->params['previewWidthList']; $previewconverters = $this->params['previewConverters']; $timeout = $this->params['timeout']; $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); - $previewer->setConverters($previewconverters); + if($conversionmgr) + $previewer->setConversionMgr($conversionmgr); + else + $previewer->setConverters($previewconverters); $this->contentHeading(getMLText("docs_in_revision_no_access")); @@ -457,13 +461,17 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { $user = $this->params['user']; $folder = $this->params['folder']; $docsmissingrevsiondate = $this->params['docsmissingrevsiondate']; + $conversionmgr = $this->params['conversionmgr']; $cachedir = $this->params['cachedir']; $previewwidth = $this->params['previewWidthList']; $previewconverters = $this->params['previewConverters']; $timeout = $this->params['timeout']; $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); - $previewer->setConverters($previewconverters); + if($conversionmgr) + $previewer->setConversionMgr($conversionmgr); + else + $previewer->setConverters($previewconverters); $this->contentHeading(getMLText("docs_with_missing_revision_date")); @@ -477,13 +485,17 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { $user = $this->params['user']; $folder = $this->params['folder']; $docsinreception = $this->params['docsinreception']; + $conversionmgr = $this->params['conversionmgr']; $cachedir = $this->params['cachedir']; $previewwidth = $this->params['previewWidthList']; $previewconverters = $this->params['previewConverters']; $timeout = $this->params['timeout']; $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); - $previewer->setConverters($previewconverters); + if($conversionmgr) + $previewer->setConversionMgr($conversionmgr); + else + $previewer->setConverters($previewconverters); $this->contentHeading(getMLText("docs_in_revision_no_access")); @@ -497,6 +509,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { $user = $this->params['user']; $folder = $this->params['folder']; $processwithoutusergroup = $this->params['processwithoutusergroup']; + $conversionmgr = $this->params['conversionmgr']; $cachedir = $this->params['cachedir']; $previewwidth = $this->params['previewWidthList']; $previewconverters = $this->params['previewConverters']; @@ -504,7 +517,10 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { $repair = $this->params['repair']; $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); - $previewer->setConverters($previewconverters); + if($conversionmgr) + $previewer->setConversionMgr($conversionmgr); + else + $previewer->setConverters($previewconverters); $this->contentHeading(getMLText($process."s_without_".$ug)); @@ -617,6 +633,7 @@ $(document).ready( function() { $docsinrevision = $this->params['docsinrevision']; $docsinreception = $this->params['docsinreception']; $processwithoutusergroup = $this->params['processwithoutusergroup']; + $docsmissingrevsiondate = $this->params['docsmissingrevsiondate']; $wrongfiletypeversions = $this->params['wrongfiletypeversions']; $repair = $this->params['repair']; $unlink = $this->params['unlink']; From 18a5306d3cff256b3dff51630422f1e88c38a722 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 20 Sep 2022 07:09:13 +0200 Subject: [PATCH 1581/2006] check for revision date even if document is expired --- views/bootstrap/class.ViewDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index eaebf2a5a..e49a4d4a0 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -1742,7 +1742,7 @@ $(document).ready( function() {
    getStatus(); - if($status['status'] == S_RELEASED) { + if(in_array($status['status'], [S_RELEASED, S_EXPIRED])) { if($latestContent->getRevisionDate()) { $this->warningMsg(getMLText('revise_document_on', array('date' => getReadableDate($latestContent->getRevisionDate())))); } else { From c3058176f3cba65d32f45266f25ae7d3542a63e9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 21 Sep 2022 10:09:40 +0200 Subject: [PATCH 1582/2006] do not use plain html, but use methods from theme class --- views/bootstrap/class.SetRecipients.php | 95 ++++++++++++++----------- views/bootstrap/class.SetRevisors.php | 94 +++++++++++++----------- 2 files changed, 108 insertions(+), 81 deletions(-) diff --git a/views/bootstrap/class.SetRecipients.php b/views/bootstrap/class.SetRecipients.php index 603576d54..851af0fcc 100644 --- a/views/bootstrap/class.SetRecipients.php +++ b/views/bootstrap/class.SetRecipients.php @@ -70,78 +70,93 @@ class SeedDMS_View_SetRecipients extends SeedDMS_Theme_Style { -contentContainerStart(); ?> - -
    - -
    - -
    -
    + $this->formField( + getMLText("individuals"), + array( + 'element'=>'select', + 'id'=>'indRecipients', + 'name'=>'indRecipients[]', + 'class'=>'chzn-select', + 'multiple'=>true, + 'attributes'=>array(array('data-allow-clear', 'true'), array('data-placeholder', getMLText('select_ind_recipients')), array('data-no_results_text', getMLText('unknown_user'))), + 'options'=>$options + ) + ); -
    - -
    - -
    -
    + $this->formField( + getMLText("individuals_in_groups"), + array( + 'element'=>'select', + 'id'=>'grpIndRecipients', + 'name'=>'grpIndRecipients[]', + 'class'=>'chzn-select', + 'multiple'=>true, + 'attributes'=>array(array('data-allow-clear', 'true'), array('data-placeholder', getMLText('select_grp_ind_recipients')), array('data-no_results_text', getMLText('unknown_group'))), + 'options'=>$options + ) + ); -
    - -
    - -
    -
    + $this->formField( + getMLText("groups"), + array( + 'element'=>'select', + 'id'=>'grpRecipients', + 'name'=>'grpRecipients[]', + 'class'=>'chzn-select', + 'multiple'=>true, + 'attributes'=>array(array('data-allow-clear', 'true'), array('data-placeholder', getMLText('select_grp_recipients')), array('data-no_results_text', getMLText('unknown_group'))), + 'options'=>$options + ) + ); -contentContainerEnd(); $this->formSubmit(" ".getMLText('update')); ?> diff --git a/views/bootstrap/class.SetRevisors.php b/views/bootstrap/class.SetRevisors.php index 20b8b9abf..a18f856f0 100644 --- a/views/bootstrap/class.SetRevisors.php +++ b/views/bootstrap/class.SetRevisors.php @@ -82,14 +82,8 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Theme_Style { $this->getDateChooser($startdate, "startdate", $this->params['session']->getLanguage()) ); } -?> - -
    - -
    - -
    -
    - -
    - -
    - -
    -
    + $this->formField( + getMLText("individuals_in_groups"), + array( + 'element'=>'select', + 'id'=>'grpIndRevisors', + 'name'=>'grpIndRevisors[]', + 'class'=>'chzn-select', + 'multiple'=>true, + 'attributes'=>array(array('data-allow-clear', 'true'), array('data-placeholder', getMLText('select_grp_ind_revisors')), array('data-no_results_text', getMLText('unknown_group'))), + 'options'=>$options + ) + ); -
    - -
    - -
    -
    - -formField( + getMLText("groups"), + array( + 'element'=>'select', + 'id'=>'grpRevisors', + 'name'=>'grpRevisors[]', + 'class'=>'chzn-select', + 'multiple'=>true, + 'attributes'=>array(array('data-allow-clear', 'true'), array('data-placeholder', getMLText('select_grp_revisors')), array('data-no_results_text', getMLText('unknown_group'))), + 'options'=>$options + ) + ); $this->contentContainerEnd(); $this->formSubmit(" ".getMLText('update')); ?> From 4b9844262ca8fced227eec72a3a84c64707d3dd1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 21 Sep 2022 12:49:22 +0200 Subject: [PATCH 1583/2006] init variable --- views/bootstrap/class.SetRecipients.php | 1 + 1 file changed, 1 insertion(+) diff --git a/views/bootstrap/class.SetRecipients.php b/views/bootstrap/class.SetRecipients.php index 851af0fcc..fd450cf9a 100644 --- a/views/bootstrap/class.SetRecipients.php +++ b/views/bootstrap/class.SetRecipients.php @@ -107,6 +107,7 @@ class SeedDMS_View_SetRecipients extends SeedDMS_Theme_Style { $options = []; foreach ($docAccess["groups"] as $group) { + $optopt = []; $grpusers = $group->getUsers(); if(count($grpusers) == 0) $optopt[] = ['disabled', 'disabled']; From 2ce2fd07feca57aba09c08813cd32485569433e8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 9 Nov 2022 12:22:23 +0100 Subject: [PATCH 1584/2006] 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 + + + 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 From e422fcf67a71b2eccbcc822bc63b5462012b3359 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 9 Nov 2022 13:31:10 +0100 Subject: [PATCH 1585/2006] 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 1586/2006] 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 1587/2006] 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 b786e42bb3499a3d7c0059b6eec6d8744ee23d6c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 11 Nov 2022 14:47:42 +0100 Subject: [PATCH 1588/2006] 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 e2e52d61b17bb53e54ca1b1d5154761047fdfe0f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 14 Nov 2022 08:16:51 +0100 Subject: [PATCH 1589/2006] 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 "
    "; $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 "\n"; print "\n"; - print "\n"; + print "\n"; print "\n"; print "\n"; print "\n\n\n"; @@ -194,7 +195,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { echo ""; echo ""; echo ""; - echo ""; + echo ""; echo ""; } print "
    ".$object['msg']; if($repair) $document->repair(); echo "
    ".getMLText("name")."".getMLText("id")."".getMLText("parent")."".getMLText("parent_folder")."".getMLText("error")."
    ".$error['id']."".$error['parent']."".$error['msg']."getID()."\" formtoken=\"".createFormKey('movefolder')."\">Move getID()."\" formtoken=\"".createFormKey('movefolder')."\" title=\"".getMLText("move_into_rootfolder")."\">".getMLText('move')."
    \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 1590/2006] 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 "\n"; + print "\n"; + print "\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 "
    ".getMLText("name")."".getMLText("owner")."".getMLText("actions")."
    "; + } +} /* }}} */ + 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 3b473edd253c43d98b513f4ab8e59cb579455f81 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 14 Nov 2022 16:25:22 +0100 Subject: [PATCH 1591/2006] 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 9c740db936ce999e9c817a479cf7cd79fc2ea8d7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 14 Nov 2022 17:23:26 +0100 Subject: [PATCH 1592/2006] 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 4e1e126783a7f53459aece1e371fccab61b9f2ee Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 21 Nov 2022 16:32:06 +0100 Subject: [PATCH 1593/2006] 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 1594/2006] 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 - 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 + + + 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 1595/2006] 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 1596/2006] 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 1597/2006] 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 1598/2006] 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 1599/2006] 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 1600/2006] 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 1601/2006] 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 1602/2006] 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 1603/2006] 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 1604/2006] 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 1605/2006] 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 1606/2006] 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 1607/2006] 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 1608/2006] 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 1609/2006] 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 1610/2006] 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 1611/2006] 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 1612/2006] 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 1613/2006] 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 1614/2006] 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 1615/2006] 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 1616/2006] 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 1617/2006] 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 1618/2006] 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 1619/2006] 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 1620/2006] 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 1621/2006] 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 ''; } /* }}} */ From 11d134e35a8bc4b27e0370c3a4e134b11b29bb1a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 29 Nov 2022 17:36:59 +0100 Subject: [PATCH 1622/2006] 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 1623/2006] 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 1624/2006] 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 1625/2006] 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 1626/2006] 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 1627/2006] $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 1628/2006] 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 1629/2006] 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 1630/2006] 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 1631/2006] 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 1632/2006] 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 1633/2006] 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 1634/2006] 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 1635/2006] 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 1636/2006] 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 - 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 + + + 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 1637/2006] 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 1638/2006] 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 1639/2006] 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 1640/2006] 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 1641/2006] 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 1642/2006] 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 1643/2006] 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 {
    -

    +

    formSubmit(" " . getMLText('refresh'));?>

    @@ -374,7 +374,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { - + 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 1644/2006] 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 1645/2006] 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 1646/2006] 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 1647/2006] 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 { ?>
    - -

    + +

    formSubmit(' '.getMLText('backup_remove'),'','','danger');?>

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

    +

    formSubmit(' '.getMLText('rm_document'),'','','danger');?>

    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 { ?>
    - - - + + + formSubmit(' '.getMLText('rm_file'),'','','danger');?>
    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")); ?>
    - + warningMsg(getMLText("confirm_rm_dump", array ("dumpname" => htmlspecialchars($dumpname)))); ?> -

    +

    formSubmit(' '.getMLText('dump_remove'),'','','danger');?>

    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 ''; + 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');?>
    "> - + formSubmit(' '.getMLText('delete'),'','','danger');?>

    From aeb0e4f1de082353983d037f5caf5732039d5573 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 10 Dec 2022 14:18:07 +0100 Subject: [PATCH 1648/2006] 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 1649/2006] 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 1650/2006] 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 1651/2006] 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 1652/2006] 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 1653/2006] 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 1654/2006] 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 1655/2006] 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(''); 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(''); else - $('#status_'+data.data).html(''); + $('#status_'+data.data).html(''); } else { - $('#status_'+data.data).html(''); + $('#status_'+data.data).html(''); 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(''); funcArray.push(docid); }); docstoindex = funcArray.length; @@ -235,13 +235,13 @@ div.folder {font-weight: bold; line-height: 20px; margin-top: 10px;}
    -
    +
    -
    +
    Date: Thu, 15 Dec 2022 12:46:54 +0100 Subject: [PATCH 1656/2006] 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 1657/2006] 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 1658/2006] 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 1659/2006] 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 1660/2006] 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(''); } else { + $('#update_messages').append('

    Docid: ' + data.data + ' (' + data.mimetype + ')

    ' + '

    Cmd: ' + data.cmd + '

    ' + data.message+'
    '); $('#status_'+data.data).html(''); 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 1661/2006] 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 1662/2006] 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 = 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 1663/2006] 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 1664/2006] 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 1665/2006] 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 1666/2006] 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 1667/2006] 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 1668/2006] 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 1669/2006] 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 1670/2006] 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 1671/2006] 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 1672/2006] 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 1673/2006] 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 1674/2006] 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 1675/2006] 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 1676/2006] 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 - 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 + + + 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 1677/2006] 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 1678/2006] 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 1679/2006] 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 1680/2006] 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 - 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 + + + 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 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 1681/2006] 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 1682/2006] 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 1683/2006] 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 1684/2006] 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 1685/2006] 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 1686/2006] 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 1687/2006] 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 1688/2006] 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(''); } 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(''); 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 1689/2006] 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 1690/2006] 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 gesperrt

    Die 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 1691/2006] 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 1692/2006] 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 1693/2006] 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 1694/2006] 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 1695/2006] 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 1696/2006] 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 1697/2006] 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 1698/2006] 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 1699/2006] 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 1700/2006] 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 1701/2006] 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 1702/2006] 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 1703/2006] 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 1704/2006] 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 1705/2006] 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 1706/2006] 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 1707/2006] 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 1708/2006] 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 1709/2006] 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 1710/2006] 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 1711/2006] 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 1712/2006] 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 1713/2006] 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 1714/2006] 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 1715/2006] 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 1716/2006] 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 1717/2006] 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 1718/2006] 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 1719/2006] 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 1720/2006] 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 1721/2006] 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 {
     
     	
     	
    -	_httpRoot ?>styles/theme ?>/favicon.ico
    +	_httpRoot ?>views/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}" ?>" />
     	_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 1722/2006] 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 1723/2006] 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 1724/2006] 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 1725/2006] 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 1726/2006] 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 1727/2006] 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 1728/2006] 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 1729/2006] 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 1730/2006] 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 1731/2006] 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 1732/2006] 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 1733/2006] 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 1734/2006] 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 1735/2006] 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 1736/2006] 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 1737/2006] 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 "\"".$extname."\""; + 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 1738/2006] 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 1739/2006] 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 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 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 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 1740/2006] 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 1741/2006] 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 1742/2006] 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 1743/2006] 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 1744/2006] 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 1745/2006] 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 1746/2006] 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 1747/2006] 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 1748/2006] 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 1749/2006] 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 1750/2006] 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 1751/2006] 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 1752/2006] 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 1753/2006] 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 1754/2006] 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 1755/2006] 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 1756/2006] 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 1757/2006] 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 1758/2006] 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 1759/2006] 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 1760/2006] 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 1761/2006] 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)); } } } From 0825ab0113f56be3e3feb4248cf8adff7df23f34 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 17 Jan 2023 12:31:55 +0100 Subject: [PATCH 1762/2006] add list of all extension at beginning of extensions tab --- views/bootstrap/class.Settings.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 936bf828a..761939b44 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -230,6 +230,17 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style { header('Content-Type: application/javascript; charset=UTF-8'); ?> +function scrollToTargetAdjusted(target){ + var element = document.getElementById(target); + var headerOffset = 60; + var elementPosition = element.getBoundingClientRect().top; + var offsetPosition = elementPosition + window.pageYOffset - headerOffset; + + window.scrollTo({ + top: offsetPosition, + behavior: "smooth" + }); +} $(document).ready( function() { $('#settingstab li a').click(function(event) { $('#currenttab').val($(event.currentTarget).data('target').substring(1)); @@ -256,6 +267,11 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style { } }); }); + + $('a.scrollto').click(function(event) { +console.log($(event.currentTarget).data('target').substring(1)); + scrollToTargetAdjusted($(event.currentTarget).data('target').substring(1)); + }); }); callHook('getFullSearchEngine')) && is_array($kkk)) -- SETTINGS - ADVANCED - DISPLAY --> getExtensionConfiguration() as $extname=>$extconf) { + echo ''.$extconf['title']." ● "; + } foreach($extmgr->getExtensionConfiguration() as $extname=>$extconf) { if($this->hasHook('processConfig')) $extconf = $this->callHook('processConfig', $extname, $extconf); if($this->isVisible($extname.'|')) { if($extconf['config']) { - $this->showRawConfigHeadline("".'_extensions[$extname]["__disable__"] ? '1' : '').'" />_extensions[$extname]["__disable__"] ? ' disabled' : ' enabled').'"> '.$extconf['title'].''); + $this->showRawConfigHeadline("".'_extensions[$extname]["__disable__"] ? '1' : '').'" />_extensions[$extname]["__disable__"] ? ' disabled' : ' enabled').'"> '.$extconf['title'].''); foreach($extconf['config'] as $confkey=>$conf) { ob_start(); if($this->isVisible($extname.'|'.$confkey)) { From 9d69bd12eba4f05eaae1d533e542e5ca9e56e5c7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 19 Jan 2023 07:05:41 +0100 Subject: [PATCH 1763/2006] fix text in comment --- 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 a4606327e..13fd47e6f 100644 --- a/inc/inc.ClassConversionMgr.php +++ b/inc/inc.ClassConversionMgr.php @@ -29,7 +29,7 @@ require_once("inc/inc.ClassConversionServiceTextToImage.php"); */ class SeedDMS_ConversionMgr { /** - * List of services for searching fulltext + * List of services for converting documents */ public $services; From 2f0fdfca199e9f6da9d2a1604df00aea2170c02a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 19 Jan 2023 07:06:45 +0100 Subject: [PATCH 1764/2006] make it work in recent versions of seeddms --- install/update-1.8.1/update.php | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/install/update-1.8.1/update.php b/install/update-1.8.1/update.php index 9e483850b..388b970c8 100644 --- a/install/update-1.8.1/update.php +++ b/install/update-1.8.1/update.php @@ -18,16 +18,12 @@ // 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.AccessUtils.php"); -include("../inc/inc.ClassAccess.php"); -include("../inc/inc.ClassDocument.php"); -include("../inc/inc.ClassFolder.php"); -include("../inc/inc.ClassGroup.php"); -include("../inc/inc.ClassUser.php"); -include("../inc/inc.DBAccess.php"); -include("../inc/inc.FileUtils.php"); -include("../inc/inc.Authentication.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"); +include("../../inc/inc.DBInit.php"); print ""; @@ -42,7 +38,7 @@ function update_content() GLOBAL $db,$settings; // create temp folder - if (!makedir($settings->_contentDir."/temp")) return false; + if (!SeedDMS_Core_File::makeDir($settings->_contentDir."/temp")) return false; // for all contents $queryStr = "SELECT * FROM tblDocumentContent"; @@ -53,19 +49,19 @@ function update_content() for ($i=0;$i_contentDir."/temp/".$contents[$i]["document"])) return false; + if (!SeedDMS_Core_File::makeDir($settings->_contentDir."/temp/".$contents[$i]["document"])) return false; // move every content in temp/documentID/version.fileType $source = $settings->_contentDir."/".$contents[$i]["dir"]."/data".$contents[$i]["fileType"]; $target = $settings->_contentDir."/temp/".$contents[$i]["document"]."/".$contents[$i]["version"].$contents[$i]["fileType"]; - if (!copyFile($source, $target)) return false; + if (!SeedDMS_Core_File::copyFile($source, $target)) return false; } // change directory - if (!renameDir($settings->_contentDir."/".$settings->_contentOffsetDir,$settings->_contentDir."/old")) return false; - if (!renameDir($settings->_contentDir."/temp",$settings->_contentDir."/".$settings->_contentOffsetDir)) return false; + if (!SeedDMS_Core_File::renameDir($settings->_contentDir."/".$settings->_contentOffsetDir,$settings->_contentDir."/old")) return false; + if (!SeedDMS_Core_File::renameDir($settings->_contentDir."/temp",$settings->_contentDir."/".$settings->_contentOffsetDir)) return false; return true; } From 19cdccbd880f4f9177fad47d4d603f6198a151ce Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 19 Jan 2023 07:07:08 +0100 Subject: [PATCH 1765/2006] fix syntax error --- 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 1055d87dd..18569d6fb 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'=null)); +$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>null)); if($view) { $view($_GET); exit; From b6a52ee4de1bc15fb774b06bc8bac2c399a642a5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 19 Jan 2023 07:07:36 +0100 Subject: [PATCH 1766/2006] _getDocumentsData returns filetype and origfilename --- restapi/index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/restapi/index.php b/restapi/index.php index a988a63f2..ae5339117 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -91,6 +91,8 @@ class RestapiController { /* {{{ */ 'sequence'=>$document->getSequence(), 'expires'=>$document->getExpires() ? date('Y-m-d H:i:s', $document->getExpires()) : "", 'mimetype'=>$lc->getMimeType(), + 'filetype'=>$lc->getFileType(), + 'origfilename'=>$lc->getOriginalFileName(), 'version'=>$lc->getVersion(), 'version_comment'=>$lc->getComment(), 'version_date'=>date('Y-m-d H:i:s', $lc->getDate()), From 9ec87a727eeee19299454e7988f52d503ee79e6b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 19 Jan 2023 07:08:04 +0100 Subject: [PATCH 1767/2006] do not show batch operation on categories if none are defined --- views/bootstrap/class.Search.php | 63 ++++++++++++++++---------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 9f919b609..9d947d802 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -968,38 +968,39 @@ function typeahead() { /* {{{ */ ob_start(); $cats = $dms->getDocumentCategories(); - $options = array(); - $options[] = array("-1", getMLText("choose_category")); - foreach ($cats as $currcat) { - $options[] = array($currcat->getID(), htmlspecialchars($currcat->getName()), false); + if($cats) { + $options = array(); + $options[] = array("-1", getMLText("choose_category")); + foreach ($cats as $currcat) { + $options[] = array($currcat->getID(), htmlspecialchars($currcat->getName()), false); + } + $this->formField( + null, + array( + 'element'=>'select', + 'id'=>'batchcategory', + 'class'=>'chzn-select', + 'options'=>$options, + 'multiple'=>false, + 'placeholder'=>getMLText('select_category'), + 'attributes'=>array(array('style', 'width: 100%;')) + ) + ); + $this->formField( + getMLText("batch_remove_category"), + array( + 'element'=>'input', + 'type'=>'checkbox', + 'id'=>'removecategory', + 'value'=>'1', + ) + ); + + print $this->html_link('Search', array_merge($_GET, array('action'=>'changecategory')), array('class'=>'btn btn-primary change-category-btn mt-4', 'id'=>'changecategory'), " ".getMLText("batch_change_category"), false, true)."\n"; + + $content = ob_get_clean(); + $this->printAccordion(getMLText('batch_change_category'), $content); } - $this->formField( - null, - array( - 'element'=>'select', - 'id'=>'batchcategory', - 'class'=>'chzn-select', - 'options'=>$options, - 'multiple'=>false, - 'placeholder'=>getMLText('select_category'), - 'attributes'=>array(array('style', 'width: 100%;')) - ) - ); - $this->formField( - getMLText("batch_remove_category"), - array( - 'element'=>'input', - 'type'=>'checkbox', - 'id'=>'removecategory', - 'value'=>'1', - ) - ); -// print $this->html_link('Search', array_merge($_GET, array('action'=>'changeowner')), array('class'=>'btn btn-primary', 'id'=>'changeowner'), " ".getMLText("batch_change_owner"), false, true)."\n"; - - print $this->html_link('Search', array_merge($_GET, array('action'=>'changecategory')), array('class'=>'btn btn-primary change-category-btn mt-4', 'id'=>'changecategory'), " ".getMLText("batch_change_category"), false, true)."\n"; - - $content = ob_get_clean(); - $this->printAccordion(getMLText('batch_change_category'), $content); } // }}} From fb43a8281855d906647181651713a248583f5276 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 19 Jan 2023 08:59:49 +0100 Subject: [PATCH 1768/2006] check for more mimetypes in getWrongFiletypeDocumentContent() --- SeedDMS_Core/Core/inc.ClassDMS.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index c0affa302..b2ada7676 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -3957,7 +3957,7 @@ class SeedDMS_Core_DMS { * @return bool|SeedDMS_Core_Document[] */ function getWrongFiletypeDocumentContent() { /* {{{ */ - $queryStr = "SELECT * FROM `tblDocumentContent` WHERE `mimeType` in ('application/pdf', 'image/png', 'image/gif', 'image/jpg')"; + $queryStr = "SELECT * FROM `tblDocumentContent` WHERE `mimeType` in ('application/zip', 'application/pdf', 'image/png', 'image/gif', 'image/jpg', 'audio/mp3', 'text/rtf')"; $resArr = $this->db->getResultArray($queryStr); if ($resArr === false) return false; @@ -3967,10 +3967,13 @@ class SeedDMS_Core_DMS { foreach($resArr as $row) { $expect = ''; switch($row['mimeType']) { + case "application/zip": case "application/pdf": case "image/png": case "image/gif": case "image/jpg": + case "audio/mp3": + case "text/rtf": $expect = substr($row['mimeType'], -3, 3); break; } From 0a3f8dd180c6942880ed8542d532db04fb94b228 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 19 Jan 2023 09:36:46 +0100 Subject: [PATCH 1769/2006] add endpoint 'version', send notification after document or content was added --- restapi/index.php | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/restapi/index.php b/restapi/index.php index ae5339117..215674dc9 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -629,6 +629,7 @@ class RestapiController { /* {{{ */ $dms = $this->container->dms; $userobj = $this->container->userobj; $settings = $this->container->config; + $notifier = $this->container->notifier; if(!$userobj) { return $response->withJson(array('success'=>false, 'message'=>'Not logged in', 'data'=>''), 403); @@ -720,13 +721,12 @@ class RestapiController { /* {{{ */ $fileType = ".".pathinfo($origfilename, PATHINFO_EXTENSION); finfo_close($finfo); $res = $mfolder->addDocument($docname, $comment, $expires, $owner ? $owner : $userobj, $keywords, $cats, $temp, $origfilename ? $origfilename : basename($temp), $fileType, $userfiletype, $sequence, array(), array(), $reqversion, $version_comment, $attributes); - // addDocumentCategories($res, $categories); - // setDocumentAttributes($res, $attributes); - unlink($temp); if($res) { $doc = $res[0]; - // $rec = array('id'=>(int)$doc->getId(), 'name'=>$doc->getName(), 'version'=>$doc->getLatestContent()->getVersion()); + if($notifier) { + $notifier->sendNewDocumentMail($doc, $userobj); + } return $response->withJson(array('success'=>true, 'message'=>'Upload succeded', 'data'=>$this->__getLatestVersionData($doc->getLatestContent())), 201); } else { return $response->withJson(array('success'=>false, 'message'=>'Upload failed', 'data'=>''), 500); @@ -747,6 +747,7 @@ class RestapiController { /* {{{ */ $dms = $this->container->dms; $userobj = $this->container->userobj; $settings = $this->container->config; + $notifier = $this->container->notifier; if(!$userobj) { return $response->withJson(array('success'=>false, 'message'=>'Not logged in', 'data'=>''), 403); @@ -803,10 +804,20 @@ class RestapiController { /* {{{ */ $userfiletype = finfo_file($finfo, $temp); $fileType = ".".pathinfo($origfilename, PATHINFO_EXTENSION); finfo_close($finfo); + $oldexpires = $document->getExpires(); $res=$document->addContent($comment, $userobj, $temp, $origfilename, $fileType, $userfiletype, array(), array(), 0, $attributes); unlink($temp); if($res) { + if($notifier) { + $notifier->sendNewDocumentVersionMail($document, $userobj); + + /* Actually there is not need to even try sending this mail + * because the expiration date cannot be set when calling + * this rest api endpoint. + */ + $notifier->sendChangedExpiryMail($document, $userobj, $oldexpires); + } $rec = array('id'=>(int)$document->getId(), 'name'=>$document->getName(), 'version'=>$document->getLatestContent()->getVersion()); return $response->withJson(array('success'=>true, 'message'=>'Upload succeded', 'data'=>$rec), 200); } else { @@ -827,6 +838,7 @@ class RestapiController { /* {{{ */ $dms = $this->container->dms; $userobj = $this->container->userobj; $settings = $this->container->config; + $notifier = $this->container->notifier; if(!$userobj) { return $response->withJson(array('success'=>false, 'message'=>'Not logged in', 'data'=>''), 403); @@ -869,6 +881,9 @@ class RestapiController { /* {{{ */ unlink($temp); if($res) { $doc = $res[0]; + if($notifier) { + $notifier->sendNewDocumentMail($doc, $userobj); + } $rec = array('id'=>(int)$doc->getId(), 'name'=>$doc->getName()); return $response->withJson(array('success'=>true, 'message'=>'Upload succeded', 'data'=>$rec), 200); } else { @@ -2596,6 +2611,13 @@ class TestController { /* {{{ */ public function echoData($request, $response, $args) { /* {{{ */ return $response->withJson(array('success'=>true, 'message'=>'This is the result of the echo call.', 'data'=>$args['data']), 200); } /* }}} */ + + public function version($request, $response, $args) { /* {{{ */ + $logger = $this->container->logger; + + $v = new SeedDMS_Version(); + return $response->withJson(array('success'=>true, 'message'=>'This is '.$v->banner(), 'data'=>['major'=>$v->majorVersion(), 'minor'=>$v->minorVersion(), 'subminor'=>$v->subminorVersion()]), 200); + } /* }}} */ } /* }}} */ /* Middleware for authentication */ @@ -2645,7 +2667,7 @@ class RestapiAuth { /* {{{ */ */ 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/') { + } elseif(!in_array($request->getUri()->getPath(), array('login')) && substr($request->getUri()->getPath(), 0, 5) != 'echo/' && $request->getUri()->getPath() != 'version') { $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); @@ -2803,6 +2825,7 @@ $app->put('/categories/{id}/name', \RestapiController::class.':changeCategoryNam $app->get('/attributedefinitions', \RestapiController::class.':getAttributeDefinitions'); $app->put('/attributedefinitions/{id}/name', \RestapiController::class.':changeAttributeDefinitionName'); $app->get('/echo/{data}', \TestController::class.':echoData'); +$app->get('/version', \TestController::class.':version'); $app->get('/statstotal', \RestapiController::class.':getStatsTotal'); if(isset($GLOBALS['SEEDDMS_HOOKS']['initRestAPI'])) { From 872c66158bc184858ea7191e9b0edf4ed8f2fed0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 19 Jan 2023 12:10:33 +0100 Subject: [PATCH 1770/2006] conversion service gets reference to conversion mgr when service is added --- inc/inc.ClassConversionMgr.php | 1 + inc/inc.ClassConversionServiceBase.php | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/inc/inc.ClassConversionMgr.php b/inc/inc.ClassConversionMgr.php index 13fd47e6f..121e337a4 100644 --- a/inc/inc.ClassConversionMgr.php +++ b/inc/inc.ClassConversionMgr.php @@ -38,6 +38,7 @@ class SeedDMS_ConversionMgr { } public function addService($service) { + $service->setConversionMgr($this); $this->services[$service->from][$service->to][] = $service; return $service; } diff --git a/inc/inc.ClassConversionServiceBase.php b/inc/inc.ClassConversionServiceBase.php index 9ea95812e..b90d3e4bc 100644 --- a/inc/inc.ClassConversionServiceBase.php +++ b/inc/inc.ClassConversionServiceBase.php @@ -36,6 +36,11 @@ abstract class SeedDMS_ConversionServiceBase { */ protected $logger; + /** + * conversion manager + */ + protected $conversionmgr; + /** * @var $success set to false if conversion failed */ @@ -45,12 +50,22 @@ abstract class SeedDMS_ConversionServiceBase { $this->from = null; $this->to = null; $this->success = true; + $this->logger = null; + $this->conversionmgr = null; } public function setLogger($logger) { $this->logger = $logger; } + public function setConversionMgr($conversionmgr) { + $this->conversionmgr = $conversionmgr; + } + + public function getConversionMgr() { + return $this->conversionmgr; + } + public function getInfo() { return 'Conversion service'; } From b197639dd22c55143eb845eca9edbe0c6374a61d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 19 Jan 2023 15:01:43 +0100 Subject: [PATCH 1771/2006] add wasSuccessful() to check if last conversion was successful --- inc/inc.ClassConversionMgr.php | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/inc/inc.ClassConversionMgr.php b/inc/inc.ClassConversionMgr.php index 121e337a4..557f796c8 100644 --- a/inc/inc.ClassConversionMgr.php +++ b/inc/inc.ClassConversionMgr.php @@ -33,8 +33,14 @@ class SeedDMS_ConversionMgr { */ public $services; + /** + * @var $success set to false if conversion failed + */ + protected $success; + public function __construct() { $this->services = array(); + $this->success = true; } public function addService($service) { @@ -54,22 +60,30 @@ class SeedDMS_ConversionMgr { * Return the service that would be tried first for converting * the document. * - * The conversion may not use this service but choose a different + * The conversion manager may not use this service but choose a different * one when it fails. */ - public function getService($from, $to) { + public function getService($from, $to) { /* {{{ */ if(!empty($this->services[$from][$to])) return end($this->services[$from][$to]); else return null; - } + } /* }}} */ - public function getServices() { + public function getServices() { /* {{{ */ return $this->services; - } + } /* }}} */ + + public function wasSuccessful() { /* {{{ */ + return $this->success; + } /* }}} */ /** - * Convert a file + * Convert a file from one format into another format + * + * This method will try each conversion service until a service + * fails or was successful. If a service succeeds it must not + * return false, null, '' or 0 * * @param string $file name of file to convert * @param string $from mimetype of input file @@ -87,8 +101,10 @@ class SeedDMS_ConversionMgr { for(end($services); key($services)!==null; prev($services)) { $service = current($services); $text = $service->convert($file, $target, $params); - if(!$service->wasSuccessful()) + if(!$service->wasSuccessful()) { + $this->success = false; return false; + } if($text) return $text; } From 7bfc2c46020567699146ffe72a00488b9b2f47ea Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 10:48:00 +0100 Subject: [PATCH 1772/2006] various minor changes to easy conversion into a markdown file --- SeedDMS_Core/package.xml | 50 ++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 046973024..050f9a716 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -115,6 +115,7 @@ + 2010-04-27 3.0.0 3.0.0 @@ -123,13 +124,14 @@ stable stable - 2010-04-27 GPL License Initial release + 2011-07-23 + 3.2.0 3.2.0 @@ -138,8 +140,6 @@ Initial release stable stable - 2011-07-23 - GPL License New release @@ -1501,13 +1501,13 @@ do not sort some temporary tables anymore, because it causes an error in mysql i GPL License -SeedDMS_Core_DMS::filterDocumentFiles() returns also documents which are not public -if the owner tries to access them -Check return value of onPreRemove[Document|Folder], return from calling method if bool -Add SeedDMS_Core_DMS::getDocumentList() -Limit number of duplicate files to 1000 -Add hook on(Pre|Post)RemoveContent -Add hook onAttributeValidate +- SeedDMS_Core_DMS::filterDocumentFiles() returns also documents which are not public + if the owner tries to access them +- Check return value of onPreRemove[Document|Folder], return from calling method if bool +- Add SeedDMS_Core_DMS::getDocumentList() +- Limit number of duplicate files to 1000 +- Add hook on(Pre|Post)RemoveContent +- Add hook onAttributeValidate @@ -1590,9 +1590,9 @@ returns just users which are not disabled GPL License -add SeedDMS_Core_Folder::getDocumentsMinMax() -add lots of DocBlocks from merge request #8 -add SeedDMS_Core_AttributeDefinition::removeValue() +- add SeedDMS_Core_Folder::getDocumentsMinMax() +- add lots of DocBlocks from merge request #8 +- add SeedDMS_Core_AttributeDefinition::removeValue() @@ -1608,7 +1608,7 @@ add SeedDMS_Core_AttributeDefinition::removeValue() GPL License -just bump version +- just bump version @@ -1624,10 +1624,10 @@ just bump version GPL License -SeedDMS_Core_DMS::search() returns false in case of an error -do not use views in DBAccessPDO by default anymore, use temp. tables -SeedDMS_Core_Document::getNotifyList() has new parameter to include disabled user in list -fix possible sql injection in SeedDMS_Core_User +- SeedDMS_Core_DMS::search() returns false in case of an error +- do not use views in DBAccessPDO by default anymore, use temp. tables +- SeedDMS_Core_Document::getNotifyList() has new parameter to include disabled user in list +- fix possible sql injection in SeedDMS_Core_User @@ -1643,10 +1643,10 @@ fix possible sql injection in SeedDMS_Core_User GPL License -context can be passed to getAccessMode() -call hook in SeedDMS_Core_Folder::getAccessMode() -new optional parameter $listguest for SeedDMS_Core_Document::getReadAccessList() -remove deprecated methods SeedDMS_Core_Document::convert(), SeedDMS_Core_Document::wasConverted(), SeedDMS_Core_Document::viewOnline(), SeedDMS_Core_Document::getUrl() +- context can be passed to getAccessMode() +- call hook in SeedDMS_Core_Folder::getAccessMode() +- new optional parameter $listguest for SeedDMS_Core_Document::getReadAccessList() +- remove deprecated methods SeedDMS_Core_Document::convert(), SeedDMS_Core_Document::wasConverted(), SeedDMS_Core_Document::viewOnline(), SeedDMS_Core_Document::getUrl() @@ -1662,8 +1662,8 @@ remove deprecated methods SeedDMS_Core_Document::convert(), SeedDMS_Core_Documen GPL License -fix php warning if workflow state doesn' have next transition -add method SeedDMS_Core_DatabaseAccess::setLogFp() +- fix php warning if workflow state doesn' have next transition +- add method SeedDMS_Core_DatabaseAccess::setLogFp() @@ -1679,7 +1679,7 @@ add method SeedDMS_Core_DatabaseAccess::setLogFp() GPL License -??? +- ??? From 42828065ce24d0e04aa722b373b9a991d6a3fb4d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 10:48:28 +0100 Subject: [PATCH 1773/2006] add target changelog which turns a package.xml into markdown --- Makefile | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 64114fe21..5479e2391 100644 --- a/Makefile +++ b/Makefile @@ -67,4 +67,31 @@ doc: apidoc: tools/apigen/bin/apigen SeedDMS_Core/Core --exclude "tests/*" --output html -.PHONY: doc webdav webapp repository +# Turn the package.xml file into CHANGELOG.md +# +# The idea is to form blocks of lines separated by an empty line. +# Echo block consists of the version number, release date und notes. +# This blocks are turned into single lines which are than sorted. +# Afterwards the single lines are turned back into blocks. +# +# It first uses sgrep to extract the version, date und notes. This is +# feed to sed to isolated the date and version and put them on separate +# lines. Each version +# forms a block of n lines with the first two being the version and date. +# All remaining lines are notes. Blocks are separated by an empty line. +# It's important to form blocks without ane empty lines because the following +# awk will create a single line from each block which can then be sorted +# (or simply reversed in order). +# Because the blocks are listed in the wrong order (last version first and +# previous version last, e.g. 5.1.29, 3.3.0, 3.3.1, ...., 5.1.27, 5.1.28) they +# need to be reversed in order. This is done by turning each block into line +# with the former new lines replaced by a '|'. So it's basically a '|' separated +# csv file which is then reversed in order by 'sort -r'. In order to separate +# blocks by a newline, each line of that output is appended by another +# line break. Result is put back +# into the original format by replacing all '|' by newline. +# +changelog: + @sgrep 'stag("DATE") .. etag("DATE") or ((stag("RELEASE") .. etag("RELEASE")) in (stag("VERSION") .. etag("VERSION"))) or inner(stag("NOTES") __ etag("NOTES"))' SeedDMS_Core/package.xml | sed -e 's#^ *\([-0-9]*\)\([0-9.]*\)#\n\n\2 (\1)\n---------------------#' | awk -F'\n' -vRS='' -vOFS='|' '{$$1=$$1}1' | sort -V -r | sed 's/$$/\n/' | tr '|' '\n' + +.PHONY: doc webdav webapp repository changelog From 93088edfcecd93abab26226f8c687e7d4edab2c3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 10:51:13 +0100 Subject: [PATCH 1774/2006] set SEEDDMS_CORE_SQL before running unit tests --- build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.xml b/build.xml index b02d9167e..81caffe74 100644 --- a/build.xml +++ b/build.xml @@ -63,7 +63,7 @@ - + From c8057fc72f1fa16369c642ed4f684203fb19ccbe Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 10:57:59 +0100 Subject: [PATCH 1775/2006] replace tabs by spaces --- SeedDMS_Core/package.xml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 050f9a716..46c4d4218 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -699,21 +699,21 @@ no changes - 2014-07-30 - - - 4.3.9 - 4.3.9 - - - stable - stable - - GPL License - + 2014-07-30 + + + 4.3.9 + 4.3.9 + + + stable + stable + + GPL License + - SeedDMS_Core_KeywordCategory::getKeywordLists() sorts keywords aphabetically - SeedDMS_Core_DMS::addUser() doesn't throw an error if sql_mode is set to STRICT_TRANS_TABLES and pwdexpiration is not set to a valid date. - + 2014-10-22 @@ -955,7 +955,7 @@ by a group or user right - new method SeedDMS_Core_DMS::createDump() - minor improvements int SeedDMS_Core_Document::getReadAccessList() - + 2016-01-22 @@ -979,7 +979,7 @@ SeedDMS_Core_DMS::getNotificationsByUser() are deprecated - SeedDMS_Core_DocumentCategory::getDocumentsByCategory() now returns the documents - add SeedDMS_Core_Group::getWorkflowStatus() - SeedDMS_Core_User::getDocumentsLocked() sets locking user propperly - + 2016-01-22 @@ -1054,7 +1054,7 @@ SeedDMS_Core_DMS::getNotificationsByUser() are deprecated GPL License - add more callbacks - + 2016-04-26 @@ -1275,7 +1275,7 @@ do not sort some temporary tables anymore, because it causes an error in mysql i GPL License - all changes from 4.3.25 merged - + 2016-04-04 @@ -1435,7 +1435,7 @@ do not sort some temporary tables anymore, because it causes an error in mysql i stable GPL License - + all sql statements can be logged to a file do not sort some temporary tables anymore, because it causes an error in mysql if sql_mode=only_full_group_by is set @@ -1906,7 +1906,7 @@ returns just users which are not disabled GPL License - SeedDMS_Core_DMS::getTimeline() uses status log instead of document content -- add methods SeedDMS_Core_DocumentContent::getReviewers() and SeedDMS_Core_DocumentContent::getApprovers() +- add methods SeedDMS_Core_DocumentContent::getReviewers() and SeedDMS_Core_DocumentContent::getApprovers() - add methods SeedDMS_Core_DocumentContent::getApproveLog() and SeedDMS_Core_DocumentContent::getReviewLog() - better handling of document with an empty workflow state - fix checking of email addresses by using filter_var instead of regex From 1da52544af01cf89c3799d4df39debff4cd932ac Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 10:58:16 +0100 Subject: [PATCH 1776/2006] handle none numberic versions when creating changelog --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5479e2391..8d94c6b56 100644 --- a/Makefile +++ b/Makefile @@ -92,6 +92,6 @@ apidoc: # into the original format by replacing all '|' by newline. # changelog: - @sgrep 'stag("DATE") .. etag("DATE") or ((stag("RELEASE") .. etag("RELEASE")) in (stag("VERSION") .. etag("VERSION"))) or inner(stag("NOTES") __ etag("NOTES"))' SeedDMS_Core/package.xml | sed -e 's#^ *\([-0-9]*\)\([0-9.]*\)#\n\n\2 (\1)\n---------------------#' | awk -F'\n' -vRS='' -vOFS='|' '{$$1=$$1}1' | sort -V -r | sed 's/$$/\n/' | tr '|' '\n' + @sgrep 'stag("DATE") .. etag("DATE") or ((stag("RELEASE") .. etag("RELEASE")) in (stag("VERSION") .. etag("VERSION"))) or inner(stag("NOTES") __ etag("NOTES"))' SeedDMS_Core/package.xml | sed -e 's#^ *\([-0-9]*\)\([0-9.preRC]*\)#\n\n\2 (\1)\n---------------------#' | awk -F'\n' -vRS='' -vOFS='|' '{$$1=$$1}1' | sort -V -r | sed 's/$$/\n/' | tr '|' '\n' .PHONY: doc webdav webapp repository changelog From 4f6261321f73ce2ae9beedc997439b99904c596b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 11:00:07 +0100 Subject: [PATCH 1777/2006] replace tabs by spaces --- SeedDMS_Core/package.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 03e497d8b..ecc20d28a 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -1735,7 +1735,7 @@ returns just users which are not disabled GPL License - speed up SeedDMS_Core_Folder::getSubFolders() SeedDMS_Core_Folder::getDocuments() by minimizing the number of sql queries. - + 2020-02-18 @@ -1751,7 +1751,7 @@ returns just users which are not disabled GPL License - no changes, just keep same version as seeddms application - + 2020-04-14 From 1c8d267a6654edb6537e594e51f139c230661ed7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 11:05:58 +0100 Subject: [PATCH 1778/2006] minor correction of old release dates --- SeedDMS_Core/package.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 46c4d4218..9f4881c4f 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -1704,7 +1704,7 @@ returns just users which are not disabled - 2019-08-07 + 2019-09-06 5.1.13 @@ -1809,7 +1809,7 @@ returns just users which are not disabled - 2020-07-28 + 2020-07-30 5.1.19 @@ -1973,7 +1973,7 @@ returns just users which are not disabled - 2022-04-25 + 2022-05-20 5.1.26 From 6dc9cc8b8e1ad6eeb191c50d6147b09723d35834 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 11:11:10 +0100 Subject: [PATCH 1779/2006] minor corrections to sync with seeddms 5 --- SeedDMS_Core/package.xml | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index ecc20d28a..7afb44684 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -1738,7 +1738,7 @@ returns just users which are not disabled - 2020-02-18 + 2020-03-02 5.1.15 @@ -1969,6 +1969,7 @@ returns just users which are not disabled - backport setFileType() from 6.0.x - add SeedDMS_Core_File::fileExtension() - add callbacks on onPostUpdateAttribute, onPostRemoveAttribute, onPostAddAttribute +- fix searching for document content with a custom attribute having a value set @@ -2404,27 +2405,6 @@ better error checking in SeedDMS_Core_Document::cancelCheckOut() - SeedDMS_Core_DocumentContent::getWorkflow() has optional parameter to return data from table tblWorkflowDocumentContent - - 2022-04-25 - - - 5.1.26 - 5.1.26 - - - stable - stable - - GPL License - -- fix validating multi value attributes -- SeedDMS_Core_User::removeFromProcesses() can be limited to a list of documents. In that case only the last version will be modified. -- add more types to getStatisticalData() -- add optional parameter $op to SeedDMS_Core_AttributeDefinition::getObjects() -- SeedDMS_Core_AttributeDefinition::getObjects() will not filter by value if null is passed -- SeedDMS_Core_DMS::getAllAttributeDefinitions() has second parameter to filter attributes by type - - 2022-05-20 From 88874155b02606feed47d515446f02a5d1536e62 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 12:09:45 +0100 Subject: [PATCH 1780/2006] add seeddms/core --- composer-dist.json | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/composer-dist.json b/composer-dist.json index 7c0171634..1c69d8361 100644 --- a/composer-dist.json +++ b/composer-dist.json @@ -12,6 +12,17 @@ "pear/db": "*", "alecrabbit/php-console-colour": "*", "zf1/zend-search-lucene": "*", - "symfony/http-foundation": "^5.4" - } + "symfony/http-foundation": "^5.4", + "seeddms/core": "dev-master" + }, + "repositories": [ + { + "type": "path", + "url": "/home/cvs/seeddms/SeedDMS_Core", + "options": { + "symlink": false + } + } + ] + } From 9df57ebe675e382371f0958257ff9ecaa28383b6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 12:21:14 +0100 Subject: [PATCH 1781/2006] no longer include Core.php from SeedDMS, use vendor/seeddms/core instead --- inc/inc.ClassSettings.php | 2 +- inc/inc.Init.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 9e65b2f8c..e695242fc 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -1479,7 +1479,7 @@ class Settings { /* {{{ */ if(!empty($this->_coreDir)) require_once($this->_coreDir.'/Core.php'); else - require_once($this->_rootDir.'../pear/SeedDMS/Core.php'); + require_once($this->_rootDir.'../pear/vendor/seeddms/core/Core.php'); $tmpcore = new SeedDMS_Core_DMS(null, $this->_contentDir); $db = new SeedDMS_Core_DatabaseAccess($this->_dbDriver, $this->_dbHostname, $this->_dbUser, $this->_dbPass, $this->_dbDatabase); if(!$db->connect()) { diff --git a/inc/inc.Init.php b/inc/inc.Init.php index 69ed0c6a4..1b4aaba5a 100644 --- a/inc/inc.Init.php +++ b/inc/inc.Init.php @@ -23,6 +23,6 @@ use Symfony\Component\HttpFoundation\Request; if(!empty($settings->_coreDir)) require_once($settings->_coreDir.'/Core.php'); else - require_once('SeedDMS/Core.php'); + require_once('vendor/seeddms/core/Core.php'); $request = Request::createFromGlobals(); From b7a718732d34072a6112c4c1207bfc9c63badaaa Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 12:27:22 +0100 Subject: [PATCH 1782/2006] new changelog created from package.xml --- SeedDMS_Core/CHANGELOG.md | 639 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 639 insertions(+) create mode 100644 SeedDMS_Core/CHANGELOG.md diff --git a/SeedDMS_Core/CHANGELOG.md b/SeedDMS_Core/CHANGELOG.md new file mode 100644 index 000000000..8ac741064 --- /dev/null +++ b/SeedDMS_Core/CHANGELOG.md @@ -0,0 +1,639 @@ +5.1.29 (2022-11-21) +--------------------- +- SeedDMS_Core_Folder::addDocument() does rollback transaction propperly when setting document categories fail +- add $skiproot and $sep parameter to SeedDMS_Core_Folder::getFolderPathPlain() +- add class name for 'documentfile' +- add method SeedDMS_Core_KeywordCategory::countKeywordLists() + +5.1.28 (2022-11-07) +--------------------- +- 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 + + +5.1.27 (2022-08-31) +--------------------- +- fix SeedDMS_Core_DMS::addAttributeDefinition() when objtype is 0 +- sort search result even if sortorder is 'i' or 'n' +- pass an array as an attribute to search() will OR each element + +5.1.26 (2022-05-20) +--------------------- +- fix validating multi value attributes +- SeedDMS_Core_User::removeFromProcesses() can be limited to a list of documents. In that case only the last version will be modified. +- add more types to getStatisticalData() +- add optional parameter $op to SeedDMS_Core_AttributeDefinition::getObjects() +- SeedDMS_Core_AttributeDefinition::getObjects() will not filter by value if null is passed +- SeedDMS_Core_DMS::getAllAttributeDefinitions() has second parameter to filter attributes by type + +5.1.25 (2022-04-22) +--------------------- +- rename getLastWorkflowTransition() to getLastWorkflowLog() +- getLastWorkflowLog() returns a workflow entry even if the workflow has ended +- backport setFileType() from 6.0.x +- add SeedDMS_Core_File::fileExtension() +- add callbacks on onPostUpdateAttribute, onPostRemoveAttribute, onPostAddAttribute +- fix searching for document content with a custom attribute having a value set + +5.1.24 (2021-12-11) +--------------------- +- in SeedDMS_Core_DocumentContent::removeWorkflow() remove records from tblWorklflowLog before tblDWorkflowDocumentContent +- make all class variables of SeedDMS_Core_User protected +- fix various errors in SeedDMS_Core_AttributeDefinition::validate() +- add lots of unit tests +- replace incorrect use of array_search() by in_array() +- move method SeedDMS_Core_DMS::createDump() into SeedDMS_Core_DatabaseAccess +- lots of parameter checking when calling methods() +- make sure callbacks are callable +- SeedDMS_Core_Folder::getParent() returns null if there is no parent (used to be false) +- SeedDMS_Core_DMS::search() will not find document without an expiration date anymore, if the search is limited by an expiration end date but no start date +- add method SeedDMS_Core_Folder::getFoldersMinMax() +- init internal cache variables of SeedDMS_Core_Folder/SeedDMS_Core_Document and add method clearCache() +- SeedDMS_Core_Folder::hasDocuments() does not use the interal document cache anymore +- SeedDMS_Core_Document::addDocumentLink() returns an object of type SeedDMS_Core_DocumentLink in case of success +- trim email, comment, language, theme when setting data of user +- more checks whether an id > 0 when getting a database record + +5.1.23 (2021-08-19) +--------------------- +- SeedDMS_Core_DMS::getTimeline() uses status log instead of document content +- add methods SeedDMS_Core_DocumentContent::getReviewers() and SeedDMS_Core_DocumentContent::getApprovers() +- add methods SeedDMS_Core_DocumentContent::getApproveLog() and SeedDMS_Core_DocumentContent::getReviewLog() +- better handling of document with an empty workflow state +- fix checking of email addresses by using filter_var instead of regex +- add new method SeedDMS_Core_Document::hasCategory() +- add new method SeedDMS_Core_DocumentContent::removeReview() +- add new method SeedDMS_Core_DocumentContent::removeApproval() +- add new method SeedDMS_Core_User::getFolders() +- add new method SeedDMS_Core_User::getDocumentContents() +- add new method SeedDMS_Core_User::getDocumentFiles() +- add new method SeedDMS_Core_User::getDocumentLinks() +- add new type 'foldersperuser' to method SeedDMS_Core_DMS::getStatisticalData() + +5.1.22 (2021-03-15) +--------------------- +- add SeedDMS_Core_DatabaseAccess::hasTable() +- add SeedDMS_Core_User->isType() and SeedDMS_Core_Group->isType() +- add SeedDMS_Core_User->getDMS() and SeedDMS_Core_Group->getDMS() +- add new parameter to SeedDMS_Core_DMS->getDocumentList() for skipping expired documents +- add parameter $incdisabled to SeedDMS_Core_Folder::getNotifyList() +- do not validate value in SeedDMS_Core_Attribute::setValue(), it should have been done before +- SeedDMS_Core_DMS::search() can search for last date of document status change +- smarter caching in SeedDMS_Core_Document::getDocumentFiles() which fixes a potential + problem when removing a document + +5.1.21 (2020-09-29) +--------------------- +- SeedDMS_Folder_DMS::getAccessList() and getDefaultAccess() do not return fals anymore if the parent does not exists. They just stop inheritance. +- pass attribute value to callback 'onAttributeValidate' +- new paramter 'new' of methode SeedDMЅ_Core_AttributeDefinition::validate() +- check if folder/document is below rootDir can be turned on (default off) +- SeedDMS_Core_User::setHomeFolder() can be used to unset the home folder +- check if attribute definition exists when setting attributes of folders and documents + +5.1.20 (2020-09-29) +--------------------- +- SeedDMS_Core_DMS::getDocumentList() returns false, if an unknown list is passed +- SeedDMS_Core_Document::getDocumentFiles() has new parameter to select only those files attached to a specific version of the document +- removing a document version will not remove attachments of the document anymore +- set dms of new user instances in SeedDMS_Core_Group + +5.1.19 (2020-07-30) +--------------------- +- add method SeedDMS_Core_Document::setParent() as an alias for setFolder() +- clear the save content list and latest content in SeedDMS_Core_Document after + a version has been deleted. +- new method SeedDMS_Core_Document::isLatestVersion() +- add new attribute types 'document', 'folder', 'user', 'group' + +5.1.18 (2020-05-28) +--------------------- +- fixed remaining todos +- fixed parsing of file size in SeedDMS_Core_File::parse_filesize() +- fix SeedDMS_Core_DMS::getDocumentByOriginalFilename() + +5.1.17 (2020-05-22) +--------------------- +- add new callback onSetStatus +- fix SeedDMS_Core_DMS::getExpiredDocuments(), sql statement failed because temp. tables were not created +- add parameters $orderdir, $orderby, $update to SeedDMS_Core::getExpiredDocuments() + +5.1.16 (2020-04-14) +--------------------- +- fix call of hooks in SeedDMS_Core +- add variable lasterror in SeedDMS_Core_DMS which can be set by hooks to pass an + error msg to the calling application +- better error checking in SeedDMS_Core_Document::addDocumentFile() + +5.1.15 (2020-03-02) +--------------------- +- no changes, just keep same version as seeddms application + +5.1.14 (2020-02-17) +--------------------- +- speed up SeedDMS_Core_Folder::getSubFolders() SeedDMS_Core_Folder::getDocuments() by minimizing the number of sql queries. + +5.1.13 (2019-09-06) +--------------------- +- add decorators +- add new methods SeedDMS_Core_Document::isType(), SeedDMS_Core_Folder::isType(), SeedDMS_Core_DocumentContent::isType(). Use them instead of checking the class name. +- skip a fileType with just a '.' + +5.1.12 (2019-07-01) +--------------------- +- parameter $orderby passed to SeedDMS_Core_Folder::getDocuments() and SeedDMS_Core_Folder::getSubFolders() can be a string, but only the first char is evaluated +- SeedDMS_Core_DMS::search() excepts parameters as array, added orderby +- add SeedDMS_Core_Folder::hasSubFolderByName() +- fix SeedDMS_Core_Folder::hasDocumentByName() which returned an int > 0 if documents + has been loaded before and even if the document searching for was not among them. +- add new method SeedDMS_Core_Folder::empty() + +5.1.11 (2019-05-03) +--------------------- +- ??? + +5.1.10 (2019-04-04) +--------------------- +- fix php warning if workflow state doesn' have next transition +- add method SeedDMS_Core_DatabaseAccess::setLogFp() + +5.1.9 (2018-11-13) +--------------------- +- context can be passed to getAccessMode() +- call hook in SeedDMS_Core_Folder::getAccessMode() +- new optional parameter $listguest for SeedDMS_Core_Document::getReadAccessList() +- remove deprecated methods SeedDMS_Core_Document::convert(), SeedDMS_Core_Document::wasConverted(), SeedDMS_Core_Document::viewOnline(), SeedDMS_Core_Document::getUrl() + +5.1.8 (2018-07-02) +--------------------- +- SeedDMS_Core_DMS::search() returns false in case of an error +- do not use views in DBAccessPDO by default anymore, use temp. tables +- SeedDMS_Core_Document::getNotifyList() has new parameter to include disabled user in list +- fix possible sql injection in SeedDMS_Core_User + +5.1.7 (2018-04-05) +--------------------- +- just bump version + +5.1.6 (2018-02-14) +--------------------- +- add SeedDMS_Core_Folder::getDocumentsMinMax() +- add lots of DocBlocks from merge request #8 +- add SeedDMS_Core_AttributeDefinition::removeValue() + +5.1.5 (2017-11-07) +--------------------- +- use views instead of temp. tables +- add list of expired documents in SeedDMS_Core_DMS::getDocumentList() +- add methods to set comment, name, public, version of document files +- add method SeedDMS_Core_Document::transferToUser() +- SeedDMS_Core_Document::addDocumentFile() returns object of file +- add SeedDMS_Core_DocumentFile::setDate() +- remove SeedDMS_Core_DocumentCategory::addCategory() and getCategories() +- add optional parameters $limit and $offset to SeedDMS_Core_Folder::getDocuments() + and SeedDMS_Core_Folder::getSubFolders() +- getInstance() returns now null instead of false if the object was not found in the db +- add new methods SeedDMS_Core_Document::addCategories() and + SeedDMS_Core_Document::removeCategories() + +5.1.4 (2017-09-05) +--------------------- +- add virtual access mode for document links and attachments plus callbacks to + check access mode in a hook +- add new method SeedDMS_Core_DMS::getDocumentsExpired() +- all changes from 5.0.14 merged + +5.1.3 (2017-08-23) +--------------------- +- SeedDMS_Core_Document::getNotifyList() and SeedDMS_Core_Folder::getNotifyList() +returns just users which are not disabled +- add new methods removeFromProcesses(), getWorkflowsInvolved(), getKeywordCategories() to SeedDMS_Core_User +- add methods isMandatoryReviewerOf() and isMandatoryApproverOf() +- add methods transferDocumentsFolders() and transferEvents() +- add method SeedDMS_Core_DMS::getDocumentByOriginalFilename() + +5.1.2 (2017-03-23) +--------------------- +- SeedDMS_Core_DMS::filterDocumentFiles() returns also documents which are not public + if the owner tries to access them +- Check return value of onPreRemove[Document +Folder], return from calling method if bool +- Add SeedDMS_Core_DMS::getDocumentList() +- Limit number of duplicate files to 1000 +- Add hook on(Pre +Post)RemoveContent +- Add hook onAttributeValidate + +5.1.1 (2017-02-20) +--------------------- +- all changes from 5.0.11 merged + +5.1.0 (2017-02-20) +--------------------- +- added postgres support + +5.0.13 (2017-07-13) +--------------------- +- all changes from 4.3.36 merged + +5.0.12 (2017-03-23) +--------------------- +all sql statements can be logged to a file +do not sort some temporary tables anymore, because it causes an error in mysql if sql_mode=only_full_group_by is set + +5.0.11 (2017-02-28) +--------------------- +- all changes from 4.3.34 merged + +5.0.10 (2017-02-20) +--------------------- +- all changes from 4.3.33 merged + +5.0.9 (2016-11-02) +--------------------- +- all changes from 4.3.32 merged + +5.0.8 (2016-11-02) +--------------------- +- all changes from 4.3.31 merged + +5.0.7 (2016-11-02) +--------------------- +- all changes from 4.3.30 merged +- better attribute value checking + +5.0.6 (2016-09-06) +--------------------- +- all changes from 4.3.29 merged + +5.0.5 (2016-08-09) +--------------------- +- all changes from 4.3.28 merged + +5.0.4 (2016-05-03) +--------------------- +- all changes from 4.3.27 merged + +5.0.3 (2016-04-04) +--------------------- +- use classname from SeedDMS_Core_DMS::_classnames for SeedDMS_Core_DocumentContent +- all changes from 4.3.26 merged + +5.0.2 (2016-04-26) +--------------------- +- all changes from 4.3.25 merged + +5.0.1 (2016-01-22) +--------------------- +- all changes from 4.3.24 merged + +5.0.0 (2016-01-22) +--------------------- +- classes can be overloaded +- clean workflow log when a document version was deleted + +4.3.37 (2018-02-14) +--------------------- +- SeedDMS_Core_DMS::search() finds documents without a status log + +4.3.36 (2017-03-22) +--------------------- +- fix sql statement for creating temp. tables (sqlite) + +4.3.35 (2017-07-11) +--------------------- +do not sort some temporary tables anymore, because it causes an error in mysql if sql_mode=only_full_group_by is set + +4.3.34 (2017-02-28) +--------------------- +SeedDMS_Core_DMS::getDuplicateDocumentContent() returns complete document + +4.3.33 (2017-02-22) +--------------------- +- SeedDMЅ_Core_DMS::getTimeline() no longer returns duplicate documents +- SeedDMЅ_Core_Document::addContent() sets workflow after status was set +- SeedDMЅ_Core_Keyword::setOwner() fix sql statement +- SeedDMЅ_Core_User::setFullname() minor fix in sql statement + +4.3.32 (2017-01-12) +--------------------- +- order groups by name returned by getReadAccessList() +- add optional parameter to SeedDMS_Core_DMS::filterDocumentLinks() +- SeedDMS_Core_DMS::search() can search for document/folder id + +4.3.31 (2016-11-02) +--------------------- +- new method SeedDMЅ_Core_WorkflowAction::getTransitions() +- new method SeedDMЅ_Core_WorkflowState::getTransitions() +- new method SeedDMЅ_Core_AttributeDefinition::parseValue() +- add check for cycles in workflow SeedDMS_Core_Workflow::checkForCycles() + +4.3.30 (2016-10-07) +--------------------- +- new method SeedDMЅ_Core_AttributeDefinition::getValueSetSeparator() +- trim each value of a value set before saving the complete value set as a string + +4.3.29 (2016-09-06) +--------------------- +- SeedDMЅ_Core_Object::getAttributes() orders attributes by name of attribute definition +- SeedDMЅ_Core_Workflow::addTransition() force reload of transition list after adding a +- SeedDMЅ_Core_Document::rewrite[Review +Approval]Log() will also copy file if it exists +- add method SeedDMЅ_Core_Document::rewriteWorkflowLog() + +4.3.28 (2016-08-24) +--------------------- +- SeedDMЅ_Core_DMS::search() searches also comment of document version + +4.3.27 (2016-04-26) +--------------------- +- callbacks can have more then one user function +- fix some sql statements, because they didn't work with mysql 5.7.5 anymore + +4.3.26 (2016-04-04) +--------------------- +- add more callbacks + +4.3.25 (2016-03-08) +--------------------- +- rename SeedDMS_Core_Group::getNotificationsByGroup() to getNotifications() +- use __construct() for all constructors +- fix setting multi value attributes for versions + +4.3.24 (2016-01-22) +--------------------- +- make sure boolean attribute is saved as 0/1 +- add SeedDMS_Core_User::[g +s]etMandatoryWorkflows() +- add SeedDMS_Core_User::getNotifications() +- add SeedDMS_Core_Group::getNotifications() +- SeedDMS_Core_DMS::getNotificationsByGroup() and +SeedDMS_Core_DMS::getNotificationsByUser() are deprecated +- SeedDMS_Core_DocumentCategory::getDocumentsByCategory() now returns the documents +- add SeedDMS_Core_Group::getWorkflowStatus() +- SeedDMS_Core_User::getDocumentsLocked() sets locking user propperly + +4.3.24 (2016-01-21) +--------------------- +- make sure boolean attribute is saved as 0/1 +- add SeedDMS_Core_User::[g +s]etMandatoryWorkflows() +- add SeedDMS_Core_User::getNotifications() +- add SeedDMS_Core_Group::getNotifications() +- SeedDMS_Core_DMS::getNotificationsByGroup() and +SeedDMS_Core_DMS::getNotificationsByUser() are deprecated +- SeedDMS_Core_DocumentCategory::getDocumentsByCategory() now returns the documents +- add SeedDMS_Core_Group::getWorkflowStatus() +- SeedDMS_Core_User::getDocumentsLocked() sets locking user propperly + +4.3.23 (2016-01-21) +--------------------- +- new method SeedDMS_Core_DMS::createDump() +- minor improvements int SeedDMS_Core_Document::getReadAccessList() + +4.3.22 (2015-11-09) +--------------------- +- fix sql statement to reset password +- pass some more information for timeline + +4.3.21 (2015-09-28) +--------------------- +- add method SeedDMS_Core_Database::getCurrentTimestamp() +- add method SeedDMS_Core_Database::getCurrentDatetime() +- user getCurrentTimestamp() and getCurrentDatetime() whenever possible + +4.3.20 (2015-06-26) +--------------------- +- add method SeedDMS_Core_DMS::checkDate() +- add method SeedDMS_Core_Document::setDate() +- add method SeedDMS_Core_Folder::setDate() +- date can be passed to SeedDMS_Core_DocumentContent::setStatus() +- add method SeedDMS_Core_DocumentContent::rewriteStatusLog() +- add method SeedDMS_Core_DocumentContent::rewriteReviewLog() +- add method SeedDMS_Core_DocumentContent::rewriteApprovalLog() +- access rights for guest are also taken into account if set in an acl. Previously guest could gain read rights even if the access was probibited +by a group or user right + +4.3.19 (2015-06-26) +--------------------- +- add optional paramter $noclean to clearAccessList(), setDefaultAccess(), setInheritAccess() +- clearAccessList() will clean up the notifier list +- new method cleanNotifyList() + +4.3.18 (2015-06-09) +--------------------- +- add optional paramter $msg to SeedDMS_Core_DocumentContent::verifyStatus() +- add method SeedDMS_Core_DMS::getDuplicateDocumentContent() + +4.3.17 (2015-03-27) +--------------------- +clean workflow log when a document version was deleted + +4.3.16 (2015-03-20) +--------------------- +no changes + +4.3.15 (2015-02-12) +--------------------- +users returned by SeedDMS_Core_DMS::getAllUsers() have language and theme set again + +4.3.13 (2014-11-27) +--------------------- +- fix searching for attributes +- add some more documentation +- SeedDMS_Core_DMS::getDocumentCategories() returns categories sorted by name (Bug #181) +- new methode SeedDMS_Core_Document::replaceContent() which replaces the content of a version. + 4.3.14 +- add missing start transaction in SeedDMD_Core_Folder::remove() +- SeedDMD_Core_Folder::isSubFolder() doesn't compare object instances anymore (Bug #194) + +4.3.12 (2014-11-17) +--------------------- +- fix searching folders with multivalue attributes + +4.3.11 (2014-11-13) +--------------------- +- fixed saving multivalue attributes +- add method SeedDMS_Core_Attribute::getValueAsArray() + +4.3.10 (2014-10-22) +--------------------- +new release + +4.3.9 (2014-07-30) +--------------------- +- SeedDMS_Core_KeywordCategory::getKeywordLists() sorts keywords aphabetically +- SeedDMS_Core_DMS::addUser() doesn't throw an error if sql_mode is set to STRICT_TRANS_TABLES and pwdexpiration is not set to a valid date. + +4.3.8 (2014-04-09) +--------------------- +- new method SeedDMS_Core_DMS::getStatisticalData() + +4.3.7 (2014-03-21) +--------------------- +no changes + +4.3.6 (2014-03-18) +--------------------- +- add optional parameters $publiconly=false and $user=null to SeedDMS_Core_Document::getDocumentLinks() +- add new method SeedDMS_Core_Document::getReverseDocumentLinks() + +4.3.5 (2014-03-04) +--------------------- +no changes + +4.3.4 (2014-02-01) +--------------------- +- fix handling of multivalue attributes + +4.3.3 (2014-02-01) +--------------------- +- SeedDMS_Folder::getDocuments() and SeedDMS_Folder::getSubFolders() do not + do any sorting if $orderby is not set. +- database hostname can have port seperated by ':' +- make all functions in SeedDMS_Core_File static (fixes problem with php 5.5.x) + +4.3.2 (2013-11-27) +--------------------- +- new method SeedDMS_Core_Folder::isSubFolder() +- check for subFolder in SeedDMS_Core_Folder::setParent() +- new methods SeedDMS_Core_DMS::checkFolders() and SeedDMS_Core_DMS::checkDocuments() + +4.3.0 (2013-09-05) +--------------------- +- various small corrections +- comment of version is no longer taken from document if version comment is empty +- passing an array of users to SeedDMЅ_Core_DMS::search() instead of a single user ist now allowed +- turn on foreign key constraints for sqlite3 +- SeedDMЅ_Core_Folder::getPath() can handle a subfolder treated as a root folder + +4.2.2 (2013-05-17) +--------------------- +- admins can be added as reviewer/approver again + +4.2.1 (2013-04-30) +--------------------- +- fixed bug in SeedDMS_Core_DocumentContent::addIndApp() + +4.2.0 (2013-04-22) +--------------------- +- fixed bug in SeedDMS_Core_DocumentContent::addIndApp() + +4.1.3 (2013-04-08) +--------------------- +- stay in sync with seeddms application + +4.1.2 (2013-04-05) +--------------------- +- set propper folderList of sub folders after moving a folder + +4.1.1 (2013-04-05) +--------------------- +- stay in sync with seeddms application + +4.1.0 (2013-03-28) +--------------------- +- minor bugfixes + +4.0.0 (2013-02-26) +--------------------- +- minor bugfixes + +4.0.0pre5 (2013-02-14) +--------------------- +- changed name from letodms to seeddms +- fixed SeedDMS_Database::TableList() + +4.0.0pre4 (2013-02-11) +--------------------- +- calculate checksum for document versions +- some bug fixes +- some more documentation +- added new methods SeedDMS_Core_Document::getReadUserList() and + SeedDMS_Core_Folder::getReadUserList() which replaces getApproversList() +- fixed sql statement in getReadUserList() for sqlite3 + +4.0.0pre3 (2013-02-08) +--------------------- +- minor bug fixes + +4.0.0pre2 (2013-02-06) +--------------------- +- lots of bug fixes +- replaced more of old var declaration +- more code documentation + +4.0.0pre1 (2013-01-24) +--------------------- +- added database transactions +- new workflow +- replaced old var declaration + +4.0.0RC1 (2013-02-20) +--------------------- +- minor bugfixes + +3.4.0 (2012-12-13) +--------------------- +- added PDO database driver, several sql changes for better compatiblity +- fixed bug when adding a new document category +- make sure the database remains consistent even in case of errors + +3.3.9 (2012-09-19) +--------------------- +- version update to be in sync with letodms application + +3.3.8 (2012-09-16) +--------------------- +- more sql injection protection in LetoDMS_Core_User + +3.3.7 (2012-08-25) +--------------------- +- no changes, just keep same version as letodms application + +3.3.6 (2012-07-16) +--------------------- +- no changes, just keep same version as letodms application + +3.3.5 (2012-04-30) +--------------------- +- minor corrections + +3.3.4 (2012-04-11) +--------------------- +- fixed bug in LetoDMS_Core_DocumentFile::getPath() + +3.3.3 (2012-03-28) +--------------------- +- fixed bug in LetoDMS_Core_Document::getPath() + +3.3.2 (2012-03-22) +--------------------- +- fixed bug in LetoDMS_Core_Document::getDir() + +3.3.1 (2012-03-21) +--------------------- +- new release + +3.3.0 (2012-02-08) +--------------------- +- added methods to find and repair errors in document and folder records +- removed sendmail parameter from some methods in LetoDMS_Core_Document +- do not use some of the temporay tables anymore +- SetFetchMode(ADODB_FETCH_ASSOC) in LetoDMS_Core_DatabaseAccess::connect() + +3.2.0 (2011-07-23) +--------------------- +New release + +3.0.0 (2010-04-27) +--------------------- +Initial release + From 33f7567241412354ed6e249325d9097394935342 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 12:28:35 +0100 Subject: [PATCH 1783/2006] add unit tests --- SeedDMS_Core/bootstrap-5.php | 3 + SeedDMS_Core/bootstrap-6.php | 3 + SeedDMS_Core/phpunit.xml | 26 + SeedDMS_Core/tests/.phpunit.result.cache | 1 + .../tests/AttributeDefinitionTest.php | 574 ++++ SeedDMS_Core/tests/AttributeTest.php | 155 + SeedDMS_Core/tests/DatabaseTest.php | 324 ++ SeedDMS_Core/tests/DmsTest.php | 2956 +++++++++++++++++ SeedDMS_Core/tests/DmsWithDataTest.php | 290 ++ SeedDMS_Core/tests/DocumentCategoryTest.php | 295 ++ SeedDMS_Core/tests/DocumentContentTest.php | 593 ++++ SeedDMS_Core/tests/DocumentFileTest.php | 290 ++ SeedDMS_Core/tests/DocumentLinkTest.php | 125 + SeedDMS_Core/tests/DocumentTest.php | 1323 ++++++++ SeedDMS_Core/tests/FileUtilsTest.php | 219 ++ SeedDMS_Core/tests/FolderTest.php | 1221 +++++++ SeedDMS_Core/tests/GroupTest.php | 410 +++ SeedDMS_Core/tests/KeywordCategoryTest.php | 147 + SeedDMS_Core/tests/ReviewApprovalTest.php | 477 +++ SeedDMS_Core/tests/SeedDmsBase.php | 365 ++ SeedDMS_Core/tests/UserTest.php | 1679 ++++++++++ SeedDMS_Core/tests/WorkflowTest.php | 638 ++++ 22 files changed, 12114 insertions(+) create mode 100644 SeedDMS_Core/bootstrap-5.php create mode 100644 SeedDMS_Core/bootstrap-6.php create mode 100644 SeedDMS_Core/phpunit.xml create mode 100644 SeedDMS_Core/tests/.phpunit.result.cache create mode 100644 SeedDMS_Core/tests/AttributeDefinitionTest.php create mode 100644 SeedDMS_Core/tests/AttributeTest.php create mode 100644 SeedDMS_Core/tests/DatabaseTest.php create mode 100644 SeedDMS_Core/tests/DmsTest.php create mode 100644 SeedDMS_Core/tests/DmsWithDataTest.php create mode 100644 SeedDMS_Core/tests/DocumentCategoryTest.php create mode 100644 SeedDMS_Core/tests/DocumentContentTest.php create mode 100644 SeedDMS_Core/tests/DocumentFileTest.php create mode 100644 SeedDMS_Core/tests/DocumentLinkTest.php create mode 100644 SeedDMS_Core/tests/DocumentTest.php create mode 100644 SeedDMS_Core/tests/FileUtilsTest.php create mode 100644 SeedDMS_Core/tests/FolderTest.php create mode 100644 SeedDMS_Core/tests/GroupTest.php create mode 100644 SeedDMS_Core/tests/KeywordCategoryTest.php create mode 100644 SeedDMS_Core/tests/ReviewApprovalTest.php create mode 100644 SeedDMS_Core/tests/SeedDmsBase.php create mode 100644 SeedDMS_Core/tests/UserTest.php create mode 100644 SeedDMS_Core/tests/WorkflowTest.php diff --git a/SeedDMS_Core/bootstrap-5.php b/SeedDMS_Core/bootstrap-5.php new file mode 100644 index 000000000..5d0d0e4a5 --- /dev/null +++ b/SeedDMS_Core/bootstrap-5.php @@ -0,0 +1,3 @@ + + + + + tests + + + + + + Core + + + diff --git a/SeedDMS_Core/tests/.phpunit.result.cache b/SeedDMS_Core/tests/.phpunit.result.cache new file mode 100644 index 000000000..007ae03d8 --- /dev/null +++ b/SeedDMS_Core/tests/.phpunit.result.cache @@ -0,0 +1 @@ +C:37:"PHPUnit\Runner\DefaultTestResultCache":106:{a:2:{s:7:"defects";a:1:{s:17:"DmsTest::testInit";i:3;}s:5:"times";a:1:{s:17:"DmsTest::testInit";d:0.002;}}} \ No newline at end of file diff --git a/SeedDMS_Core/tests/AttributeDefinitionTest.php b/SeedDMS_Core/tests/AttributeDefinitionTest.php new file mode 100644 index 000000000..f6276e536 --- /dev/null +++ b/SeedDMS_Core/tests/AttributeDefinitionTest.php @@ -0,0 +1,574 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +use PHPUnit\Framework\TestCase; + +/** + * Attribute definition test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class AttributeDefinitionTest extends TestCase +{ + + /** + * Create a real dms object with a mocked db + * + * This mock is only used if \SeedDMS_Core_DatabaseAccess::getResult() is + * called once. This is the case for all \SeedDMS_Core_AttributeDefinition::setXXX() + * methods like setName(). + * + * @return \SeedDMS_Core_DMS + */ + protected function getDmsWithMockedDb() : \SeedDMS_Core_DMS + { + $db = $this->createMock(\SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE ")) + ->willReturn(true); + $dms = new \SeedDMS_Core_DMS($db, ''); + return $dms; + } + + /** + * Create a mocked dms + * + * @return \SeedDMS_Core_DMS + */ + protected function getDmsMock() : \SeedDMS_Core_DMS + { + $dms = $this->createMock(\SeedDMS_Core_DMS::class); + $dms->expects($this->any()) + ->method('getDocument') + ->with(1) + ->willReturn(true); + $dms->expects($this->any()) + ->method('getFolder') + ->with(1) + ->willReturn(true); + $dms->expects($this->any()) + ->method('getUser') + ->will( + $this->returnValueMap( + array( + array(1, new \SeedDMS_Core_User(1, 'admin', 'pass', 'Joe Foo', 'baz@foo.de', 'en_GB', 'bootstrap', 'My comment', \SeedDMS_Core_User::role_admin)), + array(2, new \SeedDMS_Core_User(2, 'admin2', 'pass', 'Joe Bar', 'bar@foo.de', 'en_GB', 'bootstrap', 'My comment', \SeedDMS_Core_User::role_admin)), + array(3, null) + ) + ) + ); + $dms->expects($this->any()) + ->method('getGroup') + ->will( + $this->returnValueMap( + array( + array(1, new \SeedDMS_Core_Group(1, 'admin group 1', 'My comment')), + array(2, new \SeedDMS_Core_Group(2, 'admin group 2', 'My comment')), + array(3, null) + ) + ) + ); + return $dms; + } + + /** + * Create a mock attribute definition object + * + * @param int $type type of attribute + * @param boolean $multiple set to true for multi value attributes + * @param int $minvalues minimum number of attribute values + * @param int $maxvalues maximum number of attribute values + * @param string $valueset list of allowed values separated by the first char + * @param string $regex regular expression that must match the attribute value + * + * @return \SeedDMS_Core_AttributeDefinition + */ + protected function getAttributeDefinition($type, $multiple=false, $minvalues=0, $maxvalues=0, $valueset='', $regex='') + { + $attrdef = new \SeedDMS_Core_AttributeDefinition(1, 'foo attr', \SeedDMS_Core_AttributeDefinition::objtype_folder, $type, $multiple, $minvalues, $maxvalues, $valueset, $regex); + return $attrdef; + } + + /** + * Test getId() + * + * @return void + */ + public function testGetId() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_int); + $this->assertEquals(1, $attrdef->getId()); + } + + /** + * Test getName() + * + * @return void + */ + public function testGetName() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_int); + $this->assertEquals('foo attr', $attrdef->getName()); + } + + /** + * Test setName() + * + * @return void + */ + public function testSetName() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_int); + /* A mocked dms is needed for updating the database */ + $attrdef->setDMS(self::getDmsWithMockedDb()); + $attrdef->setName('bar attr'); + $this->assertEquals('bar attr', $attrdef->getName()); + } + + /** + * Test getObjType() + * + * @return void + */ + public function testGetObjType() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_int); + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::objtype_folder, $attrdef->getObjType()); + } + + /** + * Test setObjType() + * + * @return void + */ + public function testSetObjType() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_int); + /* A mocked dms is needed for updating the database */ + $attrdef->setDMS(self::getDmsWithMockedDb()); + $attrdef->setObjType(\SeedDMS_Core_AttributeDefinition::objtype_document); + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::objtype_document, $attrdef->getObjType()); + } + + /** + * Test getType() + * + * @return void + */ + public function testGetType() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_int); + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::type_int, $attrdef->getType()); + } + + /** + * Test setType() + * + * @return void + */ + public function testSetType() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_int); + /* A mocked dms is needed for updating the database */ + $attrdef->setDMS(self::getDmsWithMockedDb()); + $attrdef->setType(\SeedDMS_Core_AttributeDefinition::type_string); + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::type_string, $attrdef->getType()); + } + + /** + * Test getMultipleValues() + * + * @return void + */ + public function testGetMultipleValues() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_int); + $this->assertEquals(false, $attrdef->getMultipleValues()); + } + + /** + * Test setMultipleValues() + * + * @return void + */ + public function testSetMultipleValues() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_int); + /* A mocked dms is needed for updating the database */ + $attrdef->setDMS(self::getDmsWithMockedDb()); + /* Toogle the current value of multiple values */ + $oldvalue = $attrdef->getMultipleValues(); + $attrdef->setMultipleValues(!$oldvalue); + $this->assertEquals(!$oldvalue, $attrdef->getMultipleValues()); + } + + /** + * Test getMinValues() + * + * @return void + */ + public function testGetMinValues() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_int); + $this->assertEquals(0, $attrdef->getMinValues()); + } + + /** + * Test setMinValues() + * + * @return void + */ + public function testSetMinValues() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_int); + /* A mocked dms is needed for updating the database */ + $attrdef->setDMS(self::getDmsWithMockedDb()); + /* add 5 to value of min values */ + $oldvalue = $attrdef->getMinValues(); + $attrdef->setMinValues($oldvalue+5); + $this->assertEquals($oldvalue+5, $attrdef->getMinValues()); + } + + /** + * Test getMaxValues() + * + * @return void + */ + public function testGetMaxValues() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_int); + $this->assertEquals(0, $attrdef->getMaxValues()); + } + + /** + * Test setMaxValues() + * + * @return void + */ + public function testSetMaxValues() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_int); + /* A mocked dms is needed for updating the database */ + $attrdef->setDMS(self::getDmsWithMockedDb()); + /* add 5 to value of max values */ + $oldvalue = $attrdef->getMaxValues(); + $attrdef->setMaxValues($oldvalue+5); + $this->assertEquals($oldvalue+5, $attrdef->getMaxValues()); + } + + /** + * Test getValueSet() + * + * @return void + */ + public function testGetValueSet() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string, false, 0, 0, '|foo|bar|baz'); + $this->assertEquals('|foo|bar|baz', $attrdef->getValueSet()); + } + + /** + * Test getValueSetSeparator() + * + * @return void + */ + public function testGetValueSetSeparator() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string, false, 0, 0, '|foo|bar|baz'); + $this->assertEquals('|', $attrdef->getValueSetSeparator()); + /* No value set will return no separator */ + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_int); + $this->assertEmpty($attrdef->getValueSetSeparator()); + /* Even a 1 char value set will return no separator */ + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string, false, 0, 0, '|'); + $this->assertEmpty($attrdef->getValueSetSeparator()); + /* Multiple users or groups always use a ',' as a separator */ + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_user, true); + $this->assertEquals(',', $attrdef->getValueSetSeparator()); + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_group, true); + $this->assertEquals(',', $attrdef->getValueSetSeparator()); + } + + /** + * Test getValueSetAsArray() + * + * @return void + */ + public function testGetValueSetAsArray() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string, false, 0, 0, '|foo|bar|baz '); + $valueset = $attrdef->getValueSetAsArray(); + $this->assertIsArray($valueset); + $this->assertCount(3, $valueset); + /* value set must contain 'baz' though 'baz ' was originally set */ + $this->assertContains('baz', $valueset); + /* No value set will return an empty array */ + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string); + $valueset = $attrdef->getValueSetAsArray(); + $this->assertIsArray($valueset); + $this->assertEmpty($valueset); + } + + /** + * Test getValueSetValue() + * + * @return void + */ + public function testGetValueSetValue() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string, false, 0, 0, '|foo|bar|baz '); + $this->assertEquals('foo', $attrdef->getValueSetValue(0)); + /* Check if trimming of 'baz ' worked */ + $this->assertEquals('baz', $attrdef->getValueSetValue(2)); + /* Getting the value of a none existing index returns false */ + $this->assertFalse($attrdef->getValueSetValue(3)); + + /* Getting a value from a none existing value set returns false as well */ + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string); + $this->assertFalse($attrdef->getValueSetValue(0)); + } + + /** + * Test setValueSet() + * + * @return void + */ + public function testSetValueSet() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_int); + /* A mocked dms is needed for updating the database */ + $attrdef->setDMS(self::getDmsWithMockedDb()); + /* add 5 to value of min values */ + $attrdef->setValueSet(' |foo|bar | baz '); + $this->assertEquals('|foo|bar|baz', $attrdef->getValueSet()); + } + + /** + * Test getRegex() + * + * @return void + */ + public function testGetRegex() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string, false, 0, 0, '', '[0-9].*'); + $this->assertEquals('[0-9].*', $attrdef->getRegex()); + } + + /** + * Test setRegex() + * + * @return void + */ + public function testSetRegex() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string); + /* A mocked dms is needed for updating the database */ + $attrdef->setDMS(self::getDmsWithMockedDb()); + /* set a new valid regex */ + $this->assertTrue($attrdef->setRegex(' /[0-9].*/i ')); + $this->assertEquals('/[0-9].*/i', $attrdef->getRegex()); + /* set a new invalid regex will return false and keep the old regex */ + $this->assertFalse($attrdef->setRegex(' /([0-9].*/i ')); + $this->assertEquals('/[0-9].*/i', $attrdef->getRegex()); + } + + /** + * Test setEmptyRegex() + * + * @return void + */ + public function testSetEmptyRegex() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string); + /* A mocked dms is needed for updating the database */ + $attrdef->setDMS(self::getDmsWithMockedDb()); + /* set an empty regex */ + $this->assertTrue($attrdef->setRegex('')); + } + + /** + * Test parseValue() + * + * @return void + */ + public function testParseValue() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string); + $value = $attrdef->parseValue('foo'); + $this->assertIsArray($value); + $this->assertCount(1, $value); + $this->assertContains('foo', $value); + /* An attribute definition with multiple values will split the value by the first char */ + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string, true, 0, 0, '|baz|bar|foo'); + $value = $attrdef->parseValue('|bar|baz'); + $this->assertIsArray($value); + $this->assertCount(2, $value); + /* An attribute definition without multiple values, will treat the value as a string */ + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string, false, 0, 0, '|baz|bar|foo'); + $value = $attrdef->parseValue('|bar|baz'); + $this->assertIsArray($value); + $this->assertCount(1, $value); + $this->assertContains('|bar|baz', $value); + } + + /** + * Test validate() + * + * @TODO Instead of having a lengthy list of assert calls, this could be + * implemented with data providers for each attribute type + * + * @return void + */ + public function testValidate() + { + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string); + $this->assertTrue($attrdef->validate('')); // even an empty string is valid + $this->assertTrue($attrdef->validate('foo')); // there is no invalid string + + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string, false, 0, 0, '', '/[0-9]*S/'); + $this->assertFalse($attrdef->validate('foo')); // doesn't match the regex + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_regex, $attrdef->getValidationError()); + $this->assertTrue($attrdef->validate('S')); // no leading numbers needed + $this->assertTrue($attrdef->validate('8980S')); // leading numbers are ok + + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string, false, 0, 0, '|foo|bar|baz', ''); + $this->assertTrue($attrdef->validate('foo')); // is part of value map + $this->assertFalse($attrdef->validate('foz')); // is not part of value map + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_valueset, $attrdef->getValidationError()); + + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string, true, 0, 0, '|foo|bar|baz', ''); + $this->assertTrue($attrdef->validate('foo')); // is part of value map + $this->assertFalse($attrdef->validate('')); // an empty value cannot be in the valueset + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_valueset, $attrdef->getValidationError()); + $this->assertTrue($attrdef->validate('|foo|baz')); // both are part of value map + $this->assertFalse($attrdef->validate('|foz|baz')); // 'foz' is not part of value map + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_valueset, $attrdef->getValidationError()); + + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_string, true, 1, 1, '|foo|bar|baz', ''); + $this->assertTrue($attrdef->validate('foo')); // is part of value map + $this->assertFalse($attrdef->validate('')); // empty string is invalid because of min values = 1 + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_min_values, $attrdef->getValidationError()); + $this->assertFalse($attrdef->validate('|foo|baz')); // both are part of value map, but only value is allowed + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_max_values, $attrdef->getValidationError()); + + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_boolean); + $this->assertTrue($attrdef->validate(0)); + $this->assertTrue($attrdef->validate(1)); + $this->assertFalse($attrdef->validate(2)); + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_boolean, $attrdef->getValidationError()); + + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_int); + $this->assertTrue($attrdef->validate(0)); + $this->assertTrue($attrdef->validate('0')); + $this->assertFalse($attrdef->validate('a')); + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_int, $attrdef->getValidationError()); + + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_date); + $this->assertTrue($attrdef->validate('2021-09-30')); + $this->assertTrue($attrdef->validate('1968-02-29')); // 1968 was a leap year + $this->assertTrue($attrdef->validate('2000-02-29')); // 2000 was a leap year + $this->assertFalse($attrdef->validate('1900-02-29')); // 1900 didn't was a leap year + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_date, $attrdef->getValidationError()); + $this->assertFalse($attrdef->validate('1970-02-29')); // 1970 didn't was a leap year + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_date, $attrdef->getValidationError()); + $this->assertFalse($attrdef->validate('2010/02/28')); // This has the wrong format + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_date, $attrdef->getValidationError()); + $this->assertFalse($attrdef->validate('1970-00-29')); // 0 month is not allowed + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_date, $attrdef->getValidationError()); + $this->assertFalse($attrdef->validate('1970-01-00')); // 0 day is not allowed + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_date, $attrdef->getValidationError()); + + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_float); + $this->assertTrue($attrdef->validate('0.567')); + $this->assertTrue($attrdef->validate('1000')); + $this->assertTrue($attrdef->validate('1000e3')); + $this->assertTrue($attrdef->validate('1000e-3')); + $this->assertTrue($attrdef->validate('-1000')); + $this->assertTrue($attrdef->validate('+1000')); + $this->assertFalse($attrdef->validate('0,567')); // wrong decimal point + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_float, $attrdef->getValidationError()); + $this->assertFalse($attrdef->validate('0.56.7')); // two decimal point + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_float, $attrdef->getValidationError()); + + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_email); + $this->assertTrue($attrdef->validate('info@seeddms.org')); + $this->assertTrue($attrdef->validate('info@seeddms.verylongtopleveldomain')); + $this->assertFalse($attrdef->validate('@seeddms.org')); // no user + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_email, $attrdef->getValidationError()); + $this->assertFalse($attrdef->validate('info@localhost')); // no tld + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_email, $attrdef->getValidationError()); + $this->assertFalse($attrdef->validate('info@@seeddms.org')); // double @ + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_email, $attrdef->getValidationError()); + $this->assertTrue($attrdef->validate('info@subsubdomain.subdomain.seeddms.org')); // multiple subdomains are ok + $this->assertFalse($attrdef->validate('info@seeddms..org')); // double . is not allowed + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_email, $attrdef->getValidationError()); + $this->assertFalse($attrdef->validate('info@s.org')); // 2nd level domain name is too short + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_email, $attrdef->getValidationError()); + $this->assertFalse($attrdef->validate('info@seeddms.o')); // top level domain name is too short + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_email, $attrdef->getValidationError()); + $this->assertTrue($attrdef->validate('info@0123456789-0123456789-0123456789-0123456789-0123456789-01234567.org')); // domain name is 63 chars long, which is the max length + $this->assertFalse($attrdef->validate('info@0123456789-0123456789-0123456789-0123456789-0123456789-012345678.org')); // domain name is 1 char longer than 63 chars + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_email, $attrdef->getValidationError()); + + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_url); + $this->assertTrue($attrdef->validate('http://seeddms.org')); + $this->assertTrue($attrdef->validate('https://seeddms.org')); + $this->assertFalse($attrdef->validate('ftp://seeddms.org')); // ftp is not allowed + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_url, $attrdef->getValidationError()); + $this->assertTrue($attrdef->validate('http://localhost')); // no tld is just fine + $this->assertFalse($attrdef->validate('http://localhost.o')); // tld is to short + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_url, $attrdef->getValidationError()); + + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_user); + $attrdef->setDMS(self::getDmsMock()); + $this->assertTrue($attrdef->validate(1)); + $this->assertFalse($attrdef->validate(3)); + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_user, $attrdef->getValidationError()); + + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_group); + $attrdef->setDMS(self::getDmsMock()); + $this->assertTrue($attrdef->validate('1')); + $this->assertTrue($attrdef->validate('2')); + $this->assertFalse($attrdef->validate('3')); // there is no group with id=3 + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_group, $attrdef->getValidationError()); + + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_group, true); + $attrdef->setDMS(self::getDmsMock()); + $this->assertTrue($attrdef->validate(',1,2')); + $this->assertFalse($attrdef->validate(',1,2,3')); // there is no group with id=3 + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_group, $attrdef->getValidationError()); + + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_user); + $attrdef->setDMS(self::getDmsMock()); + $this->assertTrue($attrdef->validate('1')); + $this->assertTrue($attrdef->validate('2')); + $this->assertFalse($attrdef->validate('3')); // there is no user with id=3 + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_user, $attrdef->getValidationError()); + + $attrdef = self::getAttributeDefinition(\SeedDMS_Core_AttributeDefinition::type_user, true); + $attrdef->setDMS(self::getDmsMock()); + $this->assertTrue($attrdef->validate(',1,2')); + $this->assertFalse($attrdef->validate(',1,2,3')); // there is no user with id=3 + $this->assertEquals(\SeedDMS_Core_AttributeDefinition::val_error_user, $attrdef->getValidationError()); + } + +} diff --git a/SeedDMS_Core/tests/AttributeTest.php b/SeedDMS_Core/tests/AttributeTest.php new file mode 100644 index 000000000..66d7dba84 --- /dev/null +++ b/SeedDMS_Core/tests/AttributeTest.php @@ -0,0 +1,155 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +use PHPUnit\Framework\TestCase; + +/** + * Attribute and attribute definition test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class AttributeTest extends TestCase +{ + + /** + * Create a mock dms object + * + * @return SeedDMS_Core_DMS + */ + protected function getMockDMS() : SeedDMS_Core_DMS + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->any()) + ->method('getResult') + ->with($this->stringContains("UPDATE ")) + ->willReturn(true); + $dms = new SeedDMS_Core_DMS($db, ''); + return $dms; + } + + /** + * Create a mock attribute definition object + * + * @param int $type type of attribute + * @param boolean $multiple true if multiple values are allowed + * @param int $minvalues minimum number of required values + * @param int $maxvalues maximum number of required value + * @param string $valueset list of allowed values separated by the first char + * @param string $regex regular expression the attribute value must match + * + * @return SeedDMS_Core_AttributeDefinition + */ + protected function getAttributeDefinition($type, $multiple=false, $minvalues=0, $maxvalues=0, $valueset='', $regex='') + { + $attrdef = new SeedDMS_Core_AttributeDefinition(1, 'foo attrdef', SeedDMS_Core_AttributeDefinition::objtype_folder, $type, $multiple, $minvalues, $maxvalues, $valueset, $regex); + return $attrdef; + } + + /** + * Create a mock attribute object + * + * @param SeedDMS_Core_AttributeDefinition $attrdef attribute defintion of attribute + * @param mixed $value value of attribute + * + * @return SeedDMS_Core_Attribute + */ + static protected function getAttribute($attrdef, $value) + { + $folder = new SeedDMS_Core_Folder(1, 'Folder', null, '', '', '', 0, 0, 0); + $attribute = new SeedDMS_Core_Attribute(1, $folder, $attrdef, $value); + $attribute->setDMS($attrdef->getDMS()); + return $attribute; + } + + /** + * Test getId() + * + * @return void + */ + public function testGetId() + { + $attrdef = self::getAttributeDefinition(SeedDMS_Core_AttributeDefinition::type_int); + $attribute = self::getAttribute($attrdef, ''); + $this->assertEquals(1, $attribute->getId()); + } + + /** + * Test getValue() + * + * @return void + */ + public function testGetValue() + { + $attrdef = self::getAttributeDefinition(SeedDMS_Core_AttributeDefinition::type_int); + $attribute = self::getAttribute($attrdef, 7); + $this->assertEquals(7, $attribute->getValue()); + } + + /** + * Test getValueAsArray() + * + * @return void + */ + public function testGetValueAsArray() + { + $attrdef = self::getAttributeDefinition(SeedDMS_Core_AttributeDefinition::type_int); + $attribute = self::getAttribute($attrdef, 7); + $this->assertIsArray($attribute->getValueAsArray()); + $this->assertCount(1, $attribute->getValueAsArray()); + $this->assertContains(7, $attribute->getValueAsArray()); + + /* Test a multi value integer */ + $attrdef = self::getAttributeDefinition(SeedDMS_Core_AttributeDefinition::type_int, true); + $attribute = self::getAttribute($attrdef, ',3,4,6'); + $value = $attribute->getValueAsArray(); + $this->assertIsArray($attribute->getValueAsArray()); + $this->assertCount(3, $attribute->getValueAsArray()); + $this->assertContains('6', $attribute->getValueAsArray()); + } + + /** + * Test setValue() + * + * @return void + */ + public function testSetValue() + { + $attrdef = self::getAttributeDefinition(SeedDMS_Core_AttributeDefinition::type_int); + $attrdef->setDMS(self::getMockDMS()); + $attribute = self::getAttribute($attrdef, 0); + $this->assertTrue($attribute->setValue(9)); + $this->assertEquals(9, $attribute->getValue()); + /* Setting an array of values for a none multi value attribute will just take the + * element of the array. + */ + $this->assertTrue($attribute->setValue([8,9])); + $this->assertEquals(8, $attribute->getValue()); + + $attrdef = self::getAttributeDefinition(SeedDMS_Core_AttributeDefinition::type_int, true); + $attrdef->setDMS(self::getMockDMS()); + $attribute = self::getAttribute($attrdef, ',3,4,6'); + $attribute->setValue([8,9,10]); + $this->assertEquals(',8,9,10', $attribute->getValue()); + $this->assertIsArray($attribute->getValueAsArray()); + $this->assertCount(3, $attribute->getValueAsArray()); + $this->assertContains('9', $attribute->getValueAsArray()); + } +} diff --git a/SeedDMS_Core/tests/DatabaseTest.php b/SeedDMS_Core/tests/DatabaseTest.php new file mode 100644 index 000000000..bfbc5ce42 --- /dev/null +++ b/SeedDMS_Core/tests/DatabaseTest.php @@ -0,0 +1,324 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +namespace PHPUnit\Framework; + +use PHPUnit\Framework\SeedDmsTest; + +require_once('SeedDmsBase.php'); + +/** + * Low level Database test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class DatabaseTest extends SeedDmsTest +{ + + /** + * Create a sqlite database in memory + * + * @return void + */ + protected function setUp(): void + { + self::$dbh = self::createInMemoryDatabase(); + } + + /** + * Clean up at tear down + * + * @return void + */ + protected function tearDown(): void + { + self::$dbh = null; + } + + /** + * Check if connection to database exists + * + * @return void + */ + public function testIsConnected() + { + $this->assertTrue(self::$dbh->ensureConnected()); + } + + /** + * Test for number of tables in database + * + * @return void + */ + public function testTableList() + { + $tablelist = self::$dbh->TableList(); + $this->assertIsArray($tablelist); + // There are just 42 tables in SeedDMS5 and 55 tables in SeedDMS6, + // but one additional + // table 'sqlite_sequence' + $dms = new \SeedDMS_Core_DMS(null, ''); + if($dms->version[0] == '5') + $this->assertCount(43, $tablelist); + else + $this->assertCount(56, $tablelist); + } + + /** + * Test createTemporaryTable() + * + * @return void + */ + public function testCreateTemporaryTable() + { + foreach (['ttreviewid', 'ttapproveid', 'ttstatid', 'ttcontentid'] as $temp) { + $ret = self::$dbh->createTemporaryTable($temp); + $rec = self::$dbh->getResultArray("SELECT * FROM `".$temp."`"); + $this->assertIsArray($rec); + } + /* Running it again will not harm */ + foreach (['ttreviewid', 'ttapproveid', 'ttstatid', 'ttcontentid'] as $temp) { + $ret = self::$dbh->createTemporaryTable($temp); + $rec = self::$dbh->getResultArray("SELECT * FROM `".$temp."`"); + $this->assertIsArray($rec); + } + /* Running it again and overwrite the old table contents */ + foreach (['ttreviewid', 'ttapproveid', 'ttstatid', 'ttcontentid'] as $temp) { + $ret = self::$dbh->createTemporaryTable($temp, true); + $rec = self::$dbh->getResultArray("SELECT * FROM `".$temp."`"); + $this->assertIsArray($rec); + } + } + + /** + * Test createTemporaryTable() based on views + * + * @return void + */ + public function testCreateTemporaryTableBasedOnViews() + { + self::$dbh->useViews(true); + foreach (['ttreviewid', 'ttapproveid', 'ttstatid', 'ttcontentid'] as $temp) { + $ret = self::$dbh->createTemporaryTable($temp); + $rec = self::$dbh->getResultArray("SELECT * FROM `".$temp."`"); + $this->assertIsArray($rec); + } + $viewlist = self::$dbh->ViewList(); + $this->assertIsArray($viewlist); + $this->assertCount(4, $viewlist); + + /* Running it again will not harm */ + foreach (['ttreviewid', 'ttapproveid', 'ttstatid', 'ttcontentid'] as $temp) { + $ret = self::$dbh->createTemporaryTable($temp); + $rec = self::$dbh->getResultArray("SELECT * FROM `".$temp."`"); + $this->assertIsArray($rec); + } + /* Running it again and replace the old view */ + foreach (['ttreviewid', 'ttapproveid', 'ttstatid', 'ttcontentid'] as $temp) { + $ret = self::$dbh->createTemporaryTable($temp, true); + $rec = self::$dbh->getResultArray("SELECT * FROM `".$temp."`"); + $this->assertIsArray($rec); + } + } + + /** + * Test for number of views in database + * + * @return void + */ + public function testViewList() + { + $viewlist = self::$dbh->ViewList(); + $this->assertIsArray($viewlist); + // There are 0 views + $this->assertCount(0, $viewlist); + } + + /** + * Test getDriver() + * + * @return void + */ + public function testGetDriver() + { + $driver = self::$dbh->getDriver(); + $this->assertEquals('sqlite', $driver); + } + + /** + * Test rbt() + * + * @return void + */ + public function testRbt() + { + $str = self::$dbh->rbt("SELECT * FROM `tblUsers`"); + $this->assertEquals('SELECT * FROM "tblUsers"', $str); + } + + /** + * Test if table tblFolders has root folder + * + * @return void + */ + public function testInitialRootFolder() + { + $this->assertTrue(self::$dbh->hasTable('tblFolders')); + $query = 'SELECT * FROM `tblFolders`'; + $recs = self::$dbh->getResultArray($query); + $this->assertIsArray($recs); + $this->assertCount(1, $recs); + } + + /** + * Test if table tblUsers has two initial users + * + * @return void + */ + public function testInitialUsers() + { + $this->assertTrue(self::$dbh->hasTable('tblUsers')); + $query = 'SELECT * FROM `tblUsers`'; + $recs = self::$dbh->getResultArray($query); + $this->assertIsArray($recs); + $this->assertCount(2, $recs); + } + + /** + * Test getCurrentDatetime() + * + * @return void + */ + public function testGetCurrentDatetime() + { + $query = 'SELECT '.self::$dbh->getCurrentDatetime().' as a'; + $recs = self::$dbh->getResultArray($query); + $now = date('Y-m-d H:i:s'); + $this->assertIsArray($recs); + $this->assertEquals($now, $recs[0]['a'], 'Make sure php.ini has the proper timezone configured'); + } + + /** + * Test getCurrentTimestamp() + * + * @return void + */ + public function testGetCurrentTimestamp() + { + $query = 'SELECT '.self::$dbh->getCurrentTimestamp().' as a'; + $recs = self::$dbh->getResultArray($query); + $now = time(); + $this->assertIsArray($recs); + $this->assertEquals($now, $recs[0]['a'], 'Make sure php.ini has the proper timezone configured'); + } + + /** + * Test concat() + * + * @return void + */ + public function testConcat() + { + $query = 'SELECT '.self::$dbh->concat(["'foo'", "'baz'", "'bar'"]).' as a'; + $recs = self::$dbh->getResultArray($query); + $this->assertIsArray($recs); + $this->assertEquals('foobazbar', $recs[0]['a']); + } + + /** + * Test qstr() + * + * @return void + */ + public function testQstr() + { + $str = self::$dbh->qstr("bar"); + $this->assertEquals("'bar'", $str); + } + + /** + * Test getResult() if the sql fails + * + * @return void + */ + public function testGetResultSqlFail() + { + $ret = self::$dbh->getResult("UPDATE FOO SET `name`='foo'"); + $this->assertFalse($ret); + $errmsg = self::$dbh->getErrorMsg(); + $this->assertStringContainsString('no such table: FOO', $errmsg); + } + + /** + * Test getResultArray() if the sql fails + * + * @return void + */ + public function testGetResultArraySqlFail() + { + $ret = self::$dbh->getResultArray("SELECT * FROM FOO"); + $this->assertFalse($ret); + $errmsg = self::$dbh->getErrorMsg(); + $this->assertStringContainsString('no such table: FOO', $errmsg); + } + + /** + * Test logging into file + * + * @return void + */ + public function testLogging() + { + $fp = fopen('php://memory', 'r+'); + self::$dbh->setLogFp($fp); + $sql = "SELECT * FROM `tblUsers`"; + $ret = self::$dbh->getResultArray($sql); + $this->assertIsArray($ret); + fseek($fp, 0); + $contents = fread($fp, 200); + /* Check if sql statement was logged into file */ + $this->assertStringContainsString($sql, $contents); + fclose($fp); + } + + /** + * Test createDump() + * + * @return void + */ + public function testCreateDump() + { + $fp = fopen('php://memory', 'r+'); + $ret = self::$dbh->createDump($fp); + $this->assertTrue($ret); + $stat = fstat($fp); + $this->assertIsArray($stat); + $dms = new \SeedDMS_Core_DMS(null, ''); + if($dms->version[0] == '5') + $this->assertEquals(1724, $stat['size']); + else + $this->assertEquals(2272, $stat['size']); +// fseek($fp, 0); +// echo fread($fp, 200); + fclose($fp); + } +} + diff --git a/SeedDMS_Core/tests/DmsTest.php b/SeedDMS_Core/tests/DmsTest.php new file mode 100644 index 000000000..a6811c5d6 --- /dev/null +++ b/SeedDMS_Core/tests/DmsTest.php @@ -0,0 +1,2956 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +use PHPUnit\Framework\SeedDmsTest; + +/** + * DMS test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class DmsTest extends SeedDmsTest +{ + + /** + * Create a real sqlite database in memory + * + * @return void + */ + protected function setUp(): void + { + self::$dbh = self::createInMemoryDatabase(); + self::$contentdir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpunit-'.time(); + mkdir(self::$contentdir); + // echo "Creating temp content dir: ".self::$contentdir."\n"; + self::$dms = new SeedDMS_Core_DMS(self::$dbh, self::$contentdir); + self::$dbversion = self::$dms->getDBVersion(); + } + + /** + * Clean up at tear down + * + * @return void + */ + protected function tearDown(): void + { + self::$dbh = null; + // echo "\nRemoving temp. content dir: ".self::$contentdir."\n"; + exec('rm -rf '.self::$contentdir); + } + + /** + * Create a mock admin role object (only used for SeedDMS 6) + * + * @return SeedDMS_Core_User + */ + protected function getAdminRole() + { + $role = new SeedDMS_Core_Role(1, 'admin', SeedDMS_Core_Role::role_admin); + return $role; + } + + /** + * Test checkIfEqual() + * + * @return void + */ + public function testCheckIfEqual() + { + $user1 = new SeedDMS_Core_User(1, 'user 1', '', '', '', '', '', '', 1); + $group1 = new SeedDMS_Core_Group(1, 'group 1', ''); + $group1n = new SeedDMS_Core_Group(1, 'group 1n', ''); + $group1c = clone $group1; + $group2 = new SeedDMS_Core_Group(2, 'group 1', ''); + $dms = new SeedDMS_Core_DMS(null, ''); + $this->assertFalse($dms->checkIfEqual($group1, $user1)); // different classes + $this->assertFalse($dms->checkIfEqual($group1, $group2)); // different id + $this->assertTrue($dms->checkIfEqual($group1, $group1c)); // a clone is always equal + $this->assertTrue($dms->checkIfEqual($group1, $group1n)); // different instances but same id is sufficient to be equal + } /* }}} */ + + /** + * Test checkDate() + * + * @return void + */ + public function testCheckDate() + { + $dms = new SeedDMS_Core_DMS(null, ''); + $this->assertTrue($dms->checkDate('2020-02-28 10:12:34')); + $this->assertTrue($dms->checkDate('2020-02-29 10:12:34')); // a leap year + $this->assertFalse($dms->checkDate('2020-02-30 10:12:34')); // feb has never 30 days + $this->assertFalse($dms->checkDate('2021-02-29 10:12:34')); // not a leap year + $this->assertFalse($dms->checkDate('2020-02-28 24:12:34')); // hour is out of range + $this->assertFalse($dms->checkDate('2020-02-28 23:60:34')); // minute is out of range + $this->assertFalse($dms->checkDate('2020-02-28 23:59:60')); // second is out of range + $this->assertFalse($dms->checkDate('2020-02-28 23:59:')); // second is missing + $this->assertTrue($dms->checkDate('2020-02-28', 'Y-m-d')); // just checking the date + $this->assertFalse($dms->checkDate('28.2.2020', 'd.m.Y')); // month must be 01-12 + $this->assertTrue($dms->checkDate('28.2.2020', 'd.n.Y')); // month must be 1-12 + $this->assertFalse($dms->checkDate('28.02.2020', 'd.n.Y')); // month must be 1-12 + } /* }}} */ + + /** + * Test getClassname() + * + * @return void + */ + public function testGetClassName() + { + /* Do not mess up the global instance self::$dms, but create my own */ + $dms = new SeedDMS_Core_DMS(null, ''); + $this->assertEquals('SeedDMS_Core_Folder', $dms->getClassname('folder')); + $this->assertEquals('SeedDMS_Core_Document', $dms->getClassname('document')); + $this->assertEquals('SeedDMS_Core_DocumentContent', $dms->getClassname('documentcontent')); + $this->assertEquals('SeedDMS_Core_User', $dms->getClassname('user')); + $this->assertEquals('SeedDMS_Core_Group', $dms->getClassname('group')); + $this->assertFalse($dms->getClassname('foo')); + } + + /** + * Test setClassname() + * + * @return void + */ + public function testSetClassName() + { + /* Do not mess up the global instance self::$dms, but create my own */ + $dms = new SeedDMS_Core_DMS(null, ''); + $this->assertEquals('SeedDMS_Core_Folder', $dms->setClassname('folder', 'MyNewFolderClass')); + $this->assertEquals('MyNewFolderClass', $dms->getClassname('folder')); + $this->assertEquals('MyNewFolderClass', $dms->setClassname('folder', 'MySuperNewFolderClass')); + $this->assertFalse($dms->setClassname('foo', 'MyNewFolderClass')); + } + + /** + * Test addCallback() + * + * @return void + */ + public function testAddCallback() + { + /* Do not mess up the global instance self::$dms, but create my own */ + $dms = new SeedDMS_Core_DMS(null, ''); + /* Add a closure as a callback is just fine */ + $this->assertTrue( + $dms->addCallback( + 'onPostSomething', function () { + } + ) + ); + /* An empty callback will make addCallback() fail */ + $this->assertFalse( + $dms->addCallback( + '', function () { + } + ) + ); + /* Passing a class method is ok */ + $this->assertTrue($dms->addCallback('onPostSomething', 'DmsTest::testAddCallback')); + /* Passing a none existing class mehtod makes addCallback() fail */ + $this->assertFalse($dms->addCallback('onPostSomething', 'DmsTest::thisMethodDoesNotExist')); + } + + /** + * Test for hasCallback + * + * @return void + */ + public function testHasCallback() + { + /* Do not mess up the global instance self::$dms, but create my own */ + $dms = new SeedDMS_Core_DMS(null, ''); + /* Add a closure as a callback is just fine */ + $this->assertTrue( + $dms->addCallback( + 'onPostSomething', function () { + } + ) + ); + $this->assertTrue($dms->hasCallback('onPostSomething')); + $this->assertFalse($dms->hasCallback('thisOneDoesNotExist')); + } + + /** + * Test for getDecorators + * + * @return void + */ + public function testGetDecorators() + { + /* Do not mess up the global instance self::$dms, but create my own */ + $dms = new SeedDMS_Core_DMS(null, ''); + $this->assertFalse($dms->getDecorators('folder')); + } + + /** + * Test for addDecorator + * + * @return void + */ + public function testaddDecorator() + { + /* Do not mess up the global instance self::$dms, but create my own */ + $dms = new SeedDMS_Core_DMS(null, ''); + $this->assertTrue($dms->addDecorator('folder', 'MyNewDecorator')); + $decorators = $dms->getDecorators('folder'); + $this->assertIsArray($decorators); + $this->assertCount(1, $decorators); + } + + /** + * Test getDb() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDb() + { + $this->assertEquals(self::$dbh, self::$dms->getDb()); + } + + /** + * Test getDBVersion() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDbVersion() + { + $version = self::$dms->getDBVersion(); + $this->assertCount(4, $version); + $this->assertGreaterThanOrEqual(5, $version['major']); + $this->assertGreaterThanOrEqual(0, $version['minor']); + } + + /** + * Test getDBVersionFailMissingTable() + * + * This method checks if getDBVersion() returns false if the table + * list of the database does not contain the table 'tblVersion' + * + * @return void + */ + public function testGetDbVersionFailMissingTable() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('TableList') + ->willReturn(['tblFolders', 'tblDocuments']); + $dms = new SeedDMS_Core_DMS($db, ''); + $version = $dms->getDBVersion(); + $this->assertFalse($version); + } + + /** + * Test getDBVersionSqlFail() + * + * This method checks if getDBVersion() returns false if the sql + * for selecting the records in table 'tblVersion' fail + * + * @return void + */ + public function testGetDbVersionSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with("SELECT * FROM `tblVersion` ORDER BY `major`,`minor`,`subminor` LIMIT 1") + ->willReturn(false); + $db->expects($this->once()) + ->method('TableList') + ->willReturn(['tblVersion', 'tblFolders', 'tblDocuments']); + $dms = new SeedDMS_Core_DMS($db, ''); + $version = $dms->getDBVersion(); + $this->assertFalse($version); + } + + /** + * Test getDBVersionNoRecord() + * + * This method checks if getDBVersion() returns false a table 'tblVersion' + * exists but has no record + * + * @return void + */ + public function testGetDbVersionNoRecord() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with("SELECT * FROM `tblVersion` ORDER BY `major`,`minor`,`subminor` LIMIT 1") + ->willReturn(array()); + $db->expects($this->once()) + ->method('TableList') + ->willReturn(['tblVersion', 'tblFolders', 'tblDocuments']); + $dms = new SeedDMS_Core_DMS($db, ''); + $version = $dms->getDBVersion(); + $this->assertFalse($version); + } + + /** + * Test checkVersion() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testCheckVersion() + { + $this->assertTrue(self::$dms->checkVersion()); + } + + /** + * Test checkVersionFail() + * + * This method checks if checkVersion() returns false if the version + * in table 'tblVersion' does not match the version in the class variable + * $version. To make this method independant of version changes, the + * current version is taken from SeedDMS_Core_DMS::version and modified + * in order to differ from the version stored in the database. + * + * @return void + */ + public function testcheckVersionFail() + { + $verstr = (new SeedDMS_Core_DMS(null, ''))->version; + $verarr = explode('.', $verstr); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with("SELECT * FROM `tblVersion` ORDER BY `major`,`minor`,`subminor` LIMIT 1") + ->willReturn([['major'=>$verarr[0], 'minor'=>$verarr[1]+1]]); + $db->expects($this->once()) + ->method('TableList') + ->willReturn(['tblVersion', 'tblFolders', 'tblDocuments']); + $dms = new SeedDMS_Core_DMS($db, ''); + $version = $dms->checkVersion(); + $this->assertFalse($version); + } + + /** + * Test checkVersionSqlFail() + * + * This method checks if checkVersion() returns false if the sql + * for selecting the records in table 'tblVersion' fail + * + * @return void + */ + public function testcheckVersionSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with("SELECT * FROM `tblVersion` ORDER BY `major`,`minor`,`subminor` LIMIT 1") + ->willReturn(false); + $db->expects($this->once()) + ->method('TableList') + ->willReturn(['tblVersion', 'tblFolders', 'tblDocuments']); + $dms = new SeedDMS_Core_DMS($db, ''); + $version = $dms->checkVersion(); + $this->assertFalse($version); + } + + /** + * Test checkVersionFailMissingTable() + * + * This method checks if checkVersion() returns false if the table + * list of the database does not contain the table 'tblVersion' + * + * @return void + */ + public function testCheckVersionFailMissingTable() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('TableList') + ->willReturn(['tblFolders', 'tblDocuments']); + $dms = new SeedDMS_Core_DMS($db, ''); + $version = $dms->checkVersion(); + $this->assertTrue($version); // A missing table tblVersion returns true! + } + + /** + * Test checkVersionNoRecord() + * + * This method checks if checkVersion() returns false a table 'tblVersion' + * exists but has no record + * + * @return void + */ + public function testCheckVersionNoRecord() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with("SELECT * FROM `tblVersion` ORDER BY `major`,`minor`,`subminor` LIMIT 1") + ->willReturn(array()); + $db->expects($this->once()) + ->method('TableList') + ->willReturn(['tblVersion', 'tblFolders', 'tblDocuments']); + $dms = new SeedDMS_Core_DMS($db, ''); + $version = $dms->checkVersion(); + $this->assertFalse($version); + } + + /** + * Test setRootFolderID() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSetRootFolderID() + { + /* Setting the same root folder is ok */ + $oldid = self::$dms->setRootFolderID(1); + $this->assertEquals(1, $oldid); + /* Setting a none existing root folder id will not change the root folder */ + $oldid = self::$dms->setRootFolderID(2); + $this->assertFalse($oldid); + /* Make sure the old root folder is still set */ + $rootfolder = self::$dms->getRootFolder(); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $rootfolder); + $this->assertEquals(1, $rootfolder->getId()); + } + + /** + * Test getRootFolder() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetRootFolder() + { + $rootfolder = self::$dms->getRootFolder(); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $rootfolder); + $this->assertEquals(1, $rootfolder->getId()); + } + + /** + * Test setUser() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSetUser() + { + $user = self::$dms->getUser(1); + $olduser = self::$dms->setUser($user); // returns null because there is no old user + $this->assertNull($olduser); + $olduser = self::$dms->setUser($user); // second call will return the user set before + $this->assertIsObject($olduser); + $olduser = self::$dms->setUser(null); // old user is still an object + $this->assertIsObject($olduser); + $olduser = self::$dms->setUser(8); // invalid user + $this->assertFalse($olduser); + } + + /** + * Test getLoggedInUser() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetLoggedInUser() + { + $olduser = self::$dms->getLoggedInUser(); // initially this is set to null + $this->assertNull($olduser); + $user = self::$dms->getUser(1); + self::$dms->setUser($user); + $olduser = self::$dms->getLoggedInUser(); + $this->assertEquals($olduser->getId(), $user->getId()); + } + + /** + * Test getDocument() + * + * As there is currently no document, getDocument() must return null. + * If false was returned it would indicated an sql error. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocument() + { + $document = self::$dms->getDocument(1); + $this->assertNull($document); + } + + /** + * Test getDocumentsByUser() + * + * As there is currently no document, getDocumentsByUser() must return + * an empty array. + * If false was returned it would indicated an sql error. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentsByUser() + { + $documents = self::$dms->getDocumentsByUser(self::$dms->getUser(1)); + $this->assertIsArray($documents); + $this->assertCount(0, $documents); + } + + /** + * Test getDocumentsLockedByUser() + * + * As there is currently no document, getDocumentsLockedByUser() must return + * an empty array. + * If false was returned it would indicated an sql error. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentsLockedByUser() + { + $documents = self::$dms->getDocumentsLockedByUser(self::$dms->getUser(1)); + $this->assertIsArray($documents); + $this->assertCount(0, $documents); + } + + /** + * Test makeTimeStamp() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testMakeTimeStamp() + { + /* Assert correct date */ + $this->assertEquals(0, self::$dms->makeTimeStamp(1, 0, 0, 1970, 1, 1)); + $this->assertEquals(68166000, self::$dms->makeTimeStamp(0, 0, 0, 1972, 2, 29)); + /* Assert incorrect dates */ + $this->assertFalse(self::$dms->makeTimeStamp(0, 0, 0, 1970, 13, 1), 'Incorrect month not recognized'); + $this->assertFalse(self::$dms->makeTimeStamp(0, 0, 0, 1970, 1, 32), 'Incorrect day in january not recognized'); + $this->assertFalse(self::$dms->makeTimeStamp(0, 0, 0, 1970, 4, 31), 'Incorrect day in april not recognized'); + $this->assertFalse(self::$dms->makeTimeStamp(0, 0, 0, 1970, 2, 29), 'Incorrect day in february not recognized'); + $this->assertFalse(self::$dms->makeTimeStamp(24, 0, 0, 1970, 1, 1), 'Incorrect hour not recognized'); + $this->assertFalse(self::$dms->makeTimeStamp(0, 60, 0, 1970, 1, 1), 'Incorrect minute not recognized'); + $this->assertFalse(self::$dms->makeTimeStamp(0, 0, 60, 1970, 1, 1), 'Incorrect second not recognized'); + } + + /** + * Test search() + * + * Just search the root folder in different ways. Because the initial database + * does not have any documents, this method will test various ways to + * find the root folder 'DMS' with id=1 + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSearchRootFolder() + { + /* searching for folders/documents in any field */ + $result = self::$dms->search( + array( + 'query'=>'DMS' + ) + ); + $this->assertEquals(1, $result['totalFolders']); + $this->assertCount(1, $result['folders']); + $this->assertEquals(0, $result['totalDocs']); + $this->assertCount(0, $result['docs']); + + /* searching for folders in any field */ + $result = self::$dms->search( + array( + 'query'=>'DMS', + 'mode'=>0x2 + ) + ); + $this->assertEquals(1, $result['totalFolders']); + $this->assertCount(1, $result['folders']); + $this->assertEquals(0, $result['totalDocs']); + $this->assertCount(0, $result['docs']); + + /* searching for documents in any field will not return any folders*/ + $result = self::$dms->search( + array( + 'query'=>'DMS', + 'mode'=>0x1 + ) + ); + $this->assertEquals(0, $result['totalFolders']); + $this->assertCount(0, $result['folders']); + $this->assertEquals(0, $result['totalDocs']); + $this->assertCount(0, $result['docs']); + + /* searching for folders with a bogus name may not return any folders */ + $result = self::$dms->search( + array( + 'query'=>'foo', + 'mode'=>0x2 + ) + ); + $this->assertEquals(0, $result['totalFolders']); + $this->assertCount(0, $result['folders']); + + /* searching for folders by its id */ + $result = self::$dms->search( + array( + 'query'=>'1', + 'mode'=>0x2 + ) + ); + $this->assertEquals(1, $result['totalFolders']); + $this->assertCount(1, $result['folders']); + + /* searching for folders by an unknown id */ + $result = self::$dms->search( + array( + 'query'=>'2', + 'mode'=>0x2 + ) + ); + $this->assertEquals(0, $result['totalFolders']); + $this->assertCount(0, $result['folders']); + + /* searching for folders with two terms ANDed, but only one matches */ + $result = self::$dms->search( + array( + 'query'=>'DMS foo', + 'mode'=>0x2, + 'logicalmode'=>'AND', + ) + ); + $this->assertEquals(0, $result['totalFolders']); + $this->assertCount(0, $result['folders']); + + /* searching for folders with two terms ORed, but only one matches */ + $result = self::$dms->search( + array( + 'query'=>'DMS foo', + 'mode'=>0x2, + 'logicalmode'=>'OR', + ) + ); + $this->assertEquals(1, $result['totalFolders']); + $this->assertCount(1, $result['folders']); + + /* searching for folders with two terms ANDed, both match, but in different fields (name and id) */ + $result = self::$dms->search( + array( + 'query'=>'DMS 1', + 'mode'=>0x2, + 'logicalmode'=>'AND', + ) + ); + $this->assertEquals(1, $result['totalFolders']); + $this->assertCount(1, $result['folders']); + + /* searching for folders with two terms ANDed, both match, but in different fields (name and id). But only one field is searched. */ + $result = self::$dms->search( + array( + 'query'=>'DMS 1', + 'mode'=>0x2, + 'logicalmode'=>'AND', + 'searchin'=>array(2,3), // name, comment + ) + ); + $this->assertEquals(0, $result['totalFolders']); + $this->assertCount(0, $result['folders']); + + /* searching for folders below a start folder will not find the folder 'DMS' + * anymore, because the start folder itself will not be found. + */ + $result = self::$dms->search( + array( + 'query'=>'DMS', + 'mode'=>0x2, + 'startFolder'=>self::$dms->getRootFolder() + ) + ); + $this->assertEquals(0, $result['totalFolders']); + $this->assertCount(0, $result['folders']); + + /* Restrict search to the owner of the folder 'DMS' + */ + $result = self::$dms->search( + array( + 'query'=>'DMS', + 'mode'=>0x2, + 'owner'=>self::$dms->getUser(1) + ) + ); + $this->assertEquals(1, $result['totalFolders']); + $this->assertCount(1, $result['folders']); + + /* Restrict search to user who does not own a document + */ + $result = self::$dms->search( + array( + 'query'=>'DMS', + 'mode'=>0x2, + 'owner'=>self::$dms->getUser(2) + ) + ); + $this->assertEquals(0, $result['totalFolders']); + $this->assertCount(0, $result['folders']); + + /* Restrict search to a list of owners (in this case all users) + */ + $result = self::$dms->search( + array( + 'query'=>'DMS', + 'mode'=>0x2, + 'owner'=>self::$dms->getAllUsers() + ) + ); + $this->assertEquals(1, $result['totalFolders']); + $this->assertCount(1, $result['folders']); + + } + + /** + * Test getFolder() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetFolder() + { + $folder = self::$dms->getFolder(1); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $folder); + $this->assertEquals(1, $folder->getId()); + } + + /** + * Test getFolderByName() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetFolderByName() + { + $folder = self::$dms->getFolderByName('DMS'); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $folder); + $this->assertEquals(1, $folder->getId()); + $folder = self::$dms->getFolderByName('FOO'); + $this->assertNull($folder); + } + + /** + * Test checkFolders() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testCheckFolders() + { + $errors = self::$dms->checkFolders(); + $this->assertIsArray($errors); + $this->assertCount(0, $errors); + } + + /** + * Test checkFoldersSqlFail() + * + * This test catches the case when the sql statement for getting all + * folders fails. + * + * @return void + */ + public function testCheckFoldersSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with("SELECT * FROM `tblFolders`") + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $this->assertFalse($dms->checkFolders()); + } + + /** + * Test checkFoldersFailNoParent() + * + * This test catches the case when a folder's parent is not present + * + * @return void + */ + public function testCheckFoldersFailNoParent() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with("SELECT * FROM `tblFolders`") + ->willReturn( + array( + array('id'=>1, 'name'=>'DMS', 'parent'=>0, 'folderList'=>''), + array('id'=>5, 'name'=>'Subfolder', 'parent'=>3, 'folderList'=>':1:'), + ) + ); + $dms = new SeedDMS_Core_DMS($db, ''); + $errors = $dms->checkFolders(); + $this->assertIsArray($errors); + $this->assertCount(1, $errors); // there should be 1 error + $this->assertArrayHasKey(5, $errors); // folder with id=5 has the wrong parent + $this->assertEquals('Missing parent', $errors[5]['msg']); + } + + /** + * Test checkFoldersFailWrongFolderList() + * + * This test catches the case when a folder's parent is not present + * + * @return void + */ + public function testCheckFoldersFailWrongFolderList() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with("SELECT * FROM `tblFolders`") + ->willReturn( + array( + array('id'=>1, 'name'=>'DMS', 'parent'=>0, 'folderList'=>''), + array('id'=>5, 'name'=>'Subfolder', 'parent'=>1, 'folderList'=>':1:2:'), + ) + ); + $dms = new SeedDMS_Core_DMS($db, ''); + $errors = $dms->checkFolders(); + $this->assertIsArray($errors); + $this->assertCount(1, $errors); // there should be 1 error + $this->assertArrayHasKey(5, $errors); // folder with id=5 has the wrong parent + $this->assertStringContainsString('Wrong folder list', $errors[5]['msg']); + } + + /** + /** + * Test checkDocuments() + * + * The intitial database does not have any documents which makes this + * test less usefull. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testCheckDocuments() + { + $errors = self::$dms->checkDocuments(); + $this->assertIsArray($errors); + $this->assertCount(0, $errors); + } + + /** + * Test checkDocumentsSqlFoldersFail() + * + * This test catches the case when the sql statement for getting all + * folders fails. + * + * @return void + */ + public function testCheckDocumentsSqlFoldersFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with("SELECT * FROM `tblFolders`") + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $this->assertFalse($dms->checkDocuments()); + } + + /** + * Test checkDocumentsSqlDocumentsFail() + * + * This test catches the case when the sql statement for getting all + * documents fails, after getting all folders succeeded. + * + * @return void + */ + public function testCheckDocumentsSqlDocumentsFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->exactly(2)) + ->method('getResultArray') + ->will( + $this->returnValueMap( + array( + array("SELECT * FROM `tblFolders`", true, array( + array('id'=>1, 'name'=>'DMS', 'parent'=>0, 'folderList'=>'') + )), + array("SELECT * FROM `tblDocuments`", true, false) + ) + ) + ); + $dms = new SeedDMS_Core_DMS($db, ''); + $this->assertFalse($dms->checkDocuments()); + } + + /** + * Test checkDocumentsFailNoParent() + * + * This test catches the case when a documents's parent is not present + * + * @return void + */ + public function testCheckDocumentsFailNoParent() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->exactly(2)) + ->method('getResultArray') + ->will( + $this->returnValueMap( + array( + array("SELECT * FROM `tblFolders`", true, array( + array('id'=>1, 'name'=>'DMS', 'parent'=>0, 'folderList'=>''), + array('id'=>5, 'name'=>'Subfolder', 'parent'=>1, 'folderList'=>':1:'), + )), + array("SELECT * FROM `tblDocuments`", true, array( + array('id'=>1, 'name'=>'Document 1', 'folder'=>1, 'folderList'=>':1:'), + array('id'=>2, 'name'=>'Document 2', 'folder'=>2, 'folderList'=>':1:5:'), + )) + ) + ) + ); + $dms = new SeedDMS_Core_DMS($db, ''); + $errors = $dms->checkDocuments(); + $this->assertIsArray($errors); + $this->assertCount(1, $errors); // there should be 1 error + $this->assertArrayHasKey(2, $errors); // document with id=2 has the wrong parent + $this->assertEquals('Missing parent', $errors[2]['msg']); + } + + /** + * Test checkDocumentsFailWrongFolderList() + * + * This test catches the case when a documents's parent is not present + * + * @return void + */ + public function testCheckDocumentsFailWrongFolderList() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->exactly(2)) + ->method('getResultArray') + ->will( + $this->returnValueMap( + array( + array("SELECT * FROM `tblFolders`", true, array( + array('id'=>1, 'name'=>'DMS', 'parent'=>0, 'folderList'=>''), + array('id'=>5, 'name'=>'Subfolder', 'parent'=>1, 'folderList'=>':1:'), + )), + array("SELECT * FROM `tblDocuments`", true, array( + array('id'=>1, 'name'=>'Document 1', 'folder'=>1, 'folderList'=>':1:'), + array('id'=>2, 'name'=>'Document 2', 'folder'=>5, 'folderList'=>':1:2:'), + )) + ) + ) + ); + $dms = new SeedDMS_Core_DMS($db, ''); + $errors = $dms->checkDocuments(); + $this->assertIsArray($errors); + $this->assertCount(1, $errors); // there should be 1 error + $this->assertArrayHasKey(2, $errors); // document with id=2 has the wrong parent + $this->assertStringContainsString('Wrong folder list', $errors[2]['msg']); + } + + /** + * Test getUser() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetUser() + { + $user = self::$dms->getUser(1); + $this->assertInstanceOf(SeedDMS_Core_User::class, $user); + $this->assertEquals(1, $user->getId()); + } + + /** + * Test getUserByLogin() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetUserByLogin() + { + $user = self::$dms->getUserByLogin('admin'); + $this->assertInstanceOf(SeedDMS_Core_User::class, $user); + $this->assertEquals('admin', $user->getLogin()); + } + + /** + * Test getUserByEmail() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetUserByEmail() + { + $user = self::$dms->getUserByEmail('info@seeddms.org'); + $this->assertInstanceOf(SeedDMS_Core_User::class, $user); + $this->assertEquals('admin', $user->getLogin()); + } + + /** + * Test getAllUsers() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAllUsers() + { + $users = self::$dms->getAllUsers(); + $this->assertIsArray($users); + $this->assertCount(2, $users); + } + + /** + * Test addUser() + * + * Add a new user and retrieve it afterwards. Also check if the number + * of users has increased by one. Add a user with the same name a + * second time and check if it returns false. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddUser() + { + /* Adding a new user */ + $user = self::$dms->addUser('new user', 'pwd', 'Full Name', 'newuser@seeddms.org', 'en_GB', 'bootstrap', 'with comment'); + $this->assertIsObject($user); + $this->assertEquals('new user', $user->getLogin()); + $this->assertEquals('with comment', $user->getComment()); + + /* Adding a user with the same login must fail */ + $user = self::$dms->addUser('new user', 'pwd', 'Full Name', 'newuser@seeddms.org', 'en_GB', 'bootstrap', 'with comment'); + $this->assertFalse($user); + + /* There should be 3 users now */ + $users = self::$dms->getAllUsers(); + $this->assertIsArray($users); + $this->assertCount(3, $users); + + /* Check if setting the password expiration to 'now' works */ + $now = date('Y-m-d H:i:s'); + $user = self::$dms->addUser('new user pwdexpiration 1', 'pwd', 'Full Name', 'newuser@seeddms.org', 'en_GB', 'bootstrap', 'with comment', '', false, false, 'now'); + $this->assertEquals($now, $user->getPwdExpiration()); + $now = date('Y-m-d H:i:s'); + $user = self::$dms->addUser('new user pwdexpiration 2', 'pwd', 'Full Name', 'newuser@seeddms.org', 'en_GB', 'bootstrap', 'with comment', '', false, false, $now); + $this->assertEquals($now, $user->getPwdExpiration()); + } + + /** + * Test addUserWithPostAddHook() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddUserWithPostAddHook() + { + /* Add the 'onPostAddUser' callback */ + $ret = 0; + $callback = function ($param, $user) use (&$ret) { + $ret = 1; + }; + self::$dms->addCallback('onPostAddUser', $callback, 1); + /* Adding a new user */ + $user = self::$dms->addUser('new user', 'pwd', 'Full Name', 'newuser@seeddms.org', 'en_GB', 'bootstrap', 'with comment'); + $this->assertIsObject($user); + $this->assertEquals('new user', $user->getLogin()); + $this->assertEquals(1, $ret); + } + + /** + * Test addUser() with sql failure + * + * @return void + */ + public function testAddUserSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("INSERT INTO `tblUsers`")) + ->willReturn(false); + $db->expects($this->once()) + ->method('getResultArray') + ->with("SELECT * FROM `tblUsers` WHERE `login` = ") + ->willReturn([]); + $dms = new SeedDMS_Core_DMS($db, ''); + if(self::$dbversion['major'] < 6) + $role = 1; + else + $role = $this->getAdminRole(); + $user = $dms->addUser('new user', 'pwd', 'Full Name', 'newuser@seeddms.org', 'en_GB', 'bootstrap', 'with comment', $role); + $this->assertFalse($user); + } + + /** + * Test getGroup() + * + * Get a group by its id + * + * @return void + */ + public function testGetGroup() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with("SELECT * FROM `tblGroups` WHERE `id` = 1") + ->willReturn([['id'=>1, 'name'=>'foo', 'comment'=>'']]); + $dms = new SeedDMS_Core_DMS($db, ''); + $group = $dms->getGroup(1); + $this->assertIsObject($group); + $this->assertEquals(1, $group->getId()); + } + + /** + * Test getGroupByName() + * + * Get a group by its name + * + * qstr must be mocked because it is used in the sql statement to quote + * the name. + * + * @return void + */ + public function testGetGroupByName() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with("SELECT * FROM `tblGroups` WHERE `name` = 'foo'") + ->willReturn([['id'=>1, 'name'=>'foo', 'comment'=>'']]); + $db->expects($this->once()) + ->method('qstr') + ->will( + $this->returnCallback( + function ($a) { + return "'".$a."'"; + } + ) + ); + $dms = new SeedDMS_Core_DMS($db, ''); + $group = $dms->getGroupByName('foo'); + $this->assertIsObject($group); + $this->assertEquals('foo', $group->getName()); + } + + /** + * Test getAllGroups() + * + * The intitial database does not have any groups + * + * @return void + */ + public function testGetAllGroups() + { + $groups = self::$dms->getAllGroups(); + $this->assertIsArray($groups); + $this->assertCount(0, $groups); + } + + /** + * Test addGroup() + * + * Add a new group and retrieve it afterwards. Also check if the number + * of groups has increased by one. Add a group with the same name a + * second time and check if it returns false. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddGroup() + { + /* Adding a new group */ + $group = self::$dms->addGroup('new group', 'with comment'); + $this->assertIsObject($group); + $this->assertEquals('new group', $group->getName()); + /* Adding a group with the same name must fail */ + $group = self::$dms->addGroup('new group', 'with comment'); + $this->assertFalse($group); + /* There should be one group now */ + $groups = self::$dms->getAllGroups(); + $this->assertIsArray($groups); + $this->assertCount(1, $groups); + } + + /** + * Test addGroupWithPostAddHook() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddGroupWithPostAddHook() + { + /* Add the 'onPostAddGroup' callback */ + $ret = 0; + $callback = function ($param, $group) use (&$ret) { + $ret = 1; + }; + self::$dms->addCallback('onPostAddGroup', $callback, 1); + /* Adding a new group */ + $group = self::$dms->addGroup('new group', 'with comment'); + $this->assertIsObject($group); + $this->assertEquals('new group', $group->getName()); + $this->assertEquals(1, $ret); + } + + /** + * Test addGroup() with sql failure + * + * @return void + */ + public function testAddGroupSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("INSERT INTO `tblGroups`")) + ->willReturn(false); + $db->expects($this->once()) + ->method('getResultArray') + ->with("SELECT * FROM `tblGroups` WHERE `name` = ") + ->willReturn([]); + $dms = new SeedDMS_Core_DMS($db, ''); + $group = $dms->addGroup('new group', 'with comment'); + $this->assertFalse($group); + } + + /** + * Test getAllKeywordCategories() + * + * The intitial database does not have any keyword categories + * + * @return void + */ + public function testGetAllKeywordCategories() + { + $cats = self::$dms->getAllKeywordCategories(); + $this->assertIsArray($cats); + $this->assertCount(0, $cats); + /* Even passing bogus ids is handled propperly */ + $cats = self::$dms->getAllKeywordCategories(['kk', '0', 3, true]); + $this->assertIsArray($cats); + $this->assertCount(0, $cats); + } + + /** + * Test getAllUserKeywordCategories() + * + * Method getAllUserKeywordCategories() actually uses + * getAllKeywordCategories() + * + * The intitial database does not have any keyword categories + * + * @return void + */ + public function testGetAllUserKeywordCategories() + { + $cats = self::$dms->getAllUserKeywordCategories(1); + $this->assertIsArray($cats); + $this->assertCount(0, $cats); + /* Passing a none existing user id will return an empty array */ + $cats = self::$dms->getAllUserKeywordCategories(3); + $this->assertIsArray($cats); + $this->assertCount(0, $cats); + /* Passing an invalid user id will return false */ + $cats = self::$dms->getAllUserKeywordCategories(0); + $this->assertFalse($cats); + } + + /** + * Test getAllKeywordCategories() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAllKeywordCategoriesSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblKeywordCategories`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $cats = $dms->getAllKeywordCategories(); + $this->assertFalse($cats); + } + + /** + * Test addKeywordCategory() + * + * Add a new keyword category and retrieve it afterwards. Also check if the + * number of keyword categories has increased by one. Add a keyword category + * with the same name a second time and check if it returns false. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddKeywordCategory() + { + /* Adding a new keyword category */ + $cat = self::$dms->addKeywordCategory(1, 'new category'); + $this->assertIsObject($cat); + $this->assertEquals('new category', $cat->getName()); + + /* Adding a keyword category for the same user and with the same name must fail */ + $cat = self::$dms->addKeywordCategory(1, 'new category'); + $this->assertFalse($cat); + + /* Adding a keyword category with a non existing user id must fail */ + $cat = self::$dms->addKeywordCategory(0, 'new category'); + $this->assertFalse($cat); + + /* Adding a keyword category with an empty name must fail */ + $cat = self::$dms->addKeywordCategory(1, ' '); + $this->assertFalse($cat); + + /* Adding a keyword category with a non existing user id must fail */ + // $cat = self::$dms->addKeywordCategory(3, 'new category'); + // $this->assertFalse($cat); + + /* There should be 1 keyword category now */ + $cats = self::$dms->getAllKeywordCategories(); + $this->assertIsArray($cats); + $this->assertCount(1, $cats); + } + + /** + * Test addKeywordCategoryWithPostAddHook() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddKeywordCategoryWithPostAddHook() + { + /* Add the 'onPostAddKeywordCategory' callback */ + $ret = 0; + $callback = function ($param, $cat) use (&$ret) { + $ret = 1; + }; + self::$dms->addCallback('onPostAddKeywordCategory', $callback, 1); + /* Adding a new keyword category */ + $cat = self::$dms->addKeywordCategory(1, 'new category'); + $this->assertIsObject($cat); + $this->assertEquals('new category', $cat->getName()); + $this->assertEquals(1, $ret); + } + + /** + * Test addKeywordCategory() with sql failure + * + * @return void + */ + public function testAddKeywordCategorySqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("INSERT INTO `tblKeywordCategories`")) + ->willReturn(false); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblKeywordCategories` WHERE `name` =")) + ->willReturn([]); + $dms = new SeedDMS_Core_DMS($db, ''); + $cat = $dms->addKeywordCategory(1, 'new category'); + $this->assertFalse($cat); + } + + /** + * Test getKeywordCategory() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetKeywordCategory() + { + $cat = self::$dms->addKeywordCategory(1, 'new category'); + $cat = self::$dms->getKeywordCategory(1); + $this->assertInstanceOf(SeedDMS_Core_Keywordcategory::class, $cat); + $this->assertEquals(1, $cat->getId()); + /* Return false if the id is invalid */ + $cat = self::$dms->getKeywordCategory(0); + $this->assertFalse($cat); + /* Return null if the keyword category with the id does not exist */ + $cat = self::$dms->getKeywordCategory(2); + $this->assertNull($cat); + } + + /** + * Test getKeywordCategory() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetKeywordCategorySqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with("SELECT * FROM `tblKeywordCategories` WHERE `id` = 1") + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $cat = $dms->getKeywordCategory(1); + $this->assertFalse($cat); + } + + /** + * Test getKeywordCategoryByName() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetKeywordCategoryByName() + { + $cat = self::$dms->addKeywordCategory(1, 'new category'); + $cat = self::$dms->getKeywordCategory(1); + $this->assertInstanceOf(SeedDMS_Core_Keywordcategory::class, $cat); + $this->assertEquals(1, $cat->getId()); + /* Return false if the user id is invalid */ + $cat = self::$dms->getKeywordCategoryByName('new category', 0); + $this->assertFalse($cat); + /* Return null if the keyword category with the passed name does not exist */ + $cat = self::$dms->getKeywordCategoryByName('foo', 1); + $this->assertNull($cat); + /* Return category if the keyword category with the passed name exists */ + $cat = self::$dms->getKeywordCategoryByName('new category', 1); + $this->assertIsObject($cat); + $this->assertInstanceOf(SeedDMS_Core_Keywordcategory::class, $cat); + } + + /** + * Test getKeywordCategoryByName() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetKeywordCategoryByNameSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblKeywordCategories` WHERE `name` =")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $cat = $dms->getKeywordCategoryByName('foo', 1); + $this->assertFalse($cat); + } + + /** + * Test getDocumentCategories() + * + * The intitial database does not have any document categories + * + * @return void + */ + public function testGetDocumentCategories() + { + $cats = self::$dms->getDocumentCategories(); + $this->assertIsArray($cats); + $this->assertCount(0, $cats); + } + + /** + * Test getDocumentCategories() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentCategoriesNameSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblCategory`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $cats = $dms->getDocumentCategories(); + $this->assertFalse($cats); + } + + /** + * Test getDocumentCategory() + * + * The intitial database does not have any document categories + * + * @return void + */ + public function testGetDocumentCategory() + { + /* Adding a new keyword category */ + $cat = self::$dms->addDocumentCategory('new category'); + $this->assertIsObject($cat); + $this->assertEquals('new category', $cat->getName()); + + $cat = self::$dms->getDocumentCategory($cat->getId()); + $this->assertIsObject($cat); + + /* Return false if the id is out of range */ + $cat = self::$dms->getDocumentCategory(0); + $this->assertFalse($cat); + + /* Return null if the keyword category with the id does not exist */ + $cat = self::$dms->getDocumentCategory(2); + $this->assertNull($cat); + } + + /** + * Test getDocumentCategory() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentCategorySqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with("SELECT * FROM `tblCategory` WHERE `id` = 1") + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $cat = $dms->getDocumentCategory(1); + $this->assertFalse($cat); + } + + /** + * Test getDocumentCategoryByName() + * + * The intitial database does not have any document categories + * + * @return void + */ + public function testGetDocumentCategoryByName() + { + /* Adding a new keyword category with leading and trailing spaces*/ + $cat = self::$dms->addDocumentCategory(' new category '); + $this->assertIsObject($cat); + $this->assertEquals('new category', $cat->getName()); + + $cat = self::$dms->getDocumentCategoryByName($cat->getName()); + $this->assertIsObject($cat); + + $cat = self::$dms->getDocumentCategoryByName(' '); + $this->assertFalse($cat); + } + + /** + * Test getDocumentCategoryByName() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentCategoryByNameSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblCategory` WHERE `name`=")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $cat = $dms->getDocumentCategoryByName('foo'); + $this->assertFalse($cat); + } + + /** + * Test addDocumentCategory() + * + * Add a new keyword category and retrieve it afterwards. Also check if the + * number of keyword categories has increased by one. Add a keyword category + * with the same name a second time and check if it returns false. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddDocumentCategory() + { + /* Adding a new keyword category */ + $cat = self::$dms->addDocumentCategory('new category'); + $this->assertIsObject($cat); + $this->assertEquals('new category', $cat->getName()); + + /* Adding a document category with the same name must fail */ + $cat = self::$dms->addDocumentCategory('new category'); + $this->assertFalse($cat); + + /* Adding a document category with an empty name must fail */ + $cat = self::$dms->addDocumentCategory(' '); + $this->assertFalse($cat); + + /* There should be 1 document category now */ + $cats = self::$dms->getDocumentCategories(); + $this->assertIsArray($cats); + $this->assertCount(1, $cats); + } + + /** + * Test addDocumentCategoryWithPostAddHook() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddDocumentCategoryWithPostAddHook() + { + /* Add the 'onPostAddDocumentCategory' callback */ + $ret = 0; + $callback = function ($param, $group) use (&$ret) { + $ret = 1; + }; + self::$dms->addCallback('onPostAddDocumentCategory', $callback, 1); + /* Adding a new group */ + $cat = self::$dms->addDocumentCategory('new category'); + $this->assertIsObject($cat); + $this->assertEquals('new category', $cat->getName()); + $this->assertEquals(1, $ret); + } + + /** + * Test addDocumentCategory() with sql failure + * + * @return void + */ + public function testAddDocumentCategorySqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("INSERT INTO `tblCategory`")) + ->willReturn(false); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblCategory` WHERE `name`=")) + ->willReturn([]); + $dms = new SeedDMS_Core_DMS($db, ''); + $cat = $dms->addDocumentCategory('new category'); + $this->assertFalse($cat); + } + + /** + * Test getAttributeDefinition() with a none existing workflow + * + * The intitial database does not have any workflows + * + * @return void + */ + public function testGetAttributeDefinitionNoExists() + { + $workflow = self::$dms->getAttributeDefinition(1); + $this->assertNull($workflow); + /* Passing an id not a numeric value returns false */ + $workflow = self::$dms->getAttributeDefinition('foo'); + $this->assertFalse($workflow); + /* Passing an id out of range returns false */ + $workflow = self::$dms->getAttributeDefinition(0); + $this->assertFalse($workflow); + } + + /** + * Test getAttributeDefinition() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAttributeDefinitionSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblAttributeDefinitions` WHERE `id` =")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $attrdef = $dms->getAttributeDefinition(1); + $this->assertFalse($attrdef); + } + + /** + * Test getAttributeDefinitionByName() with a none existing workflow + * + * The intitial database does not have any workflows + * + * @return void + */ + public function testGetAttributeDefinitionByNameNoExists() + { + $workflow = self::$dms->getAttributeDefinitionByName('foo'); + $this->assertNull($workflow); + } + + /** + * Test getAttributeDefinitionByName() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAttributeDefinitionByNameSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblAttributeDefinitions` WHERE `name` =")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $attrdef = $dms->getAttributeDefinitionByName('foo'); + $this->assertFalse($attrdef); + } + + /** + * Test getAllAttributeDefinitions() + * + * The intitial database does not have any attribute definitions + * + * @return void + */ + public function testGetAllAttributeDefinitions() + { + $attrdefs = self::$dms->getAllAttributeDefinitions(); + $this->assertIsArray($attrdefs); + $this->assertCount(0, $attrdefs); + } + + /** + * Test getAllAttributeDefinitions() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAllAttributeDefinitionsSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblAttributeDefinitions`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $attrdef = $dms->getAllAttributeDefinitions(); + $this->assertFalse($attrdef); + } + + /** + * Test addAttributeDefinition() + * + * Add a new group and retrieve it afterwards. Also check if the number + * of groups has increased by one. Add a group with the same name a + * second time and check if it returns false. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddAttributeDefinition() + { + /* Adding a new attribute definition */ + $attrdef = self::$dms->addAttributeDefinition('new attribute definition', SeedDMS_Core_AttributeDefinition::objtype_folder, SeedDMS_Core_AttributeDefinition::type_int, false, 0, 0, '', ''); + $this->assertIsObject($attrdef); + $this->assertEquals('new attribute definition', $attrdef->getName()); + /* Get the new attribute definition by its id */ + $newattrdef = self::$dms->getAttributeDefinition($attrdef->getId()); + $this->assertIsObject($newattrdef); + $this->assertEquals($attrdef->getId(), $newattrdef->getId()); + /* Get the new attribute definition by its name */ + $newattrdef = self::$dms->getAttributeDefinitionByName('new attribute definition'); + $this->assertIsObject($newattrdef); + $this->assertEquals($attrdef->getId(), $newattrdef->getId()); + /* Adding an attribute definition with the same name must fail */ + $attrdef = self::$dms->addAttributeDefinition('new attribute definition', SeedDMS_Core_AttributeDefinition::objtype_folder, SeedDMS_Core_AttributeDefinition::type_int, false, 0, 0, '', ''); + $this->assertFalse($attrdef); + /* Adding an attribute definition with an empty name must fail */ + $attrdef = self::$dms->addAttributeDefinition(' ', SeedDMS_Core_AttributeDefinition::objtype_folder, SeedDMS_Core_AttributeDefinition::type_int, false, 0, 0, '', ''); + $this->assertFalse($attrdef); + /* Adding an attribute definition with an invalid object type must fail */ + $attrdef = self::$dms->addAttributeDefinition('no object type', -1, SeedDMS_Core_AttributeDefinition::type_int, false, 0, 0, '', ''); + $this->assertFalse($attrdef); + /* Adding an attribute definition without a type must fail */ + $attrdef = self::$dms->addAttributeDefinition('no type', SeedDMS_Core_AttributeDefinition::objtype_folder, 0, 0, '', ''); + $this->assertFalse($attrdef); + /* There should be one attribute definition now */ + $attrdefs = self::$dms->getAllAttributeDefinitions(); + $this->assertIsArray($attrdefs); + $this->assertCount(1, $attrdefs); + /* There should be one attribute definition of object type folder now */ + $attrdefs = self::$dms->getAllAttributeDefinitions(SeedDMS_Core_AttributeDefinition::objtype_folder); + $this->assertIsArray($attrdefs); + $this->assertCount(1, $attrdefs); + /* The object type can also be passed as an array */ + $attrdefs = self::$dms->getAllAttributeDefinitions([SeedDMS_Core_AttributeDefinition::objtype_folder]); + $this->assertIsArray($attrdefs); + $this->assertCount(1, $attrdefs); + /* Adding more attribute definitions of different object type */ + $attrdef = self::$dms->addAttributeDefinition('new attribute definition all', SeedDMS_Core_AttributeDefinition::objtype_all, SeedDMS_Core_AttributeDefinition::type_int, false, 0, 0, '', ''); + $this->assertIsObject($attrdef); + $this->assertEquals('new attribute definition all', $attrdef->getName()); + $attrdef = self::$dms->addAttributeDefinition('new attribute definition document', SeedDMS_Core_AttributeDefinition::objtype_all, SeedDMS_Core_AttributeDefinition::type_int, false, 0, 0, '', ''); + $this->assertIsObject($attrdef); + $this->assertEquals('new attribute definition document', $attrdef->getName()); + $attrdef = self::$dms->addAttributeDefinition('new attribute definition documentcontent', SeedDMS_Core_AttributeDefinition::objtype_all, SeedDMS_Core_AttributeDefinition::type_int, false, 0, 0, '', ''); + $this->assertIsObject($attrdef); + $this->assertEquals('new attribute definition documentcontent', $attrdef->getName()); + /* There should be four attribute definitions now */ + $attrdefs = self::$dms->getAllAttributeDefinitions(); + $this->assertIsArray($attrdefs); + $this->assertCount(4, $attrdefs); + } + + /** + * Test getAllWorkflows() + * + * The intitial database does not have any workflows + * + * @return void + */ + public function testGetAllWorkflows() + { + $workflows = self::$dms->getAllWorkflows(); + $this->assertIsArray($workflows); + $this->assertCount(0, $workflows); + } + + /** + * Test getAllWorkflows() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAllWorkflowsSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblWorkflows`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $workflows = $dms->getAllWorkflows(); + $this->assertFalse($workflows); + } + + /** + * Test getWorkflow() with a none existing workflow + * + * The intitial database does not have any workflows + * + * @return void + */ + public function testGetWorkflowNoExists() + { + $workflow = self::$dms->getWorkflow(1); + $this->assertNull($workflow); + /* Passing an id not a numeric value returns false */ + $workflow = self::$dms->getWorkflow('foo'); + $this->assertFalse($workflow); + /* Passing an id out of range returns false */ + $workflow = self::$dms->getWorkflow(0); + $this->assertFalse($workflow); + } + + /** + * Test getWorkflow() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetWorkflowSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblWorkflows` WHERE `id`=")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $workflow = $dms->getWorkflow(1); + $this->assertFalse($workflow); + } + + /** + * Test getWorkflowByName() with a none existing workflow + * + * The intitial database does not have any workflows + * + * @return void + */ + public function testGetWorkflowByNameNoExists() + { + $workflow = self::$dms->getWorkflowByName('foo'); + $this->assertNull($workflow); + } + + /** + * Test getWorkflowByName() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetWorkflowByNameSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblWorkflows` WHERE `name`=")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $workflow = $dms->getWorkflowByName('foo'); + $this->assertFalse($workflow); + } + + /** + * Test addWorkflow() + * + * Add a new workflow and retrieve it afterwards. Also check if the number + * of workflows has increased by one. Add a workflow with the same name a + * second time and check if it returns false. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddWorkflow() + { + /* Adding a new workflow */ + $workflowstate = self::$dms->addWorkflowState('new workflow state', S_RELEASED); + $workflow = self::$dms->addWorkflow('new workflow', $workflowstate); + $this->assertIsObject($workflow); + $this->assertEquals('new workflow', $workflow->getName()); + /* Adding a workflow with the same name must fail */ + $workflow = self::$dms->addWorkflow('new workflow', $workflowstate); + $this->assertFalse($workflow); + /* Adding a workflow with an empty name must fail */ + $workflow = self::$dms->addWorkflow(' ', $workflowstate); + $this->assertFalse($workflow); + /* There should be one workflow now */ + $workflows = self::$dms->getAllWorkflows(); + $this->assertIsArray($workflows); + $this->assertCount(1, $workflows); + } + + /** + * Test getAllWorkflowStates() + * + * The intitial database does not have any workflow states + * + * @return void + */ + public function testGetAllWorkflowStates() + { + $states = self::$dms->getAllWorkflowStates(); + $this->assertIsArray($states); + $this->assertCount(0, $states); + } + + /** + * Test getAllWorkflowStates() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAllWorkflowStatesSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblWorkflowStates`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $states = $dms->getAllWorkflowStates(); + $this->assertFalse($states); + } + + /** + * Test getWorkflowState() with a none existing workflow state + * + * The intitial database does not have any workflow states + * + * @return void + */ + public function testGetWorkflowStateNoExists() + { + $workflowstate = self::$dms->getWorkflowState(1); + $this->assertNull($workflowstate); + /* Passing an id not a numeric value returns false */ + $workflowstate = self::$dms->getWorkflowState('foo'); + $this->assertFalse($workflowstate); + /* Passing an id out of range returns false */ + $workflowstate = self::$dms->getWorkflowState(0); + $this->assertFalse($workflowstate); + } + + /** + * Test getWorkflowState() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetWorkflowStateSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblWorkflowStates` WHERE `id` =")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $state = $dms->getWorkflowState(1); + $this->assertFalse($state); + } + + /** + * Test getWorkflowStateByName() with a none existing workflow state + * + * The intitial database does not have any workflow states + * + * @return void + */ + public function testGetWorkflowStateByNameNoExists() + { + $workflowstate = self::$dms->getWorkflowStateByName('foo'); + $this->assertNull($workflowstate); + } + + /** + * Test getWorkflowStateByName() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetWorkflowStateByNameSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblWorkflowStates` WHERE `name`=")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $state = $dms->getWorkflowStateByName('foo'); + $this->assertFalse($state); + } + + /** + * Test addWorkflowState() + * + * Add a new workflow state and retrieve it afterwards. Also check if the number + * of workflow states has increased by one. Add a workflow state with the same name a + * second time and check if it returns false. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddWorkflowState() + { + /* Adding a new workflow state */ + $workflowstate = self::$dms->addWorkflowState('new workflow state', S_RELEASED); + $this->assertIsObject($workflowstate); + $this->assertEquals('new workflow state', $workflowstate->getName()); + /* Adding a workflow state with the same name must fail */ + $workflowstate = self::$dms->addWorkflowState('new workflow state', S_RELEASED); + $this->assertFalse($workflowstate); + /* Adding a workflow state with an empty name must fail */ + $workflowstate = self::$dms->addWorkflowState(' ', S_RELEASED); + $this->assertFalse($workflowstate); + /* There should be one workflow state now */ + $workflowstates = self::$dms->getAllWorkflowStates(); + $this->assertIsArray($workflowstates); + $this->assertCount(1, $workflowstates); + } + + /** + * Test getAllWorkflowActions() + * + * The intitial database does not have any workflow actions + * + * @return void + */ + public function testGetAllWorkflowActions() + { + $actions = self::$dms->getAllWorkflowActions(); + $this->assertIsArray($actions); + $this->assertCount(0, $actions); + } + + /** + * Test getAllWorkflowActions() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAllWorkflowActionsSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblWorkflowActions`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $actions = $dms->getAllWorkflowActions(); + $this->assertFalse($actions); + } + + /** + * Test getWorkflowAction() with a none existing workflow + * + * The intitial database does not have any workflow actions + * + * @return void + */ + public function testGetWorkflowActionNoExists() + { + $workflowaction = self::$dms->getWorkflowAction(1); + $this->assertNull($workflowaction); + /* Passing an id not a numeric value returns false */ + $workflowaction = self::$dms->getWorkflowAction('foo'); + $this->assertFalse($workflowaction); + /* Passing an id out of range returns false */ + $workflowaction = self::$dms->getWorkflowAction(0); + $this->assertFalse($workflowaction); + } + + /** + * Test getWorkflowAction() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetWorkflowActionSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblWorkflowActions` WHERE `id` =")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $action = $dms->getWorkflowAction(1); + $this->assertFalse($action); + } + + /** + * Test getWorkflowActionByName() with a none existing workflow action + * + * The intitial database does not have any workflow actions + * + * @return void + */ + public function testGetWorkflowActionByNameNoExists() + { + $workflowaction = self::$dms->getWorkflowActionByName('foo'); + $this->assertNull($workflowaction); + } + + /** + * Test getWorkflowActionByName() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetWorkflowActionByNameSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblWorkflowActions` WHERE `name` =")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $action = $dms->getWorkflowActionByName('foo'); + $this->assertFalse($action); + } + + /** + * Test addWorkflowAction() + * + * Add a new workflow state and retrieve it afterwards. Also check if the number + * of workflow states has increased by one. Add a workflow state with the same name a + * second time and check if it returns false. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddWorkflowAction() + { + /* Adding a new workflow action */ + $workflowaction = self::$dms->addWorkflowAction('new workflow action', S_RELEASED); + $this->assertIsObject($workflowaction); + $this->assertEquals('new workflow action', $workflowaction->getName()); + /* Adding a workflow action with the same name must fail */ + $workflowaction = self::$dms->addWorkflowAction('new workflow action', S_RELEASED); + $this->assertFalse($workflowaction); + /* Adding a workflow action with an empty name must fail */ + $workflowaction = self::$dms->addWorkflowAction(' ', S_RELEASED); + $this->assertFalse($workflowaction); + /* There should be one workflow action now */ + $workflowactions = self::$dms->getAllWorkflowActions(); + $this->assertIsArray($workflowactions); + $this->assertCount(1, $workflowactions); + } + + /** + * Test getStatisticalData() + * + * @return void + */ + public function testGetStatisticalData() + { + /* There should one folder (root folder) */ + $data = self::$dms->getStatisticalData('foldersperuser'); + $this->assertIsArray($data); + $this->assertEquals(1, $data[0]['total']); + /* There should be no documents */ + foreach (array('docsperuser', 'docspermimetype', 'docspercategory', 'docspermonth', 'docsperstatus', 'docsaccumulated', 'sizeperuser') as $type) { + $data = self::$dms->getStatisticalData($type); + $this->assertIsArray($data); + $this->assertCount(0, $data); + } + /* Passing an unknown name returns an empty array */ + $data = self::$dms->getStatisticalData('foo'); + $this->assertIsArray($data); + $this->assertCount(0, $data); + } + + /** + * Test getStatisticalDataFail() + * + * Check if getStatisticalData() fails if the sql statements fail + * + * @return void + */ + public function testGetStatisticalDataFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->any()) + ->method('getResultArray') + ->with($this->stringContains("SELECT ")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + foreach (array('foldersperuser', 'docsperuser', 'docspermimetype', 'docspercategory', 'docspermonth', 'docsperstatus', 'docsaccumulated', 'sizeperuser') as $type) { + $data = $dms->getStatisticalData($type); + $this->assertFalse($data); + } + } + + /** + * Test createPasswordRequest() and checkPasswordRequest() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testCreateAndCheckAndDeletePasswordRequest() + { + $user = self::$dms->getUser(1); + $hash = self::$dms->createPasswordRequest($user); + $this->assertIsString($hash); + $user = self::$dms->checkPasswordRequest($hash); + $this->assertIsObject($user); + $this->assertEquals(1, $user->getId()); + /* Check a non existing hash */ + $user = self::$dms->checkPasswordRequest('foo'); + $this->assertFalse($user); + /* Delete the hash */ + $ret = self::$dms->deletePasswordRequest($hash); + $this->assertTrue($ret); + /* Checking the hash again must return false, because it was deleted */ + $user = self::$dms->checkPasswordRequest($hash); + $this->assertFalse($user); + } + + /** + * Test method checkPasswordRequest() with sql failure + * + * @return void + */ + public function testCheckPasswordRequestSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblUserPasswordRequest`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $this->assertFalse($dms->checkPasswordRequest('foo')); + } + + /** + * Test method deletePasswordRequest() with sql failure + * + * @return void + */ + public function testDeletePasswordRequestSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("DELETE FROM `tblUserPasswordRequest`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $this->assertFalse($dms->deletePasswordRequest('foo')); + } + + /** + * Test getTimeline() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetTimeline() + { + $timeline = self::$dms->getTimeline(); + $this->assertIsArray($timeline); + } + + /** + * Test getUnlinkedDocumentContent() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetUnlinkedDocumentContent() + { + $contents = self::$dms->getUnlinkedDocumentContent(); + $this->assertIsArray($contents); + $this->assertCount(0, $contents); + } + + /** + * Test getNoFileSizeDocumentContent() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetNoFileSizeDocumentContent() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $contents = self::$dms->getNoFileSizeDocumentContent(); + $this->assertIsArray($contents); + $this->assertCount(0, $contents); + /* Manipulate the file size right in the database */ + $dbh = self::$dms->getDB(); + $ret = $dbh->getResult("UPDATE `tblDocumentContent` SET `fileSize` = 0"); + $this->assertTrue($ret); + $contents = self::$dms->getNoFileSizeDocumentContent(); + $this->assertIsArray($contents); + $this->assertCount(1, $contents); + } + + /** + * Test getNoFileSizeDocumentContent() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetNoFileSizeDocumentContentSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblDocumentContent` WHERE `fileSize`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $this->assertFalse($dms->getNoFileSizeDocumentContent()); + } + + /** + * Test getNoChecksumDocumentContent() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetNoChecksumDocumentContent() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $contents = self::$dms->getNoChecksumDocumentContent(); + $this->assertIsArray($contents); + $this->assertCount(0, $contents); + /* Manipulate the checksum right in the database */ + $dbh = self::$dms->getDB(); + $ret = $dbh->getResult("UPDATE `tblDocumentContent` SET `checksum` = null"); + $this->assertTrue($ret); + $contents = self::$dms->getNoChecksumDocumentContent(); + $this->assertIsArray($contents); + $this->assertCount(1, $contents); + } + + /** + * Test getNoChecksumDocumentContent() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetNoChecksumDocumentContentSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblDocumentContent` WHERE `checksum`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $this->assertFalse($dms->getNoChecksumDocumentContent()); + } + + /** + * Test getDuplicateDocumentContent() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDuplicateDocumentContent() + { + $contents = self::$dms->getDuplicateDocumentContent(); + $this->assertIsArray($contents); + $this->assertCount(0, $contents); + } + + /** + * Test getDuplicateDocumentContent() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDuplicateDocumentContentWithDuplicates() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $document1 = self::createDocument($rootfolder, $user, 'Document 1'); + + $filename = self::createTempFile(200); + list($document2, $res) = $rootfolder->addDocument( + 'Documet 2', // name + '', // comment + null, // no expiration + $user, // owner + '', // keywords + [], // categories + $filename, // name of file + 'file1.txt', // original file name + '.txt', // file type + 'text/plain', // mime type + 1.0 // sequence + ); + list($document3, $res) = $rootfolder->addDocument( + 'Documet 3', // name + '', // comment + null, // no expiration + $user, // owner + '', // keywords + [], // categories + $filename, // name of file + 'file1.txt', // original file name + '.txt', // file type + 'text/plain', // mime type + 1.0 // sequence + ); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + + $contents = self::$dms->getDuplicateDocumentContent(); + $this->assertIsArray($contents); + $this->assertCount(1, $contents); + } + + /** + * Test method getDuplicateDocumentContent() with sql failure + * + * @return void + */ + public function testGetDuplicateDocumentContentSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT a.*, b.`id` as dupid FROM `tblDocumentContent`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $this->assertFalse($dms->getDuplicateDocumentContent()); + } + + /** + * Test getNotificationsByUser() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetNotificationsByUser() + { + $user = self::$dms->getUser(1); + $notifications = self::$dms->getNotificationsByUser($user, 0); + $this->assertIsArray($notifications); + $this->assertCount(0, $notifications); + $notifications = self::$dms->getNotificationsByUser($user, 1); + $this->assertIsArray($notifications); + $this->assertCount(0, $notifications); + } + + /** + * Test getNotificationsByGroup() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetNotificationsByGroup() + { + $group = self::$dms->addGroup('new group', 'with comment'); + $this->assertIsObject($group); + $notifications = self::$dms->getNotificationsByGroup($group, 0); + $this->assertIsArray($notifications); + $this->assertCount(0, $notifications); + $notifications = self::$dms->getNotificationsByGroup($group, 1); + $this->assertIsArray($notifications); + $this->assertCount(0, $notifications); + } + + /** + * Test getDocumentsExpired() + * + * Check if getDocumentsExpired() fails if the parameters are wrong + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentsExpiredFail() + { + $documents = self::$dms->getDocumentsExpired(false); + $this->assertFalse($documents); + $documents = self::$dms->getDocumentsExpired('2021-04'); + $this->assertFalse($documents); + $documents = self::$dms->getDocumentsExpired('2021-01-32'); + $this->assertFalse($documents); + $documents = self::$dms->getDocumentsExpired('2021-01-31'); // valid date + $this->assertIsArray($documents); + } + + /** + * Test method getDocumentsExpired() with sql failure + * + * @return void + */ + public function testGetDocumentsExpiredSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('createTemporaryTable') + ->with('ttstatid') + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $this->assertFalse($dms->getDocumentsExpired(1)); + } + + /** + * Test getDocumentByName() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentByName() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $rootfolder); + $subfolder = $rootfolder->addSubFolder('Subfolder 1', '', $user, 2.0); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $subfolder); + + /* Add a new document */ + $filename = self::createTempFile(200); + list($document, $res) = $subfolder->addDocument( + 'Document 1', // name + '', // comment + null, // no expiration + $user, // owner + '', // keywords + [], // categories + $filename, // name of file + 'file1.txt', // original file name + '.txt', // file type + 'text/plain', // mime type + 1.0 // sequence + ); + $this->assertIsObject($document); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + /* Search without a parent folder restriction */ + $document = self::$dms->getDocumentByName('Document 1'); + $this->assertInstanceOf(SeedDMS_Core_Document::class, $document); + /* Searching in the root folder will return no document */ + $document = self::$dms->getDocumentByName('Document 1', $rootfolder); + $this->assertNull($document); + /* Searching in the sub folder will return the document */ + $document = self::$dms->getDocumentByName('Document 1', $subfolder); + $this->assertInstanceOf(SeedDMS_Core_Document::class, $document); + /* Searching for an empty name returns false */ + $document = self::$dms->getDocumentByName(' '); + $this->assertFalse($document); + } + + /** + * Test getDocumentByName() with sql failure + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentByNameSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lockUser`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document = $dms->getDocumentByName('foo'); + $this->assertFalse($document); + } + + /** + * Test getDocumentByOriginalFilename() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentByOriginalFilename() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $rootfolder); + $subfolder = $rootfolder->addSubFolder('Subfolder 1', '', $user, 2.0); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $subfolder); + + /* Add a new document */ + $filename = self::createTempFile(200); + list($document, $res) = $subfolder->addDocument( + 'Document 1', // name + '', // comment + null, // no expiration + $user, // owner + '', // keywords + [], // categories + $filename, // name of file + 'file1.txt', // original file name + '.txt', // file type + 'text/plain', // mime type + 1.0 // sequence + ); + $this->assertIsObject($document); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + /* Search without a parent folder restriction */ + $document = self::$dms->getDocumentByOriginalFilename('file1.txt'); + $this->assertInstanceOf(SeedDMS_Core_Document::class, $document); + /* Searching in the root folder will return no document */ + $document = self::$dms->getDocumentByOriginalFilename('file1.txt', $rootfolder); + $this->assertNull($document); + /* Searching in the sub folder will return the document */ + $document = self::$dms->getDocumentByOriginalFilename('file1.txt', $subfolder); + $this->assertInstanceOf(SeedDMS_Core_Document::class, $document); + /* Searching for an empty name returns false */ + $document = self::$dms->getDocumentByOriginalFilename(' '); + $this->assertFalse($document); + } + + /** + * Test method getDocumentByOriginalFilename() with sql failure + * + * @return void + */ + public function testGetDocumentByOriginalFilenameSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('createTemporaryTable') + ->with('ttcontentid') + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $this->assertFalse($dms->getDocumentByOriginalFilename(1)); + } + + /** + * Test getDocumentList() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentList() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $rootfolder); + + /* Add a new document */ + $filename = self::createTempFile(200); + list($document, $res) = $rootfolder->addDocument( + 'Document 1', // name + '', // comment + null, // no expiration + $user, // owner + '', // keywords + [], // categories + $filename, // name of file + 'file1.txt', // original file name + '.txt', // file type + 'text/plain', // mime type + 1.0 // sequence + ); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + $this->assertIsObject($document); + + /* Add a second new document */ + $filename = self::createTempFile(200); + list($document, $res) = $rootfolder->addDocument( + 'Document 2', // name + '', // comment + mktime(0, 0, 0), // expires today + $user, // owner + '', // keywords + [], // categories + $filename, // name of file + 'file2.txt', // original file name + '.txt', // file type + 'text/plain', // mime type + 1.0 // sequence + ); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + $this->assertIsObject($document); + + $documents = self::$dms->getDocumentList('MyDocs', $user); + $this->assertIsArray($documents); + $this->assertCount(2, $documents); + /* All documents expiring from 1 year ago till today */ + $documents = self::$dms->getDocumentList('ExpiredOwner', $user); + $this->assertIsArray($documents); + $this->assertCount(1, $documents); + /* All documents expiring today */ + $documents = self::$dms->getDocumentList('ExpiredOwner', $user, 0); + $this->assertIsArray($documents); + $this->assertCount(1, $documents); + /* All documents expiring tomorrow */ + $documents = self::$dms->getDocumentList('ExpiredOwner', $user, date("Y-m-d", time()+86400)); + $this->assertIsArray($documents); + $this->assertCount(1, $documents); + /* Get unknown list */ + $documents = self::$dms->getDocumentList('foo', $user); + $this->assertFalse($documents); + } + + /** + * Test search() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSearch() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $rootfolder); + $subfolder = $rootfolder->addSubFolder('Subfolder 1', '', $user, 2.0); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $subfolder); + + /* Add a new document to the subfolder*/ + $filename = self::createTempFile(200); + list($document, $res) = $subfolder->addDocument( + 'Document 1', // name + '', // comment + null, // no expiration + $user, // owner + '', // keywords + [], // categories + $filename, // name of file + 'file1.txt', // original file name + '.txt', // file type + 'text/plain', // mime type + 1.0 // sequence + ); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + /* Add a new document to the root folder. All documents expire. The first + * expires today, the second expires tomorrow, etc. + */ + for ($i=2; $i<=30; $i++) { + $filename = self::createTempFile(200); + list($document, $res) = $rootfolder->addDocument( + 'Document '.$i, // name + '', // comment + mktime(0, 0, 0)+($i-2)*86400, // expires in $i-2 days + $user, // owner + '', // keywords + [], // categories + $filename, // name of file + 'file'.$i.'.txt', // original file name + '.txt', // file type + 'text/plain', // mime type + 1.0+$i // sequence + ); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + } + $hits = self::$dms->search(['query'=>'Document']); + $this->assertIsArray($hits); + $this->assertCount(5, $hits); + $this->assertEquals(30, $hits['totalDocs']); + $this->assertCount(30, $hits['docs']); + /* Limit number of documents to 10 */ + $hits = self::$dms->search(['query'=>'Document', 'limit'=>10]); + $this->assertIsArray($hits); + $this->assertCount(5, $hits); + $this->assertEquals(30, $hits['totalDocs']); + $this->assertCount(10, $hits['docs']); + /* Same number of documents if startFolder is the root folder */ + $hits = self::$dms->search(['query'=>'Document', 'startFolder'=>$rootfolder]); + $this->assertIsArray($hits); + $this->assertCount(5, $hits); + $this->assertEquals(30, $hits['totalDocs']); + $this->assertCount(30, $hits['docs']); + /* There is just one document below the sub folder */ + $hits = self::$dms->search(['query'=>'Document', 'startFolder'=>$subfolder]); + $this->assertIsArray($hits); + $this->assertCount(5, $hits); + $this->assertEquals(1, $hits['totalDocs']); + /* Get documents with a given expiration date in the future + * All documents in subfolder, but not the one in the root folder + */ + $expts = mktime(0, 0, 0); + $expstart = [ + 'year'=>date('Y', $expts), + 'month'=>date('m', $expts), + 'day'=>date('d', $expts), + 'hour'=>date('H', $expts), + 'minute'=>date('i', $expts), + 'second'=>date('s', $expts) + ]; + $hits = self::$dms->search(['query'=>'Document', 'expirationstartdate'=>$expstart]); + $this->assertIsArray($hits); + $this->assertCount(5, $hits); + $this->assertEquals(29, $hits['totalDocs']); + /* Get documents with a given expiration date in the future, starting tomorrow + * All documents in subfolder - 1 + */ + $expts = mktime(0, 0, 0)+86400; + $expstart = [ + 'year'=>date('Y', $expts), + 'month'=>date('m', $expts), + 'day'=>date('d', $expts), + 'hour'=>date('H', $expts), + 'minute'=>date('i', $expts), + 'second'=>date('s', $expts) + ]; + $hits = self::$dms->search(['query'=>'Document', 'expirationstartdate'=>$expstart]); + $this->assertIsArray($hits); + $this->assertCount(5, $hits); + $this->assertEquals(28, $hits['totalDocs']); + /* Get documents expire today or tomorrow + * 2 documents in subfolder + */ + $expts = mktime(0, 0, 0); + $expstart = [ + 'year'=>date('Y', $expts), + 'month'=>date('m', $expts), + 'day'=>date('d', $expts), + 'hour'=>date('H', $expts), + 'minute'=>date('i', $expts), + 'second'=>date('s', $expts) + ]; + $expts += 1*86400; + $expstop = [ + 'year'=>date('Y', $expts), + 'month'=>date('m', $expts), + 'day'=>date('d', $expts), + 'hour'=>date('H', $expts), + 'minute'=>date('i', $expts), + 'second'=>date('s', $expts) + ]; + $hits = self::$dms->search(['query'=>'Document', 'expirationstartdate'=>$expstart, 'expirationenddate'=>$expstop]); + $this->assertIsArray($hits); + $this->assertCount(5, $hits); + $this->assertEquals(2, $hits['totalDocs']); + /* Get documents expire before and tomorrow + * 2 documents in subfolder + */ + $expts = mktime(0, 0, 0); // Start of today + $expts += 1*86400; // Start of tomorrow + $expstop = [ + 'year'=>date('Y', $expts), + 'month'=>date('m', $expts), + 'day'=>date('d', $expts), + 'hour'=>date('H', $expts), + 'minute'=>date('i', $expts), + 'second'=>date('s', $expts) + ]; + $hits = self::$dms->search(['query'=>'Document', 'expirationenddate'=>$expstop]); + $this->assertIsArray($hits); + $this->assertCount(5, $hits); + $this->assertEquals(2, $hits['totalDocs']); + } + +} + diff --git a/SeedDMS_Core/tests/DmsWithDataTest.php b/SeedDMS_Core/tests/DmsWithDataTest.php new file mode 100644 index 000000000..17fde09e7 --- /dev/null +++ b/SeedDMS_Core/tests/DmsWithDataTest.php @@ -0,0 +1,290 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +use PHPUnit\Framework\SeedDmsTest; + +/** + * DMS test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class DmsWithDataTest extends SeedDmsTest +{ + + /** + * Create a real sqlite database in memory + * + * @return void + */ + protected function setUp(): void + { + self::$dbh = self::createInMemoryDatabase(); + self::$contentdir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpunit-'.time(); + mkdir(self::$contentdir); + // echo "Creating temp content dir: ".self::$contentdir."\n"; + self::$dms = new SeedDMS_Core_DMS(self::$dbh, self::$contentdir); + } + + /** + * Clean up at tear down + * + * @return void + */ + protected function tearDown(): void + { + self::$dbh = null; + // echo "\nRemoving temp. content dir: ".self::$contentdir."\n"; + exec('rm -rf '.self::$contentdir); + } + + /** + * Test getFoldersMinMax() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetFoldersMinMax() + { + self::createSimpleFolderStructure(); + $rootfolder = self::$dms->getRootFolder(); + $minmax = $rootfolder->getFoldersMinMax(); + $this->assertIsArray($minmax); + $this->assertCount(2, $minmax); + $this->assertEquals(0.5, $minmax['min']); + $this->assertEquals(2.0, $minmax['max']); + } + + /** + * Test method getFoldersMinMax() + * + * @return void + */ + public function testGetFoldersMinMaxSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT min(`sequence`) AS `min`, max(`sequence`) AS `max` FROM `tblFolders`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->getFoldersMinMax()); + } + + /** + * Test getDocumentsMinMax() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentsMinMax() + { + self::createSimpleFolderStructureWithDocuments(); + $subfolder = self::$dms->getFolderByName('Subfolder 1'); + $this->assertIsObject($subfolder); + $minmax = $subfolder->getDocumentsMinMax(); + $this->assertIsArray($minmax); + $this->assertCount(2, $minmax); + $this->assertEquals(2.0, $minmax['min']); + $this->assertEquals(16.0, $minmax['max']); + } + + /** + * Test method getDocumentsMinMax() + * + * @return void + */ + public function testGetDocumentsMinMaxSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT min(`sequence`) AS `min`, max(`sequence`) AS `max` FROM `tblDocuments`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->getDocumentsMinMax()); + } + + /** + * Test addDocument() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddDocument() + { + self::createSimpleFolderStructure(); + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $rootfolder); + $this->assertEquals(1, $rootfolder->getId()); + /* Add a new document */ + $filename = self::createTempFile(200); + list($document, $res) = $rootfolder->addDocument( + 'Document 1', // name + '', // comment + null, // expiration + $user, // owner + '', // keywords + [], // categories + $filename, // name of file + 'file1.txt', // original file name + '.txt', // file type + 'text/plain', // mime type + 1.0 // sequence + ); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + $this->assertIsObject($document); + $this->assertInstanceOf(SeedDMS_Core_Document::class, $document); + $this->assertEquals('Document 1', $document->getName()); + } + + /** + * Test getDocumentsExpired() + * + * Create two documents which will expired today and tomorrow + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentsExpiredFuture() + { + self::createSimpleFolderStructure(); + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $rootfolder); + $this->assertEquals(1, $rootfolder->getId()); + /* Add a new document */ + $filename = self::createTempFile(200); + list($document, $res) = $rootfolder->addDocument( + 'Document 1', // name + '', // comment + mktime(23,59,59), // expiration is still today at 23:59:59 + $user, // owner + '', // keywords + [], // categories + $filename, // name of file + 'file1.txt', // original file name + '.txt', // file type + 'text/plain', // mime type + 1.0 // sequence + ); + $this->assertIsObject($document); + list($document, $res) = $rootfolder->addDocument( + 'Document 2', // name + '', // comment + mktime(23,59,59)+1, // expiration is tomorrow today at 0:00:00 + $user, // owner + '', // keywords + [], // categories + $filename, // name of file + 'file1.txt', // original file name + '.txt', // file type + 'text/plain', // mime type + 1.0 // sequence + ); + $this->assertIsObject($document); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + $documents = self::$dms->getDocumentsExpired(0); /* Docs expire today */ + $this->assertIsArray($documents); + $this->assertCount(1, $documents); + $documents = self::$dms->getDocumentsExpired(date('Y-m-d')); /* Docs expire today */ + $this->assertIsArray($documents); + $this->assertCount(1, $documents); + $documents = self::$dms->getDocumentsExpired(1); /* Docs expire till tomorrow 23:59:59 */ + $this->assertIsArray($documents); + $this->assertCount(2, $documents); + $documents = self::$dms->getDocumentsExpired(date('Y-m-d', time()+86400)); /* Docs expire till tomorrow 23:59:59 */ + $this->assertIsArray($documents); + $this->assertCount(2, $documents); + $documents = self::$dms->getDocumentsExpired(date('Y-m-d', time()+86400), $user); /* Docs expire till tomorrow 23:59:59 owned by $user */ + $this->assertIsArray($documents); + $this->assertCount(2, $documents); + } + + /** + * Test getDocumentsExpired() + * + * Create two documents which have expired yesterday and the day before + * yesterday + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentsExpiredPast() + { + self::createSimpleFolderStructure(); + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $rootfolder); + $this->assertEquals(1, $rootfolder->getId()); + /* Add a new document */ + $filename = self::createTempFile(200); + list($document, $res) = $rootfolder->addDocument( + 'Document 1', // name + '', // comment + mktime(0,0,0)-1, // expiration was yesterday + $user, // owner + '', // keywords + [], // categories + $filename, // name of file + 'file1.txt', // original file name + '.txt', // file type + 'text/plain', // mime type + 1.0 // sequence + ); + $this->assertIsObject($document); + list($document, $res) = $rootfolder->addDocument( + 'Document 2', // name + '', // comment + mktime(0,0,0)-1-86400, // expiration the day before yesterday + $user, // owner + '', // keywords + [], // categories + $filename, // name of file + 'file1.txt', // original file name + '.txt', // file type + 'text/plain', // mime type + 1.0 // sequence + ); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + $this->assertIsObject($document); + $documents = self::$dms->getDocumentsExpired(0); /* No Docs expire today */ + $this->assertIsArray($documents); + $this->assertCount(0, $documents); + $documents = self::$dms->getDocumentsExpired(-1); /* Docs expired yesterday */ + $this->assertIsArray($documents); + $this->assertCount(1, $documents); + $documents = self::$dms->getDocumentsExpired(-2); /* Docs expired since the day before yesterday */ + $this->assertIsArray($documents); + $this->assertCount(2, $documents); + } + + +} diff --git a/SeedDMS_Core/tests/DocumentCategoryTest.php b/SeedDMS_Core/tests/DocumentCategoryTest.php new file mode 100644 index 000000000..37309d9a1 --- /dev/null +++ b/SeedDMS_Core/tests/DocumentCategoryTest.php @@ -0,0 +1,295 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +use PHPUnit\Framework\SeedDmsTest; + +/** + * User test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class DocumentCategoryTest extends SeedDmsTest +{ + + /** + * Create a real sqlite database in memory + * + * @return void + */ + protected function setUp(): void + { + self::$dbh = self::createInMemoryDatabase(); + self::$contentdir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpunit-'.time(); + mkdir(self::$contentdir); + // echo "Creating temp content dir: ".self::$contentdir."\n"; + self::$dms = new SeedDMS_Core_DMS(self::$dbh, self::$contentdir); + } + + /** + * Clean up at tear down + * + * @return void + */ + protected function tearDown(): void + { + self::$dbh = null; + // echo "\nRemoving temp. content dir: ".self::$contentdir."\n"; + exec('rm -rf '.self::$contentdir); + } + + /** + * Test method getName() and setName() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetName() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $cat = self::$dms->addDocumentCategory('Category 1'); + $name = $cat->getName(); + $ret = $cat->setName('foo'); + $this->assertTrue($ret); + $name = $cat->getName(); + $this->assertEquals('foo', $name); + $ret = $cat->setName(' '); + $this->assertFalse($ret); + } + + /** + * Test method addCategories(), hasCategory(), setCategory() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddCategoryToDocument() + { + $rootfolder = self::$dms->getRootFolder(); + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + + /* Add a new document and two categories */ + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $cat1 = self::$dms->addDocumentCategory('Category 1'); + $cat2 = self::$dms->addDocumentCategory('Category 2'); + + /* There are no categories yet */ + $ret = $document->hasCategory($cat1); + $this->assertFalse($ret); + + /* Not passing a category yields on error */ + $ret = $document->hasCategory(null); + $this->assertFalse($ret); + + /* Adding a category ... */ + $ret = $document->addCategories([$cat1]); + $this->assertTrue($ret); + + /* ... and check if it is there */ + $ret = $document->hasCategory($cat1); + $this->assertTrue($ret); + + /* There should be one category now */ + $cats = $document->getCategories(); + $this->assertIsArray($cats); + $this->assertCount(1, $cats); + $this->assertEquals($cat1->getName(), $cats[0]->getName()); + + /* Adding the same category shouldn't change anything */ + $ret = $document->addCategories([$cat1]); + $this->assertTrue($ret); + + /* Check if category is used */ + $ret = $cat1->isUsed(); + $this->assertTrue($ret); + $ret = $cat2->isUsed(); + $this->assertFalse($ret); + + /* There is one document with cat 1 but none with cat 2 */ + $docs = $cat1->getDocumentsByCategory(); + $this->assertIsArray($docs); + $this->assertCount(1, $docs); + $num = $cat1->countDocumentsByCategory(); + $this->assertEquals(1, $num); + $docs = $cat2->getDocumentsByCategory(); + $this->assertIsArray($docs); + $this->assertCount(0, $docs); + $num = $cat2->countDocumentsByCategory(); + $this->assertEquals(0, $num); + + /* Still only one category */ + $cats = $document->getCategories(); + $this->assertIsArray($cats); + $this->assertCount(1, $cats); + + /* Setting new categories will replace the old ones */ + $ret = $document->setCategories([$cat1, $cat2]); + $this->assertTrue($ret); + + /* Now we have two categories */ + $cats = $document->getCategories(); + $this->assertIsArray($cats); + $this->assertCount(2, $cats); + + /* Remove a category */ + $ret = $document->removeCategories([$cat1]); + $this->assertTrue($ret); + + /* Removing the same category again does not harm*/ + $ret = $document->removeCategories([$cat1]); + $this->assertTrue($ret); + + /* We are back to one category */ + $cats = $document->getCategories(); + $this->assertIsArray($cats); + $this->assertCount(1, $cats); + + /* Remove the remaining category from the document */ + $ret = $document->removeCategories($cats); + $this->assertTrue($ret); + + /* No category left */ + $cats = $document->getCategories(); + $this->assertIsArray($cats); + $this->assertCount(0, $cats); + + /* Remove the category itself */ + $cats = self::$dms->getDocumentCategories(); + $this->assertIsArray($cats); + $this->assertCount(2, $cats); + $ret = $cat1->remove(); + $cats = self::$dms->getDocumentCategories(); + $this->assertIsArray($cats); + $this->assertCount(1, $cats); + } + + /** + * Test method getCategories() with sql fail + * + * @return void + */ + public function testGetCategoriesSqlFail() + { + $document = $this->getMockedDocument(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblCategory` WHERE")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($document->getCategories()); + } + + /** + * Test method addCategories() with sql fail + * + * @return void + */ + public function testAddCategoriesSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + /* mock sql statement in getCategories() which is called in addCategories() */ + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblCategory` WHERE")) + ->willReturn([]); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("INSERT INTO `tblDocumentCategory`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document = $this->getMockedDocument(); + $document->setDMS($dms); + $cat = new SeedDMS_Core_DocumentCategory(1, 'Category'); + $cat->setDMS($dms); + $this->assertFalse($document->addCategories([$cat])); + } + + /** + * Test method removeCategories() with sql fail + * + * @return void + */ + public function testRemoveCategoriesSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("DELETE FROM `tblDocumentCategory` WHERE")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document = $this->getMockedDocument(); + $document->setDMS($dms); + $cat = new SeedDMS_Core_DocumentCategory(1, 'Category'); + $cat->setDMS($dms); + $this->assertFalse($document->removeCategories([$cat])); + } + + /** + * Test method setCategories() with sql fail when deleting categories + * + * @return void + */ + public function testSetCategoriesSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("DELETE FROM `tblDocumentCategory` WHERE")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document = $this->getMockedDocument(); + $document->setDMS($dms); + $cat = new SeedDMS_Core_DocumentCategory(1, 'Category'); + $cat->setDMS($dms); + $this->assertFalse($document->setCategories([$cat])); + } + + /** + * Test method setCategories() with sql fail when inserting new categories + * + * @return void + */ + public function testSetCategoriesSqlFail2() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->exactly(2)) + ->method('getResult') + ->will( + $this->returnValueMap( + array( + array("DELETE FROM `tblDocumentCategory` WHERE `documentID` = 1", true, true), + array("INSERT INTO `tblDocumentCategory`", true, false) + ) + ) + ); + $dms = new SeedDMS_Core_DMS($db, ''); + $document = $this->getMockedDocument(); + $document->setDMS($dms); + $cat = new SeedDMS_Core_DocumentCategory(1, 'Category'); + $cat->setDMS($dms); + $this->assertFalse($document->setCategories([$cat])); + } + +} + diff --git a/SeedDMS_Core/tests/DocumentContentTest.php b/SeedDMS_Core/tests/DocumentContentTest.php new file mode 100644 index 000000000..9a8e9a14b --- /dev/null +++ b/SeedDMS_Core/tests/DocumentContentTest.php @@ -0,0 +1,593 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +use PHPUnit\Framework\SeedDmsTest; + +/** + * Group test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class DocumentContentTest extends SeedDmsTest +{ + + /** + * Create a real sqlite database in memory + * + * @return void + */ + protected function setUp(): void + { + self::$dbh = self::createInMemoryDatabase(); + self::$contentdir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpunit-'.time(); + mkdir(self::$contentdir); + // echo "Creating temp content dir: ".self::$contentdir."\n"; + self::$dms = new SeedDMS_Core_DMS(self::$dbh, self::$contentdir); + } + + /** + * Clean up at tear down + * + * @return void + */ + protected function tearDown(): void + { + self::$dbh = null; + // echo "\nRemoving temp. content dir: ".self::$contentdir."\n"; + exec('rm -rf '.self::$contentdir); + } + + /** + * Test method getContent(), getContentByVersion(), getLatestContent() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetContent() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $this->assertIsObject($document); + $lcontent = $document->getLatestContent(); + $this->assertIsObject($lcontent); + $version = $document->getContentByVersion(1); + $this->assertIsObject($version); + $this->assertEquals($version->getId(), $lcontent->getId()); + $content = $document->getContent(); + $this->assertIsArray($content); + $this->assertCount(1, $content); + $this->assertEquals($version->getId(), $content[0]->getId()); + } + + /** + * Test method getContent() mit sql fail + * + * @return void + */ + public function testGetContentSqlFail() + { + $document = $this->getMockedDocument(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblDocumentContent` WHERE `document` ")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($document->getContent()); + } + + /** + * Test method getContentByVersion() mit sql fail + * + * @return void + */ + public function testGetContentByVersionSqlFail() + { + $document = $this->getMockedDocument(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblDocumentContent` WHERE `document` ")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($document->getContentByVersion(1)); + } + + /** + * Test method getLatestContent() mit sql fail + * + * @return void + */ + public function testGetLatestContentSqlFail() + { + $document = $this->getMockedDocument(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblDocumentContent` WHERE `document` ")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($document->getLatestContent()); + } + + /** + * Test method removeContent() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testRemoveContent() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $this->assertIsObject($document); + $lcontent = $document->getLatestContent(); + $this->assertIsObject($lcontent); + + /* Removing the only version will fail */ + $ret = $document->removeContent($lcontent); + $this->assertFalse($ret); + + /* Add a new version */ + $filename = self::createTempFile(300); + $result = $document->addContent('', $user, $filename, 'file2.txt', '.txt', 'text/plain'); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + $this->assertIsObject($result); + $this->assertIsObject($result->getContent()); + + /* Second trial to remove a version. Now it succeeds because it is not + * the last version anymore. + */ + $ret = $document->removeContent($lcontent); + $this->assertTrue($ret); + + /* The latest version is now version 2 */ + $lcontent = $document->getLatestContent(); + $this->assertIsObject($lcontent); + $this->assertEquals(2, $lcontent->getVersion()); + + /* There is only 1 version left */ + $contents = $document->getContent(); + $this->assertIsArray($contents); + $this->assertCount(1, $contents); + } + + /** + * Test method isType() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testIsType() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $this->assertIsObject($document); + $lcontent = $document->getLatestContent(); + $this->assertIsObject($lcontent); + $ret = $lcontent->isType('documentcontent'); + $this->assertTrue($ret); + } + + /** + * Test method getUser(), getDocument() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testVarious() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $this->assertIsObject($document); + $lcontent = $document->getLatestContent(); + $this->assertIsObject($lcontent); + $ret = $lcontent->isType('documentcontent'); + $this->assertTrue($ret); + $doc = $lcontent->getDocument(); + $this->assertEquals($document->getId(), $doc->getId()); + $u = $lcontent->getUser(); + $this->assertEquals($user->getId(), $u->getId()); + $filetype = $lcontent->getFileType(); + $this->assertEquals('.txt', $filetype); + $origfilename = $lcontent->getOriginalFileName(); + $this->assertEquals('file1.txt', $origfilename); + } + + /** + * Test method getComment(), setComment() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetComment() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $this->assertIsObject($document); + $lcontent = $document->getLatestContent(); + $this->assertIsObject($lcontent); + $comment = $lcontent->getComment(); + $this->assertEquals('', $comment); + $ret = $lcontent->setComment('Document content comment'); + $this->assertTrue($ret); + /* Retrieve the document content from the database again */ + $content = self::$dms->getDocumentContent($lcontent->getId()); + $comment = $content->getComment(); + $this->assertEquals('Document content comment', $comment); + } + + /** + * Test method getDate(), setDate() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetDate() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $this->assertIsObject($document); + $lcontent = $document->getLatestContent(); + $this->assertIsObject($lcontent); + $date = $lcontent->getDate(); + $this->assertIsInt($date); + $this->assertGreaterThanOrEqual(time(), $date); + + /* Set date as timestamp */ + $ret = $lcontent->setDate($date-1000); + $this->assertTrue($ret); + /* Retrieve the document content from the database again */ + $content = self::$dms->getDocumentContent($lcontent->getId()); + $newdate = $content->getDate(); + $this->assertEquals($date-1000, $newdate); + + /* Set date in Y-m-d H:i:s format */ + $date = time()-500; + $ret = $lcontent->setDate(date('Y-m-d H:i:s', $date)); + $this->assertTrue($ret); + /* Retrieve the document content from the database again */ + $content = self::$dms->getDocumentContent($lcontent->getId()); + $newdate = $content->getDate(); + $this->assertEquals($date, $newdate); + + /* Not passing a date will set the current date/time */ + $date = time(); + $ret = $lcontent->setDate(); + $this->assertTrue($ret); + /* Retrieve the document content from the database again */ + $content = self::$dms->getDocumentContent($lcontent->getId()); + $newdate = $content->getDate(); + $this->assertEquals($date, $newdate); + } + + /** + * Test method getFileSize(), setFileSize() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetFileSize() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1', 200); + $this->assertIsObject($document); + $lcontent = $document->getLatestContent(); + $this->assertIsObject($lcontent); + $filesize = $lcontent->getFileSize(); + $this->assertEquals(200, $filesize); + + /* Intentially corrupt the file size */ + $db = self::$dms->getDb(); + $ret = $db->getResult("UPDATE `tblDocumentContent` SET `fileSize` = 300 WHERE `document` = " . $document->getID() . " AND `version` = " . $lcontent->getVersion()); + $this->assertTrue($ret); + + $corcontent = self::$dms->getDocumentContent($lcontent->getId()); + $filesize = $corcontent->getFileSize(); + $this->assertEquals(300, $filesize); + + /* Repair filesize by calling setFileSize() */ + $ret = $corcontent->setFileSize(); + $this->assertTrue($ret); + $filesize = $corcontent->getFileSize(); + $this->assertEquals(200, $filesize); + } + + /** + * Test method getChecksum(), setChecksum() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetChecksum() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1', 200); + $this->assertIsObject($document); + $lcontent = $document->getLatestContent(); + $this->assertIsObject($lcontent); + $orgchecksum = $lcontent->getChecksum(); + $this->assertIsString($orgchecksum); + $this->assertEquals(32, strlen($orgchecksum)); + + /* Intentially corrupt the checksum */ + $db = self::$dms->getDb(); + $ret = $db->getResult("UPDATE `tblDocumentContent` SET `checksum` = 'foobar' WHERE `document` = " . $document->getID() . " AND `version` = " . $lcontent->getVersion()); + $this->assertTrue($ret); + + $corcontent = self::$dms->getDocumentContent($lcontent->getId()); + $checksum = $corcontent->getChecksum(); + $this->assertEquals('foobar', $checksum); + + /* Repair filesize by calling setChecksum() */ + $ret = $corcontent->setChecksum(); + $this->assertTrue($ret); + $checksum = $corcontent->getChecksum(); + $this->assertEquals($orgchecksum, $checksum); + } + + /** + * Test method getStatus(), setStatus(), getStatusLog() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetStatus() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1', 200); + $this->assertIsObject($document); + $lcontent = $document->getLatestContent(); + $this->assertIsObject($lcontent); + + $status = $lcontent->getStatus(); + $this->assertIsArray($status); + $this->assertEquals(S_RELEASED, $status['status']); + + $statuslog = $lcontent->getStatusLog(); + $this->assertIsArray($statuslog); + $this->assertCount(1, $statuslog); + + /* Missing update user returns false */ + $ret = $lcontent->setStatus(S_OBSOLETE, '', null); + $this->assertFalse($ret); + + /* A status out of range returns false */ + $ret = $lcontent->setStatus(9, '', $user); + $this->assertFalse($ret); + + /* A wrong date returns false */ + $ret = $lcontent->setStatus(S_OBSOLETE, '', $user, '2021-02-29 10:10:10'); + $this->assertFalse($ret); + + $ret = $lcontent->setStatus(S_OBSOLETE, 'No longer valid', $user, date('Y-m-d H:i:s')); + $status = $lcontent->getStatus(); + $this->assertIsArray($status); + $this->assertEquals(S_OBSOLETE, $status['status']); + + /* Status log has now 2 entries */ + $statuslog = $lcontent->getStatusLog(); + $this->assertIsArray($statuslog); + $this->assertCount(2, $statuslog); + + /* Add the 'onSetStatus' callback */ + $callret = ''; + $callback = function ($param, $content, $updateuser, $oldstatus, $newstatus) use (&$callret) { + $callret = $oldstatus.' to '.$newstatus; + return $param; + }; + /* Because the callback will return false, the status will not be set */ + self::$dms->setCallback('onSetStatus', $callback, false); + /* Trying to go back to status released with a callback returning false */ + $ret = $lcontent->setStatus(S_RELEASED, 'Valid again', $user); + $status = $lcontent->getStatus(); + $this->assertIsArray($status); + /* Status is still S_OBSOLETE because the callback returned false */ + $this->assertEquals(S_OBSOLETE, $status['status']); + $this->assertEquals(S_OBSOLETE.' to '.S_RELEASED, $callret); + + /* Do it again, but this time the callback returns true */ + self::$dms->setCallback('onSetStatus', $callback, true); + /* Trying to go back to status released with a callback returning true */ + $ret = $lcontent->setStatus(S_RELEASED, 'Valid again', $user); + $status = $lcontent->getStatus(); + $this->assertIsArray($status); + /* Status updated to S_RELEASED because the callback returned true */ + $this->assertEquals(S_RELEASED, $status['status']); + $this->assertEquals(S_OBSOLETE.' to '.S_RELEASED, $callret); + + /* Status log has now 3 entries */ + $statuslog = $lcontent->getStatusLog(); + $this->assertIsArray($statuslog); + $this->assertCount(3, $statuslog); + + /* Get just the last entry */ + $statuslog = $lcontent->getStatusLog(1); + $this->assertIsArray($statuslog); + $this->assertCount(1, $statuslog); + $this->assertEquals('Valid again', $statuslog[0]['comment']); + } + + /** + * Test method getMimeType(), setMimeType() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetMimeType() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1', 200); + $this->assertIsObject($document); + $lcontent = $document->getLatestContent(); + $this->assertIsObject($lcontent); + + $ret = $lcontent->setMimeType('text/csv'); + $this->assertTrue($ret); + + /* Retrieve the document content from the database again */ + $content = self::$dms->getDocumentContent($lcontent->getId()); + $this->assertIsObject($content); + $this->assertEquals('text/csv', $content->getMimeType()); + } + + /** + * Test method getFileType(), setFileType() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetFileType() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1', 200); + $this->assertIsObject($document); + $lcontent = $document->getLatestContent(); + $this->assertIsObject($lcontent); + + $ret = $lcontent->setMimeType('text/css'); + $this->assertTrue($ret); + + $ret = $lcontent->setFileType(); + $this->assertTrue($ret); + + /* Retrieve the document content from the database again */ + $content = self::$dms->getDocumentContent($lcontent->getId()); + $this->assertIsObject($content); + $this->assertEquals('.css', $content->getFileType()); + + /* Also get the file content to ensure the renaming of the file + * on disc has succeeded. + */ + $c = file_get_contents(self::$dms->contentDir.$lcontent->getPath()); + $this->assertEquals(200, strlen($c)); + } + + /** + * Test method replaceContent() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testReplaceContent() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $guest = self::$dms->getUser(2); + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1', 200); + $this->assertIsObject($document); + $lcontent = $document->getLatestContent(); + $this->assertIsObject($lcontent); + + $filename = self::createTempFile(300); + /* Not using the same user yields an error */ + $ret = $document->replaceContent(1, $guest, $filename, 'file1.txt', '.txt', 'text/plain'); + $this->assertFalse($ret); + /* Not using the same orig. file name yields an error */ + $ret = $document->replaceContent(1, $user, $filename, 'file2.txt', '.txt', 'text/plain'); + $this->assertFalse($ret); + /* Not using the same file type yields an error */ + $ret = $document->replaceContent(1, $user, $filename, 'file1.txt', '.csv', 'text/plain'); + $this->assertFalse($ret); + /* Not using the same mime type yields an error */ + $ret = $document->replaceContent(1, $user, $filename, 'file1.txt', '.txt', 'text/csv'); + $this->assertFalse($ret); + + /* Setting version to 0 will replace the latest version */ + $ret = $document->replaceContent(0, $user, $filename, 'file1.txt', '.txt', 'text/plain'); + $this->assertTrue($ret); + + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + + /* Retrieve the document content from the database again */ + $newcontent = $document->getLatestContent(); + $this->assertIsObject($newcontent); + $this->assertEquals('text/plain', $newcontent->getMimeType()); + /* File size has grown from 200 to 300 bytes */ + $filesize = $newcontent->getFileSize(); + $this->assertEquals(300, $filesize); + /* Still version 1 */ + $version = $newcontent->getVersion(); + $this->assertEquals(1, $version); + } + + /** + * Test method replaceContent() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAccessMode() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $guest = self::$dms->getUser(2); + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1', 200); + $this->assertIsObject($document); + $lcontent = $document->getLatestContent(); + $this->assertIsObject($lcontent); + + /* Access rights on a document content are always M_READ unless the callback + * onCheckAccessDocumentContent is implemented */ + $mode = $lcontent->getAccessMode($user); + $this->assertEquals(M_READ, $mode); + } +} diff --git a/SeedDMS_Core/tests/DocumentFileTest.php b/SeedDMS_Core/tests/DocumentFileTest.php new file mode 100644 index 000000000..95d758c56 --- /dev/null +++ b/SeedDMS_Core/tests/DocumentFileTest.php @@ -0,0 +1,290 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +use PHPUnit\Framework\SeedDmsTest; + +/** + * Group test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class DocumentFileTest extends SeedDmsTest +{ + + /** + * Create a real sqlite database in memory + * + * @return void + */ + protected function setUp(): void + { + self::$dbh = self::createInMemoryDatabase(); + self::$contentdir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpunit-'.time(); + mkdir(self::$contentdir); + // echo "Creating temp content dir: ".self::$contentdir."\n"; + self::$dms = new SeedDMS_Core_DMS(self::$dbh, self::$contentdir); + self::$dbversion = self::$dms->getDBVersion(); + } + + /** + * Clean up at tear down + * + * @return void + */ + protected function tearDown(): void + { + self::$dbh = null; + // echo "\nRemoving temp. content dir: ".self::$contentdir."\n"; + exec('rm -rf '.self::$contentdir); + } + + /** + * Test method getInstance() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetMockedDocumentFile() + { + $user = self::getMockedUser(); + $document1 = self::getMockedDocument(1, 'Document 1'); + $file = new SeedDMS_Core_DocumentFile(1, $document1, $user->getId(), 'comment', time(), '', '.txt', 'text/plain', 'test.txt', 'name', 1, true); + $this->assertIsObject($file); + $this->assertTrue($file->isType('documentfile')); + + $document = $file->getDocument(); + $this->assertIsObject($document); + $this->assertTrue($document->isType('document')); + $this->assertEquals('Document 1', $document->getName()); + + $ispublic = $file->isPublic(); + $this->assertTrue($ispublic); + + $comment = $file->getComment(); + $this->assertEquals('comment', $comment); + + $filetype = $file->getFileType(); + $this->assertEquals('.txt', $filetype); + + $mimetype = $file->getMimeType(); + $this->assertEquals('text/plain', $mimetype); + + $name = $file->getName(); + $this->assertEquals('name', $name); + + $origfilename = $file->getOriginalFileName(); + $this->assertEquals('test.txt', $origfilename); + + $version = $file->getVersion(); + $this->assertEquals(1, $version); + + $accessmode = $file->getAccessMode($user); + $this->assertEquals(M_READ, $accessmode); + } + + /** + * Test method setComment() mit sql fail + * + * @return void + */ + public function testSetCommentSqlFail() + { + $user = self::getMockedUser(); + $document = $this->getMockedDocument(); + $file = new SeedDMS_Core_DocumentFile(1, $document, $user->getId(), 'comment', time(), '', '.txt', 'text/plain', 'test.txt', 'name', 1, true); + $this->assertIsObject($file); + $this->assertTrue($file->isType('documentfile')); + + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblDocumentFiles` SET `comment`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($file->setComment('my comment')); + } + + /** + * Test method setName() mit sql fail + * + * @return void + */ + public function testSetNameSqlFail() + { + $user = self::getMockedUser(); + $document = $this->getMockedDocument(); + $file = new SeedDMS_Core_DocumentFile(1, $document, $user->getId(), 'comment', time(), '', '.txt', 'text/plain', 'test.txt', 'name', 1, true); + $this->assertIsObject($file); + $this->assertTrue($file->isType('documentfile')); + + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblDocumentFiles` SET `name`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($file->setName('my name')); + } + + /** + * Test method setDate() mit sql fail + * + * @return void + */ + public function testSetDateSqlFail() + { + $user = self::getMockedUser(); + $document = $this->getMockedDocument(); + $file = new SeedDMS_Core_DocumentFile(1, $document, $user->getId(), 'comment', time(), '', '.txt', 'text/plain', 'test.txt', 'name', 1, true); + $this->assertIsObject($file); + $this->assertTrue($file->isType('documentfile')); + + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblDocumentFiles` SET `date`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($file->setDate()); + } + + /** + * Test method setVersion() mit sql fail + * + * @return void + */ + public function testSetVersionSqlFail() + { + $user = self::getMockedUser(); + $document = $this->getMockedDocument(); + $file = new SeedDMS_Core_DocumentFile(1, $document, $user->getId(), 'comment', time(), '', '.txt', 'text/plain', 'test.txt', 'name', 1, true); + $this->assertIsObject($file); + $this->assertTrue($file->isType('documentfile')); + + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblDocumentFiles` SET `version`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($file->setVersion(1)); + } + + /** + * Test method setPublic() mit sql fail + * + * @return void + */ + public function testSetPublicnSqlFail() + { + $user = self::getMockedUser(); + $document = $this->getMockedDocument(); + $file = new SeedDMS_Core_DocumentFile(1, $document, $user->getId(), 'comment', time(), '', '.txt', 'text/plain', 'test.txt', 'name', 1, true); + $this->assertIsObject($file); + $this->assertTrue($file->isType('documentfile')); + + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblDocumentFiles` SET `public`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($file->setPublic(true)); + } + + /** + * Test method addDocumentFile(), getDocumentFile() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddDocumentFile() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $this->assertIsObject($document); + $tmpfile = self::createTempFile(); + $file = $document->addDocumentFile('attachment.txt', 'comment', $user, $tmpfile, 'attachment.txt', '.txt', 'text/plain', 0, true); + $this->assertTrue(SeedDMS_Core_File::removeFile($tmpfile)); + $this->assertIsObject($file); + $this->assertTrue($file->isType('documentfile')); + + $files = $document->getDocumentFiles(); + $this->assertIsArray($files); + $this->assertCount(1, $files); + + $file = $files[0]; + + $document = $file->getDocument(); + $this->assertIsObject($document); + $this->assertTrue($document->isType('document')); + $this->assertEquals('Document 1', $document->getName()); + + $ispublic = $file->isPublic(); + $this->assertTrue($ispublic); + + $luser = $file->getUser(); + $this->assertIsObject($luser); + $this->assertTrue($luser->isType('user')); + + $ret = $file->setComment('new comment'); + $this->assertTrue($ret); + $comment = $file->getComment(); + $this->assertEquals('new comment', $comment); + + $ret = $file->setName('new name'); + $this->assertTrue($ret); + $name = $file->getName(); + $this->assertEquals('new name', $name); + + $now = time(); + $ret = $file->setDate($now); + $this->assertTrue($ret); + $date = $file->getDate(); + $this->assertEquals($now, $date); + + $ret = $file->setDate('fail'); + $this->assertFalse($ret); + + $ret = $file->setVersion(2); + $this->assertTrue($ret); + $version = $file->getVersion(); + $this->assertEquals(2, $version); + + $ret = $file->setVersion('fail'); + $this->assertFalse($ret); + + $ret = $file->setPublic(true); + $this->assertTrue($ret); + $ispublic = $file->isPublic(); + $this->assertEquals(1, $ispublic); + + + } +} diff --git a/SeedDMS_Core/tests/DocumentLinkTest.php b/SeedDMS_Core/tests/DocumentLinkTest.php new file mode 100644 index 000000000..d646607e9 --- /dev/null +++ b/SeedDMS_Core/tests/DocumentLinkTest.php @@ -0,0 +1,125 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +use PHPUnit\Framework\SeedDmsTest; + +/** + * Group test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class DocumentLinkTest extends SeedDmsTest +{ + + /** + * Create a real sqlite database in memory + * + * @return void + */ + protected function setUp(): void + { + self::$dbh = self::createInMemoryDatabase(); + self::$contentdir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpunit-'.time(); + mkdir(self::$contentdir); + // echo "Creating temp content dir: ".self::$contentdir."\n"; + self::$dms = new SeedDMS_Core_DMS(self::$dbh, self::$contentdir); + self::$dbversion = self::$dms->getDBVersion(); + } + + /** + * Clean up at tear down + * + * @return void + */ + protected function tearDown(): void + { + self::$dbh = null; + // echo "\nRemoving temp. content dir: ".self::$contentdir."\n"; + exec('rm -rf '.self::$contentdir); + } + + /** + * Test method getInstance() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetMockedDocumentLink() + { + $user = self::getMockedUser(); + $document1 = self::getMockedDocument(1, 'Document 1'); + $document2 = self::getMockedDocument(2, 'Document 2'); + $link = new SeedDMS_Core_DocumentLink(1, $document1, $document2, $user, true); + $this->assertIsObject($link); + $this->assertTrue($link->isType('documentlink')); + + $document = $link->getDocument(); + $this->assertIsObject($document); + $this->assertTrue($document->isType('document')); + $this->assertEquals('Document 1', $document->getName()); + + $document = $link->getTarget(); + $this->assertIsObject($document); + $this->assertTrue($document->isType('document')); + $this->assertEquals('Document 2', $document->getName()); + + $ispublic = $link->isPublic(); + $this->assertTrue($ispublic); + } + + /** + * Test method addDocumentLink(), getDocumentLink() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddDocumentLink() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $document1 = self::createDocument($rootfolder, $user, 'Document 1'); + $this->assertIsObject($document1); + $document2 = self::createDocument($rootfolder, $user, 'Document 2'); + $this->assertIsObject($document2); + $link = $document1->addDocumentLink($document2->getId(), $user->getId(), true); + $this->assertIsObject($link); + $this->assertTrue($link->isType('documentlink')); + + $document = $link->getDocument(); + $this->assertIsObject($document); + $this->assertTrue($document->isType('document')); + $this->assertEquals('Document 1', $document->getName()); + + $document = $link->getTarget(); + $this->assertIsObject($document); + $this->assertTrue($document->isType('document')); + $this->assertEquals('Document 2', $document->getName()); + + $ispublic = $link->isPublic(); + $this->assertTrue($ispublic); + + $luser = $link->getUser(); + $this->assertIsObject($luser); + $this->assertTrue($luser->isType('user')); + } +} diff --git a/SeedDMS_Core/tests/DocumentTest.php b/SeedDMS_Core/tests/DocumentTest.php new file mode 100644 index 000000000..5331f367d --- /dev/null +++ b/SeedDMS_Core/tests/DocumentTest.php @@ -0,0 +1,1323 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +use PHPUnit\Framework\SeedDmsTest; + +/** + * Group test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class DocumentTest extends SeedDmsTest +{ + + /** + * Create a real sqlite database in memory + * + * @return void + */ + protected function setUp(): void + { + self::$dbh = self::createInMemoryDatabase(); + self::$contentdir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpunit-'.time(); + mkdir(self::$contentdir); + // echo "Creating temp content dir: ".self::$contentdir."\n"; + self::$dms = new SeedDMS_Core_DMS(self::$dbh, self::$contentdir); + self::$dbversion = self::$dms->getDBVersion(); + } + + /** + * Clean up at tear down + * + * @return void + */ + protected function tearDown(): void + { + self::$dbh = null; + // echo "\nRemoving temp. content dir: ".self::$contentdir."\n"; + exec('rm -rf '.self::$contentdir); + } + + /** + * Test method getInstance() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetInstance() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1'); + /* Get the document with id 1, which must be 'Document 1' */ + $document = SeedDMS_Core_Document::getInstance(1, self::$dms); + $this->assertIsObject($document); + $this->assertTrue($document->isType('document')); + $this->assertEquals('Document 1', $document->getName()); + /* Get a none existing document */ + $document = SeedDMS_Core_Document::getInstance(2, self::$dms); + $this->assertNull($document); + } + + /** + * Test method getInstance() within a root folder + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetInstanceWithinRoot() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + /* The simple folder structure will create to subfolders, each + * with 15 documents. + */ + self::createSimpleFolderStructureWithDocuments(); + $subfolder = self::$dms->getFolderByName('Subfolder 1'); + /* Get a document in Subfolder 1 */ + $document1 = self::$dms->getDocumentByName('Document 1-1'); + /* Get a document in Subfolder 2 */ + $document2 = self::$dms->getDocumentByName('Document 2-1'); + + /* Getting a document in subfolder 1 without any restrictions must succeed */ + $document = SeedDMS_Core_Document::getInstance($document1->getId(), self::$dms); + $this->assertIsObject($document); + $this->assertTrue($document->isType('document')); + + /* Make Subfolder 1 the root folder */ + self::$dms->checkWithinRootDir = true; + self::$dms->setRootFolderID($subfolder->getId()); + + /* Getting a document by id in subfolder 1 still must succeed */ + $document = SeedDMS_Core_Document::getInstance($document1->getId(), self::$dms); + $this->assertIsObject($document); + $this->assertTrue($document->isType('document')); + + /* Getting a document by id in subfolder 2 must fail */ + $document = SeedDMS_Core_Document::getInstance($document2->getId(), self::$dms); + $this->assertNull($document); + + /* Get a document in Subfolder 1 */ + $document = self::$dms->getDocumentByName('Document 1-1'); + $this->assertIsObject($document); + $this->assertTrue($document->isType('document')); + + /* Get a document in Subfolder 2 */ + $document = self::$dms->getDocumentByName('Document 2-1'); + $this->assertNull($document); + } + + /** + * Test method getInstance() + * + * @return void + */ + public function testGetInstanceSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lock` FROM `tblDocuments`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $this->assertFalse(SeedDMS_Core_Document::getInstance(1, $dms)); + } + + /** + * Test method getDir() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDir() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $this->assertIsObject($document); + $this->assertEquals('1/', $document->getDir()); + } + + /** + * Test method getComment() and setComment() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetComment() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->getUser(1); + $document = self::createDocument($folder, $user, 'Document 1'); + $this->assertIsObject($document); + $comment = $document->getComment(); + $this->assertEquals('', $comment); + $ret = $document->setComment('foo'); + $this->assertTrue($ret); + $comment = $document->getComment(); + $this->assertEquals('foo', $comment); + } + + /** + * Test method setComment() mit sql fail + * + * @return void + */ + public function testSetCommentSqlFail() + { + $document = $this->getMockedDocument(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblDocuments` SET `comment`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($document->setComment('my comment')); + } + + /** + * Test method getKeywords() and setKeywords() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetKeywords() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->getUser(1); + $document = self::createDocument($folder, $user, 'Document 1'); + $this->assertIsObject($document); + $keywords = $document->getKeywords(); + $this->assertEquals('', $keywords); + $ret = $document->setKeywords('foo bar'); + $this->assertTrue($ret); + $keywords = $document->getKeywords(); + $this->assertEquals('foo bar', $keywords); + } + + /** + * Test method setKeywords() mit sql fail + * + * @return void + */ + public function testSetKeywordsSqlFail() + { + $document = $this->getMockedDocument(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblDocuments` SET `keywords`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($document->setKeywords('keywords')); + } + + /** + * Test method getName() and setName() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetName() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->getUser(1); + $document = self::createDocument($folder, $user, 'Document 1'); + $this->assertIsObject($document); + $name = $document->getName(); + $this->assertEquals('Document 1', $name); + $ret = $document->setName('foo'); + $this->assertTrue($ret); + $name = $document->getName(); + $this->assertEquals('foo', $name); + } + + /** + * Test method setName() mit sql fail + * + * @return void + */ + public function testSetNameSqlFail() + { + $document = $this->getMockedDocument(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblDocuments` SET `name`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($document->setName('my name')); + } + + /** + * Test method getDate() and setDate() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetDate() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->getUser(1); + $document = self::createDocument($folder, $user, 'Document 1'); + $now = time(); + /* Passing false as a time stamp will take current time stamp */ + $ret = $document->setDate(false); + $this->assertTrue($ret); + $date = $document->getDate(); + $this->assertEquals($now, $date); + /* Setting a time stamp */ + $now -= 1000; + $ret = $document->setDate($now); + $this->assertTrue($ret); + $date = $document->getDate(); + $this->assertEquals($now, $date); + /* Setting a none numeric value will fail */ + $ret = $document->setDate('foo'); + $this->assertFalse($ret); + } + + /** + * Test method setDate() with sql fail + * + * @return void + */ + public function testSetDateSqlFail() + { + $document = $this->getMockedDocument(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblDocuments` SET `date` = ")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($document->setDate(null)); + } + + /** + * Test method getDefaultAccess() and setDefaultAccess() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetDefaultAccess() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->getUser(1); + $document = self::createDocument($folder, $user, 'Document 1'); + $this->assertIsObject($document); + $this->assertTrue($document->isType('document')); + $defaultaccess = $document->getDefaultAccess(); + $this->assertEquals(M_READ, $defaultaccess); + + /* Setting a default access out of range yields an error */ + $ret = $document->setDefaultAccess(0, true); + $this->assertFalse($ret); + + /* Setting a default access out of range yields an error */ + $ret = $document->setDefaultAccess(M_ALL+1, true); + $this->assertFalse($ret); + + /* Setting the default access will have no effect as long as access + * rights are inherited. */ + $ret = $document->setDefaultAccess(M_READWRITE, true); + $this->assertTrue($ret); + $defaultaccess = $document->getDefaultAccess(); + $this->assertEquals(M_READ, $defaultaccess); + + /* Once inheritance of access rights is turned off, the previously + * set default access right will take effect. */ + $ret = $document->setInheritAccess(false, true); + $this->assertTrue($ret); + $defaultaccess = $document->getDefaultAccess(); + $this->assertEquals(M_READWRITE, $defaultaccess); + + /* Also check if inherited access was turned off */ + $ret = $document->getInheritAccess(); + $this->assertFalse($ret); + } + + /** + * Test method setDefaultAccess() mit sql fail + * + * @return void + */ + public function testSetDefaultAccessSqlFail() + { + $document = $this->getMockedDocument(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblDocuments` SET `defaultAccess`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($document->setDefaultAccess(M_READ)); + } + + /** + * Test method setInheritAccess() mit sql fail + * + * @return void + */ + public function testSetInheritAccessSqlFail() + { + $document = $this->getMockedDocument(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblDocuments` SET `inheritAccess`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($document->setInheritAccess(0)); + } + + /** + * Test method addAccess(), removeAccess(), changeAccess(), getAccessList() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetAccess() + { + self::createGroupsAndUsers(); + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $adminuser = self::$dms->getUser(1); + $guestuser = self::$dms->getUser(2); + $user = self::$dms->getUserByLogin('user-1-1'); + $this->assertIsObject($user); + $this->assertTrue($user->isType('user')); + $group = self::$dms->getGroupByName('Group 1'); + $this->assertIsObject($group); + $this->assertTrue($group->isType('group')); + $document = self::createDocument($folder, $adminuser, 'Document 1'); + $this->assertIsObject($document); + $this->assertTrue($document->isType('document')); + $defaultaccess = $document->getDefaultAccess(); + $this->assertEquals(M_READ, $defaultaccess); + + /* Turn off inheritance, otherwise the access rights have no effect */ + $ret = $document->setInheritAccess(false, true); + $this->assertTrue($ret); + + /* Retrieving an access mode without a valid user will always return M_NONE */ + $mode = $document->getAccessMode(null); + $this->assertEquals(M_NONE, $mode); + + /* The admin user has always unlimited access */ + $mode = $document->getAccessMode($adminuser); + $this->assertEquals(M_ALL, $mode); + + /* Without setting any specific access, the document has a default mode M_READ */ + $mode = $document->getAccessMode($user); + $this->assertEquals(M_READ, $mode); + + /* Access mode for group is also the default access */ + $mode = $document->getGroupAccessMode($group); + $this->assertEquals(M_READ, $mode); + + /* Set unlimited access rights for everybody */ + $ret = $document->setDefaultAccess(M_ALL); + $this->assertTrue($ret); + $mode = $document->getAccessMode($user); + $this->assertEquals(M_ALL, $mode); + $mode = $document->getGroupAccessMode($group); + $this->assertEquals(M_ALL, $mode); + + /* Guest still have just read access */ + $mode = $document->getAccessMode($guestuser); + $this->assertEquals(M_READ, $mode); + + /* Add wrong access type returns false */ + $ret = $document->addAccess(M_ALL+1, $user->getId(), true); + $this->assertFalse($ret); + + /* Add read/write access on the document for user */ + $ret = $document->addAccess(M_READWRITE, $user->getId(), true); + $this->assertTrue($ret); + /* Adding another access right (not matter which one) for the + * same user yields an error + */ + $ret = $document->addAccess(M_READ, $user->getId(), true); + $this->assertFalse($ret); + + /* Passing an invalid second parameter will return false */ + $accesslist = $document->getAccessList(M_ANY, 5); + $this->assertFalse($accesslist); + + /* Searching for mode == M_READ will return neither a group nor + * the user, because the user has read&write access + */ + $accesslist = $document->getAccessList(M_READ); + $this->assertIsArray($accesslist); + $this->assertCount(0, $accesslist['groups']); + $this->assertCount(0, $accesslist['users']); + + $accesslist = $document->getAccessList(M_READWRITE); + $this->assertIsArray($accesslist); + $this->assertCount(0, $accesslist['groups']); + $this->assertCount(1, $accesslist['users']); + + $accesslist = $document->getAccessList(); + $this->assertIsArray($accesslist); + $this->assertCount(0, $accesslist['groups']); + $this->assertCount(1, $accesslist['users']); + + /* Access mode is just read/write for the user thought the default is unlimited */ + $mode = $document->getAccessMode($user); + $this->assertEquals(M_READWRITE, $mode); + /* Access mode for the group is still unlimited */ + $mode = $document->getGroupAccessMode($group); + $this->assertEquals(M_ALL, $mode); + + /* Setting default access to M_READ + * is just a precaution to ensure the unlimeted access rights is not + * derived from the default access which was set to M_ALL above. + */ + $ret = $document->setDefaultAccess(M_READ); + $this->assertTrue($ret); + $mode = $document->getGroupAccessMode($group); + $this->assertEquals(M_READ, $mode); + + /* Add unlimeted access on the document for group */ + $ret = $document->addAccess(M_ALL, $group->getId(), false); + $this->assertTrue($ret); + /* Adding another access right (not matter which one) for the + * same group yields an error + */ + $ret = $document->addAccess(M_READ, $group->getId(), false); + $this->assertFalse($ret); + + $accesslist = $document->getAccessList(); + $this->assertIsArray($accesslist); + $this->assertCount(1, $accesslist['groups']); + $this->assertCount(1, $accesslist['users']); + + /* The group has now unlimited access rights */ + $mode = $document->getGroupAccessMode($group); + $this->assertEquals(M_ALL, $mode); + + /* The user still has just read/write access, though the group he belongs + * to has unlimeted rights. The specific user rights has higher priority. + */ + $mode = $document->getAccessMode($user); + $this->assertEquals(M_READWRITE, $mode); + + /* Remove all specific access rights for the user */ + $ret = $document->removeAccess($user->getId(), true); + $this->assertTrue($ret); + + /* Now the group rights apply for the user, because there are no + * specific user rights anymore. + */ + $mode = $document->getAccessMode($user); + $this->assertEquals(M_ALL, $mode); + + /* change unlimeted access on the document for group to none */ + $ret = $document->changeAccess(M_NONE, $group->getId(), false); + $this->assertTrue($ret); + $mode = $document->getAccessMode($user); + $this->assertEquals(M_NONE, $mode); + + /* clear all access rights */ + $ret = $document->clearAccessList(); + $this->assertTrue($ret); + $accesslist = $document->getAccessList(); + $this->assertIsArray($accesslist); + $this->assertCount(0, $accesslist['groups']); + $this->assertCount(0, $accesslist['users']); + + /* We are back to the default access rights */ + $mode = $document->getAccessMode($user); + $this->assertEquals(M_READ, $mode); + + } + + /** + * Test method addNotify(), removeNotify(), getNotifyList(), cleanNotifyList() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetNotify() + { + self::createGroupsAndUsers(); + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $adminuser = self::$dms->getUser(1); + $guestuser = self::$dms->getUser(2); + $user = self::$dms->getUserByLogin('user-1-1'); + $this->assertIsObject($user); + $this->assertTrue($user->isType('user')); + $group = self::$dms->getGroupByName('Group 1'); + $this->assertIsObject($group); + $this->assertTrue($group->isType('group')); + $document = self::createDocument($folder, $adminuser, 'Document 1'); + $this->assertIsObject($document); + $this->assertTrue($document->isType('document')); + + $notifylist = $document->getNotifyList(); + $this->assertIsArray($notifylist); + $this->assertCount(0, $notifylist['groups']); + $this->assertCount(0, $notifylist['users']); + + /* Add notify on the document for user */ + $ret = $document->addNotify($user->getId(), true); + $this->assertEquals(0, $ret); + + /* Add notify on the document for group */ + $ret = $document->addNotify($group->getId(), false); + $this->assertEquals(0, $ret); + + /* Add notify on the document for a user that does not exists */ + $ret = $document->addNotify(15, true); + $this->assertEquals(-1, $ret); + + $notifylist = $document->getNotifyList(); + $this->assertIsArray($notifylist); + $this->assertCount(1, $notifylist['groups']); + $this->assertCount(1, $notifylist['users']); + + /* Setting the default access to M_NONE and turning off inheritance + * will clean the notification list, because the notifiers have no + * longer read access on the document and therefore will be removed + * from the notification list. + */ + $ret = $document->setInheritAccess(false); + $this->assertTrue($ret); + $ret = $document->setDefaultAccess(M_NONE); + $this->assertTrue($ret); + + $notifylist = $document->getNotifyList(); + $this->assertIsArray($notifylist); + $this->assertCount(0, $notifylist['groups']); + $this->assertCount(0, $notifylist['users']); + } + + /** + * Test method isDescendant() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testIsDescendant() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $subfolder1 = $rootfolder->addSubFolder('Subfolder 1', '', $user, 2.0); + $subfolder2 = $rootfolder->addSubFolder('Subfolder 2', '', $user, 1.0); + $document = self::createDocument($subfolder1, $user, 'Document 1'); + /* document is a descendant of root folder and subfolder 1 */ + $this->assertTrue($document->isDescendant($rootfolder)); + $this->assertTrue($document->isDescendant($subfolder1)); + /* subfolder is not a descendant of subfolder 2 */ + $this->assertFalse($document->isDescendant($subfolder2)); + } + + /** + * Test method getParent() + * + * Create a new document below root folder and check if parent + * of the document is the root folder. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetParent() + { + $user = self::$dms->getUser(1); + $rootfolder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $parent = $document->getParent(); + $this->assertIsObject($parent); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $parent); + $this->assertEquals(1, $parent->getId()); + } + + /** + * Test method setParent() + * + * Create a new document below root folder, move it to a subfolder + * and check if parent of the document is the sub folder. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSetParent() + { + $user = self::$dms->getUser(1); + $rootfolder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $subfolder = $rootfolder->addSubFolder('Subfolder 1', '', $user, 0); + $document = self::createDocument($rootfolder, $user, 'Document 1'); + /* Setting a null folder is not allowed */ + $ret = $document->setParent(null); + $this->assertFalse($ret); + + /* Passed object must be a folder */ + $ret = $document->setParent($user); + $this->assertFalse($ret); + + $ret = $document->setParent($subfolder); + $this->assertTrue($ret); + $parent = $document->getParent(); + $this->assertIsObject($parent); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $parent); + $this->assertEquals(2, $parent->getId()); + } + + /** + * Test method setParent() mit sql fail + * + * @return void + */ + public function testSetParentSqlFail() + { + $document = $this->getMockedDocument(); + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblDocuments` SET `folder`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($document->setParent($rootfolder)); + } + + /** + * Test method setOwner() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSetOwner() + { + $adminuser = self::$dms->getUser(1); + $rootfolder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->addUser('user1', 'user1', 'User One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($user); + $document = self::createDocument($rootfolder, $adminuser, 'Document 1'); + /* Setting a null user is not allowed */ + $ret = $document->setOwner(null); + $this->assertFalse($ret); + + /* Passed object must be a folder */ + $ret = $document->setOwner($rootfolder); + $this->assertFalse($ret); + + $res = $document->setOwner($user); + $this->assertTrue($res); + $owner = $document->getOwner(); + $this->assertIsObject($owner); + $this->assertInstanceOf(SeedDMS_Core_User::class, $owner); + $this->assertEquals($user->getId(), $owner->getId()); + } + + /** + * Test method setOwner() mit sql fail + * + * @return void + */ + public function testSetOwnerSqlFail() + { + $document = $this->getMockedDocument(); + $user = $this->getMockedUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblDocuments` SET `owner`")) + ->willReturn(false); + // SeedDMS 6 will fetch the old owner in setOwner() before setting the + // new owner + if(self::$dbversion['major'] == 6) { + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblUsers` WHERE `id` = ")) + ->willReturn([]); + } + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($document->setOwner($user)); + } + + /** + * Test method expires(), setExpires(), getExpires() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetExpires() + { + $adminuser = self::$dms->getUser(1); + $rootfolder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $document = self::createDocument($rootfolder, $adminuser, 'Document 1'); + $expires = $document->expires(); + $this->assertFalse($expires); + $expires = $document->getExpires(); + $this->assertFalse($expires); + $now = time(); + $res = $document->setExpires($now); + $this->assertTrue($res); + /* Setting it again will return true */ + $res = $document->setExpires($now); + $this->assertTrue($res); + $expires = $document->expires(); + $this->assertTrue($res); + $expirets = $document->getExpires(); + $this->assertEquals($now, $expirets); + } + + /** + * Test method setExpires() mit sql fail + * + * @return void + */ + public function testSetExpiresSqlFail() + { + $document = $this->getMockedDocument(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblDocuments` SET `expires`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($document->setExpires(time())); + } + + /** + * Test method setLocked(), isLocked() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSetAndIsLocked() + { + $adminuser = self::$dms->getUser(1); + $rootfolder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->addUser('user1', 'user1', 'User One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($user); + $document = self::createDocument($rootfolder, $adminuser, 'Document 1'); + $res = $document->isLocked(); + $this->assertFalse($res); + $res = $document->setLocked($user); + $this->assertTrue($res); + $res = $document->isLocked(); + $this->assertTrue($res); + $lockuser = $document->getLockingUser(); + $this->assertIsObject($lockuser); + $this->assertInstanceOf(SeedDMS_Core_User::class, $lockuser); + $this->assertEquals($user->getId(), $lockuser->getId()); + /* parameter passed to setLocked must be false or a user */ + $res = $document->setLocked(null); + /* document is still locked and locking user is unchanged */ + $res = $document->isLocked(); + $this->assertTrue($res); + $lockuser = $document->getLockingUser(); + $this->assertIsObject($lockuser); + $this->assertInstanceOf(SeedDMS_Core_User::class, $lockuser); + $this->assertEquals($user->getId(), $lockuser->getId()); + /* Unlock the document */ + $res = $document->setLocked(false); + $this->assertTrue($res); + $res = $document->isLocked(); + $this->assertFalse($res); + $lockuser = $document->getLockingUser(); + $this->assertFalse($lockuser); + } + + /** + * Test method setLocked() with sql fail + * + * @return void + */ + public function testSetLockedSqlFail() + { + $document = $this->getMockedDocument(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("DELETE FROM `tblDocumentLocks`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($document->setLocked(false)); + } + + /** + * Test method getSequence() and setSequence() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetSequence() + { + $adminuser = self::$dms->getUser(1); + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $document = self::createDocument($folder, $adminuser, 'Document 1'); + /* The document still has sequence = 1.0 */ + $sequence = $document->getSequence(); + $this->assertEquals(1.0, $sequence); + $ret = $document->setSequence(1.5); + $this->assertTrue($ret); + $sequence = $document->getSequence(); + $this->assertEquals(1.5, $sequence); + } + + /** + * Test method setSequence() mit sql fail + * + * @return void + */ + public function testSetSequenceSqlFail() + { + $document = $this->getMockedDocument(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblDocuments` SET `sequence`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $document->setDMS($dms); + $this->assertFalse($document->setSequence(1.1)); + } + + /** + * Test method getContentByVersion(), isLatestContent() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetContentByVersion() + { + $adminuser = self::$dms->getUser(1); + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $document = self::createDocument($folder, $adminuser, 'Document 1'); + /* Get version 1 */ + $content = $document->getContentByVersion(1); + $this->assertIsObject($content); + $this->assertInstanceOf(SeedDMS_Core_DocumentContent::class, $content); + /* There is no version 2 */ + $content = $document->getContentByVersion(2); + $this->assertNull($content); + /* version must be numeric */ + $content = $document->getContentByVersion('foo'); + $this->assertFalse($content); + /* Check if 1 is the latest version number */ + $ret = $document->isLatestContent(1); + $this->assertTrue($ret); + $ret = $document->isLatestContent(2); + $this->assertFalse($ret); + } + + /** + * Test method getDocumentContent() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentContent() + { + $adminuser = self::$dms->getUser(1); + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $document = self::createDocument($folder, $adminuser, 'Document 1'); + /* Get version 1 */ + $content = $document->getContentByVersion(1); + $this->assertIsObject($content); + $this->assertInstanceOf(SeedDMS_Core_DocumentContent::class, $content); + $again = self::$dms->getDocumentContent($content->getId()); + $this->assertIsObject($again); + $this->assertInstanceOf(SeedDMS_Core_DocumentContent::class, $again); + $this->assertEquals($content->getId(), $again->getId()); + $none = self::$dms->getDocumentContent(2); + $this->assertNull($none); + } + + /** + * Test method getDocumentContent() with sql failure + * + * @return void + */ + public function testGetDocumentContentSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblDocumentContent` WHERE `id`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $this->assertFalse($dms->getDocumentContent(1)); + } + + /** + * Test method addDocumentLink(), getDocumentLinks(), getReverseDocumentLinks() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddAndGetDocumentLinks() + { + $adminuser = self::$dms->getUser(1); + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->addUser('user1', 'user1', 'User One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($user); + $document1 = self::createDocument($folder, $adminuser, 'Document 1'); + $document2 = self::createDocument($folder, $adminuser, 'Document 2'); + + /* document 1 has no links */ + $links = $document1->getDocumentLinks(); + $this->assertIsArray($links); + $this->assertCount(0, $links); + $links = $document1->getReverseDocumentLinks(); + $this->assertIsArray($links); + $this->assertCount(0, $links); + + /* Adding a link to none existing target or by a none existing user fails */ + $ret = $document1->addDocumentLink(3, $user->getId(), false); + $this->assertFalse($ret); + $ret = $document1->addDocumentLink($document2->getId(), 4, false); + $this->assertFalse($ret); + + /* Adding a link with a bogus target or user must fail */ + $ret = $document1->addDocumentLink('foo', 1, false); + $this->assertFalse($ret); + $ret = $document1->addDocumentLink(3, 'foo', false); + $this->assertFalse($ret); + + /* Adding a link to myself must fail */ + $ret = $document1->addDocumentLink($document1->getId(), $user->getId(), false); + $this->assertFalse($ret); + + /* Add a non public link to document 2 by user */ + $link = $document1->addDocumentLink($document2->getId(), $user->getId(), false); + $this->assertIsObject($link); + $this->assertInstanceOf(SeedDMS_Core_DocumentLink::class, $link); + $links = $document1->getDocumentLinks(); + $this->assertIsArray($links); + $this->assertCount(1, $links); + $links = $document2->getReverseDocumentLinks(); + $this->assertIsArray($links); + $this->assertCount(1, $links); + /* There is one reverse link of a user */ + $links = $document2->getReverseDocumentLinks(false, $user); + $this->assertIsArray($links); + $this->assertCount(1, $links); + /* There are no public reverse links */ + $links = $document2->getReverseDocumentLinks(true); + $this->assertIsArray($links); + $this->assertCount(0, $links); + + /* There are no public links of document 1 */ + $document1->clearCache(); + $links = $document1->getDocumentLinks(true); + $this->assertIsArray($links); + $this->assertCount(0, $links); + + /* There are no links by adminuser of document 1 */ + $document1->clearCache(); + $links = $document1->getDocumentLinks(false, $adminuser); + $this->assertIsArray($links); + $this->assertCount(0, $links); + + /* There are links by user of document 1 */ + $document1->clearCache(); + $links = $document1->getDocumentLinks(false, $user); + $this->assertIsArray($links); + $this->assertCount(1, $links); + + $link = $document1->getDocumentLink($links[0]->getId()); + $this->assertIsObject($link); + $this->assertTrue($link->isType('documentlink')); + } + + /** + * Test method addDocumentLink(), removeDocumentLinks() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddAndRemoveDocumentLink() + { + $adminuser = self::$dms->getUser(1); + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->addUser('user1', 'user1', 'User One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($user); + $document1 = self::createDocument($folder, $adminuser, 'Document 1'); + $document2 = self::createDocument($folder, $adminuser, 'Document 2'); + + /* Add a non public link to document 2 by user */ + $link = $document1->addDocumentLink($document2->getId(), $user->getId(), false); + $this->assertIsObject($link); + $this->assertInstanceOf(SeedDMS_Core_DocumentLink::class, $link); + $links = $document1->getDocumentLinks(); + $this->assertIsArray($links); + $this->assertCount(1, $links); + + /* Remove the link again */ + $link = $links[0]; + $ret = $document1->removeDocumentLink($link->getId()); + $this->assertTrue($ret); + $links = $document1->getDocumentLinks(); + $this->assertIsArray($links); + $this->assertCount(0, $links); + } + + /** + * Test method addDocumentFile(), getDocumentFiles() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddAndGetDocumentFiles() + { + $adminuser = self::$dms->getUser(1); + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->addUser('user1', 'user1', 'User One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($user); + $document = self::createDocument($folder, $adminuser, 'Document 1'); + + /* document has no files */ + $files = $document->getDocumentFiles(); + $this->assertIsArray($files); + $this->assertCount(0, $files); + + $filename = self::createTempFile(100); + $file1 = $document->addDocumentFile('Attachment 1', '', $user, $filename, 'attachment1.txt', '.txt', 'plain/text'); + unlink($filename); + $this->assertIsObject($file1); + $this->assertInstanceOf(SeedDMS_Core_DocumentFile::class, $file1); + + $filename = self::createTempFile(100); + $file2 = $document->addDocumentFile('Attachment 2', '', $user, $filename, 'attachment2.txt', '.txt', 'plain/text', 1); + unlink($filename); + $this->assertIsObject($file2); + $this->assertInstanceOf(SeedDMS_Core_DocumentFile::class, $file2); + + /* Get all attachments */ + $files = $document->getDocumentFiles(); + $this->assertIsArray($files); + $this->assertCount(2, $files); + + /* Get attachments for version 1 only */ + $files = $document->getDocumentFiles(1, false); + $this->assertIsArray($files); + $this->assertCount(1, $files); + + /* Get attachments for version 1 and version independed */ + $files = $document->getDocumentFiles(1, true); + $this->assertIsArray($files); + $this->assertCount(2, $files); + } + + /** + * Test method addDocumentFile(), removeDocumentFile() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddAndRemoveDocumentFiles() + { + $adminuser = self::$dms->getUser(1); + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->addUser('user1', 'user1', 'User One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($user); + $document = self::createDocument($folder, $adminuser, 'Document 1'); + + /* document has no files */ + $files = $document->getDocumentFiles(); + $this->assertIsArray($files); + $this->assertCount(0, $files); + + $filename = self::createTempFile(100); + $file1 = $document->addDocumentFile('Attachment 1', '', $user, $filename, 'attachment1.txt', '.txt', 'plain/text'); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + $this->assertIsObject($file1); + $this->assertInstanceOf(SeedDMS_Core_DocumentFile::class, $file1); + + /* document has now 1 file */ + $files = $document->getDocumentFiles(); + $this->assertIsArray($files); + $this->assertCount(1, $files); + + /* Removing a file with a none exiting or bogus id must fail */ + $ret = $document->removeDocumentFile(2); + $this->assertFalse($ret); + $ret = $document->removeDocumentFile('foo'); + $this->assertFalse($ret); + + $ret = $document->removeDocumentFile($files[0]->getId()); + $this->assertTrue($ret); + + $files = $document->getDocumentFiles(); + $this->assertIsArray($files); + $this->assertCount(0, $files); + } + + /** + * Test method addDocument(), removeDocument() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddAndRemoveDocument() + { + $adminuser = self::$dms->getUser(1); + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->addUser('user1', 'user1', 'User One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($user); + $document = self::createDocument($folder, $adminuser, 'Document 1'); + $docid = $document->getId(); + + $filename = self::createTempFile(100); + $file1 = $document->addDocumentFile('Attachment 1', '', $user, $filename, 'attachment1.txt', '.txt', 'plain/text'); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + $this->assertIsObject($file1); + $this->assertInstanceOf(SeedDMS_Core_DocumentFile::class, $file1); + + $ret = $document->remove(); + $this->assertTrue($ret); + $document = self::$dms->getDocument($docid); + $this->assertNull($document); + } + + /** + * Test method getUsedDiskSpace() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetUsedDiskSpace() + { + $adminuser = self::$dms->getUser(1); + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + /* Create a document with 1234 Bytes */ + $document = self::createDocument($folder, $adminuser, 'Document 1', 1234); + $size = $document->getUsedDiskSpace(); + $this->assertEquals(1234, $size); + } + + /** + * Test method getTimeline() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetTimeline() + { + $adminuser = self::$dms->getUser(1); + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + /* Create a document */ + $document = self::createDocument($folder, $adminuser, 'Document 1'); + /* Attach a file */ + $filename = self::createTempFile(100); + $file1 = $document->addDocumentFile('Attachment 1', '', $adminuser, $filename, 'attachment1.txt', '.txt', 'plain/text'); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + $this->assertIsObject($file1); + $this->assertInstanceOf(SeedDMS_Core_DocumentFile::class, $file1); + + /* Get the timeline. It must contain two entries + * - the initial release of the document + * - adding the attachment + */ + $timeline = $document->getTimeLine(); + $this->assertIsArray($timeline); + $this->assertCount(2, $timeline); + } + + /** + * Test method transferToUser() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testTransferToUser() + { + $adminuser = self::$dms->getUser(1); + $user = self::$dms->addUser('user1', 'user1', 'User One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($user); + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + /* Create two documents */ + $document1 = self::createDocument($folder, $adminuser, 'Document 1'); + $document2 = self::createDocument($folder, $adminuser, 'Document 2'); + + /* Attach a file */ + $filename = self::createTempFile(100); + $file1 = $document1->addDocumentFile('Attachment 1', '', $adminuser, $filename, 'attachment1.txt', '.txt', 'plain/text'); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + $this->assertIsObject($file1); + $this->assertInstanceOf(SeedDMS_Core_DocumentFile::class, $file1); + + /* Add a non public link to document 2 */ + $link = $document1->addDocumentLink($document2->getId(), $adminuser->getId(), false); + $this->assertIsObject($link); + $this->assertInstanceOf(SeedDMS_Core_DocumentLink::class, $link); + + /* Transfer document to $user */ + $this->assertEquals('admin', $document1->getOwner()->getLogin()); + $links = $document1->getDocumentLinks(false, $adminuser); + $this->assertIsArray($links); + $this->assertCount(1, $links); + + $ret = $document1->transferToUser($user); + $this->assertTrue($ret); + $this->assertEquals('user1', $document1->getOwner()->getLogin()); + $links = $document1->getDocumentLinks(false, $user); + $this->assertIsArray($links); + $this->assertCount(1, $links); + $files = $document1->getDocumentFiles(); + $this->assertIsArray($files); + $this->assertCount(1, $files); + $this->assertEquals($files[0]->getUserID(), $user->getId()); + } +} diff --git a/SeedDMS_Core/tests/FileUtilsTest.php b/SeedDMS_Core/tests/FileUtilsTest.php new file mode 100644 index 000000000..7e1b87cfb --- /dev/null +++ b/SeedDMS_Core/tests/FileUtilsTest.php @@ -0,0 +1,219 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +use PHPUnit\Framework\SeedDmsTest; + +/** + * Group test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class FileUtilsTest extends SeedDmsTest +{ + /** + * Create temporary directory + * + * @return void + */ + protected function setUp(): void + { + self::$contentdir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpunit-'.time(); + mkdir(self::$contentdir); + } + + /** + * Clean up at tear down + * + * @return void + */ + protected function tearDown(): void + { + exec('rm -rf '.self::$contentdir); + } + + /** + * Test method format_filesize() + * + * @return void + */ + public function testFormatFileSize() + { + $this->assertEquals('1 Byte', SeedDMS_Core_File::format_filesize(1)); + $this->assertEquals('0 Bytes', SeedDMS_Core_File::format_filesize(0)); + $this->assertEquals('1000 Bytes', SeedDMS_Core_File::format_filesize(1000)); + $this->assertEquals('1 KiB', SeedDMS_Core_File::format_filesize(1024)); + $this->assertEquals('1 KiB', SeedDMS_Core_File::format_filesize(1025)); + $this->assertEquals('2 KiB', SeedDMS_Core_File::format_filesize(2047)); + $this->assertEquals('1 MiB', SeedDMS_Core_File::format_filesize(1024*1024)); + $this->assertEquals('1 GiB', SeedDMS_Core_File::format_filesize(1024*1024*1024)); + } + + /** + * Test method format_filesize() + * + * @return void + */ + public function testParseFileSize() + { + $this->assertEquals(200, SeedDMS_Core_File::parse_filesize('200B')); + $this->assertEquals(200, SeedDMS_Core_File::parse_filesize('200 B')); + $this->assertEquals(200, SeedDMS_Core_File::parse_filesize('200')); + $this->assertEquals(1024, SeedDMS_Core_File::parse_filesize('1K')); + $this->assertEquals(2*1024*1024, SeedDMS_Core_File::parse_filesize('2M')); + $this->assertEquals(3*1024*1024*1024, SeedDMS_Core_File::parse_filesize('3 G')); + $this->assertEquals(4*1024*1024*1024*1024, SeedDMS_Core_File::parse_filesize('4 T')); + $this->assertFalse(SeedDMS_Core_File::parse_filesize('4 t')); + $this->assertFalse(SeedDMS_Core_File::parse_filesize('-4T')); + } + + /** + * Test method fileSize() + * + * @return void + */ + public function testFileSize() + { + $filename = self::createTempFile(200, self::$contentdir); + $this->assertEquals(200, SeedDMS_Core_File::fileSize($filename)); + /* Getting the size of a none existing file returns false */ + $this->assertFalse(SeedDMS_Core_File::fileSize('foobar')); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + } + + /** + * Test method file_exists() + * + * @return void + */ + public function testFileExists() + { + $filename = self::createTempFile(200, self::$contentdir); + $this->assertTrue(SeedDMS_Core_File::file_exists($filename)); + $this->assertFalse(SeedDMS_Core_File::file_exists($filename.'bla')); + $this->assertTrue(SeedDMS_Core_File::removeFile($filename)); + } + + /** + * Test method fileExtension() + * + * @return void + */ + public function testFileExtension() + { + $this->assertEquals('png', SeedDMS_Core_File::fileExtension('image/png')); + $this->assertEquals('', SeedDMS_Core_File::fileExtension('image/kpng')); + $this->assertEquals('txt', SeedDMS_Core_File::fileExtension('text/plain')); + $this->assertEquals('md', SeedDMS_Core_File::fileExtension('text/markdown')); + } + + /** + * Test method moveFile() + * + * @return void + */ + public function testMoveFile() + { + $filename = self::createTempFile(200, self::$contentdir); + $this->assertEquals(200, SeedDMS_Core_File::fileSize($filename)); + $ret = SeedDMS_Core_File::moveFile($filename, self::$contentdir.DIRECTORY_SEPARATOR."foobar"); + $this->assertTrue($ret); + /* Getting the file size of the old doc must fail now */ + $this->assertFalse(SeedDMS_Core_File::fileSize($filename)); + /* Getting the file size of the new doc succeds */ + $this->assertEquals(200, SeedDMS_Core_File::fileSize(self::$contentdir.DIRECTORY_SEPARATOR."foobar")); + $this->assertTrue(SeedDMS_Core_File::removeFile(self::$contentdir.DIRECTORY_SEPARATOR."foobar")); + } + + /** + * Test method makeDir(), renameDir(), removeDir() + * + * @return void + */ + public function testMakeRenameAndRemoveDir() + { + /* Create a directory and put a file into it */ + $ret = SeedDMS_Core_File::makeDir(self::$contentdir.DIRECTORY_SEPARATOR."foobar"); + system('touch '.self::$contentdir.DIRECTORY_SEPARATOR."foobar".DIRECTORY_SEPARATOR."tt"); + /* Rename the directory */ + $ret = SeedDMS_Core_File::renameDir(self::$contentdir.DIRECTORY_SEPARATOR."foobar", self::$contentdir.DIRECTORY_SEPARATOR."bazfoo"); + $this->assertTrue($ret); + /* The new must exist and the old one is gone */ + $this->assertTrue(is_dir(self::$contentdir.DIRECTORY_SEPARATOR."bazfoo")); + $this->assertFalse(is_dir(self::$contentdir.DIRECTORY_SEPARATOR."foobar")); + $this->assertTrue(SeedDMS_Core_File::removeDir(self::$contentdir.DIRECTORY_SEPARATOR."bazfoo")); + $this->assertFalse(SeedDMS_Core_File::removeDir(self::$contentdir.DIRECTORY_SEPARATOR."bazfoo")); + $this->assertFalse(SeedDMS_Core_File::removeDir(self::$contentdir.DIRECTORY_SEPARATOR."foobar")); + + /* Create a directory, a sub directory and a file */ + $ret = SeedDMS_Core_File::makeDir(self::$contentdir.DIRECTORY_SEPARATOR."foobar"); + $this->assertTrue($ret); + $ret = SeedDMS_Core_File::makeDir(self::$contentdir.DIRECTORY_SEPARATOR."foobar".DIRECTORY_SEPARATOR."bazfoo"); + $this->assertTrue($ret); + system('touch '.self::$contentdir.DIRECTORY_SEPARATOR."foobar".DIRECTORY_SEPARATOR."bazfoo".DIRECTORY_SEPARATOR."tt"); + $this->assertTrue(SeedDMS_Core_File::file_exists(self::$contentdir.DIRECTORY_SEPARATOR."foobar".DIRECTORY_SEPARATOR."bazfoo".DIRECTORY_SEPARATOR."tt")); + + $ret = SeedDMS_Core_File::removeDir(self::$contentdir.DIRECTORY_SEPARATOR."foobar"); + $this->assertTrue($ret); + $this->assertFalse(SeedDMS_Core_File::file_exists(self::$contentdir.DIRECTORY_SEPARATOR."foobar")); + $this->assertFalse(SeedDMS_Core_File::file_exists(self::$contentdir.DIRECTORY_SEPARATOR."foobar".DIRECTORY_SEPARATOR."bazfoo")); + $this->assertFalse(SeedDMS_Core_File::file_exists(self::$contentdir.DIRECTORY_SEPARATOR."foobar".DIRECTORY_SEPARATOR."bazfoo".DIRECTORY_SEPARATOR."tt")); + } + + /** + * Test method makeDir(), copyDir(), removeDir() + * + * @return void + */ + public function testMakeCopyAndRemoveDir() + { + /* Create a directory and put a file into it */ + $ret = SeedDMS_Core_File::makeDir(self::$contentdir.DIRECTORY_SEPARATOR."foobar"); + system('touch '.self::$contentdir.DIRECTORY_SEPARATOR."foobar".DIRECTORY_SEPARATOR."tt"); + /* Rename the directory */ + $ret = SeedDMS_Core_File::copyDir(self::$contentdir.DIRECTORY_SEPARATOR."foobar", self::$contentdir.DIRECTORY_SEPARATOR."bazfoo"); + $this->assertTrue($ret); + /* The new and the old dir must exist */ + $this->assertTrue(is_dir(self::$contentdir.DIRECTORY_SEPARATOR."bazfoo")); + $this->assertTrue(is_dir(self::$contentdir.DIRECTORY_SEPARATOR."foobar")); + $this->assertTrue(SeedDMS_Core_File::removeDir(self::$contentdir.DIRECTORY_SEPARATOR."bazfoo")); + $this->assertTrue(SeedDMS_Core_File::removeDir(self::$contentdir.DIRECTORY_SEPARATOR."foobar")); + } + + /** + * Test method moveDir() + * + * @return void + */ + public function testMakeAndMoveDir() + { + /* Create a directory and put a file into it */ + $ret = SeedDMS_Core_File::makeDir(self::$contentdir.DIRECTORY_SEPARATOR."foobar"); + system('touch '.self::$contentdir.DIRECTORY_SEPARATOR."foobar".DIRECTORY_SEPARATOR."tt"); + /* Rename the directory */ + $ret = SeedDMS_Core_File::moveDir(self::$contentdir.DIRECTORY_SEPARATOR."foobar", self::$contentdir.DIRECTORY_SEPARATOR."bazfoo"); + $this->assertTrue($ret); + /* The new must exist and the old dir must be disappeared */ + $this->assertTrue(is_dir(self::$contentdir.DIRECTORY_SEPARATOR."bazfoo")); + $this->assertFalse(is_dir(self::$contentdir.DIRECTORY_SEPARATOR."foobar")); + $this->assertTrue(SeedDMS_Core_File::removeDir(self::$contentdir.DIRECTORY_SEPARATOR."bazfoo")); + $this->assertFalse(is_dir(self::$contentdir.DIRECTORY_SEPARATOR."bazfoo")); + } +} diff --git a/SeedDMS_Core/tests/FolderTest.php b/SeedDMS_Core/tests/FolderTest.php new file mode 100644 index 000000000..ee05f0b8c --- /dev/null +++ b/SeedDMS_Core/tests/FolderTest.php @@ -0,0 +1,1221 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +use PHPUnit\Framework\SeedDmsTest; + +/** + * Group test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class FolderTest extends SeedDmsTest +{ + + /** + * Create a real sqlite database in memory + * + * @return void + */ + protected function setUp(): void + { + self::$dbh = self::createInMemoryDatabase(); + self::$contentdir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpunit-'.time(); + mkdir(self::$contentdir); + // echo "Creating temp content dir: ".self::$contentdir."\n"; + self::$dms = new SeedDMS_Core_DMS(self::$dbh, self::$contentdir); + } + + /** + * Clean up at tear down + * + * @return void + */ + protected function tearDown(): void + { + self::$dbh = null; + // echo "\nRemoving temp. content dir: ".self::$contentdir."\n"; + exec('rm -rf '.self::$contentdir); + } + + /** + * Test method getInstance() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetInstanceRootFolder() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $this->assertIsObject($folder); + $this->assertEquals('DMS', $folder->getName()); + /* get instance of none existing folder */ + $folder = SeedDMS_Core_Folder::getInstance(2, self::$dms); + $this->assertNull($folder); + } + + /** + * Test method isType() + * + * @return void + */ + public function testIsType() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $this->assertTrue($folder->isType('folder')); + } + + /** + * Test method getInstance() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetInstance() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $subfolder = $rootfolder->addSubFolder('Subfolder 1', '', $user, 2.0); + $subsubfolder = $subfolder->addSubFolder('Subsubfolder 1', '', $user, 1.0); + /* Get the folder with id 2, which must be 'Subfolder 1' */ + $folder = SeedDMS_Core_Folder::getInstance(2, self::$dms); + $this->assertIsObject($folder); + $this->assertEquals('Subfolder 1', $folder->getName()); + /* Get a none existing folder */ + $folder = SeedDMS_Core_Folder::getInstance(4, self::$dms); + $this->assertNull($folder); + } + + /** + * Test method getInstance() + * + * @return void + */ + public function testGetInstanceSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblFolders`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $this->assertFalse(SeedDMS_Core_Folder::getInstance(1, $dms)); + } + + /** + * Test method getInstanceByName() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetInstanceByName() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $subfolder = $rootfolder->addSubFolder('Subfolder 1', '', $user, 2.0); + $subsubfolder = $subfolder->addSubFolder('Subsubfolder 1', '', $user, 1.0); + /* Search for it anywhere in the folder hierarchy */ + $folder = SeedDMS_Core_Folder::getInstanceByName('Subsubfolder 1', null, self::$dms); + $this->assertIsObject($folder); + $this->assertEquals('Subsubfolder 1', $folder->getName()); + /* Search for it within 'Subfolder 1' will find it */ + $folder = SeedDMS_Core_Folder::getInstanceByName('Subsubfolder 1', $subfolder, self::$dms); + $this->assertIsObject($folder); + $this->assertEquals('Subsubfolder 1', $folder->getName()); + /* Search for it within root folder will not find it */ + $folder = SeedDMS_Core_Folder::getInstanceByName('Subsubfolder 1', $rootfolder, self::$dms); + $this->assertNull($folder); + } + + /** + * Test method getInstanceByName() + * + * @return void + */ + public function testGetInstanceByNameSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblFolders`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $this->assertFalse(SeedDMS_Core_Folder::getInstanceByName('foo', null, $dms)); + } + + /** + * Test method getName() and setName() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetName() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $name = $folder->getName(); + $this->assertEquals('DMS', $name); + $ret = $folder->setName('foo'); + $this->assertTrue($ret); + $name = $folder->getName(); + $this->assertEquals('foo', $name); + } + + /** + * Test method setName() + * + * @return void + */ + public function testSetNameSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblFolders` SET `name`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->setName('foo')); + } + + /** + * Test method getComment() and setComment() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetComment() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $comment = $folder->getComment(); + $this->assertEquals('DMS root', $comment); + $ret = $folder->setComment('foo'); + $this->assertTrue($ret); + $comment = $folder->getComment(); + $this->assertEquals('foo', $comment); + } + + /** + * Test method setComment() + * + * @return void + */ + public function testSetCommentSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblFolders` SET `comment`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->setComment('foo')); + } + + /** + * Test method getSequence() and setSequence() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetSequence() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + /* The root folder's sequence in the initial database is 0.0 */ + $sequence = $folder->getSequence(); + $this->assertEquals(0.0, $sequence); + $ret = $folder->setSequence(1.5); + $this->assertTrue($ret); + $sequence = $folder->getSequence(); + $this->assertEquals(1.5, $sequence); + } + + /** + * Test method setSequence() + * + * @return void + */ + public function testSetSequenceSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblFolders` SET `sequence`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->setSequence(0.0)); + } + + /** + * Test method getDate() and setDate() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetDate() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $now = time(); + /* Passing false as a time stamp will take current time stamp */ + $ret = $folder->setDate(false); + $this->assertTrue($ret); + $date = $folder->getDate(); + $this->assertEquals($now, $date); + /* Setting a time stamp */ + $now -= 1000; + $ret = $folder->setDate($now); + $this->assertTrue($ret); + $date = $folder->getDate(); + $this->assertEquals($now, $date); + /* Setting a none numeric value will fail */ + $ret = $folder->setDate('foo'); + $this->assertFalse($ret); + } + + /** + * Test method setDate() + * + * @return void + */ + public function testSetDateSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblFolders` SET `date`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->setDate(time())); + } + + /** + * Test method getParent() + * + * Get parent of root folder which is always null. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetParentRootFolder() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $parent = $folder->getParent(); + $this->assertNull($parent); + } + + /** + * Test method getParent() + * + * Create a new subfolder below root folder and check if parent + * of the folder is the root folder. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetParent() + { + $adminuser = self::$dms->getUser(1); + $rootfolder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $subfolder = $rootfolder->addSubFolder('Subfolder 1', '', $adminuser, 0); + $parent = $subfolder->getParent(); + $this->assertIsObject($parent); + $this->assertInstanceOf(SeedDMS_Core_Folder::class, $parent); + $this->assertEquals(1, $parent->getId()); + } + + /** + * Test method setParent() on root folder + * + * Moving the root folder will always fail + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSetParentRootFolder() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $ret = $folder->setParent(1); + $this->assertFalse($ret); + } + + /** + * Test method getOwner() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetOwner() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $owner = $folder->getOwner(); + $this->assertIsObject($owner); + $this->assertInstanceOf(SeedDMS_Core_User::class, $owner); + $this->assertEquals(1, $owner->getId()); + } + + /** + * Test method setOwner() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSetOwner() + { + $adminuser = self::$dms->getUser(1); + $rootfolder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->addUser('user1', 'user1', 'User One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $subfolder = $rootfolder->addSubFolder('Subfolder 1', '', $adminuser, 0); + $res = $subfolder->setOwner($user); + $this->assertTrue($res); + $owner = $subfolder->getOwner(); + $this->assertIsObject($owner); + $this->assertInstanceOf(SeedDMS_Core_User::class, $owner); + $this->assertEquals($user->getId(), $owner->getId()); + } + + /** + * Test method setOwner() + * + * @return void + */ + public function testSetOwnerSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $user = new SeedDMS_Core_User(1, 'admin', 'pass', 'Joe Foo', 'baz@foo.de', 'en_GB', 'bootstrap', 'My comment', SeedDMS_Core_User::role_admin); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblFolders` SET `owner`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->setOwner($user)); + } + + /** + * Test method getDefaultAccess() + * + * The default access is always M_READ unless it was set differently + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDefaultAccess() + { + $adminuser = self::$dms->getUser(1); + $rootfolder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $accessmode = $rootfolder->getDefaultAccess(); + $this->assertEquals(M_READ, $accessmode); + $subfolder = $rootfolder->addSubFolder('Subfolder 1', '', $adminuser, 0); + $accessmode = $subfolder->getDefaultAccess(); + $this->assertEquals(M_READ, $accessmode); + } + + /** + * Test method setDefaultAccess() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSetDefaultAccess() + { + $adminuser = self::$dms->getUser(1); + $rootfolder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $subfolder = $rootfolder->addSubFolder('Subfolder 1', '', $adminuser, 0); + /* Setting the default access to something != M_READ will not have + * any effect as long as inheritage of access rights is turned on. + */ + $subfolder->setDefaultAccess(M_READWRITE, true); + $accessmode = $subfolder->getDefaultAccess(); + $this->assertEquals(M_READ, $accessmode); + /* Turning inheritage off will use the default access */ + $subfolder->setInheritAccess(false, true); + $accessmode = $subfolder->getDefaultAccess(); + $this->assertEquals(M_READWRITE, $accessmode); + } + + /** + * Test method setDefaultAccess() + * + * @return void + */ + public function testSetDefaultAccessSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblFolders` SET `defaultAccess`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->setDefaultAccess(M_NONE)); + } + + /** + * Test method setInheritAccess() + * + * @return void + */ + public function testSetInheritAccessSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblFolders` SET `inheritAccess`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->setInheritAccess(true)); + } + + /** + * Test method hasSubFolders() on root folder and after adding + * new subfolders. + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testHasSubFolders() + { + $user = self::$dms->getUser(1); + $rootfolder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $ret = $rootfolder->hasSubFolders(); + $this->assertIsInt($ret); + $this->assertEquals(0, $ret); + $subfolder1 = $rootfolder->addSubFolder('Subfolder 1', '', $user, 2.0); + $subfolder2 = $rootfolder->addSubFolder('Subfolder 2', '', $user, 1.0); + $ret = $rootfolder->hasSubFolders(); + $this->assertIsInt($ret); + $this->assertEquals(2, $ret); + /* hasSubFolderByName() just returns true or false */ + $ret = $rootfolder->hasSubFolderByName('Subfolder 1'); + $this->assertTrue($ret); + $ret = $rootfolder->hasSubFolderByName('Subfolder 3'); + $this->assertFalse($ret); + } + + /** + * Test method hasSubFolders with sql fail() + * + * @return void + */ + public function testHasSubFoldersSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT count(*) as c FROM `tblFolders`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->hasSubFolders()); + } + + /** + * Test method hasSubFolderByName with sql fail() + * + * @return void + */ + public function testHasSubFolderByNameSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT count(*) as c FROM `tblFolders`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->hasSubFolderByName('foo')); + } + + /** + * Test method getSubFolders() on root folder + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetSubFoldersRootOnly() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $folders = $folder->getSubFolders(); + $this->assertIsArray($folders); + $this->assertCount(0, $folders); + } + + /** + * Test method getSubFolders() on root folder + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetSubFolders() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $subfolder1 = $rootfolder->addSubFolder('Subfolder 1', '', $user, 2.0); + $subfolder2 = $rootfolder->addSubFolder('Subfolder 2', '', $user, 1.0); + $folders = $rootfolder->getSubFolders(); + $this->assertIsArray($folders); + $this->assertCount(2, $folders); + + /* Get sub folders order by name descending */ + $rootfolder->clearCache(); // Force retrieving sub folders from database + $folders = $rootfolder->getSubFolders('n', 'desc', 1, 0); + $this->assertIsArray($folders); + $this->assertCount(1, $folders); + $this->assertEquals('Subfolder 2', $folders[0]->getName()); + + /* Get sub folders order by name descending with an offset of 1 */ + $rootfolder->clearCache(); // Force retrieving sub folders from database + $folders = $rootfolder->getSubFolders('n', 'desc', 1, 1); + $this->assertIsArray($folders); + $this->assertCount(1, $folders); + $this->assertEquals('Subfolder 1', $folders[0]->getName()); + + /* Get sub folders order by sequence ascending */ + $rootfolder->clearCache(); // Force retrieving sub folders from database + $folders = $rootfolder->getSubFolders('s', 'asc', 1, 0); + $this->assertIsArray($folders); + $this->assertCount(1, $folders); + $this->assertEquals('Subfolder 2', $folders[0]->getName()); + + /* Get sub folders order by sequence ascending with a bogus offset */ + $rootfolder->clearCache(); // Force retrieving sub folders from database + $folders = $rootfolder->getSubFolders('s', 'asc', 0, 4); + $this->assertIsArray($folders); + $this->assertCount(2, $folders); + $this->assertEquals('Subfolder 2', $folders[0]->getName()); + } + + /** + * Test method getSubFolders() + * + * @return void + */ + public function testGetSubFoldersSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblFolders`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->getSubFolders()); + } + + /** + * Test method isDescendant() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testIsDescendant() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $subfolder = $rootfolder->addSubFolder('Subfolder 1', '', $user, 2.0); + $subsubfolder = $subfolder->addSubFolder('Subsubfolder 1', '', $user, 1.0); + /* subsubfolder is a descendant of root folder */ + $this->assertTrue($subsubfolder->isDescendant($rootfolder)); + /* subfolder is not a descendant of subsubfolder */ + $this->assertFalse($subfolder->isDescendant($subsubfolder)); + } + + /** + * Test method isSubFolder() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testIsSubFolder() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $subfolder = $rootfolder->addSubFolder('Subfolder 1', '', $user, 2.0); + $subsubfolder = $subfolder->addSubFolder('Subsubfolder 1', '', $user, 1.0); + $this->assertTrue($rootfolder->isSubFolder($subsubfolder)); + $this->assertFalse($subsubfolder->isSubFolder($subfolder)); + } + + /** + * Test method setParent() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSetParent() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $subfolder = $rootfolder->addSubFolder('Subfolder 1', '', $user, 2.0); + $subsubfolder = $subfolder->addSubFolder('Subsubfolder 1', '', $user, 1.0); + /* Add a new document for folderList checking afterwards */ + $document = self::createDocument($subsubfolder, $user, 'Document 1'); + $folderlist = $subsubfolder->getFolderList(); + $this->assertEquals(':1:2:', $folderlist); + $folderlist = $document->getFolderList(); + $this->assertEquals(':1:2:3:', $folderlist); + /* Making $subsubfolder parent of $subfolder will fail, because + * $subfolder is a parent of $subsubfolder + */ + $this->assertFalse($subfolder->setParent($subsubfolder)); + /* Moving $subsubfolder into rool folder is possible */ + $this->assertTrue($subsubfolder->setParent($rootfolder)); + /* Root folder has now two children */ + $children = $rootfolder->getSubFolders(); + $this->assertIsArray($children); + $this->assertCount(2, $children); + /* Move the folder will have changed the folder list. Check it */ + $errors = self::$dms->checkFolders(); + $this->assertIsArray($errors); + $this->assertCount(0, $errors); + $errors = self::$dms->checkDocuments(); + $this->assertIsArray($errors); + $this->assertCount(0, $errors); + } + + /** + * Test method getPath() on root folder + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetPathRootOnly() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $path = $folder->getPath(); + $this->assertIsArray($path); + $this->assertCount(1, $path); + /* The only folder in the path is the root folder itself */ + $this->assertEquals(1, $path[0]->getId()); + } + + /** + * Test method getPath() on root folder + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetPath() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $subfolder = $rootfolder->addSubFolder('Subfolder 1', '', $user, 2.0); + $subsubfolder = $subfolder->addSubFolder('Subsubfolder 1', '', $user, 1.0); + $path = $subsubfolder->getPath(); + $this->assertIsArray($path); + $this->assertCount(3, $path); + } + + /** + * Test method getFolderPathPlain() on root folder + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetFolderPathPlain() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $path = $folder->getFolderPathPlain(); + $this->assertIsString($path); + $this->assertEquals('/ DMS', $path); + } + + /** + * Test method hasDocuments() on root folder + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testHasDocuments() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->getUser(1); + $documents = $folder->hasDocuments(); + $this->assertIsInt($documents); + $this->assertEquals(0, $documents); + /* Add a new document for calling hasDocuments() afterwards */ + $document = self::createDocument($folder, $user, 'Document 1'); + $documents = $folder->hasDocuments(); + $this->assertIsInt($documents); + $this->assertEquals(1, $documents); + } + + /** + * Test method hasDocuments() + * + * @return void + */ + public function testHasDokumentsSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT count(*) as c FROM `tblDocuments`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->hasDocuments()); + } + + /** + * Test method hasDocumentByName() on root folder + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testHasDocumentByName() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->getUser(1); + $res = $folder->hasDocumentByName('foo'); + $this->assertFalse($res); + /* Add a new document for calling hasDocumentByName() afterwards */ + $document = self::createDocument($folder, $user, 'Document 1'); + $res = $folder->hasDocumentByName('Document 1'); + $this->assertTrue($res); + } + + /** + * Test method hasDocumentByName() + * + * @return void + */ + public function testHasDokumentByNameSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT count(*) as c FROM `tblDocuments`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->hasDocumentByName('foo')); + } + + /** + * Test method getDocuments() on root folder + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocuments() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->getUser(1); + $documents = $folder->getDocuments(); + $this->assertIsArray($documents); + $this->assertCount(0, $documents); + /* Add a new document for calling getDocuments() afterwards */ + $folder->clearCache(); + $document = self::createDocument($folder, $user, 'Document 1'); + $document = self::createDocument($folder, $user, 'Document 2'); + $documents = $folder->getDocuments(); + $this->assertIsArray($documents); + $this->assertCount(2, $documents); + $folder->clearCache(); + /* sort by name asc, limit 1, offset 0 */ + $documents = $folder->getDocuments('n', 'asc', 1); + $this->assertIsArray($documents); + $this->assertCount(1, $documents); + $this->assertEquals('Document 1', $documents[0]->getName()); + $folder->clearCache(); + /* sort by name desc, limit 1, offset 0 */ + $documents = $folder->getDocuments('n', 'desc', 1); + $this->assertIsArray($documents); + $this->assertCount(1, $documents); + $this->assertEquals('Document 2', $documents[0]->getName()); + $folder->clearCache(); + /* sort by name asc, limit 1, offset 1 */ + $documents = $folder->getDocuments('n', 'asc', 1, 1); + $this->assertIsArray($documents); + $this->assertCount(1, $documents); + $this->assertEquals('Document 2', $documents[0]->getName()); + } + + /** + * Test method getDocuments() + * + * @return void + */ + public function testGetDokumentsSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT `tblDocuments`.*, `tblDocumentLocks`.`userID` as `lock` FROM `tblDocuments`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->getDocuments()); + } + + /** + * Test method countChildren() on root folder + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testCountChildren() + { + $folder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->getUser(1); + $count = $folder->countChildren($user, 0); + $this->assertIsArray($count); + $this->assertCount(4, $count); + $this->assertEquals(0, $count['folder_count']); + $this->assertEquals(0, $count['document_count']); + /* Add some folders and documents */ + $this->createSimpleFolderStructure(); + $document = self::createDocument($folder, $user, 'Document 1'); + $count = $folder->countChildren($user, 6); + $this->assertIsArray($count); + $this->assertCount(4, $count); + $this->assertEquals(5, $count['folder_count']); + $this->assertEquals(1, $count['document_count']); + } + + /** + * Test method emptyFolder() on root folder + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testEmptyFolder() + { + $rootfolder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->getUser(1); + /* Add some folders and documents */ + $this->createSimpleFolderStructure(); + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $res = $rootfolder->emptyFolder(); + $this->assertTrue($res); + } + + /** + * Test method emptyFolder() on root folder + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testEmptyFolderWithCallback() + { + $rootfolder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->getUser(1); + /* Add some folders and documents */ + $this->createSimpleFolderStructure(); + $document = self::createDocument($rootfolder, $user, 'Document 1'); + + /* Add the 'onPostAddUser' callback */ + $msgs = []; + $callback = function ($param, $object) use (&$msgs) { + $msgs[] = $param." ".$object->getName(). " (".$object->getId().")"; + }; + self::$dms->addCallback('onPreRemoveFolder', $callback, 'onPreRemoveFolder'); + self::$dms->addCallback('onPostRemoveFolder', $callback, 'onPostRemoveFolder'); + self::$dms->addCallback('onPreRemoveDocument', $callback, 'onPreRemoveDocument'); + self::$dms->addCallback('onPostRemoveDocument', $callback, 'onPostRemoveDocument'); + self::$dms->addCallback('onPreEmptyFolder', $callback, 'onPreEmptyFolder'); + self::$dms->addCallback('onPostEmptyFolder', $callback, 'onPostEmptyFolder'); + + $res = $rootfolder->emptyFolder(); + $this->assertTrue($res); + $this->assertIsArray($msgs); + $this->assertCount(14, $msgs); // 5 folders x 2 callbacks + 1 document x 2 callbacks + 2 emptyFolder callbacks + } + + /** + * Test method getAccessList() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAccessList() + { + /* Add some folders and documents */ + $this->createSimpleFolderStructure(); + $this->createGroupsAndUsers(); + + $rootfolder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $user = self::$dms->getUser(1); + $this->assertIsObject($user); + $group = self::$dms->getGroup(1); + $this->assertIsObject($group); + $subfolder = self::$dms->getFolderByName('Subfolder 1'); + $this->assertIsObject($subfolder); + $subsubfolder = self::$dms->getFolderByName('Subsubfolder 1'); + $this->assertIsObject($subsubfolder); + + /* Adding an access rule will have no effect until the inheritance + * is turned off. + */ + $subfolder->addAccess(M_NONE, $user->getId(), true); + $subfolder->addAccess(M_READWRITE, $group->getId(), false); + $accesslist = $subfolder->getAccessList(); + $this->assertIsArray($accesslist); + $this->assertCount(0, $accesslist['users']); + $this->assertCount(0, $accesslist['groups']); + /* Turn inheritance off */ + $res = $subfolder->setInheritAccess(false); + $this->assertTrue($res); + /* Now the access rules on $subfolder take effect */ + $accesslist = $subfolder->getAccessList(); + $this->assertIsArray($accesslist); + $this->assertCount(1, $accesslist['users']); + $this->assertCount(1, $accesslist['groups']); + /* get list of users/groups which no access */ + $accesslist = $subfolder->getAccessList(M_NONE, O_EQ); + $this->assertIsArray($accesslist); + $this->assertCount(1, $accesslist['users']); + $this->assertCount(0, $accesslist['groups']); + /* get list of users/groups which read+write access */ + $accesslist = $subfolder->getAccessList(M_READWRITE, O_EQ); + $this->assertIsArray($accesslist); + $this->assertCount(0, $accesslist['users']); + $this->assertCount(1, $accesslist['groups']); + /* get list of users/groups which have at least read access */ + $accesslist = $subfolder->getAccessList(M_READ, O_GTEQ); + $this->assertIsArray($accesslist); + $this->assertCount(0, $accesslist['users']); + $this->assertCount(1, $accesslist['groups']); + /* get list of users/groups which have at least unlimited access */ + $accesslist = $subfolder->getAccessList(M_ALL, O_GTEQ); + $this->assertIsArray($accesslist); + $this->assertCount(0, $accesslist['users']); + $this->assertCount(0, $accesslist['groups']); + /* Subsubfolder 1 inherits from Subfolder 1 */ + $accesslist = $subsubfolder->getAccessList(); + $this->assertIsArray($accesslist); + $this->assertCount(1, $accesslist['users']); + $this->assertCount(1, $accesslist['groups']); + /* clear the access list */ + $res = $subfolder->clearAccessList(); + $this->assertTrue($res); + $accesslist = $subfolder->getAccessList(); + $this->assertIsArray($accesslist); + $this->assertCount(0, $accesslist['users']); + $this->assertCount(0, $accesslist['groups']); + /* calling getAccessList() on the $subsubfolder will still return + * the user and group, because the getParent() call in getAccessList() + * will not return the same instance like $subfolder. Hence calling + * $subfolder->clearAccessList() won't clear the accesslist of $subsubfolder's + * parent. You would have to explicitly + * clear acceslist of $subsubfolder's parent. + $res = $subsubfolder->getParent()->clearAccessList(); + $this->assertTrue($res); + $accesslist = $subsubfolder->getAccessList(); + $this->assertIsArray($accesslist); + $this->assertCount(0, $accesslist['users']); + $this->assertCount(0, $accesslist['groups']); + */ + } + + /** + * Test method addAccess() + * + * @return void + */ + public function testAddAccessWrongMode() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->addAccess(M_ANY, 1, true)); + } + + /** + * Test method addAccess() + * + * @return void + */ + public function testAddAccessSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("INSERT INTO `tblACLs`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->addAccess(M_NONE, 1, true)); + } + + /** + * Test method getAccessMode() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAccessMode() + { + /* Add some folders and documents */ + $this->createSimpleFolderStructureWithDocuments(); + $this->createGroupsAndUsers(); + + $rootfolder = SeedDMS_Core_Folder::getInstance(1, self::$dms); + $admin = self::$dms->getUser(1); + $this->assertIsObject($admin); + $this->assertTrue($admin->isAdmin()); + $guest = self::$dms->getUser(2); + $this->assertTrue($guest->isGuest()); + $user = self::$dms->getUser(3); + $this->assertIsObject($user); + if(self::$dms->version[0] == '5') + $this->assertTrue($user->getRole() == SeedDMS_Core_User::role_user); + else + $this->assertTrue($user->getRole()->getRole() == SeedDMS_Core_Role::role_user); + $joe = self::$dms->getUser(4); + $this->assertIsObject($joe); + if(self::$dms->version[0] == '5') + $this->assertTrue($joe->getRole() == SeedDMS_Core_User::role_user); + else + $this->assertTrue($joe->getRole()->getRole() == SeedDMS_Core_Role::role_user); + $sally = self::$dms->getUser(6); + $this->assertIsObject($sally); + if(self::$dms->version[0] == '5') + $this->assertTrue($sally->getRole() == SeedDMS_Core_User::role_user); + else + $this->assertTrue($sally->getRole()->getRole() == SeedDMS_Core_Role::role_user); + $group = self::$dms->getGroup(1); + $this->assertIsObject($group); + /* add guest and joe to group */ + if(!$group->isMember($guest)) { + $res = $guest->joinGroup($group); + $this->assertTrue($res); + } + if(!$group->isMember($joe)) { + $res = $joe->joinGroup($group); + $this->assertTrue($res); + } + + $subfolder1 = self::$dms->getFolderByName('Subfolder 1'); + $this->assertIsObject($subfolder1); + $subsubfolder = self::$dms->getFolderByName('Subsubfolder 1'); + $this->assertIsObject($subsubfolder); + $subfolder2 = self::$dms->getFolderByName('Subfolder 2'); + $this->assertIsObject($subfolder2); + $subfolder3 = self::$dms->getFolderByName('Subfolder 3'); + $this->assertIsObject($subfolder3); + $res = $subfolder3->setOwner($sally); + $this->assertTrue($res); + + /* Setup Subfolder 1: + * no inheritance, user has read-write access, group has unlimited access, + * default is no access + */ + $res = $subfolder1->setInheritAccess(false); + $this->assertTrue($res); + $res = $subfolder1->setDefaultAccess(M_NONE); + $this->assertTrue($res); + $res = $subfolder1->addAccess(M_READWRITE, $user->getId(), true); + $this->assertTrue($res); + $res = $subfolder1->addAccess(M_ALL, $group->getId(), false); + $this->assertTrue($res); + + /* Admin has always access mode M_ALL */ + $mode = $subfolder1->getAccessMode($admin); + $this->assertEquals(M_ALL, $mode); + /* Guest has max read access, though it's group has any access */ + $mode = $subfolder1->getAccessMode($guest); + $this->assertEquals(M_READ, $mode); + /* Joe has any access, because it's group has any access */ + $mode = $subfolder1->getAccessMode($joe); + $this->assertEquals(M_ALL, $mode); + /* Sally has no access, because it has no explicit access right and the + * default access is M_NONE. + */ + $mode = $subfolder1->getAccessMode($sally); + $this->assertEquals(M_NONE, $mode); + + /* Subfolder 3 inherits from the root folder, but sally is the owner */ + $mode = $subfolder3->getAccessMode($sally); + $this->assertEquals(M_ALL, $mode); + /* joe has just read access which is the default inherited from root */ + $mode = $subfolder3->getAccessMode($joe); + $this->assertEquals(M_READ, $mode); + + } + + /** + * Test method getFolderList() + * + * @return void + */ + public function testGetFolderListSqlFail() + { + $rootfolder = $this->getMockedRootFolder(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT `folderList` FROM `tblFolders`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $rootfolder->setDMS($dms); + $this->assertFalse($rootfolder->getFolderList()); + } + +} diff --git a/SeedDMS_Core/tests/GroupTest.php b/SeedDMS_Core/tests/GroupTest.php new file mode 100644 index 000000000..df14a13f5 --- /dev/null +++ b/SeedDMS_Core/tests/GroupTest.php @@ -0,0 +1,410 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +use PHPUnit\Framework\SeedDmsTest; + +/** + * Group test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class GroupTest extends SeedDmsTest +{ + + /** + * Create a real sqlite database in memory + * + * @return void + */ + protected function setUp(): void + { + self::$dbh = self::createInMemoryDatabase(); + self::$contentdir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpunit-'.time(); + mkdir(self::$contentdir); + // echo "Creating temp content dir: ".self::$contentdir."\n"; + self::$dms = new SeedDMS_Core_DMS(self::$dbh, self::$contentdir); + self::$dbversion = self::$dms->getDBVersion(); + } + + /** + * Clean up at tear down + * + * @return void + */ + protected function tearDown(): void + { + self::$dbh = null; + // echo "\nRemoving temp. content dir: ".self::$contentdir."\n"; + exec('rm -rf '.self::$contentdir); + } + + /** + * Create a mock group object + * + * @return SeedDMS_Core_Group + */ + protected function getMockGroup() + { + $user = $this->getMockBuilder(SeedDMS_Core_Group::class) + ->onlyMethods([]) + ->disableOriginalConstructor()->getMock(); + return $user; + } + + /** + * Create a mock group object + * + * @return SeedDMS_Core_Group + */ + protected function getGroup() + { + $group = new SeedDMS_Core_Group(1, 'foogroup', 'My comment'); + return $group; + } + + /** + * Create a mock regular user object + * + * @return SeedDMS_Core_User + */ + protected function getUser() + { + $user = new SeedDMS_Core_User(2, 'user', 'pass', 'Joe Baz', 'joe@foo.de', 'en_GB', 'bootstrap', 'My comment', SeedDMS_Core_User::role_user); + return $user; + } + + /** + * Test method isType() + * + * @return void + */ + public function testIsType() + { + $group = $this->getGroup(); + $this->assertTrue($group->isType('group')); + } + + /** + * Test method getName() + * + * @return void + */ + public function testGetName() + { + $group = $this->getGroup(); + $this->assertEquals('foogroup', $group->getName()); + } + + /** + * Test method getName() and setName() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetName() + { + $group = self::$dms->addGroup('Group', ''); + $ret = $group->setName('foo'); + $this->assertTrue($ret); + $name = $group->getName(); + $this->assertEquals('foo', $name); + /* Setting an empty name must fail */ + $ret = $group->setName(' '); + $this->assertFalse($ret); + } + + /** + * Test method setName() + * + * @return void + */ + public function testSetNameSqlFail() + { + $group = $this->getGroup(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblGroups` SET `name`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $group->setDMS($dms); + $this->assertFalse($group->setName('my name')); + } + + /** + * Test method getComment() + * + * @return void + */ + public function testGetComment() + { + $group = $this->getGroup(); + $this->assertEquals('My comment', $group->getComment()); + } + + /** + * Test method getComment() and setComment() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetComment() + { + $group = self::$dms->addGroup('Group', ''); + $ret = $group->setComment('foo'); + $this->assertTrue($ret); + $comment = $group->getComment(); + $this->assertEquals('foo', $comment); + } + + /** + * Test method setComment() + * + * @return void + */ + public function testSetCommentSqlFail() + { + $group = $this->getGroup(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblGroups` SET `comment`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $group->setDMS($dms); + $this->assertFalse($group->setComment('my comment')); + } + + /** + * Test method getUsers() + * + * @return void + */ + public function testGetUsersSqlFail() + { + $group = $this->getGroup(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT `tblUsers`.* FROM `tblUsers`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $group->setDMS($dms); + $this->assertFalse($group->getUsers()); + } + + /** + * Test method addUser(), isMember(), and removeUser() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAddAndRemoveUser() + { + $group = self::$dms->addGroup('Group', ''); + if(self::$dms->version[0] == '5') + $role = SeedDMS_Core_User::role_user; + else { + $role = SeedDMS_Core_Role::getInstance(3, self::$dms); + $this->assertIsObject($role); + $this->assertEquals($role->getRole(), SeedDMS_Core_Role::role_user); + } + $user1 = self::$dms->addUser('joe', 'pass', 'Joe Foo', 'joe@foo.de', 'en_GB', 'bootstrap', 'My comment', $role); + $user2 = self::$dms->addUser('sally', 'pass', 'Sally Foo', 'sally@foo.de', 'en_GB', 'bootstrap', 'My comment', $role); + + /* Add user1 and user2. user2 is also a manager */ + $ret = $group->addUser($user1); + $this->assertTrue($ret); + $ret = $group->addUser($user2, true); + $this->assertTrue($ret); + + $users = $group->getUsers(); + $this->assertIsArray($users); + $this->assertCount(2, $users); + + $ret = $group->removeUser($user1); + $this->assertTrue($ret); + $users = $group->getUsers(); + $this->assertIsArray($users); + $this->assertCount(1, $users); + } + + /** + * Test method isMember(), toggleManager() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testIsMember() + { + $group = self::$dms->addGroup('Group', ''); + $user1 = self::$dms->addUser('joe', 'pass', 'Joe Foo', 'joe@foo.de', 'en_GB', 'bootstrap', 'My comment'); + $user2 = self::$dms->addUser('sally', 'pass', 'Sally Foo', 'sally@foo.de', 'en_GB', 'bootstrap', 'My comment'); + + /* Add user1 and user2. user2 is also a manager */ + $ret = $group->addUser($user1); + $this->assertTrue($ret); + $ret = $group->addUser($user2, true); + $this->assertTrue($ret); + + /* user1 is a member but not a manager */ + $ret = $group->isMember($user1); + $this->assertTrue($ret); + $ret = $group->isMember($user1, true); + $this->assertFalse($ret); + + /* user2 is a member and a manager */ + $ret = $group->isMember($user2, true); + $this->assertTrue($ret); + } + + /** + * Test method toggleManager() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testToggleManager() + { + $group = self::$dms->addGroup('Group', ''); + $user1 = self::$dms->addUser('joe', 'pass', 'Joe Foo', 'joe@foo.de', 'en_GB', 'bootstrap', 'My comment'); + + /* Add user1 */ + $ret = $group->addUser($user1); + $this->assertTrue($ret); + + /* user1 is a member but not a manager */ + $ret = $group->isMember($user1); + $this->assertTrue($ret); + $ret = $group->isMember($user1, true); + $this->assertFalse($ret); + + /* Toggle manager mode of user 1 and check again */ + $ret = $group->toggleManager($user1); + $ret = $group->isMember($user1, true); + $this->assertTrue($ret); + } + + /** + * Test method getUsers() + * + * @return void + */ + public function testGetUsers() + { + $group = $this->getGroup(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + if(self::$dbversion['major'] == 6) { + $db->expects($this->exactly(2)) + ->method('getResultArray') + ->withConsecutive([$this->stringContains("`tblGroupMembers`.`groupID` = '".$group->getId()."'")], [$this->stringContains("SELECT * FROM `tblRoles` WHERE `id` =")]) + ->willReturnOnConsecutiveCalls(array(array('id'=>2, 'login'=>'user', 'pwd'=>'pass', 'fullName'=>'Joe Baz', 'email'=>'joe@foo.de', 'language'=>'en_GB', 'theme'=>'bootstrap', 'comment'=>'', 'role'=>SeedDMS_Core_User::role_user, 'hidden'=>0, 'role'=>1)), array('id'=>1, 'name'=>'role', 'role'=>1, 'noaccess'=>'')); + } else { + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("`tblGroupMembers`.`groupID` = '".$group->getId()."'")) + ->willReturn(array(array('id'=>2, 'login'=>'user', 'pwd'=>'pass', 'fullName'=>'Joe Baz', 'email'=>'joe@foo.de', 'language'=>'en_GB', 'theme'=>'bootstrap', 'comment'=>'', 'role'=>SeedDMS_Core_User::role_user, 'hidden'=>0, 'role'=>1))); + } + $dms = new SeedDMS_Core_DMS($db, ''); + + $group->setDMS($dms); + $users = $group->getUsers(); + $this->assertIsArray($users); + $this->assertCount(1, $users); + } + + /** + * Test method getManagers() + * + * @return void + */ + public function testGetManagers() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + if(self::$dbversion['major'] == 6) { + $db->expects($this->exactly(2)) + ->method('getResultArray') + ->withConsecutive([$this->stringContains("`manager` = 1")], [$this->stringContains("SELECT * FROM `tblRoles` WHERE `id` =")]) + ->willReturnOnConsecutiveCalls(array(array('id'=>2, 'login'=>'user', 'pwd'=>'pass', 'fullName'=>'Joe Baz', 'email'=>'joe@foo.de', 'language'=>'en_GB', 'theme'=>'bootstrap', 'comment'=>'', 'role'=>SeedDMS_Core_User::role_user, 'hidden'=>0, 'role'=>1)), array('id'=>1, 'name'=>'role', 'role'=>1, 'noaccess'=>'')); + } else { + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains('`manager` = 1')) + ->willReturn(array(array('id'=>2, 'login'=>'user', 'pwd'=>'pass', 'fullName'=>'Joe Baz', 'email'=>'joe@foo.de', 'language'=>'en_GB', 'theme'=>'bootstrap', 'comment'=>'', 'role'=>SeedDMS_Core_User::role_user, 'hidden'=>0))); + } + $dms = new SeedDMS_Core_DMS($db, ''); + + $group = $this->getGroup(); + $group->setDMS($dms); + $managers = $group->getManagers(); + $this->assertIsArray($managers); + $this->assertCount(1, $managers); + } + + /** + * Test method getNotifications() + * + * @return void + */ + public function testGetNotifications() + { + $group = $this->getGroup(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("WHERE `tblNotify`.`groupID` = ".$group->getId())) + ->willReturn(array(array('target'=>2, 'targetType'=>'0', 'userID'=>0, 'groupID'=>$group->getId()))); + $dms = new SeedDMS_Core_DMS($db, ''); + $group->setDMS($dms); + $notifications = $group->getNotifications(); + $this->assertIsArray($notifications); + $this->assertCount(1, $notifications); + $this->assertInstanceOf(SeedDMS_Core_Notification::class, $notifications[0]); + } + + /** + * Test method getNotifications() with target type + * + * @return void + */ + public function testGetNotificationsWithTargetType() + { + $group = $this->getGroup(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("WHERE `tblNotify`.`groupID` = ".$group->getId()." AND `tblNotify`.`targetType` = 1")) + ->willReturn(array(array('target'=>2, 'targetType'=>'1', 'userID'=>0, 'groupID'=>$group->getId()))); + $dms = new SeedDMS_Core_DMS($db, ''); + $group->setDMS($dms); + $notifications = $group->getNotifications(1); + $this->assertIsArray($notifications); + $this->assertCount(1, $notifications); + $this->assertInstanceOf(SeedDMS_Core_Notification::class, $notifications[0]); + } + + +} diff --git a/SeedDMS_Core/tests/KeywordCategoryTest.php b/SeedDMS_Core/tests/KeywordCategoryTest.php new file mode 100644 index 000000000..e22d138ed --- /dev/null +++ b/SeedDMS_Core/tests/KeywordCategoryTest.php @@ -0,0 +1,147 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +use PHPUnit\Framework\SeedDmsTest; + +/** + * User test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class KeywordCategoryTest extends SeedDmsTest +{ + + /** + * Create a real sqlite database in memory + * + * @return void + */ + protected function setUp(): void + { + self::$dbh = self::createInMemoryDatabase(); + self::$contentdir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpunit-'.time(); + mkdir(self::$contentdir); + // echo "Creating temp content dir: ".self::$contentdir."\n"; + self::$dms = new SeedDMS_Core_DMS(self::$dbh, self::$contentdir); + } + + /** + * Clean up at tear down + * + * @return void + */ + protected function tearDown(): void + { + self::$dbh = null; + // echo "\nRemoving temp. content dir: ".self::$contentdir."\n"; + exec('rm -rf '.self::$contentdir); + } + + /** + * Test method getName() and setName() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetName() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $cat = self::$dms->addKeywordCategory($user->getId(), 'Category 1'); + $name = $cat->getName(); + $ret = $cat->setName('foo'); + $this->assertTrue($ret); + $name = $cat->getName(); + $this->assertEquals('foo', $name); + $ret = $cat->setName(' '); + $this->assertFalse($ret); + } + + /** + * Test method getOwner() and setOwner() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetOwner() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $guest = SeedDMS_Core_User::getInstance(2, self::$dms); + $cat = self::$dms->addKeywordCategory($user->getId(), 'Category 1'); + $this->assertIsObject($cat); + $ret = $cat->setOwner($guest); + $this->assertTrue($ret); + $owner = $cat->getOwner(); + $this->assertEquals(2, $owner->getId()); + $ret = $cat->setOwner(null); + $this->assertFalse($ret); + } + + /** + * Test method addKeywordList() and editKeywordList(), getKeywordLists(), removeKeywordList() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetSetEditAndRemoveKeywordList() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $cat = self::$dms->addKeywordCategory($user->getId(), 'Category 1'); + $this->assertIsObject($cat); + $ret = $cat->addKeywordList('foo'); + $this->assertTrue($ret); + $ret = $cat->addKeywordList('bar'); + $this->assertTrue($ret); + $list = $cat->getKeywordLists(); + $this->assertIsArray($list); + $this->assertCount(2, $list); + $ret = $cat->editKeywordList(1, 'baz'); + $this->assertTrue($ret); + + $ret = $cat->removeKeywordList(1); + $this->assertTrue($ret); + $list = $cat->getKeywordLists(); + $this->assertIsArray($list); + $this->assertCount(1, $list); + } + + /** + * Test method addKeywordCategory() and remove() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAndAndRemoveKeywordCategory() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $cat = self::$dms->addKeywordCategory($user->getId(), 'Category 1'); + $this->assertIsObject($cat); + $ret = $cat->addKeywordList('foo'); + $this->assertTrue($ret); + $ret = $cat->addKeywordList('bar'); + $this->assertTrue($ret); + $ret = $cat->remove(); + $this->assertTrue($ret); + } +} diff --git a/SeedDMS_Core/tests/ReviewApprovalTest.php b/SeedDMS_Core/tests/ReviewApprovalTest.php new file mode 100644 index 000000000..aea040e39 --- /dev/null +++ b/SeedDMS_Core/tests/ReviewApprovalTest.php @@ -0,0 +1,477 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +use PHPUnit\Framework\SeedDmsTest; + +/** + * Group test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class ReviewApprovalTest extends SeedDmsTest +{ + + /** + * Create a real sqlite database in memory + * + * @return void + */ + protected function setUp(): void + { + self::$dbh = self::createInMemoryDatabase(); + self::$contentdir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpunit-'.time(); + mkdir(self::$contentdir); + // echo "Creating temp content dir: ".self::$contentdir."\n"; + self::$dms = new SeedDMS_Core_DMS(self::$dbh, self::$contentdir); + } + + /** + * Clean up at tear down + * + * @return void + */ + protected function tearDown(): void + { + self::$dbh = null; + // echo "\nRemoving temp. content dir: ".self::$contentdir."\n"; + exec('rm -rf '.self::$contentdir); + } + + /** + * Test method addIndReviewer(), addGrpReviewer(), verifyStatus(), + * getReviewStatus(), removeReview(), delIndReviewer() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testReviewDocumentByUserAndGroup() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $this->assertIsObject($user); + + /* Add a new user who will be the reviewer */ + $reviewer = self::$dms->addUser('reviewer', 'reviewer', 'Reviewer One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($reviewer); + + /* Add a new group which will be the reviewer */ + $reviewergrp = self::$dms->addGroup('reviewer', ''); + $this->assertIsObject($reviewergrp); + + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $content = $document->getLatestContent(); + $this->assertIsObject($content); + $status = $content->getStatus(); + $this->assertIsArray($status); + $this->assertEquals(S_RELEASED, $status['status']); + + /* A missing reviewer or user causes an error */ + $ret = $content->addIndReviewer($reviewer, null); + $this->assertEquals(-1, $ret); + + /* A missing reviewer or user causes an error */ + $ret = $content->addIndReviewer(null, $user); + $this->assertEquals(-1, $ret); + + /* Adding a group instead of a user causes an error */ + $ret = $content->addIndReviewer($reviewergrp, $user); + $this->assertEquals(-1, $ret); + + /* Finally add the reviewer */ + $ret = $content->addIndReviewer($reviewer, $user); + $this->assertGreaterThan(0, $ret); + + /* Adding the user again will yield in an error */ + $ret = $content->addIndReviewer($reviewer, $user); + $this->assertEquals(-3, $ret); + + /* Needs to call verifyStatus() in order to recalc the status */ + $newstatus = $content->verifyStatus(false, $user); + $this->assertIsInt($newstatus); + $this->assertEquals(S_DRAFT_REV, $newstatus); + + /* Get all reviews */ + $reviewstatus = $content->getReviewStatus(); + $this->assertIsArray($reviewstatus); + $this->assertCount(1, $reviewstatus); + + /* Get list of individual und group reviewers */ + $reviewers = $content->getReviewers(); + $this->assertIsArray($reviewers); + $this->assertCount(2, $reviewers); + $this->assertCount(1, $reviewers['i']); + $this->assertCount(0, $reviewers['g']); +/* + $db = self::$dms->getDB(); + $db->createTemporaryTable("ttreviewid", true); + $queryStr = "SELECT * FROM ttreviewid"; + $recs = $db->getResultArray($queryStr); + echo $db->getErrorMsg(); + var_dump($recs); +*/ + + /* A missing reviewer or user causes an error */ + $ret = $content->addGrpReviewer($reviewergrp, null); + $this->assertEquals(-1, $ret); + + /* A missing reviewer or user causes an error */ + $ret = $content->addGrpReviewer(null, $user); + $this->assertEquals(-1, $ret); + + /* Adding a user instead of a group causes an error */ + $ret = $content->addGrpReviewer($reviewer, $user); + $this->assertEquals(-1, $ret); + + /* Finally add the reviewer */ + $ret = $content->addGrpReviewer($reviewergrp, $user); + $this->assertGreaterThan(0, $ret); + $groupstatus = $reviewergrp->getReviewStatus(); + + /* Adding the group again will yield in an error */ + $ret = $content->addGrpReviewer($reviewergrp, $user); + $this->assertEquals(-3, $ret); + + /* Get all reviews */ + $reviewstatus = $content->getReviewStatus(); + $this->assertIsArray($reviewstatus); + $this->assertCount(2, $reviewstatus); + + /* Get list of individual und group reviewers */ + $reviewers = $content->getReviewers(); + $this->assertIsArray($reviewers); + $this->assertCount(2, $reviewers); + $this->assertCount(1, $reviewers['i']); + $this->assertCount(1, $reviewers['g']); + + $userstatus = $reviewer->getReviewStatus(); + $groupstatus = $reviewergrp->getReviewStatus(); + + /* There should be two log entries, one for each reviewer */ + $reviewlog = $content->getReviewLog(5); + $this->assertIsArray($reviewlog); + $this->assertCount(2, $reviewlog); + + /* Adding a review without a user of reviewer causes an error */ + $ret = $content->setReviewByInd($reviewer, null, S_LOG_ACCEPTED, 'Comment of individual reviewer'); + $this->assertEquals(-1, $ret); + $ret = $content->setReviewByInd(null, $user, S_LOG_ACCEPTED, 'Comment of individual reviewer'); + $this->assertEquals(-1, $ret); + + /* Adding a review as an individual but passing a group causes an error */ + $ret = $content->setReviewByInd($reviewergrp, $user, S_LOG_ACCEPTED, 'Comment of individual reviewer'); + $this->assertEquals(-1, $ret); + + /* Individual reviewer reviews document */ + $ret = $content->setReviewByInd($reviewer, $user, S_LOG_ACCEPTED, 'Comment of individual reviewer'); + $this->assertIsInt(0, $ret); + $this->assertGreaterThan(0, $ret); + + /* Get the last 5 review log entries (actually there are just 3 now) */ + $reviewlog = $content->getReviewLog(5); + $this->assertIsArray($reviewlog); + $this->assertCount(3, $reviewlog); + $this->assertEquals('Comment of individual reviewer', $reviewlog[0]['comment']); + $this->assertEquals(1, $reviewlog[0]['status']); + + /* Needs to call verifyStatus() in order to recalc the status. + * It must not be changed because the group reviewer has not done the + * review. + */ + $newstatus = $content->verifyStatus(false, $user); + $this->assertIsInt($newstatus); + $this->assertEquals(S_DRAFT_REV, $newstatus); + + /* Adding a review without a user of reviewer causes an error */ + $ret = $content->setReviewByGrp($reviewergrp, null, S_LOG_ACCEPTED, 'Comment of group reviewer'); + $this->assertEquals(-1, $ret); + $ret = $content->setReviewByGrp(null, $user, S_LOG_ACCEPTED, 'Comment of group reviewer'); + $this->assertEquals(-1, $ret); + + /* Adding a review as an group but passing a user causes an error */ + $ret = $content->setReviewByGrp($reviewer, $user, S_LOG_ACCEPTED, 'Comment of group reviewer'); + $this->assertEquals(-1, $ret); + + /* Group reviewer reviews document */ + $ret = $content->setReviewByGrp($reviewergrp, $user, S_LOG_ACCEPTED, 'Comment of group reviewer'); + $this->assertIsInt(0, $ret); + $this->assertGreaterThan(0, $ret); + + /* Get the last 5 review log entries (actually there are just 4 now) */ + $reviewlog = $content->getReviewLog(5); + $this->assertIsArray($reviewlog); + $this->assertCount(4, $reviewlog); + $this->assertEquals('Comment of group reviewer', $reviewlog[0]['comment']); + $this->assertEquals(1, $reviewlog[0]['status']); + + /* Now the document has received all reviews */ + $newstatus = $content->verifyStatus(false, $user); + $this->assertIsInt($newstatus); + $this->assertEquals(S_RELEASED, $newstatus); + + /* Remove the last review of the user */ + $userstatus = $reviewer->getReviewStatus($document->getId(), $content->getVersion()); + $this->assertIsArray($userstatus); + $this->assertCount(2, $userstatus); + $this->assertCount(1, $userstatus['indstatus']); + $ret = $content->removeReview($userstatus['indstatus'][$document->getId()]['reviewID'], $user, 'Undo review'); + $this->assertTrue($ret); + + /* Get the last 8 review log entries (actually there are just 5 now) */ + $reviewlog = $content->getReviewLog(8); + $this->assertIsArray($reviewlog); + $this->assertCount(5, $reviewlog); + $this->assertEquals('Undo review', $reviewlog[0]['comment']); + $this->assertEquals(0, $reviewlog[0]['status']); + + /* Now the document must be back in draft mode */ + $newstatus = $content->verifyStatus(false, $user); + $this->assertIsInt($newstatus); + $this->assertEquals(S_DRAFT_REV, $newstatus); + + /* Removing the user as a reviewer completly will release the + * document again, because the group reviewer became the only + * reviewer and has done the review already. + */ + $ret = $content->delIndReviewer($reviewer, $user, 'Reviewer removed'); + $this->assertIsInt($ret); + $this->assertEquals(0, $ret); + + /* Get the last 8 review log entries (actually there are just 6 now) */ + $reviewlog = $content->getReviewLog(8); + $this->assertIsArray($reviewlog); + $this->assertCount(6, $reviewlog); + $this->assertEquals('Reviewer removed', $reviewlog[0]['comment']); + $this->assertEquals(-2, $reviewlog[0]['status']); + + /* Now the document will be released again */ + $newstatus = $content->verifyStatus(false, $user); + $this->assertIsInt($newstatus); + $this->assertEquals(S_RELEASED, $newstatus); + } + + /** + * Test method addIndApprover(), addGrpApprover(), verifyStatus(), + * getApprovalStatus(), removeApproval(), delIndApprover() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testApproveDocumentByUserAndGroup() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $this->assertIsObject($user); + + /* Add a new user who will be the approver */ + $approver = self::$dms->addUser('approver', 'approver', 'Approver One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($approver); + + /* Add a new group which will be the approver */ + $approvergrp = self::$dms->addGroup('approver', ''); + $this->assertIsObject($approvergrp); + + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $content = $document->getLatestContent(); + $this->assertIsObject($content); + $status = $content->getStatus(); + $this->assertIsArray($status); + $this->assertEquals(S_RELEASED, $status['status']); + + /* A missing approver or user causes an error */ + $ret = $content->addIndApprover($approver, null); + $this->assertEquals(-1, $ret); + + /* A missing approver or user causes an error */ + $ret = $content->addIndApprover(null, $user); + $this->assertEquals(-1, $ret); + + /* Adding a group instead of a user causes an error */ + $ret = $content->addIndApprover($approvergrp, $user); + $this->assertEquals(-1, $ret); + + /* Finally add the reviewer */ + $ret = $content->addIndApprover($approver, $user); + $this->assertGreaterThan(0, $ret); + + /* Adding the user again will yield in an error */ + $ret = $content->addIndApprover($approver, $user); + $this->assertEquals(-3, $ret); + + /* Needs to call verifyStatus() in order to recalc the status */ + $newstatus = $content->verifyStatus(false, $user); + $this->assertIsInt($newstatus); + $this->assertEquals(S_DRAFT_APP, $newstatus); + + /* Get all approvals */ + $approvalstatus = $content->getApprovalStatus(); + $this->assertIsArray($approvalstatus); + $this->assertCount(1, $approvalstatus); + + /* Get list of individual und group approvers */ + $approvers = $content->getApprovers(); + $this->assertIsArray($approvers); + $this->assertCount(2, $approvers); + $this->assertCount(1, $approvers['i']); + $this->assertCount(0, $approvers['g']); + + /* A missing approver or user causes an error */ + $ret = $content->addGrpApprover($approvergrp, null); + $this->assertEquals(-1, $ret); + + /* A missing approver or user causes an error */ + $ret = $content->addGrpApprover(null, $user); + $this->assertEquals(-1, $ret); + + /* Adding a user instead of a group causes an error */ + $ret = $content->addGrpApprover($approver, $user); + $this->assertEquals(-1, $ret); + + /* Finally add the reviewer */ + $ret = $content->addGrpApprover($approvergrp, $user); + $this->assertGreaterThan(0, $ret); + $groupstatus = $approvergrp->getApprovalStatus(); + + /* Adding the group again will yield in an error */ + $ret = $content->addGrpApprover($approvergrp, $user); + $this->assertEquals(-3, $ret); + + /* Get all approvals */ + $approvalstatus = $content->getApprovalStatus(); + $this->assertIsArray($approvalstatus); + $this->assertCount(2, $approvalstatus); + + /* Get list of individual und group approvers */ + $approvers = $content->getApprovers(); + $this->assertIsArray($approvers); + $this->assertCount(2, $approvers); + $this->assertCount(1, $approvers['i']); + $this->assertCount(1, $approvers['g']); + + $userstatus = $approver->getApprovalStatus(); + $groupstatus = $approvergrp->getApprovalStatus(); + + /* There should be two log entries, one for each approver */ + $approvallog = $content->getApproveLog(5); + $this->assertIsArray($approvallog); + $this->assertCount(2, $approvallog); + + /* Adding a approval without a user of approver causes an error */ + $ret = $content->setApprovalByInd($approver, null, S_LOG_ACCEPTED, 'Comment of individual approver'); + $this->assertEquals(-1, $ret); + $ret = $content->setApprovalByInd(null, $user, S_LOG_ACCEPTED, 'Comment of individual approver'); + $this->assertEquals(-1, $ret); + + /* Adding a approval as an individual but passing a group causes an error */ + $ret = $content->setApprovalByInd($approvergrp, $user, S_LOG_ACCEPTED, 'Comment of individual approver'); + $this->assertEquals(-1, $ret); + + /* Individual approver approvals document */ + $ret = $content->setApprovalByInd($approver, $user, S_LOG_ACCEPTED, 'Comment of individual approver'); + $this->assertIsInt(0, $ret); + $this->assertGreaterThan(0, $ret); + + /* Get the last 5 approval log entries (actually there are just 3 now) */ + $approvallog = $content->getApproveLog(5); + $this->assertIsArray($approvallog); + $this->assertCount(3, $approvallog); + $this->assertEquals('Comment of individual approver', $approvallog[0]['comment']); + $this->assertEquals(1, $approvallog[0]['status']); + + /* Needs to call verifyStatus() in order to recalc the status. + * It must not be changed because the group approver has not done the + * approval. + */ + $newstatus = $content->verifyStatus(false, $user); + $this->assertIsInt($newstatus); + $this->assertEquals(S_DRAFT_APP, $newstatus); + + /* Adding a approval without a user of approver causes an error */ + $ret = $content->setApprovalByGrp($approvergrp, null, S_LOG_ACCEPTED, 'Comment of group approver'); + $this->assertEquals(-1, $ret); + $ret = $content->setApprovalByGrp(null, $user, S_LOG_ACCEPTED, 'Comment of group approver'); + $this->assertEquals(-1, $ret); + + /* Adding a approval as an group but passing a user causes an error */ + $ret = $content->setApprovalByGrp($approver, $user, S_LOG_ACCEPTED, 'Comment of group approver'); + $this->assertEquals(-1, $ret); + + /* Group approver approvals document */ + $ret = $content->setApprovalByGrp($approvergrp, $user, S_LOG_ACCEPTED, 'Comment of group approver'); + $this->assertIsInt(0, $ret); + $this->assertGreaterThan(0, $ret); + + /* Get the last 5 approval log entries (actually there are just 4 now) */ + $approvallog = $content->getApproveLog(5); + $this->assertIsArray($approvallog); + $this->assertCount(4, $approvallog); + $this->assertEquals('Comment of group approver', $approvallog[0]['comment']); + $this->assertEquals(1, $approvallog[0]['status']); + + /* Now the document has received all approvals */ + $newstatus = $content->verifyStatus(false, $user); + $this->assertIsInt($newstatus); + $this->assertEquals(S_RELEASED, $newstatus); + + /* Remove the last approval of the user */ + $userstatus = $approver->getApprovalStatus($document->getId(), $content->getVersion()); + $this->assertIsArray($userstatus); + $this->assertCount(2, $userstatus); + $this->assertCount(1, $userstatus['indstatus']); + $ret = $content->removeApproval($userstatus['indstatus'][$document->getId()]['approveID'], $user, 'Undo approval'); + $this->assertTrue($ret); + + /* Get the last 8 approval log entries (actually there are just 5 now) */ + $approvallog = $content->getApproveLog(8); + $this->assertIsArray($approvallog); + $this->assertCount(5, $approvallog); + $this->assertEquals('Undo approval', $approvallog[0]['comment']); + $this->assertEquals(0, $approvallog[0]['status']); + + /* Now the document must be back in draft mode */ + $newstatus = $content->verifyStatus(false, $user); + $this->assertIsInt($newstatus); + $this->assertEquals(S_DRAFT_APP, $newstatus); + + /* Removing the user as a approver completly will release the + * document again, because the group approver became the only + * approver and has done the approval already. + */ + $ret = $content->delIndApprover($approver, $user, 'Approver removed'); + $this->assertIsInt($ret); + $this->assertEquals(0, $ret); + + /* Get the last 8 approval log entries (actually there are just 6 now) */ + $approvallog = $content->getApproveLog(8); + $this->assertIsArray($approvallog); + $this->assertCount(6, $approvallog); + $this->assertEquals('Approver removed', $approvallog[0]['comment']); + $this->assertEquals(-2, $approvallog[0]['status']); + + /* Now the document will be released again */ + $newstatus = $content->verifyStatus(false, $user); + $this->assertIsInt($newstatus); + $this->assertEquals(S_RELEASED, $newstatus); + } +} diff --git a/SeedDMS_Core/tests/SeedDmsBase.php b/SeedDMS_Core/tests/SeedDmsBase.php new file mode 100644 index 000000000..dc8f7e920 --- /dev/null +++ b/SeedDMS_Core/tests/SeedDmsBase.php @@ -0,0 +1,365 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +namespace PHPUnit\Framework; + +use PHPUnit\Framework\TestCase; + +/** + * Database test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class SeedDmsTest extends TestCase +{ + + public static $dbh; + + public static $dms; + + public static $contentdir; + + public static $dbversion; + + /** + * Create a sqlite database in memory + * + * @return void + */ + public static function createInMemoryDatabase(): object + { + $dbh = new \SeedDMS_Core_DatabaseAccess('sqlite', '', '', '', ':memory:'); + $dbh->connect(); + $queries = file_get_contents(getenv("SEEDDMS_CORE_SQL")); + // generate SQL query + $queries = explode(";", $queries); + + // execute queries + $errorMsg = ''; + foreach ($queries as $query) { + //echo $query; + $query = trim($query); + if (!empty($query)) { + $dbh->getResult($query); + + if ($dbh->getErrorNo() != 0) { + //echo $dbh->getErrorMsg()."\n"; + $errorMsg .= $dbh->getErrorMsg()."\n"; + } + } + } + return $dbh; + } + + /** + * Create a mocked root folder object + * + * @return \SeedDMS_Core_Folder + */ + protected function getMockedRootFolder($id=1, $name='DMS') + { + $folder = new \SeedDMS_Core_Folder($id, $name, 0, 'DMS root', time(), 1, 0, 0, 0.0); + return $folder; + } + + /** + * Create a mocked document object + * + * @return \SeedDMS_Core_Document + */ + protected function getMockedDocument($id=1, $name='Document') + { + $document = new \SeedDMS_Core_Document($id, $name, '', time(), null, 1, 1, 1, M_READ, 0, '', 1.0); + return $document; + } + + /** + * Create a mocked user object + * + * @return \SeedDMS_Core_User + */ + protected function getMockedUser() + { + $user = new \SeedDMS_Core_User(1, 'login', '', 'New User', 'email@seeddms.org', 'de_DE', 'bootstrap', '', null); + return $user; + } + + /** + * Create a temporary file with random content and the given length. + * + * @param integer $length length of file + * + * @return string name of temporary file + */ + protected static function createTempFile($length=200, $dir='') + { + if($tmpfname = @tempnam($dir ? $dir : sys_get_temp_dir(), 'foo')) { + file_put_contents($tmpfname, substr(str_shuffle(str_repeat($x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', (int) ceil($length/strlen($x)) )),1,$length)); + return $tmpfname; + } else + return false; + } + + /** + * Create a temporary directory with random name in systems temp dir. + * + * @param integer $mode access mode of new directory + * + * @return string name of temporary directory + */ + protected static function createTempDir(string $dir = null, int $mode = 0700): string { + /* Use the system temp dir by default. */ + if (is_null($dir)) { + $dir = sys_get_temp_dir(); + } + + do { $tmp = $dir . '/' . mt_rand(); } + while (!@mkdir($tmp, $mode)); + return $tmp; + } + + /** + * Create a simple document. + * + * @param \SeedDMS_Core_Folder $parent parent folder + * @param \SeedDMS_Core_User $owner owner of document + * @param string $name name of document + * @param integer $length length of file + * + * @return string name of temporary file + */ + protected static function createDocument($parent, $owner, $name, $length=200) + { + $filename = self::createTempFile($length); + list($document, $res) = $parent->addDocument( + $name, // name + '', // comment + null, // no expiration + $owner, // owner + '', // keywords + [], // categories + $filename, // name of file + 'file1.txt', // original file name + '.txt', // file type + 'text/plain', // mime type + 1.0 // sequence + ); + unlink($filename); + return $document; + } + + /** + * Create a simple folder structure without documents + * + * DMS root -+- Subfolder 1 -+- Subsubfolder 1 -+- Subsubsubfolder 1 + * | + * +- Subfolder 2 + * | + * +- Subfolder 3 + * + * The sequence field of Subfolder x is: + * Subfolder 1: 2.0 + * Subfolder 2: 1.0 + * Subfolder 1: 0.5 + * + * @return void + */ + protected static function createSimpleFolderStructure() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + /* Set up a folder structure */ + $subfolder = $rootfolder->addSubFolder('Subfolder 1', '', $user, 2.0); + $subsubfolder = $subfolder->addSubFolder('Subsubfolder 1', '', $user, 1.0); + $subsubsubfolder = $subsubfolder->addSubFolder('Subsubsubfolder 1', '', $user, 1.0); + $rootfolder->addSubFolder('Subfolder 2', '', $user, 1.0); + $rootfolder->addSubFolder('Subfolder 3', '', $user, 0.5); + } + + /** + * Create a simple folder structure with documents + * + * Creates the same folder structure like createSimpleFolderStructure() + * but adds 30 documents to 'Subfolder 1'. They are named 'Document 1' + * to 'Document 30'. + * + * @return void + */ + protected static function createSimpleFolderStructureWithDocuments() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + self::createSimpleFolderStructure(); + /* Add documents to 'Subfolder 1' */ + $subfolder = self::$dms->getFolderByName('Subfolder 1'); + for ($i=1; $i<=15; $i++) { + $filename = self::createTempFile(200); + list($document, $res) = $subfolder->addDocument( + 'Document 1-'.$i, // name + '', // comment + null, + $user, // owner + '', // keywords + [], // categories + $filename, // name of file + 'file-1-'.$i.'.txt', // original file name + '.txt', // file type + 'text/plain', // mime type + 1.0+$i // sequence + ); + unlink($filename); + } + /* Add documents to 'Subfolder 2' */ + $subfolder = self::$dms->getFolderByName('Subfolder 2'); + for ($i=1; $i<=15; $i++) { + $filename = self::createTempFile(200); + list($document, $res) = $subfolder->addDocument( + 'Document 2-'.$i, // name + '', // comment + null, + $user, // owner + '', // keywords + [], // categories + $filename, // name of file + 'file-2-'.$i.'.txt', // original file name + '.txt', // file type + 'text/plain', // mime type + 1.0+$i // sequence + ); + unlink($filename); + } + } + + /** + * Create two groups with 3 users each + * The groups are named 'Group 1' and 'Group 2'. The users in Group 1 + * are named 'User-1-1', 'User-1-2', 'User-1-3'. The users in Group 2 + * are named 'User-2-1', 'User-2-2', 'User-2-3'. + * The login name is the lower case of the name. + * + * @return void + */ + protected static function createGroupsAndUsers() + { + for($i=1; $i<=2; $i++) { + $group = self::$dms->addGroup('Group '.$i, ''); + for($j=1; $j<=3; $j++) { + $user = self::$dms->addUser('user-'.$i.'-'.$j, '', 'User '.$j.' in group '.$i, 'user@seeddms.org', 'en_GB', 'bootstrap', ''); + $user->joinGroup($group); + } + } + } + + /** + * Creates a workflow with two transitions identical to the traditional + * workflow + * + * NR --- review --> NA -+- approve --> RL + * +- reject --> RJ | + * +- reject ---> RJ + * + * States: + * NR = needs review + * NA = needs approval + * RL = released + * RJ = rejected + * + * Actions: + * review + * approve + * reject + * + * Transitions: + * NR -- review -> NA maybe done by reviewer + * NR -- reject -> RJ maybe done by reviewer + * NA -- approve -> RL maybe done by approver + * NA -- reject -> RJ maybe done by approver + */ + protected function createWorkflow(\SeedDMS_Core_User $reviewer, \SeedDMS_Core_User $approver): \SeedDMS_Core_Workflow + { + /* Create workflow states */ + $ws_nr = self::$dms->addWorkflowState('needs review', S_IN_WORKFLOW); + $ws_na = self::$dms->addWorkflowState('needs approval', S_IN_WORKFLOW); + $ws_rl = self::$dms->addWorkflowState('released', S_RELEASED); + $ws_rj = self::$dms->addWorkflowState('rejected', S_REJECTED); + + /* Create workflow actions */ + $wa_rv = self::$dms->addWorkflowAction('review', S_IN_WORKFLOW); + $wa_rj = self::$dms->addWorkflowAction('reject', S_REJECTED); + $wa_ap = self::$dms->addWorkflowAction('approve', S_RELEASED); + + /* Create a workflow which starts in state 'needs review' */ + $workflow = self::$dms->addWorkflow('traditional workflow', $ws_nr); + /* Add transition NR -- review -> NA */ + $wt_nr_na = $workflow->addTransition($ws_nr, $wa_rv, $ws_na, [$reviewer], []); + /* Add transition NR -- review -> RJ */ + $wt_nr_rj = $workflow->addTransition($ws_nr, $wa_rj, $ws_rj, [$reviewer], []); + /* Add transition NA -- approve -> RL */ + $wt_na_rl = $workflow->addTransition($ws_na, $wa_ap, $ws_rl, [$approver], []); + /* Add transition NA -- reject -> RJ */ + $wt_na_rj = $workflow->addTransition($ws_na, $wa_rj, $ws_rj, [$approver], []); + + return $workflow; + } + + /** + * Creates a workflow with one transitions for approving a document + * + * NA -+- approve --> RL + * | + * +- reject ---> RJ + * + * States: + * NA = needs approval + * RL = released + * RJ = rejected + * + * Actions: + * approve + * reject + * + * Transitions: + * NA -- approve -> RL maybe done by approver + * NA -- reject -> RJ maybe done by approver + */ + protected function createSimpleWorkflow(\SeedDMS_Core_User $approver): \SeedDMS_Core_Workflow + { + /* Create workflow states */ + $ws_na = self::$dms->addWorkflowState('simple needs approval', S_IN_WORKFLOW); + $ws_rl = self::$dms->addWorkflowState('simple released', S_RELEASED); + $ws_rj = self::$dms->addWorkflowState('simple rejected', S_REJECTED); + + /* Create workflow actions */ + $wa_rj = self::$dms->addWorkflowAction('simple reject', S_REJECTED); + $wa_ap = self::$dms->addWorkflowAction('simple approve', S_RELEASED); + + /* Create a workflow which starts in state 'needs approval' */ + $workflow = self::$dms->addWorkflow('simple workflow', $ws_na); + /* Add transition NA -- approve -> RL */ + $wt_na_rl = $workflow->addTransition($ws_na, $wa_ap, $ws_rl, [$approver], []); + /* Add transition NA -- reject -> RJ */ + $wt_na_rj = $workflow->addTransition($ws_na, $wa_rj, $ws_rj, [$approver], []); + + return $workflow; + } + +} + diff --git a/SeedDMS_Core/tests/UserTest.php b/SeedDMS_Core/tests/UserTest.php new file mode 100644 index 000000000..6d2e6f208 --- /dev/null +++ b/SeedDMS_Core/tests/UserTest.php @@ -0,0 +1,1679 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +use PHPUnit\Framework\SeedDmsTest; + +/** + * User test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class UserTest extends SeedDmsTest +{ + + /** + * Create a real sqlite database in memory + * + * @return void + */ + protected function setUp(): void + { + self::$dbh = self::createInMemoryDatabase(); + self::$contentdir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpunit-'.time(); + mkdir(self::$contentdir); + // echo "Creating temp content dir: ".self::$contentdir."\n"; + self::$dms = new SeedDMS_Core_DMS(self::$dbh, self::$contentdir); + self::$dbversion = self::$dms->getDBVersion(); + } + + /** + * Clean up at tear down + * + * @return void + */ + protected function tearDown(): void + { + self::$dbh = null; + // echo "\nRemoving temp. content dir: ".self::$contentdir."\n"; + exec('rm -rf '.self::$contentdir); + } + + /** + * Create a mock admin user object + * + * @return SeedDMS_Core_User + */ + protected function getAdminUser() + { + $user = new SeedDMS_Core_User(1, 'admin', 'pass', 'Joe Foo', 'baz@foo.de', 'en_GB', 'bootstrap', 'My comment', SeedDMS_Core_User::role_admin); + return $user; + } + + /** + * Create a mock admin role object (only used for SeedDMS 6) + * + * @return SeedDMS_Core_User + */ + protected function getAdminRole() + { + $role = new SeedDMS_Core_Role(1, 'admin', SeedDMS_Core_Role::role_admin); + return $role; + } + + /** + * Create a mock regular user object + * + * @return SeedDMS_Core_User + */ + protected function getUser() + { + $user = new SeedDMS_Core_User(2, 'user', 'pass', 'Joe Baz', 'joe@foo.de', 'en_GB', 'bootstrap', 'My comment', SeedDMS_Core_User::role_user); + return $user; + } + + /** + * Test method setDMS() and getDMS() + * + * @return void + */ + public function testSetAndGetDMS() + { + $user = $this->getAdminUser(); + $user->setDMS(self::$dms); + $this->assertInstanceOf(SeedDMS_Core_DMS::class, $user->getDMS()); + } + + /** + * Test method isType() + * + * @return void + */ + public function testIsType() + { + $user = $this->getAdminUser(); + $this->assertTrue($user->isType('user')); + } + + /** + * Test method getPwd() + * + * @return void + */ + public function testGetPwd() + { + $user = $this->getAdminUser(); + $this->assertEquals('pass', $user->getPwd()); + } + + /** + * Test method getEmail() + * + * @return void + */ + public function testGetEmail() + { + $user = $this->getAdminUser(); + $this->assertEquals('baz@foo.de', $user->getEmail()); + } + + /** + * Test method getLanguage() + * + * @return void + */ + public function testGetLanguage() + { + $user = $this->getAdminUser(); + $this->assertEquals('en_GB', $user->getLanguage()); + } + + /** + * Test method getTheme() + * + * @return void + */ + public function testGetTheme() + { + $user = $this->getAdminUser(); + $this->assertEquals('bootstrap', $user->getTheme()); + } + + /** + * Test method getComment() + * + * @return void + */ + public function testGetComment() + { + $user = $this->getAdminUser(); + $this->assertEquals('My comment', $user->getComment()); + } + + /** + * Test method getRole() + * + * @return void + */ + public function testGetRole() + { + $user = $this->getAdminUser(); + $this->assertEquals(1, $user->getRole()); + } + + /** + * Test method isAdmin() + * + * @return void + */ + public function testIsAdmin() + { + $user = $this->getAdminUser(); + $this->assertTrue($user->isAdmin()); + $this->assertFalse($user->isGuest()); + } + + /** + * Test method isGuest() + * + * @return void + */ + public function testIsGuest() + { + $user = $this->getAdminUser(); + $this->assertFalse($user->isGuest()); + } + + /** + * Test method isHidden() + * + * @return void + */ + public function testIsHidden() + { + $user = $this->getAdminUser(); + $this->assertFalse($user->isHidden()); + } + + /** + * Test method getQuota() + * + * @return void + */ + public function testGetQuota() + { + $user = $this->getAdminUser(); + $this->assertEquals(0, $user->getQuota()); + } + + /** + * Test method getSecret() + * + * @return void + */ + public function testGetSecret() + { + if(self::$dbversion['major'] < 6) { + $this->markTestSkipped( + 'This test is not applicable for SeedDMS 5.' + ); + } else { + $user = $this->getAdminUser(); + $this->assertEquals('', $user->getSecret()); + } + } + + /** + * Test method getInstance() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetInstance() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $this->assertIsObject($user); + $this->assertEquals('admin', $user->getLogin()); + $user = SeedDMS_Core_User::getInstance('admin', self::$dms, 'name'); + $this->assertIsObject($user); + $this->assertEquals('admin', $user->getLogin()); + $user = SeedDMS_Core_User::getInstance('admin', self::$dms, 'name', 'info@seeddms.org'); + $this->assertIsObject($user); + $this->assertEquals('admin', $user->getLogin()); + /* get instance of none existing user */ + $user = SeedDMS_Core_User::getInstance('foo', self::$dms, 'name'); + $this->assertNull($user); + } + + /** + * Test method getAllInstances() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAllInstancesSqlFail() + { + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->exactly(2)) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblUsers` ORDER BY")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + /* Order by login */ + $users = SeedDMS_Core_User::getAllInstances('', $dms); + $this->assertFalse($users); + /* Order by fullname */ + $users = SeedDMS_Core_User::getAllInstances('fullname', $dms); + $this->assertFalse($users); + } + + /** + * Test method getLogin() + * + * @return void + */ + public function testGetLogin() + { + $user = $this->getAdminUser(); + $this->assertEquals('admin', $user->getLogin()); + } + + /** + * Test method setLogin() + * + * @return void + */ + public function testSetLoginSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `login`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->setLogin('foo')); + } + + /** + * Test method getLogin() and setLogin() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetLogin() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $login = $user->getLogin(); + $ret = $user->setLogin('foo'); + $this->assertTrue($ret); + $login = $user->getLogin(); + $this->assertEquals('foo', $login); + $ret = $user->setLogin(' '); + $this->assertFalse($ret); + } + + /** + * Test method getFullName() + * + * @return void + */ + public function testGetFullName() + { + $user = $this->getAdminUser(); + $this->assertEquals('Joe Foo', $user->getFullName()); + } + + /** + * Test method setFullName() + * + * @return void + */ + public function testSetFullNameSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `fullName`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->setFullName('foo')); + } + + /** + * Test method getFullName() and setFullName() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetFullName() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $fullname = $user->getFullName(); + $ret = $user->setFullName('foo'); + $this->assertTrue($ret); + $fullname = $user->getFullName(); + $this->assertEquals('foo', $fullname); + } + + /** + * Test method getPwd() and setPwd() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetPwd() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $pwd = $user->getPwd(); + $ret = $user->setPwd('foo'); + $this->assertTrue($ret); + $pwd = $user->getPwd(); + $this->assertEquals('foo', $pwd); + } + + /** + * Test method setPwd() + * + * @return void + */ + public function testSetPwdSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `pwd`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->setPwd('foo')); + } + + /** + * Test method getPwdExpiration() and setPwdExpiration() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetPwdExpiration() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $pwdexp = $user->getPwdExpiration(); + /* Set password expiration to 'never' */ + $ret = $user->setPwdExpiration('never'); + $this->assertTrue($ret); + $pwdexp = $user->getPwdExpiration(); + $this->assertNull($pwdexp); + + /* Set password expiration to 'now' */ + $now = date('Y-m-d H:i:s'); + $ret = $user->setPwdExpiration('now'); + $this->assertTrue($ret); + $pwdexp = $user->getPwdExpiration(); + $this->assertEquals($now, $pwdexp); + } + + /** + * Test method setPwdExpiration() + * + * @return void + */ + public function testSetPwdExpirationSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `pwdExpiration`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->setPwdExpiration('foo')); + } + + /** + * Test method getEmail() and setEmail() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetEmail() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $email = $user->getEmail(); + $ret = $user->setEmail('new@seeddms.org'); + $this->assertTrue($ret); + $email = $user->getEmail(); + $this->assertEquals('new@seeddms.org', $email); + } + + /** + * Test method setEmail() + * + * @return void + */ + public function testSetEmailSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `email`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->setEmail('foo')); + } + + /** + * Test method getLanguage() and setLanguage() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetLanguage() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $language = $user->getLanguage(); + $ret = $user->setLanguage('de_DE'); + $this->assertTrue($ret); + $language = $user->getLanguage(); + $this->assertEquals('de_DE', $language); + } + + /** + * Test method setLanguage() + * + * @return void + */ + public function testSetLanguageSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `language`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->setLanguage('de_DE')); + } + + /** + * Test method getTheme() and setTheme() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetTheme() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $theme = $user->getTheme(); + $ret = $user->setTheme('bootstrap4'); + $this->assertTrue($ret); + $theme = $user->getTheme(); + $this->assertEquals('bootstrap4', $theme); + } + + /** + * Test method setTheme() + * + * @return void + */ + public function testSetThemeSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `theme`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->setTheme('bootstrap')); + } + + /** + * Test method getComment() and setComment() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetComment() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $comment = $user->getComment(); + $ret = $user->setComment('my comment'); + $this->assertTrue($ret); + $comment = $user->getComment(); + $this->assertEquals('my comment', $comment); + } + + /** + * Test method setComment() + * + * @return void + */ + public function testSetCommentSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `comment`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->setComment('my comment')); + } + + /** + * Test method getRole() and setRole() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetRole() + { + if(self::$dbversion['major'] < 6) { + // SeedDMS 5 use integers for roles: 0=user, 1=admin, 2=guest + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + // User with id=1 is the admin user in the initial database + $role = $user->getRole(); + $this->assertEquals(SeedDMS_Core_User::role_admin, $role); + $ret = $user->setRole(SeedDMS_Core_User::role_guest); + $this->assertTrue($ret); + $role = $user->getRole(); + $this->assertEquals(SeedDMS_Core_User::role_guest, $role); + $ret = $user->setRole(''); + $this->assertFalse($ret); + } else { + // Starting with SeedDMS 6 a role is an object + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + // User with id=1 is the admin user in the initial database + $role = $user->getRole(); + $this->assertTrue($role->isAdmin()); + // SeedDMS_Core_User has an isAdmin() method too, which internally + // uses SeedDMS_Core_Role::isAdmin() + $this->assertTrue($user->isAdmin()); + // Get the guest role, which is supposed to have id=2 in the + // initial database + $guestrole = SeedDMS_Core_Role::getInstance(2, self::$dms); + $this->assertTrue($guestrole->isGuest()); + // Assign guest role and check if the user is a guest + $ret = $user->setRole($guestrole); + $this->assertTrue($ret); + $this->assertTrue($user->isGuest()); + } + } + + /** + * Test method setRole() + * + * @return void + */ + public function testSetRoleSqlFail() + { + if(self::$dbversion['major'] > 5) { + $role = $this->getAdminRole(); + } + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `role`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + if(self::$dbversion['major'] > 5) { + $this->assertFalse($user->setRole($role)); + } else { + $this->assertFalse($user->setRole(SeedDMS_Core_User::role_admin)); + } + } + + /** + * Test method setGuest() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSetGuest() + { + if(self::$dbversion['major'] == '5') { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $role = $user->getRole(); + $ret = $user->setGuest(); + $this->assertTrue($ret); + $role = $user->getRole(); + $this->assertEquals(SeedDMS_Core_User::role_guest, $role); + } else { + $this->markTestSkipped( + 'This test is not applicable for SeedDMS 6.' + ); + } + } + + /** + * Test method setGuest() + * + * @return void + */ + public function testSetGuestSqlFail() + { + $dms = new SeedDMS_Core_DMS(null, ''); + if(self::$dbversion['major'] == '5') { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `role`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->setGuest()); + } else { + $this->markTestSkipped( + 'This test is not applicable for SeedDMS 6.' + ); + } + } + + /** + * Test method setAdmin() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSetAdmin() + { + if(self::$dbversion['major'] == '5') { + $user = SeedDMS_Core_User::getInstance(2, self::$dms); + $role = $user->getRole(); + $ret = $user->setAdmin(); + $this->assertTrue($ret); + $role = $user->getRole(); + $this->assertEquals(SeedDMS_Core_User::role_admin, $role); + } else { + $this->markTestSkipped( + 'This test is not applicable for SeedDMS 6.' + ); + } + } + + /** + * Test method setAdmin() + * + * @return void + */ + public function testSetAdminSqlFail() + { + $dms = new SeedDMS_Core_DMS(null, ''); + if(self::$dbversion['major'] == '5') { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `role`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->setAdmin()); + } else { + $this->markTestSkipped( + 'This test is not applicable for SeedDMS 6.' + ); + } + } + + /** + * Test method getQuota() and setQuota() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetQuota() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $quota = $user->getQuota(); + $ret = $user->setQuota(100000); + $this->assertTrue($ret); + $quota = $user->getQuota(); + $this->assertEquals(100000, $quota); + /* Setting a non numeric or negative value will fail */ + $ret = $user->setQuota('foo'); + $this->assertFalse($ret); + $ret = $user->setQuota(-100); + $this->assertFalse($ret); + } + + /** + * Test method setQuota() + * + * @return void + */ + public function testSetQuotaSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `quota`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->setQuota(10000)); + } + + /** + * Test method getSecret() and setSecret() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetSecret() + { + if(self::$dbversion['major'] < 6) { + $this->markTestSkipped( + 'This test is not applicable for SeedDMS 5.' + ); + } else { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $secret = $user->getSecret(); + $ret = $user->setSecret('secret'); + $this->assertTrue($ret); + $secret = $user->getSecret(); + $this->assertEquals('secret', $secret); + } + } + + /** + * Test method setSecret() + * + * @return void + */ + public function testSetSecretSqlFail() + { + if(self::$dbversion['major'] < 6) { + $this->markTestSkipped( + 'This test is not applicable for SeedDMS 5.' + ); + } else { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `secret`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->setSecret('secret')); + } + } + + /** + * Test method isHidden() and setHidden() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testIsAndSetHidden() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $ishidden = $user->isHidden(); + /* set hidden to true */ + $ret = $user->setHidden(true); + $this->assertTrue($ret); + $ishidden = $user->isHidden(); + $this->assertTrue($ishidden); + /* set hidden to false */ + $ret = $user->setHidden(false); + $this->assertTrue($ret); + $ishidden = $user->isHidden(); + $this->assertFalse($ishidden); + } + + /** + * Test method setHidden() + * + * @return void + */ + public function testSetHiddentSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `hidden`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->setHidden(true)); + } + + /** + * Test method isDisabled() and setDisabled() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testIsAndSetDisabled() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $isdisabled = $user->isDisabled(); + /* set disabled to true */ + $ret = $user->setDisabled(true); + $this->assertTrue($ret); + $isdisabled = $user->isDisabled(); + $this->assertTrue($isdisabled); + /* set disabled to false */ + $ret = $user->setDisabled(false); + $this->assertTrue($ret); + $isdisabled = $user->isDisabled(); + $this->assertFalse($isdisabled); + } + + /** + * Test method setDisabled() + * + * @return void + */ + public function testSetDisabledtSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `disabled`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->setDisabled(true)); + } + + /** + * Test method addLoginFailure() + * + * @return void + */ + public function testAddLoginFailure() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->exactly(2)) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `loginfailures`")) + ->willReturn(true); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertEquals(1, $user->addLoginFailure()); + $this->assertEquals(2, $user->addLoginFailure()); + } + + /** + * Test method addLoginFailure() + * + * @return void + */ + public function testAddLoginFailureSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `loginfailures`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->addLoginFailure()); + } + + /** + * Test method clearLoginFailure() + * + * @return void + */ + public function testClearLoginFailure() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->exactly(2)) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `loginfailures`")) + ->willReturn(true); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertEquals(1, $user->addLoginFailure()); + $this->assertEquals(true, $user->clearLoginFailures()); + } + + /** + * Test method clearLoginFailure() + * + * @return void + */ + public function testClearLoginFailureSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `loginfailures`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->clearLoginFailures()); + } + + /** + * Test method setHomeFolder() and getHomeFolder() + * + * @return void + */ + public function testSetAndGetHomeFolder() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `homefolder`")) + ->willReturn(true); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertTrue($user->setHomeFolder(1)); + $this->assertEquals(1, $user->getHomeFolder()); + } + + /** + * Test method setHomeFolder() + * + * @return void + */ + public function testSetHomeFolderSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResult') + ->with($this->stringContains("UPDATE `tblUsers` SET `homefolder`")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->setHomeFolder(1)); + } + + /** + * Test method getUsedDiskSpace() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetUsedDiskSpace() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $size = $user->getUsedDiskSpace(); + $this->assertEquals(0, $size); + } + + /** + * Test method getUsedDiskSpace() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetUsedDiskSpaceSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT SUM(`fileSize`) sum")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->getUsedDiskSpace()); + } + + /** + * Test method removeFromProcesses() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testRemoveFromProcesses() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $ret = $user->removeFromProcesses($user); + $this->assertTrue($ret); + } + + /** + * Test method transferDocumentsFolders() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testTransferDocumentsFolders() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + self::createSimpleFolderStructureWithDocuments(); + $newuser = self::$dms->addUser('newuser', '', 'New User', 'newuser@seeddms.org', 'en_GB', 'bootstrap', ''); + /* Transfering documents and folders to the same user returns true */ + $ret = $user->transferDocumentsFolders($user); + $this->assertTrue($ret); + /* A subfolder still belongs to $user */ + $subfolder = self::$dms->getFolder(2); + $this->assertEquals($user->getId(), $subfolder->getOwner()->getId()); + /* A document still belongs to $user */ + $document = self::$dms->getDocument(1); + $this->assertEquals($user->getId(), $document->getOwner()->getId()); + /* Transfer the documents and folders to $newuser */ + $ret = $user->transferDocumentsFolders($newuser); + $this->assertTrue($ret); + /* Get the folder again, because the owner has changed */ + $subfolder = self::$dms->getFolder(2); + $this->assertEquals($newuser->getId(), $subfolder->getOwner()->getId()); + /* Get the document again, because the owner has changed */ + $document = self::$dms->getDocument(1); + $this->assertEquals($newuser->getId(), $document->getOwner()->getId()); + } + + /** + * Test method remove() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testRemove() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + self::createSimpleFolderStructureWithDocuments(); + $newuser = self::$dms->addUser('newuser', '', 'New User', 'newuser@seeddms.org', 'en_GB', 'bootstrap', ''); + /* removing a user without passed a new user for docs and folders will fail */ + $ret = $user->remove($newuser, null); + $this->assertFalse($ret); + + $ret = $user->remove($newuser, $newuser); + $this->assertTrue($ret); + + /* all documents and folders now belong to $newuser */ + $document = self::$dms->getDocument(1); + $this->assertEquals($newuser->getId(), $document->getOwner()->getId()); + $subfolder = self::$dms->getFolder(1); + $this->assertEquals($newuser->getId(), $subfolder->getOwner()->getId()); + } + + /** + * Test method getDocuments() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocuments() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $documents = $user->getDocuments(); + $this->assertIsArray($documents); + $this->assertCount(0, $documents); + } + + /** + * Test method getDocumentsLocked() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentsLocked() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $documents = $user->getDocumentsLocked(); + $this->assertIsArray($documents); + $this->assertCount(0, $documents); + } + + /** + * Test method getDocumentLinks() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentLinks() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $links = $user->getDocumentLinks(); + $this->assertIsArray($links); + $this->assertCount(0, $links); + } + + /** + * Test method getDocumentFiles() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentFiles() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $files = $user->getDocumentFiles(); + $this->assertIsArray($files); + $this->assertCount(0, $files); + } + + /** + * Test method getDocumentContents() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetDocumentContents() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $contents = $user->getDocumentContents(); + $this->assertIsArray($contents); + $this->assertCount(0, $contents); + } + + /** + * Test method getFolders() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetFolders() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $folders = $user->getFolders(); + $this->assertIsArray($folders); + $this->assertCount(1, $folders); + } + + /** + * Test method getReviewStatus() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetReviewStatus() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $status = $user->getReviewStatus(); + $this->assertIsArray($status); + $this->assertCount(2, $status); + $this->assertCount(0, $status['indstatus']); + $this->assertCount(0, $status['grpstatus']); + } + + /** + * Test method getApprovalStatus() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetApprovalStatus() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $status = $user->getApprovalStatus(); + $this->assertIsArray($status); + $this->assertCount(2, $status); + $this->assertCount(0, $status['indstatus']); + $this->assertCount(0, $status['grpstatus']); + } + + /** + * Test method getWorkflowStatus() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetWorkflowStatus() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $status = $user->getWorkflowStatus(); + $this->assertIsArray($status); + $this->assertCount(2, $status); + $this->assertCount(0, $status['u']); + $this->assertCount(0, $status['g']); + } + + /** + * Test method getWorkflowsInvolved() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetWorkflowsInvolved() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $workflows = $user->getWorkflowsInvolved(); + $this->assertIsArray($workflows); + $this->assertCount(0, $workflows); + } + + /** + * Test method getMandatoryReviewers() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetMandatoryReviewers() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $reviewers = $user->getMandatoryReviewers(); + $this->assertIsArray($reviewers); + $this->assertCount(0, $reviewers); + } + + /** + * Test method setMandatoryReviewer() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSetMandatoryReviewer() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $newuser = self::$dms->addUser('newuser', '', 'New User', 'newuser@seeddms.org', 'en_GB', 'bootstrap', ''); + $ret = $user->setMandatoryReviewer($newuser->getId(), false); + $this->assertTrue($ret); + $reviewers = $user->getMandatoryReviewers(); + $this->assertIsArray($reviewers); + $this->assertCount(1, $reviewers); + /* $newuser is now a mandatory user of $user */ + $mandatoryreviewers = $newuser->isMandatoryReviewerOf(); + $this->assertIsArray($mandatoryreviewers); + $this->assertCount(1, $mandatoryreviewers); + $this->assertEquals($user->getId(), $mandatoryreviewers[0]->getId()); + + $group = self::$dms->addGroup('Group', ''); + $ret = $user->setMandatoryReviewer($group->getId(), true); + $this->assertTrue($ret); + $reviewers = $user->getMandatoryReviewers(); + $this->assertIsArray($reviewers); + $this->assertCount(2, $reviewers); + /* FIXME: there is not isMandatoryReviewerOf() for groups */ + } + + /** + * Test method getMandatoryApprovers() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetMandatoryApprovers() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $approvers = $user->getMandatoryApprovers(); + $this->assertIsArray($approvers); + $this->assertCount(0, $approvers); + } + + /** + * Test method setMandatoryApprover() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSetMandatoryApprover() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $newuser = self::$dms->addUser('newuser', '', 'New User', 'newuser@seeddms.org', 'en_GB', 'bootstrap', ''); + $ret = $user->setMandatoryApprover($newuser->getId(), false); + $this->assertTrue($ret); + $approvers = $user->getMandatoryApprovers(); + $this->assertIsArray($approvers); + $this->assertCount(1, $approvers); + /* $newuser is now a mandatory user of $user */ + $mandatoryapprovers = $newuser->isMandatoryApproverOf(); + $this->assertIsArray($mandatoryapprovers); + $this->assertCount(1, $mandatoryapprovers); + $this->assertEquals($user->getId(), $mandatoryapprovers[0]->getId()); + + $group = self::$dms->addGroup('Group', ''); + $ret = $user->setMandatoryApprover($group->getId(), true); + $this->assertTrue($ret); + $approvers = $user->getMandatoryApprovers(); + $this->assertIsArray($approvers); + $this->assertCount(2, $approvers); + /* FIXME: there is not isMandatoryApproverOf() for groups */ + } + + /** + * Test method setMandatoryWorkflow() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSetMandatoryWorkflow() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $approver = self::$dms->addUser('approver', '', 'Approver', 'newuser@seeddms.org', 'en_GB', 'bootstrap', ''); + $reviewer = self::$dms->addUser('reviewer', '', 'Reviewer', 'newuser@seeddms.org', 'en_GB', 'bootstrap', ''); + $simpleworkflow = self::createSimpleWorkflow($approver); + $traditionalworkflow = self::createWorkflow($reviewer, $approver); + $newuser = self::$dms->addUser('newuser', '', 'New User', 'newuser@seeddms.org', 'en_GB', 'bootstrap', ''); + /* Set a single mandatory workflow */ + $ret = $newuser->setMandatoryWorkflow($simpleworkflow); + $this->assertTrue($ret); + $workflows = $newuser->getMandatoryWorkflows(); + $this->assertIsArray($workflows); + $this->assertCount(1, $workflows); + + /* Set a single mandatory workflow will add it to the list of workflows */ + $ret = $newuser->setMandatoryWorkflow($traditionalworkflow); + $this->assertTrue($ret); + $workflows = $newuser->getMandatoryWorkflows(); + $this->assertIsArray($workflows); + $this->assertCount(2, $workflows); + + /* Set a single mandatory workflow with setMandatoryWorkflows() will delete + * all existing workflows and set a new list of workflows + */ + $ret = $newuser->setMandatoryWorkflows([$simpleworkflow]); + $this->assertTrue($ret); + $workflows = $newuser->getMandatoryWorkflows(); + $this->assertIsArray($workflows); + $this->assertCount(1, $workflows); + + /* Set several mandatory workflows will delete all existing workflows + * and set new workflows. + */ + $ret = $newuser->setMandatoryWorkflows([$simpleworkflow, $traditionalworkflow]); + $this->assertTrue($ret); + $workflows = $newuser->getMandatoryWorkflows(); + $this->assertIsArray($workflows); + $this->assertCount(2, $workflows); + + /* Setting an empty list will delete all mandatory workflows */ + $ret = $newuser->setMandatoryWorkflows([]); + $this->assertTrue($ret); + $workflows = $newuser->getMandatoryWorkflows(); + $this->assertNull($workflows); + } + + /** + * Test method getMandatoryWorkflow() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetMandatoryWorkflow() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $workflow = $user->getMandatoryWorkflow(); + $this->assertNull($workflow); + } + + /** + * Test method getMandatoryWorkflows() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetMandatoryWorkflows() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $workflow = $user->getMandatoryWorkflows(); + $this->assertNull($workflow); + } + + /** + * Test method getGroups() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetGroups() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $groups = $user->getGroups(); + $this->assertIsArray($groups); + $this->assertCount(0, $groups); + $group = self::$dms->addGroup('Group', ''); + $ret = $user->joinGroup($group); + $this->assertTrue($ret); + /* Adding the user a twice to a group will fail */ + $ret = $user->joinGroup($group); + $this->assertFalse($ret); + /* user now belongs to two groups */ + $groups = $user->getGroups(); + $this->assertIsArray($groups); + $this->assertCount(1, $groups); + /* Leave the group */ + $ret = $user->leaveGroup($group); + $this->assertTrue($ret); + /* Leave the group again will fail */ + $ret = $user->leaveGroup($group); + $this->assertFalse($ret); + /* the user is no longer in any group */ + $groups = $user->getGroups(); + $this->assertIsArray($groups); + $this->assertCount(0, $groups); + } + + /** + * Test method hasImage() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testHasImage() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $image = $user->hasImage(); + $this->assertFalse($image); + } + + /** + * Test method hasImage() + * + * @return void + */ + public function testHasImageSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT COUNT(*) AS num FROM `tblUserImages` WHERE")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->hasImage()); + } + + /** + * Test method getImage() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetImage() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $image = $user->getImage(); + $this->assertNull($image); + } + + /** + * Test method getImage() + * + * @return void + */ + public function testGetImageSqlFail() + { + $user = $this->getAdminUser(); + $db = $this->createMock(SeedDMS_Core_DatabaseAccess::class); + $db->expects($this->once()) + ->method('getResultArray') + ->with($this->stringContains("SELECT * FROM `tblUserImages` WHERE")) + ->willReturn(false); + $dms = new SeedDMS_Core_DMS($db, ''); + $user->setDMS($dms); + $this->assertFalse($user->getImage()); + } + + /** + * Test method setImage() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testSetImage() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $file = self::createTempFile(200); + $ret = $user->setImage($file, 'text/plain'); + $this->assertTrue(SeedDMS_Core_File::removeFile($file)); + $this->assertTrue($ret); + $ret = $user->hasImage(); + $this->assertTrue($ret); + $image = $user->getImage(); + $this->assertIsArray($image); + $this->assertEquals('text/plain', $image['mimeType']); + } + + /** + * Test method delMandatoryReviewers() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testDelMandatoryReviewers() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $ret = $user->delMandatoryReviewers(); + $this->assertTrue($ret); + } + + /** + * Test method delMandatoryApprovers() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testDelMandatoryApprovers() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $ret = $user->delMandatoryApprovers(); + $this->assertTrue($ret); + } + + /** + * Test method delMandatoryWorkflow() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testDelMandatoryWorkflow() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $ret = $user->delMandatoryWorkflow(); + $this->assertTrue($ret); + } + + /** + * Test method getNotifications() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetNotifications() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $notifications = $user->getNotifications(); + $this->assertIsArray($notifications); + $this->assertCount(0, $notifications); + $notifications = $user->getNotifications(0); + $this->assertIsArray($notifications); + $this->assertCount(0, $notifications); + $notifications = $user->getNotifications(1); + $this->assertIsArray($notifications); + $this->assertCount(0, $notifications); + } + + /** + * Test method getKeywordCategories() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetKeywordCategories() + { + $user = SeedDMS_Core_User::getInstance(1, self::$dms); + $cats = $user->getKeywordCategories(); + $this->assertIsArray($cats); + $this->assertCount(0, $cats); + } +} + diff --git a/SeedDMS_Core/tests/WorkflowTest.php b/SeedDMS_Core/tests/WorkflowTest.php new file mode 100644 index 000000000..3abe1c26d --- /dev/null +++ b/SeedDMS_Core/tests/WorkflowTest.php @@ -0,0 +1,638 @@ + + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version @package_version@ + * @link https://www.seeddms.org + */ + +use PHPUnit\Framework\SeedDmsTest; + +/** + * Group test class + * + * @category SeedDMS + * @package Tests + * @author Uwe Steinmann + * @copyright 2021 Uwe Steinmann + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @version Release: @package_version@ + * @link https://www.seeddms.org + */ +class WorkflowTest extends SeedDmsTest +{ + + /** + * Create a real sqlite database in memory + * + * @return void + */ + protected function setUp(): void + { + self::$dbh = self::createInMemoryDatabase(); + self::$contentdir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpunit-'.time(); + mkdir(self::$contentdir); + // echo "Creating temp content dir: ".self::$contentdir."\n"; + self::$dms = new \SeedDMS_Core_DMS(self::$dbh, self::$contentdir); + self::$dbversion = self::$dms->getDBVersion(); + } + + /** + * Clean up at tear down + * + * @return void + */ + protected function tearDown(): void + { + self::$dbh = null; + // echo "\nRemoving temp. content dir: ".self::$contentdir."\n"; + exec('rm -rf '.self::$contentdir); + } + + /** + * Test method getInitState() and setInitState() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetInitState() + { + $ws_nr = self::$dms->addWorkflowState('needs review', S_IN_WORKFLOW); + $ws_na = self::$dms->addWorkflowState('needs approval', S_IN_WORKFLOW); + $workflow = self::$dms->addWorkflow('traditional workflow', $ws_nr); + $initstate = $workflow->getInitState(); + $this->assertEquals($ws_nr->getName(), $initstate->getName()); + $ret = $workflow->setInitState($ws_na); + $this->assertTrue($ret); + $initstate = $workflow->getInitState(); + $this->assertEquals($ws_na->getName(), $initstate->getName()); + } + + /** + * Test method getName() and setName() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetStateName() + { + $state = self::$dms->addWorkflowState('needs review', S_IN_WORKFLOW); + $name = $state->getName(); + $this->assertEquals('needs review', $name); + $ret = $state->setName('foobar'); + $this->assertTrue($ret); + $name = $state->getName(); + $this->assertEquals('foobar', $name); + } + + /** + * Test method getName() and setName() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetActionName() + { + $action = self::$dms->addWorkflowAction('action'); + $name = $action->getName(); + $this->assertEquals('action', $name); + $ret = $action->setName('foobar'); + $this->assertTrue($ret); + $name = $action->getName(); + $this->assertEquals('foobar', $name); + } + + /** + * Test method getName() and setName() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetWorkflowName() + { + $ws_nr = self::$dms->addWorkflowState('needs review', S_IN_WORKFLOW); + $workflow = self::$dms->addWorkflow('traditional workflow', $ws_nr); + $name = $workflow->getName(); + $this->assertEquals('traditional workflow', $name); + $ret = $workflow->setName('foo'); + $this->assertTrue($ret); + $name = $workflow->getName(); + $this->assertEquals('foo', $name); + } + + /** + * Test method getDocumentStatus() and setDocumentStatus() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testGetAndSetDocumentStatus() + { + $state = self::$dms->addWorkflowState('some name', S_RELEASED); + $docstatus = $state->getDocumentStatus(); + $this->assertEquals(S_RELEASED, $docstatus); + $ret = $state->setDocumentStatus(S_REJECTED); + $this->assertTrue($ret); + $docstatus = $state->getDocumentStatus(); + $this->assertEquals(S_REJECTED, $docstatus); + } + + /** + * Test method workflow->remove() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testCreateAndRemoveWorkflow() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $this->assertIsObject($user); + + /* Add a new user who will be the reviewer */ + $reviewer = self::$dms->addUser('reviewer', 'reviewer', 'Reviewer One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($reviewer); + + /* Add a new user who will be the approver */ + $approver = self::$dms->addUser('approver', 'approver', 'Approver One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($approver); + + $workflow = self::createWorkflow($reviewer, $approver); + $this->assertIsObject($workflow); + + $ret = $workflow->remove(); + $this->assertTrue($ret); + + $states = self::$dms->getAllWorkflowStates(); + $this->assertIsArray($states); + $this->assertCount(4, $states); + foreach($states as $state) + $this->assertFalse($state->isUsed()); + + $actions = self::$dms->getAllWorkflowActions(); + $this->assertIsArray($actions); + $this->assertCount(3, $actions); + foreach($actions as $action) + $this->assertFalse($action->isUsed()); + + } + + /** + * Test method remove() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testCreateAndRemoveAction() + { + $action = self::$dms->addWorkflowAction('action'); + $this->assertIsObject($action); + $actions = self::$dms->getAllWorkflowActions(); + $this->assertIsArray($actions); + $this->assertCount(1, $actions); + $ret = $action->remove(); + $this->assertTrue($ret); + $actions = self::$dms->getAllWorkflowActions(); + $this->assertIsArray($actions); + $this->assertCount(0, $actions); + } + + /** + * Test method remove() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testCreateAndRemoveState() + { + $state = self::$dms->addWorkflowState('needs review', S_IN_WORKFLOW); + $this->assertIsObject($state); + $states = self::$dms->getAllWorkflowStates(); + $this->assertIsArray($states); + $this->assertCount(1, $states); + $ret = $state->remove(); + $this->assertTrue($ret); + $states = self::$dms->getAllWorkflowStates(); + $this->assertIsArray($states); + $this->assertCount(0, $states); + } + + /** + * Test method setWorkflow(), getWorkflow(), getWorkflowState() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testAssignWorkflow() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $this->assertIsObject($user); + + /* Add a new user who will be the reviewer */ + $reviewer = self::$dms->addUser('reviewer', 'reviewer', 'Reviewer One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($reviewer); + + /* Add a new user who will be the approver */ + $approver = self::$dms->addUser('approver', 'approver', 'Approver One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($approver); + + $workflow = self::createWorkflow($reviewer, $approver); + $this->assertIsObject($workflow); + + /* Check for cycles */ + $cycles = $workflow->checkForCycles(); + $this->assertFalse($cycles); + + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $content = $document->getLatestContent(); + $this->assertIsObject($content); + $status = $content->getStatus(); + $this->assertIsArray($status); + $this->assertEquals(S_RELEASED, $status['status']); + + /* Assign the workflow */ + $ret = $content->setWorkflow($workflow, $user); + $this->assertTrue($ret); + + /* Assign a workflow again causes an error */ + $ret = $content->setWorkflow($workflow, $user); + $this->assertFalse($ret); + + /* Get a fresh copy of the content from the database and get the workflow */ + $again = self::$dms->getDocumentContent($content->getId()); + $this->assertIsObject($again); + $w = $again->getWorkflow(); + $this->assertEquals($workflow->getId(), $w->getId()); + + /* Status of content should be S_IN_WORKFLOW now */ + $status = $content->getStatus(); + $this->assertIsArray($status); + $this->assertEquals(S_IN_WORKFLOW, $status['status']); + + /* Get current workflow state */ + $state = $content->getWorkflowState(); + $this->assertEquals('needs review', $state->getName()); + + $workflowlog = $content->getWorkflowLog(); + $this->assertIsArray($workflowlog); + $this->assertCount(0, $workflowlog); + + /* The workflow has altogether 4 states */ + $states = $workflow->getStates(); + $this->assertIsArray($states); + $this->assertCount(4, $states); + + /* Check the initial state */ + $initstate = $workflow->getInitState(); + $this->assertEquals('needs review', $initstate->getName()); + + /* init state is definitely used */ + $ret = $initstate->isUsed(); + $this->assertTrue($ret); + + /* init state has two transistions linked to it */ + $transitions = $initstate->getTransitions(); + $this->assertIsArray($transitions); + $this->assertCount(2, $transitions); + + /* Check if workflow is used by any document */ + $isused = $workflow->isUsed(); + $this->assertTrue($isused); + + } + + /** + * Test method setWorkflow(), getWorkflow(), getWorkflowState() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testStepThroughWorkflow() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $this->assertIsObject($user); + + /* Add a new user who will be the reviewer */ + $reviewer = self::$dms->addUser('reviewer', 'reviewer', 'Reviewer One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($reviewer); + + /* Add a new user who will be the approver */ + $approver = self::$dms->addUser('approver', 'approver', 'Approver One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($approver); + + $workflow = self::createWorkflow($reviewer, $approver); + + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $content = $document->getLatestContent(); + $this->assertIsObject($content); + $status = $content->getStatus(); + $this->assertIsArray($status); + $this->assertEquals(S_RELEASED, $status['status']); + + /* Assign the workflow */ + $ret = $content->setWorkflow($workflow, $user); + $this->assertTrue($ret); + + $status = $content->getStatus(); + $this->assertIsArray($status); + $this->assertEquals(S_IN_WORKFLOW, $status['status']); + + /* Remove the workflow */ + $ret = $content->removeWorkflow($user); + $this->assertTrue($ret); + + $status = $content->getStatus(); + $this->assertIsArray($status); + $this->assertEquals(S_RELEASED, $status['status']); + + /* Remove the workflow again is just fine */ + $ret = $content->removeWorkflow($user); + $this->assertTrue($ret); + + /* Assign the workflow again */ + $ret = $content->setWorkflow($workflow, $user); + $this->assertTrue($ret); + + $status = $content->getStatus(); + $this->assertIsArray($status); + $this->assertEquals(S_IN_WORKFLOW, $status['status']); + + + /* Check if workflow needs action by the reviewer/approver */ + $ret = $content->needsWorkflowAction($reviewer); + $this->assertTrue($ret); + $ret = $content->needsWorkflowAction($approver); + $this->assertFalse($ret); + + /* Get current workflow state*/ + $state = $content->getWorkflowState(); + $this->assertEquals('needs review', $state->getName()); + + /* There should be two possible transitions now + * NR -- review -> NA + * NR -- reject -> RJ + */ + $nexttransitions = $workflow->getNextTransitions($state); + $this->assertIsArray($nexttransitions); + $this->assertCount(2, $nexttransitions); + + /* But of course, there were no previous transitions */ + $prevtransitions = $workflow->getPreviousTransitions($state); + $this->assertIsArray($prevtransitions); + $this->assertCount(0, $prevtransitions); + + /* Check if reviewer is allowed to trigger the transition. + * As we are still in the intitial state, the possible transitions + * may both be triggered by the reviewer but not by the approver. + */ + foreach($nexttransitions as $nexttransition) { + if($nexttransition->getNextState()->getDocumentStatus() == S_REJECTED) + $rejecttransition = $nexttransition; + elseif($nexttransition->getNextState()->getDocumentStatus() == S_IN_WORKFLOW) + $reviewtransition = $nexttransition; + $ret = $content->triggerWorkflowTransitionIsAllowed($reviewer, $nexttransition); + $this->assertTrue($ret); + $ret = $content->triggerWorkflowTransitionIsAllowed($approver, $nexttransition); + $this->assertFalse($ret); + } + + /* Trigger the successful review transition. + * As there is only one reviewer the transition will fire and the workflow + * moves forward into the next state. triggerWorkflowTransition() returns the + * next state. + */ + $nextstate = $content->triggerWorkflowTransition($reviewer, $reviewtransition, 'Review succeeded'); + $this->assertIsObject($nextstate); + $this->assertEquals('needs approval', $nextstate->getName()); + + $state = $content->getWorkflowState(); + $this->assertEquals($nextstate->getId(), $state->getId()); + $this->assertEquals('needs approval', $state->getName()); + + /* The workflow log has one entry now */ + $workflowlog = $content->getLastWorkflowLog(); + $this->assertIsObject($workflowlog); + $this->assertEquals('Review succeeded', $workflowlog->getComment()); + + /* There should be two possible transitions now + * NA -- approve -> RL + * NA -- reject -> RJ + */ + $nexttransitions = $workflow->getNextTransitions($state); + $this->assertIsArray($nexttransitions); + $this->assertCount(2, $nexttransitions); + + /* But of course, there is one previous transitions, the one that led to + * the current state of the workflow. + */ + $prevtransitions = $workflow->getPreviousTransitions($state); + $this->assertIsArray($prevtransitions); + $this->assertCount(1, $prevtransitions); + $this->assertEquals($reviewtransition->getId(), $prevtransitions[0]->getId()); + + /* Check if approver is allowed to trigger the transition. + * As we are now in 'needs approval' state, the possible transitions + * may both be triggered by the approver but not by the reviewer. + */ + foreach($nexttransitions as $nexttransition) { + if($nexttransition->getNextState()->getDocumentStatus() == S_REJECTED) + $rejecttransition = $nexttransition; + elseif($nexttransition->getNextState()->getDocumentStatus() == S_RELEASED) + $releasetransition = $nexttransition; + $ret = $content->triggerWorkflowTransitionIsAllowed($approver, $nexttransition); + $this->assertTrue($ret); + $ret = $content->triggerWorkflowTransitionIsAllowed($reviewer, $nexttransition); + $this->assertFalse($ret); + } + + /* Trigger the successful approve transition. + * As there is only one approver the transition will fire and the workflow + * moves forward into the next state. triggerWorkflowTransition() returns the + * next state. + */ + $nextstate = $content->triggerWorkflowTransition($approver, $releasetransition, 'Approval succeeded'); + $this->assertIsObject($nextstate); + $this->assertEquals('released', $nextstate->getName()); + + /* The workflow log has two entries now */ + $workflowlog = $content->getLastWorkflowLog(); + $this->assertIsObject($workflowlog); + $this->assertEquals('Approval succeeded', $workflowlog->getComment()); + + /* Because the workflow has reached a final state, the workflow will no + * longer be attached to the document. + */ + $workflow = $content->getWorkflow(); + $this->assertFalse($workflow); + + /* There is also no way to get the state anymore */ + $state = $content->getWorkflowState(); + $this->assertFalse($state); + + $status = $content->getStatus(); + $this->assertIsArray($status); + $this->assertEquals(S_RELEASED, $status['status']); + + /* Even after the workflow has been finished the log can still be retrieved */ + $workflowlog = $content->getLastWorkflowLog(); + $this->assertIsObject($workflowlog); + $this->assertEquals('Approval succeeded', $workflowlog->getComment()); + } + + /** + * Test method rewindWorkflow() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testRewindWorkflow() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $this->assertIsObject($user); + + /* Add a new user who will be the reviewer */ + $reviewer = self::$dms->addUser('reviewer', 'reviewer', 'Reviewer One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($reviewer); + + /* Add a new user who will be the approver */ + $approver = self::$dms->addUser('approver', 'approver', 'Approver One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($approver); + + $workflow = self::createWorkflow($reviewer, $approver); + + /* Add a new document */ + $document = self::createDocument($rootfolder, $user, 'Document 1'); + $content = $document->getLatestContent(); + $this->assertIsObject($content); + $status = $content->getStatus(); + $this->assertIsArray($status); + $this->assertEquals(S_RELEASED, $status['status']); + + /* Assign the workflow */ + $ret = $content->setWorkflow($workflow, $user); + $this->assertTrue($ret); + + $status = $content->getStatus(); + $this->assertIsArray($status); + $this->assertEquals(S_IN_WORKFLOW, $status['status']); + + /* Check if workflow needs action by the reviewer */ + $ret = $content->needsWorkflowAction($reviewer); + $this->assertTrue($ret); + + /* Get current workflow state*/ + $state = $content->getWorkflowState(); + $this->assertEquals('needs review', $state->getName()); + + /* There should be two possible transitions now + * NR -- review -> NA + * NR -- reject -> RJ + */ + $nexttransitions = $workflow->getNextTransitions($state); + $this->assertIsArray($nexttransitions); + $this->assertCount(2, $nexttransitions); + + /* Check if reviewer is allowed to trigger the transition. + * As we are still in the intitial state, the possible transitions + * may both be triggered by the reviewer but not by the approver. + */ + foreach($nexttransitions as $nexttransition) { + if($nexttransition->getNextState()->getDocumentStatus() == S_IN_WORKFLOW) + $reviewtransition = $nexttransition; + } + + /* Trigger the successful review transition. + * As there is only one reviewer the transition will fire and the workflow + * moves forward into the next state. triggerWorkflowTransition() returns the + * next state. + */ + $nextstate = $content->triggerWorkflowTransition($reviewer, $reviewtransition, 'Review succeeded'); + $this->assertIsObject($nextstate); + $this->assertEquals('needs approval', $nextstate->getName()); + + /* Get current workflow state*/ + $state = $content->getWorkflowState(); + $this->assertEquals('needs approval', $state->getName()); + + /* The workflow log has one entry now */ + $workflowlogs = $content->getWorkflowLog(); + $this->assertIsArray($workflowlogs); + $this->assertCount(1, $workflowlogs); + if(self::$dbversion['major'] > 5) + $this->assertEquals('Review succeeded', $workflowlogs[1][0]->getComment()); + else + $this->assertEquals('Review succeeded', $workflowlogs[0]->getComment()); + + $ret = $content->rewindWorkflow(); + $this->assertTrue($ret); + + /* After rewinding the workflow the initial state is set ... */ + $state = $content->getWorkflowState(); + $this->assertEquals('needs review', $state->getName()); + + /* and the workflow log has been cleared */ + $workflowlogs = $content->getWorkflowLog(); + $this->assertIsArray($workflowlogs); + $this->assertCount(0, $workflowlogs); + } + + /** + * Test method getTransitionsByStates() + * + * This method uses a real in memory sqlite3 database. + * + * @return void + */ + public function testTransitionsByStateWorkflow() + { + $rootfolder = self::$dms->getRootFolder(); + $user = self::$dms->getUser(1); + $this->assertIsObject($user); + + /* Add a new user who will be the reviewer */ + $reviewer = self::$dms->addUser('reviewer', 'reviewer', 'Reviewer One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($reviewer); + + /* Add a new user who will be the approver */ + $approver = self::$dms->addUser('approver', 'approver', 'Approver One', 'user1@seeddms.org', 'en_GB', 'bootstrap', ''); + $this->assertIsObject($approver); + + $workflow = self::createWorkflow($reviewer, $approver); + + /* Check the initial state */ + $initstate = $workflow->getInitState(); + $this->assertEquals('needs review', $initstate->getName()); + + /* init state has two transistions linked to it */ + $transitions = $initstate->getTransitions(); + $this->assertIsArray($transitions); + $this->assertCount(2, $transitions); + + $t = $workflow->getTransitionsByStates($initstate, $transitions[1]->getNextState()); + $this->assertEquals($transitions[1]->getId(), $t[0]->getId()); + } + +} From 4c39fb065adf81e4b3fc1fb29f4807cc086ec5a4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 12:28:56 +0100 Subject: [PATCH 1784/2006] add composer file --- SeedDMS_Core/composer.json | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 SeedDMS_Core/composer.json diff --git a/SeedDMS_Core/composer.json b/SeedDMS_Core/composer.json new file mode 100644 index 000000000..ab2186a95 --- /dev/null +++ b/SeedDMS_Core/composer.json @@ -0,0 +1,23 @@ +{ + "name": "seeddms/core", + "description": "Core classes to access a SeedDMS database", + "type": "library", + "license": "GPL-2.0-or-later", + "minimum-stability": "dev", + "autoload": { + "psr-4": { + "Seeddms\\Core\\": "Core/" + }, + "classmap": ["Core/"] + }, + "authors": [ + { + "name": "Uwe Steinmann", + "email": "info@seeddms.org" + } + ], + "require-dev": { + "phpunit/phpunit": "^9" + } + +} From cb1d55e413d9c0776087e34460afb7c348a08277 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 12:32:13 +0100 Subject: [PATCH 1785/2006] add all changes from 6.0.x --- SeedDMS_Core/CHANGELOG.md | 143 +++++++++++++++++++++++++++++++++++++- 1 file changed, 142 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/CHANGELOG.md b/SeedDMS_Core/CHANGELOG.md index 8ac741064..4ac0e57c0 100644 --- a/SeedDMS_Core/CHANGELOG.md +++ b/SeedDMS_Core/CHANGELOG.md @@ -1,3 +1,145 @@ +6.0.22 (2022-12-10) +--------------------- +- all changes from 5.1.29 merged + +6.0.21 (2022-11-18) +--------------------- +- all changes from 5.1.28 merged + + +6.0.20 (2022-09-18) +--------------------- +- all changes from 5.1.27 merged +- SeedDMЅ_Core_DMS::getDocumentsInRevision() returns status from revision log + +6.0.19 (2022-05-20) +--------------------- +- all changes from 5.1.26 +- removeFromProcesses() will not touch documents for which the new user does not have at least read access + +6.0.18 (2022-04-22) +--------------------- +- all changes from 5.1.25 +- fix searching for document content with a custom attribute having a value set +- SeedDMS_Core_DocumentContent::getWorkflow() has optional parameter to return data from table tblWorkflowDocumentContent + +6.0.17 (2021-12-11) +--------------------- +- all changes from 5.1.24 + +6.0.16 (2021-05-07) +--------------------- + +6.0.15 (2021-04-13) +--------------------- +- add searching for revision date +- expired documents can be skipped from counting in countTasks() +- SeedDMS_Core_DMS::getDocumentList() uses ambiguous column name when sorting by status +- add list type SleepingReviseByMe to SeedDMS_Core_DMS::getDocumentList() +- parameter 2 of SeedDMS_Core_DMS::getDocumentList() is treated as number of + days for list DueRevisions + +6.0.14 (2021-01-04) +--------------------- +better error checking in SeedDMS_Core_Document::cancelCheckOut() + +6.0.13 (2020-09-29) +--------------------- +- SeedDMS_Folder_DMS::getAccessList() and getDefaultAccess() do not return fals anymore if the parent does not exists. They just stop inheritance. + +6.0.12 (2020-06-05) +--------------------- + +6.0.11 (2020-06-05) +--------------------- +SeedDMS_Core_DMS::filterAccess() properly checks for documents + +6.0.10 (2020-05-22) +--------------------- +SeedDMS_Core_DocumentContent::delRevisor() returns -4 if user has already made a revision + +6.0.9 (2020-05-14) +--------------------- +- no changes, just keep same version as seeddms application + +6.0.8 (2020-03-02) +--------------------- +- no changes, just keep same version as seeddms application + +6.0.7 (2020-02-17) +--------------------- +SeedDMS_Core_Document::getTimeline() returns revision only for latest content +add callback onSetStatus in SeedDMS_Core_DocumentContent::setStatus() +add new list type 'DueRevision' in SeedDMS_Core_DMS::getDocumentList() +a revision can also be started if some revisors have already reviewed the document +remove a user from all its process can also be used to set a new user + +6.0.6 (2018-11-13) +--------------------- +SeedDMS_Core_Folder::addContent() uses currently logged in user as uploader instead of owner +SeedDMS_Core_DocumentContent::verifyStatus() will not set status to S_RELEASED +if currently in S_DRAFT status und no workflow, review, approval, or revision +is pending. + +6.0.5 (2018-02-27) +--------------------- +add list 'NeedsCorrectionOwner' to SeedDMS_Core_DMS::getDocumentList() + +6.0.4 (2018-02-14) +--------------------- +add lists of drafts and obsolete docs in SeedDMS_Core_DMS::getDocumentList() +add fast sql statement to SeedDMS_Core_Document::getReceiptStatus() if limit=1 +add callback onCheckAccessDocument to SeedDMS_Core_Document::getAccessMode() +add new document status 'needs correction' (S_NEEDS_CORRECTION) +do not use views as a replacement for temp. tables anymore, because they are much +slower. +add SeedDMS_Core_DocumentContent::getInstance() + +6.0.3 (2018-01-23) +--------------------- +pass 0 as default to getObjects() +SeedDMS_Core_AttributeDefinition::getStatistics() returns propper values for each item in a value set +SeedDMS_Core_DMS::getDocumentList() returns list of documents without a receiver + +6.0.2 (2017-12-19) +--------------------- +- speed up getting list of locked documents +- setting _logfile in inc.DBAccessPDO.php will log execution times in file +- fix sql statement to create temp table ttrevisionid and ttreceiptid +- SeedDMS_Core_DMS::noReadForStatus no longer needed +- SeedDMS_Core_Document::checkForDueRevisionWorkflow() also checks if there +are any waiting or pending revisions at all +- SeedDMS_Core_User::getReverseSubstitutes() works with new roles +- fix field name in getDocumentList() to make it work for pgsql +- views instead of temp. tables can be used +- ReceiveOwner list does not contain old versions anymore +- all changes up to 5.1.5 merged +- getTimeline() also returns data for documents with a scheduled revision + +6.0.1 (2017-05-28) +--------------------- +- speed up getting list of locked documents +- setting _logfile in inc.DBAccessPDO.php will log execution times in file + +6.0.0 (2017-02-28) +--------------------- +- all changes from 5.0.14 merged +- SeedDMS_Core_User::getReceiptStatus() and SeedDMS_Core_User::getReviewStatus() +only return entries of the latest document version if not specific document and +version is passed +- temp. table for revisions can be created +- new methods SeedDMS_Core_DMS::getDocumentsInReception() and +SeedDMS_Core_DMS::getDocumentsInRevision() +- limit hits of sql statement in SeedDMЅ_Core_DMS::getDuplicateDocumentContent() to 1000 +- finishRevsion() puts all revisors into state waiting, so a new revision can be started +- fix SeedDMS_Core_Group::getRevisionStatus(), which did not always return the last +log entry first +- add roles +- use classname from SeedDMS_Core_DMS::_classnames for SeedDMS_Core_DocumentContent +- add virtual access mode for document links and attachments plus callbacks to + check access mode in a hook +- add new method SeedDMS_Core_DMS::getDocumentsExpired() + 5.1.29 (2022-11-21) --------------------- - SeedDMS_Core_Folder::addDocument() does rollback transaction propperly when setting document categories fail @@ -16,7 +158,6 @@ - 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 - 5.1.27 (2022-08-31) --------------------- From 496bc9214dbe7ae6511639885452008736fbd0c8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 16:57:34 +0100 Subject: [PATCH 1786/2006] backport some changes from 6.0.x --- SeedDMS_Preview/Preview/Base.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Preview/Preview/Base.php b/SeedDMS_Preview/Preview/Base.php index d07897b6c..9fb401ada 100644 --- a/SeedDMS_Preview/Preview/Base.php +++ b/SeedDMS_Preview/Preview/Base.php @@ -73,6 +73,7 @@ class SeedDMS_Preview_Base { $this->previewDir = $previewDir; } $this->timeout = intval($timeout); + $this->converters = array(); $this->xsendfile = $xsendfile; $this->conversionmgr = null; } /* }}} */ @@ -154,7 +155,10 @@ class SeedDMS_Preview_Base { * and the value is the command to be called for creating the preview */ function setConverters($arr) { /* {{{ */ - $this->converters = $arr; + if(is_array($arr)) + $this->converters = $arr; + else + $this->converters = array(); } /* }}} */ /** From 3426fa1032343b6bfd99eb87f3388b07fc141b81 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 17:01:19 +0100 Subject: [PATCH 1787/2006] fix formating of notes in preparation for creating a changelog.md --- SeedDMS_Preview/package.xml | 74 ++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/SeedDMS_Preview/package.xml b/SeedDMS_Preview/package.xml index cddd83d25..d6dd7bc59 100644 --- a/SeedDMS_Preview/package.xml +++ b/SeedDMS_Preview/package.xml @@ -73,7 +73,7 @@ GPL License - initial version +- initial version @@ -89,7 +89,7 @@ GPL License -preview image can also be created from a document file (SeedDMS_Core_DocumentFile) +- preview image can also be created from a document file (SeedDMS_Core_DocumentFile) @@ -105,7 +105,7 @@ preview image can also be created from a document file (SeedDMS_Core_DocumentFil GPL License -add converters for .tar.gz, .ps, .txt +- add converters for .tar.gz, .ps, .txt @@ -121,7 +121,7 @@ add converters for .tar.gz, .ps, .txt GPL License -create fixed width image with proportional height +- create fixed width image with proportional height @@ -137,7 +137,7 @@ create fixed width image with proportional height GPL License -preview images will also be recreated if the object this image belongs is of newer date than the image itself. This happens if versions are being deleted and than a new version is uploaded. Because the new version will get the version number of the old version, it will also take over the old preview image.Comparing the creation date of the image with the object detects this case. +- preview images will also be recreated if the object this image belongs is of newer date than the image itself. This happens if versions are being deleted and than a new version is uploaded. Because the new version will get the version number of the old version, it will also take over the old preview image.Comparing the creation date of the image with the object detects this case. @@ -153,7 +153,7 @@ preview images will also be recreated if the object this image belongs is of new GPL License -command for creating the preview will be called with a given timeout +- command for creating the preview will be called with a given timeout @@ -169,8 +169,8 @@ command for creating the preview will be called with a given timeout GPL License -add method getFilesize() -timeout for external commands can be passed to contructor of SeedDMS_Preview_Previewer +- add method getFilesize() +- timeout for external commands can be passed to contructor of SeedDMS_Preview_Previewer @@ -186,7 +186,7 @@ timeout for external commands can be passed to contructor of SeedDMS_Preview_Pre GPL License -check if object passed to createPreview(), hasPreview() is not null +- check if object passed to createPreview(), hasPreview() is not null @@ -202,7 +202,7 @@ check if object passed to createPreview(), hasPreview() is not null GPL License -set last parameter of stream_select() to 200000 micro sec. in case the timeout in sec. is set to 0 +- set last parameter of stream_select() to 200000 micro sec. in case the timeout in sec. is set to 0 @@ -218,7 +218,7 @@ set last parameter of stream_select() to 200000 micro sec. in case the timeout i GPL License -pass variables to stream_select (required by php7) +- pass variables to stream_select (required by php7) @@ -234,11 +234,11 @@ pass variables to stream_select (required by php7) GPL License -add more documentation -finish deletePreview() -add new method deleteDocumentPreviews() -fix calculation of timeout (Bug #269) -check if cache dir exists before deleting it in deleteDocumentPreviews() +- add more documentation +- finish deletePreview() +- add new method deleteDocumentPreviews() +- fix calculation of timeout (Bug #269) +- check if cache dir exists before deleting it in deleteDocumentPreviews() @@ -254,7 +254,7 @@ check if cache dir exists before deleting it in deleteDocumentPreviews() GPL License -add new previewer which converts document to pdf instead of png +- add new previewer which converts document to pdf instead of png @@ -270,7 +270,7 @@ add new previewer which converts document to pdf instead of png GPL License -setConverters() overrides exiting converters +- setConverters() overrides exiting converters @@ -286,8 +286,8 @@ setConverters() overrides exiting converters GPL License -commands can be set for mimetypes 'xxxx/*' and '*' -pass mimetype as parameter '%m' to converter +- commands can be set for mimetypes 'xxxx/*' and '*' +- pass mimetype as parameter '%m' to converter @@ -303,7 +303,7 @@ pass mimetype as parameter '%m' to converter GPL License -createPreview() returns false if running the converter command fails +- createPreview() returns false if running the converter command fails @@ -319,7 +319,7 @@ createPreview() returns false if running the converter command fails GPL License -fix typo in converter for tar.gz files +- fix typo in converter for tar.gz files @@ -335,7 +335,7 @@ fix typo in converter for tar.gz files GPL License -SeedDMS_Preview_Base::hasConverter() returns only try if command is set +- SeedDMS_Preview_Base::hasConverter() returns only try if command is set @@ -351,8 +351,8 @@ SeedDMS_Preview_Base::hasConverter() returns only try if command is set GPL License -SeedDMS_Preview_Base::setConverters() overrides existing converters. -New method SeedDMS_Preview_Base::addConverters() merges new converters with old ones. +- SeedDMS_Preview_Base::setConverters() overrides existing converters. +- New method SeedDMS_Preview_Base::addConverters() merges new converters with old ones. @@ -368,9 +368,9 @@ New method SeedDMS_Preview_Base::addConverters() merges new converters with old GPL License -add SeedDMS_Preview_Base::sendFile() as a replacement for readfile() which uses -mod_xsendfile if available -execWithTimeout() reads data from stderr and returns it together with stdout in array +- add SeedDMS_Preview_Base::sendFile() as a replacement for readfile() which uses +- mod_xsendfile if available +- execWithTimeout() reads data from stderr and returns it together with stdout in array @@ -386,7 +386,7 @@ execWithTimeout() reads data from stderr and returns it together with stdout in GPL License -preview is also created if SeedDMS_Core_DocumentContent has a child class +- preview is also created if SeedDMS_Core_DocumentContent has a child class @@ -402,8 +402,8 @@ preview is also created if SeedDMS_Core_DocumentContent has a child class GPL License -make sure list of converters is always an array -usage of mod_sendfile can be configured +- make sure list of converters is always an array +- usage of mod_sendfile can be configured @@ -419,8 +419,8 @@ usage of mod_sendfile can be configured GPL License -new parameter for enabling/disabling xsendfile -fix creation of pdf preview if document content class is not SeedDMS_Core_DocumentContent +- new parameter for enabling/disabling xsendfile +- fix creation of pdf preview if document content class is not SeedDMS_Core_DocumentContent @@ -436,7 +436,7 @@ fix creation of pdf preview if document content class is not SeedDMS_Core_Docume GPL License -add new methode getPreviewFile() +- add new methode getPreviewFile() @@ -452,7 +452,7 @@ add new methode getPreviewFile() GPL License -add parameter $target to SeedDMS_Preview_pdfPreviewer::hasRawPreview() and SeedDMS_Preview_pdfPreviewer::getRawPreview() +- add parameter $target to SeedDMS_Preview_pdfPreviewer::hasRawPreview() and SeedDMS_Preview_pdfPreviewer::getRawPreview() @@ -468,8 +468,8 @@ add parameter $target to SeedDMS_Preview_pdfPreviewer::hasRawPreview() and SeedD GPL License -set header Content-Length -update package description +- set header Content-Length +- update package description From 284d0707ccb4935efefb8cc5c43885a48c9d0a4e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 17:11:17 +0100 Subject: [PATCH 1788/2006] fix formating of notes in preparation of creating CHANGELOG.md --- SeedDMS_Lucene/package.xml | 40 +++++++++++++++++------------------ SeedDMS_SQLiteFTS/package.xml | 28 ++++++++++++------------ 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/SeedDMS_Lucene/package.xml b/SeedDMS_Lucene/package.xml index 3ccc53ec9..eeb33269a 100644 --- a/SeedDMS_Lucene/package.xml +++ b/SeedDMS_Lucene/package.xml @@ -59,6 +59,7 @@ + 2009-04-27 0.0.1 0.0.1 @@ -67,7 +68,6 @@ alpha alpha - 2009-04-27 BSD License @@ -101,8 +101,8 @@ GPL License -use a configurable list of mime type converters, fixed indexing and searching -of special chars like german umlaute. +- use a configurable list of mime type converters, fixed indexing and searching + of special chars like german umlaute. @@ -118,7 +118,7 @@ of special chars like german umlaute. GPL License -catch exception if index is opened but not available +- catch exception if index is opened but not available @@ -134,7 +134,7 @@ catch exception if index is opened but not available GPL License -parse query term and catch errors before using it +- parse query term and catch errors before using it @@ -150,8 +150,8 @@ parse query term and catch errors before using it GPL License -explicitly set encoding to utf-8 when adding fields -do not check if deleting document from index fails, update it in any case +- explicitly set encoding to utf-8 when adding fields +- do not check if deleting document from index fails, update it in any case @@ -167,7 +167,7 @@ do not check if deleting document from index fails, update it in any case GPL License -class SeedDMS_Lucene_Search::search returns false if query is invalid instead of an empty result record +- class SeedDMS_Lucene_Search::search returns false if query is invalid instead of an empty result record @@ -183,8 +183,8 @@ class SeedDMS_Lucene_Search::search returns false if query is invalid instead of GPL License -field for original filename is treated as utf-8 -declare SeeDMS_Lucene_Indexer::open() static +- field for original filename is treated as utf-8 +- declare SeeDMS_Lucene_Indexer::open() static @@ -200,7 +200,7 @@ declare SeeDMS_Lucene_Indexer::open() static GPL License -run external commands with a timeout +- run external commands with a timeout @@ -216,7 +216,7 @@ run external commands with a timeout GPL License -add command for indexing postѕcript files +- add command for indexing postѕcript files @@ -232,7 +232,7 @@ add command for indexing postѕcript files GPL License -set last parameter of stream_select() to 200000 micro sec. in case the timeout in sec. is set to 0 +- set last parameter of stream_select() to 200000 micro sec. in case the timeout in sec. is set to 0 @@ -248,8 +248,8 @@ set last parameter of stream_select() to 200000 micro sec. in case the timeout i GPL License -pass variables to stream_select() to fullfill strict standards. -make all functions in Indexer.php static +- pass variables to stream_select() to fullfill strict standards. +- make all functions in Indexer.php static @@ -265,7 +265,7 @@ make all functions in Indexer.php static GPL License -catch exception in execWithTimeout() +- catch exception in execWithTimeout() @@ -281,7 +281,7 @@ catch exception in execWithTimeout() GPL License -allow conversion commands for mimetypes with wildcards +- allow conversion commands for mimetypes with wildcards @@ -297,7 +297,7 @@ allow conversion commands for mimetypes with wildcards GPL License -execWithTimeout() reads data from stderr and saves it into error msg +- execWithTimeout() reads data from stderr and saves it into error msg @@ -313,7 +313,7 @@ execWithTimeout() reads data from stderr and saves it into error msg GPL License -IndexedDocument() remembers cmd and mimetype +- IndexedDocument() remembers cmd and mimetype @@ -329,7 +329,7 @@ IndexedDocument() remembers cmd and mimetype GPL License -Index users with at least read access on the document +- Index users with at least read access on the document diff --git a/SeedDMS_SQLiteFTS/package.xml b/SeedDMS_SQLiteFTS/package.xml index 3813a6252..2b7dfe0b5 100644 --- a/SeedDMS_SQLiteFTS/package.xml +++ b/SeedDMS_SQLiteFTS/package.xml @@ -88,7 +88,7 @@ GPL License -initial release +- initial release @@ -104,7 +104,7 @@ initial release GPL License -add __get() to SQLiteFTS_Document because class.IndexInfo.php access class variable title which doesn't exists +- add __get() to SQLiteFTS_Document because class.IndexInfo.php access class variable title which doesn't exists @@ -120,7 +120,7 @@ add __get() to SQLiteFTS_Document because class.IndexInfo.php access class varia GPL License -check if index exists before removing it when creating a new one +- check if index exists before removing it when creating a new one @@ -136,7 +136,7 @@ check if index exists before removing it when creating a new one GPL License -add command for indexing postѕcript files +- add command for indexing postѕcript files @@ -152,7 +152,7 @@ add command for indexing postѕcript files GPL License -make it work with sqlite3 < 3.8.0 +- make it work with sqlite3 < 3.8.0 @@ -168,7 +168,7 @@ make it work with sqlite3 < 3.8.0 GPL License -set last parameter of stream_select() to 200000 micro sec. in case the timeout in sec. is set to 0 +- set last parameter of stream_select() to 200000 micro sec. in case the timeout in sec. is set to 0 @@ -184,7 +184,7 @@ set last parameter of stream_select() to 200000 micro sec. in case the timeout i GPL License -fix calculation of timeout (see bug #269) +- fix calculation of timeout (see bug #269) @@ -200,7 +200,7 @@ fix calculation of timeout (see bug #269) GPL License -catch exception in execWithTimeout() +- catch exception in execWithTimeout() @@ -216,7 +216,7 @@ catch exception in execWithTimeout() GPL License -allow conversion commands for mimetypes with wildcards +- allow conversion commands for mimetypes with wildcards @@ -232,7 +232,7 @@ allow conversion commands for mimetypes with wildcards GPL License -execWithTimeout() reads data from stderr and saves it into error msg +- execWithTimeout() reads data from stderr and saves it into error msg @@ -248,7 +248,7 @@ execWithTimeout() reads data from stderr and saves it into error msg GPL License -IndexedDocument() remembers cmd and mimetype +- IndexedDocument() remembers cmd and mimetype @@ -264,7 +264,7 @@ IndexedDocument() remembers cmd and mimetype GPL License -Set 'created' in index to creation date of indexed content (was set to current +- Set 'created' in index to creation date of indexed content (was set to current timestamp) @@ -281,7 +281,7 @@ timestamp) GPL License -Index users with at least read access on a document +- Index users with at least read access on a document @@ -297,7 +297,7 @@ Index users with at least read access on a document GPL License -add user to list of terms +- add user to list of terms From a7fd69a6b9342fd40a1b38066529d4999b7e7826 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 17:12:34 +0100 Subject: [PATCH 1789/2006] add new changelog files --- SeedDMS_Lucene/CHANGELOG.md | 94 ++++++++++++++++++++++++ SeedDMS_Preview/CHANGELOG.md | 128 +++++++++++++++++++++++++++++++++ SeedDMS_SQLiteFTS/CHANGELOG.md | 89 +++++++++++++++++++++++ 3 files changed, 311 insertions(+) create mode 100644 SeedDMS_Lucene/CHANGELOG.md create mode 100644 SeedDMS_Preview/CHANGELOG.md create mode 100644 SeedDMS_SQLiteFTS/CHANGELOG.md diff --git a/SeedDMS_Lucene/CHANGELOG.md b/SeedDMS_Lucene/CHANGELOG.md new file mode 100644 index 000000000..ce4685461 --- /dev/null +++ b/SeedDMS_Lucene/CHANGELOG.md @@ -0,0 +1,94 @@ +1.1.18 (2023-01-09) +--------------------- +- IndexedDocument() accepts a callable for conversion to text +- SeedDMS_Lucene_Search::open and create return itself but Zend_Search_Lucene + +1.1.17 (2021-05-10) +--------------------- +- close pipes in execWithTimeout(), also return exit code of command + + +1.1.16 (2020-12-12) +--------------------- +- add indexing of folders + +1.1.15 (2020-09-10) +--------------------- +- add searching for document status +- better error handling if opening index fails +- parameters for SeedDMS_Lucene_Search::search() has changed +- SeedDMS_Lucene_Search::search() returns array of hits, count and facets +- pass config array instead of index directory to SeedDMS_Lucene_Indexer::create() + and SeedDMS_Lucene_Indexer::open() + +1.1.14 (2020-09-02) +--------------------- +- Index users with at least read access on the document + +1.1.13 (2018-04-11) +--------------------- +- IndexedDocument() remembers cmd and mimetype + +1.1.12 (2018-01-30) +--------------------- +- execWithTimeout() reads data from stderr and saves it into error msg + +1.1.11 (2017-12-04) +--------------------- +- allow conversion commands for mimetypes with wildcards + +1.1.10 (2017-03-01) +--------------------- +- catch exception in execWithTimeout() + +1.1.9 (2016-04-28) +--------------------- +- pass variables to stream_select() to fullfill strict standards. +- make all functions in Indexer.php static + +1.1.8 (2016-03-29) +--------------------- +- set last parameter of stream_select() to 200000 micro sec. in case the timeout in sec. is set to 0 + +1.1.7 (2016-02-01) +--------------------- +- add command for indexing postѕcript files + +1.1.6 (2015-08-05) +--------------------- +- run external commands with a timeout + +1.1.5 (2014-07-30) +--------------------- +- field for original filename is treated as utf-8 +- declare SeeDMS_Lucene_Indexer::open() static + +1.1.4 (2013-08-13) +--------------------- +- class SeedDMS_Lucene_Search::search returns false if query is invalid instead of an empty result record + +1.1.3 (2013-06-27) +--------------------- +- explicitly set encoding to utf-8 when adding fields +- do not check if deleting document from index fails, update it in any case + +1.1.2 (2013-06-17) +--------------------- +- parse query term and catch errors before using it + +1.1.1 (2012-12-03) +--------------------- +- catch exception if index is opened but not available + +1.1.0 (2012-11-06) +--------------------- +- use a configurable list of mime type converters, fixed indexing and searching + of special chars like german umlaute. + +1.0.1 (2011-11-06) +--------------------- +- New Release + +0.0.1 (2009-04-27) +--------------------- + diff --git a/SeedDMS_Preview/CHANGELOG.md b/SeedDMS_Preview/CHANGELOG.md new file mode 100644 index 000000000..76b1546c5 --- /dev/null +++ b/SeedDMS_Preview/CHANGELOG.md @@ -0,0 +1,128 @@ +1.5.0 (2023-01-09) +--------------------- +- add previewer which creates txt + +1.4.0 (2021-10-16) +--------------------- +- use new conversion service if available +- createRawPreview() checks early if a converter exists + + +1.3.3 (2020-12-23) +--------------------- +- close pipes in execWithTimeout(), also return exit code of command +- createPreview() has optional parameter by referenz to return true if a + preview image was actually created + +1.3.2 (2020-12-23) +--------------------- +- set header Content-Length +- update package description + +1.3.1 (2020-03-21) +--------------------- +- add parameter $target to SeedDMS_Preview_pdfPreviewer::hasRawPreview() and SeedDMS_Preview_pdfPreviewer::getRawPreview() + +1.3.0 (2020-02-17) +--------------------- +- add new methode getPreviewFile() + +1.2.10 (2019-02-11) +--------------------- +- new parameter for enabling/disabling xsendfile +- fix creation of pdf preview if document content class is not SeedDMS_Core_DocumentContent + +1.2.9 (2018-07-13) +--------------------- +- make sure list of converters is always an array +- usage of mod_sendfile can be configured + +1.2.8 (2018-03-08) +--------------------- +- preview is also created if SeedDMS_Core_DocumentContent has a child class + +1.2.7 (2018-01-18) +--------------------- +- add SeedDMS_Preview_Base::sendFile() as a replacement for readfile() which uses +- mod_xsendfile if available +- execWithTimeout() reads data from stderr and returns it together with stdout in array + +1.2.6 (2017-12-04) +--------------------- +- SeedDMS_Preview_Base::setConverters() overrides existing converters. +- New method SeedDMS_Preview_Base::addConverters() merges new converters with old ones. + +1.2.5 (2017-10-11) +--------------------- +- SeedDMS_Preview_Base::hasConverter() returns only try if command is set + +1.2.4 (2017-10-11) +--------------------- +- fix typo in converter for tar.gz files + +1.2.3 (2017-09-18) +--------------------- +- createPreview() returns false if running the converter command fails + +1.2.2 (2017-03-02) +--------------------- +- commands can be set for mimetypes 'xxxx/*' and '*' +- pass mimetype as parameter '%m' to converter + +1.2.1 (2016-11-15) +--------------------- +- setConverters() overrides exiting converters + +1.2.0 (2016-11-07) +--------------------- +- add new previewer which converts document to pdf instead of png + +1.1.9 (2016-04-26) +--------------------- +- add more documentation +- finish deletePreview() +- add new method deleteDocumentPreviews() +- fix calculation of timeout (Bug #269) +- check if cache dir exists before deleting it in deleteDocumentPreviews() + +1.1.8 (2016-04-05) +--------------------- +- pass variables to stream_select (required by php7) + +1.1.7 (2016-03-29) +--------------------- +- set last parameter of stream_select() to 200000 micro sec. in case the timeout in sec. is set to 0 + +1.1.6 (2016-03-08) +--------------------- +- check if object passed to createPreview(), hasPreview() is not null + +1.1.5 (2016-02-11) +--------------------- +- add method getFilesize() +- timeout for external commands can be passed to contructor of SeedDMS_Preview_Previewer + +1.1.4 (2015-08-08) +--------------------- +- command for creating the preview will be called with a given timeout + +1.1.3 (2015-02-13) +--------------------- +- preview images will also be recreated if the object this image belongs is of newer date than the image itself. This happens if versions are being deleted and than a new version is uploaded. Because the new version will get the version number of the old version, it will also take over the old preview image.Comparing the creation date of the image with the object detects this case. + +1.1.2 (2014-04-10) +--------------------- +- create fixed width image with proportional height + +1.1.1 (2014-03-18) +--------------------- +- add converters for .tar.gz, .ps, .txt + +1.1.0 (2013-04-29) +--------------------- +- preview image can also be created from a document file (SeedDMS_Core_DocumentFile) + +1.0.0 (2012-11-20) +--------------------- +- initial version + diff --git a/SeedDMS_SQLiteFTS/CHANGELOG.md b/SeedDMS_SQLiteFTS/CHANGELOG.md new file mode 100644 index 000000000..d75aace4c --- /dev/null +++ b/SeedDMS_SQLiteFTS/CHANGELOG.md @@ -0,0 +1,89 @@ +1.0.18 (2023-01-09) +--------------------- +- 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 + +1.0.17 (2022-03-04) +--------------------- +- throw exeption in find() instead of returning false +- fix query if rootFolder or startFolder is set + + +1.0.16 (2021-05-10) +--------------------- +- close pipes in execWithTimeout(), also return exit code of command +- add support for fts5 (make it the default) +- add class SeedDMS_SQLiteFTS_Field + +1.0.15 (2020-12-12) +--------------------- +- add indexing folders + +1.0.14 (2020-09-11) +--------------------- +- add searching for document status +- search even if query is empty (will find all documents) +- parameters for SeedDMS_SQLiteFTS_Search::search() has changed +- SeedDMS_Lucene_Search::search() returns array of hits, count and facets +- pass config array instead of index directory to SeedDMS_Lucene_Indexer::create() + and SeedDMS_Lucene_Indexer::open() + +1.0.13 (2020-09-02) +--------------------- +- add user to list of terms + +1.0.12 (2020-09-02) +--------------------- +- Index users with at least read access on a document + +1.0.11 (2019-11-28) +--------------------- +- Set 'created' in index to creation date of indexed content (was set to current +timestamp) + +1.0.10 (2018-04-11) +--------------------- +- IndexedDocument() remembers cmd and mimetype + +1.0.9 (2018-01-30) +--------------------- +- execWithTimeout() reads data from stderr and saves it into error msg + +1.0.8 (2017-12-04) +--------------------- +- allow conversion commands for mimetypes with wildcards + +1.0.7 (2017-03-01) +--------------------- +- catch exception in execWithTimeout() + +1.0.6 (2016-03-29) +--------------------- +- fix calculation of timeout (see bug #269) + +1.0.5 (2016-03-29) +--------------------- +- set last parameter of stream_select() to 200000 micro sec. in case the timeout in sec. is set to 0 + +1.0.4 (2016-03-15) +--------------------- +- make it work with sqlite3 < 3.8.0 + +1.0.3 (2016-02-01) +--------------------- +- add command for indexing postѕcript files + +1.0.2 (2016-01-10) +--------------------- +- check if index exists before removing it when creating a new one + +1.0.1 (2015-11-16) +--------------------- +- add __get() to SQLiteFTS_Document because class.IndexInfo.php access class variable title which doesn't exists + +1.0.0 (2015-08-10) +--------------------- +- initial release + From 875954e730c0ca7d323c26283023067f1ea5be9a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 20 Jan 2023 17:31:22 +0100 Subject: [PATCH 1790/2006] add composer.json --- SeedDMS_Lucene/composer.json | 23 +++++++++++++++++++++++ SeedDMS_Preview/composer.json | 23 +++++++++++++++++++++++ SeedDMS_SQLiteFTS/composer.json | 23 +++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 SeedDMS_Lucene/composer.json create mode 100644 SeedDMS_Preview/composer.json create mode 100644 SeedDMS_SQLiteFTS/composer.json diff --git a/SeedDMS_Lucene/composer.json b/SeedDMS_Lucene/composer.json new file mode 100644 index 000000000..68a37caaf --- /dev/null +++ b/SeedDMS_Lucene/composer.json @@ -0,0 +1,23 @@ +{ + "name": "seeddms/lucene", + "description": "Lucene based fulltext search for SeedDMS ", + "type": "library", + "license": "GPL-2.0-or-later", + "minimum-stability": "dev", + "autoload": { + "psr-4": { + "Seeddms\\Lucene\\": "Lucene/" + }, + "classmap": ["Lucene/"] + }, + "authors": [ + { + "name": "Uwe Steinmann", + "email": "info@seeddms.org" + } + ], + "require-dev": { + "phpunit/phpunit": "^9" + } + +} diff --git a/SeedDMS_Preview/composer.json b/SeedDMS_Preview/composer.json new file mode 100644 index 000000000..9a4b5a11a --- /dev/null +++ b/SeedDMS_Preview/composer.json @@ -0,0 +1,23 @@ +{ + "name": "seeddms/preview", + "description": "Create Preview images, pdf and txt for for SeedDMS ", + "type": "library", + "license": "GPL-2.0-or-later", + "minimum-stability": "dev", + "autoload": { + "psr-4": { + "Seeddms\\Preview\\": "Preview/" + }, + "classmap": ["Preview/"] + }, + "authors": [ + { + "name": "Uwe Steinmann", + "email": "info@seeddms.org" + } + ], + "require-dev": { + "phpunit/phpunit": "^9" + } + +} diff --git a/SeedDMS_SQLiteFTS/composer.json b/SeedDMS_SQLiteFTS/composer.json new file mode 100644 index 000000000..90a19cd7d --- /dev/null +++ b/SeedDMS_SQLiteFTS/composer.json @@ -0,0 +1,23 @@ +{ + "name": "seeddms/lucene", + "description": "SQLiteFTS based fulltext search for SeedDMS ", + "type": "library", + "license": "GPL-2.0-or-later", + "minimum-stability": "dev", + "autoload": { + "psr-4": { + "Seeddms\\SQLiteFTS\\": "SQLiteFTS/" + }, + "classmap": ["SQLiteFTS/"] + }, + "authors": [ + { + "name": "Uwe Steinmann", + "email": "info@seeddms.org" + } + ], + "require-dev": { + "phpunit/phpunit": "^9" + } + +} From 78f80e7190bd9e8d55c0e07af2ed2a680b48ac5c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 21 Jan 2023 09:09:20 +0100 Subject: [PATCH 1791/2006] add new repositories for lucene, sqlitefts, preview, core --- composer-dist.json | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/composer-dist.json b/composer-dist.json index 1c69d8361..e7f5a2665 100644 --- a/composer-dist.json +++ b/composer-dist.json @@ -18,7 +18,28 @@ "repositories": [ { "type": "path", - "url": "/home/cvs/seeddms/SeedDMS_Core", + "url": "/home/cvs/seeddms-ext/core", + "options": { + "symlink": false + } + }, + { + "type": "path", + "url": "/home/cvs/seeddms-ext/lucene", + "options": { + "symlink": false + } + }, + { + "type": "path", + "url": "/home/cvs/seeddms-ext/preview", + "options": { + "symlink": false + } + }, + { + "type": "path", + "url": "/home/cvs/seeddms-ext/sqlitefts", "options": { "symlink": false } From 9b780bd883dd7e5631d7bbeed5efc3b77494818f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 21 Jan 2023 09:09:57 +0100 Subject: [PATCH 1792/2006] include Lucene.php from vendor dir --- inc/inc.FulltextInit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/inc.FulltextInit.php b/inc/inc.FulltextInit.php index 87687d9bb..9ff303637 100644 --- a/inc/inc.FulltextInit.php +++ b/inc/inc.FulltextInit.php @@ -27,7 +27,7 @@ if($settings->_enableFullSearch) { if(!empty($settings->_luceneClassDir)) require_once($settings->_luceneClassDir.'/Lucene.php'); else - require_once('SeedDMS/Lucene.php'); + require_once('vendor/seeddms/lucene/Lucene.php'); } else { $indexconf = null; if(isset($GLOBALS['SEEDDMS_HOOKS']['initFulltext'])) { From fc61b3d75965311b990e72e73a13fd7d7df4ac38 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 21 Jan 2023 09:15:46 +0100 Subject: [PATCH 1793/2006] include SQLiteFTS.php from vendor/seeddms/sqlitefts --- inc/inc.FulltextInit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/inc.FulltextInit.php b/inc/inc.FulltextInit.php index 9ff303637..5433c8f83 100644 --- a/inc/inc.FulltextInit.php +++ b/inc/inc.FulltextInit.php @@ -14,7 +14,7 @@ if($settings->_enableFullSearch) { ); $fulltextservice->addService('sqlitefts', $indexconf); - require_once('SeedDMS/SQLiteFTS.php'); + require_once('vendor/seeddms/sqlitefts/SQLiteFTS.php'); } elseif($settings->_fullSearchEngine == 'lucene') { $indexconf = array( 'Indexer' => 'SeedDMS_Lucene_Indexer', From 2a265ecea6d95178084eaab142f23944d39c8339 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 21 Jan 2023 09:16:50 +0100 Subject: [PATCH 1794/2006] minor improvements in cmd to create changelog --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8d94c6b56..ba8176ffa 100644 --- a/Makefile +++ b/Makefile @@ -91,7 +91,8 @@ apidoc: # line break. Result is put back # into the original format by replacing all '|' by newline. # +PKGFILE=SeedDMS_Core/package.xml changelog: - @sgrep 'stag("DATE") .. etag("DATE") or ((stag("RELEASE") .. etag("RELEASE")) in (stag("VERSION") .. etag("VERSION"))) or inner(stag("NOTES") __ etag("NOTES"))' SeedDMS_Core/package.xml | sed -e 's#^ *\([-0-9]*\)\([0-9.preRC]*\)#\n\n\2 (\1)\n---------------------#' | awk -F'\n' -vRS='' -vOFS='|' '{$$1=$$1}1' | sort -V -r | sed 's/$$/\n/' | tr '|' '\n' + @sgrep 'stag("DATE") .. etag("DATE") or ((stag("RELEASE") .. etag("RELEASE")) in (stag("VERSION") .. etag("VERSION"))) or inner(stag("NOTES") __ etag("NOTES"))' ${PKGFILE} | sed -e 's#^ *\([-0-9]*\)\([0-9.preRC]*\)#\n\n\2 (\1)\n---------------------#' | awk -F'\n' -vRS='' -vOFS='|' '{$$1=$$1}1' | sort -V -r | sed 's/$$/\n/' | tr '|' '\n' .PHONY: doc webdav webapp repository changelog From cca8416ef63c51ec691893244cc45b658f22e3c3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 21 Jan 2023 13:08:33 +0100 Subject: [PATCH 1795/2006] use composer packages for lucene, preview, sqlitefs, webdav server --- composer-dist.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/composer-dist.json b/composer-dist.json index e7f5a2665..8cc97ee60 100644 --- a/composer-dist.json +++ b/composer-dist.json @@ -13,7 +13,11 @@ "alecrabbit/php-console-colour": "*", "zf1/zend-search-lucene": "*", "symfony/http-foundation": "^5.4", - "seeddms/core": "dev-master" + "seeddms/core": "dev-master", + "seeddms/lucene": "dev-master", + "seeddms/preview": "dev-master", + "seeddms/sqlitefts": "dev-master", + "seeddms/http_webdav_server": "dev-master" }, "repositories": [ { @@ -43,6 +47,13 @@ "options": { "symlink": false } + }, + { + "type": "path", + "url": "/home/cvs/seeddms-ext/http_webdav_server", + "options": { + "symlink": false + } } ] From 2913a9bc977bd570c3c2291d3afc3bfb82c81a44 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 21 Jan 2023 13:31:25 +0100 Subject: [PATCH 1796/2006] include webdav server from vendor dir --- webdav/webdav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webdav/webdav.php b/webdav/webdav.php index 891b0685c..c478e91bc 100644 --- a/webdav/webdav.php +++ b/webdav/webdav.php @@ -1,6 +1,6 @@ Date: Sat, 21 Jan 2023 13:31:44 +0100 Subject: [PATCH 1797/2006] do not include pear packages anymore --- build.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.xml b/build.xml index 81caffe74..40a25acb3 100644 --- a/build.xml +++ b/build.xml @@ -151,7 +151,7 @@ - + From 22802c4abd0119ade8fae216ed21c45a0e4da3e0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 21 Jan 2023 13:47:28 +0100 Subject: [PATCH 1798/2006] remove phpexcel, raise some max version numbers --- composer-dist.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer-dist.json b/composer-dist.json index 709d27444..929b06db9 100644 --- a/composer-dist.json +++ b/composer-dist.json @@ -7,7 +7,6 @@ "erusev/parsedown": "*", "erusev/parsedown-extra": "*", "mibe/feedwriter": "^1.1", - "phpoffice/phpexcel": "^1.8", "phpoffice/phpspreadsheet": "*", "pear/log": "*", "pear/mail": "*", @@ -16,7 +15,7 @@ "pear/auth_sasl": "*", "pear/db": "*", "alecrabbit/php-console-colour": "*", - "dragonmantank/cron-expression": "^2.2", + "dragonmantank/cron-expression": "^3", "zf1/zend-search-lucene": "*", "symfony/http-foundation": "^5.4", "seeddms/core": "dev-master", From 29cae0fb6557769cf5ddda506ba20cd008703168 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 21 Jan 2023 13:55:27 +0100 Subject: [PATCH 1799/2006] keep SeedDMS/Preview until all extensions are updated --- build.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/build.xml b/build.xml index 40a25acb3..eca4d945c 100644 --- a/build.xml +++ b/build.xml @@ -151,25 +151,25 @@ - - + + - + + - - + + showConfigHeadline('settings_Server'); ?> showConfigText('settings_rootDir', 'rootDir'); ?> +showConfigText('settings_baseUrl', 'baseUrl'); ?> showConfigText('settings_httpRoot', 'httpRoot'); ?> showConfigText('settings_contentDir', 'contentDir'); ?> showConfigText('settings_backupDir', 'backupDir'); ?> From bdcaf2b5f37341b157a41f741744c447d36a287f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 26 Jan 2023 18:42:28 +0100 Subject: [PATCH 1813/2006] minor correction of log messages --- utils/schedulercli.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/schedulercli.php b/utils/schedulercli.php index b0f8a2029..1cb4f6557 100644 --- a/utils/schedulercli.php +++ b/utils/schedulercli.php @@ -90,8 +90,8 @@ foreach($tasks as $task) { * to fast, but this is up to the admin of seeddms. */ $task->updateLastNextRun(); - add_log_line("Running '".$task->getExtension()."::".$task->getTask()."::".$task->getName()); - echo "Running '".$task->getExtension()."::".$task->getTask()."::".$task->getName()."\n"; + add_log_line("Running '".$task->getExtension()."::".$task->getTask()."::".$task->getName()."'"); + echo "Running '".$task->getExtension()."::".$task->getTask()."::".$task->getName()."'\n"; if($taskobj->execute($task)) { add_log_line("Execution of task '".$task->getExtension()."::".$task->getTask()."::".$task->getName()."' successful."); } else { From d30ba981be53acb3c38f06956094ff3dbb03cc8a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 26 Jan 2023 20:55:42 +0100 Subject: [PATCH 1814/2006] add functions to return type of object type of attribute definitions --- inc/inc.Language.php | 60 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/inc/inc.Language.php b/inc/inc.Language.php index bf9636993..9dbcc1819 100644 --- a/inc/inc.Language.php +++ b/inc/inc.Language.php @@ -262,6 +262,66 @@ function getOverallStatusText($status) { /* {{{ */ } } /* }}} */ +function getAttributeTypeText($attrdef) { /* {{{ */ + switch($attrdef->getType()) { + case SeedDMS_Core_AttributeDefinition::type_int: + $t = getMLText("attrdef_type_int"); + break; + case SeedDMS_Core_AttributeDefinition::type_float: + $t = getMLText("attrdef_type_float"); + break; + case SeedDMS_Core_AttributeDefinition::type_string: + $t = getMLText("attrdef_type_string"); + break; + case SeedDMS_Core_AttributeDefinition::type_boolean: + $t = getMLText("attrdef_type_boolean"); + break; + case SeedDMS_Core_AttributeDefinition::type_date: + $t = getMLText("attrdef_type_date"); + break; + case SeedDMS_Core_AttributeDefinition::type_email: + $t = getMLText("attrdef_type_email"); + break; + case SeedDMS_Core_AttributeDefinition::type_url: + $t = getMLText("attrdef_type_url"); + break; + case SeedDMS_Core_AttributeDefinition::type_boolean: + $t = getMLText("attrdef_type_boolean"); + break; + case SeedDMS_Core_AttributeDefinition::type_folder: + $t = getMLText("attrdef_type_folder"); + break; + case SeedDMS_Core_AttributeDefinition::type_document: + $t = getMLText("attrdef_type_document"); + break; + case SeedDMS_Core_AttributeDefinition::type_user: + $t = getMLText("attrdef_type_user"); + break; + case SeedDMS_Core_AttributeDefinition::type_group: + $t = getMLText("attrdef_type_group"); + break; + } + return $t; +} /* }}} */ + +function getAttributeObjectTypeText($attrdef) { /* {{{ */ + switch($attrdef->getObjType()) { + case SeedDMS_Core_AttributeDefinition::objtype_all: + $ot = getMLText("all"); + break; + case SeedDMS_Core_AttributeDefinition::objtype_folder: + $ot = getMLText("folder"); + break; + case SeedDMS_Core_AttributeDefinition::objtype_document: + $ot = getMLText("document"); + break; + case SeedDMS_Core_AttributeDefinition::objtype_documentcontent: + $ot = getMLText("documentcontent"); + break; + } + return $ot; +} /* }}} */ + function getAttributeValidationText($error, $attrname='', $attrvalue='', $regex='') { /* {{{ */ $arr = getAttributeValidationError($error, $attrname, $attrvalue, $regex); From 12a9762c9600fe202548dc8f5f29382539ae2d2e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 26 Jan 2023 20:57:59 +0100 Subject: [PATCH 1815/2006] use getAttributeTypeText() and getAttributeObjectTypeText() --- views/bootstrap/class.AttributeMgr.php | 54 +------------------------- 1 file changed, 2 insertions(+), 52 deletions(-) diff --git a/views/bootstrap/class.AttributeMgr.php b/views/bootstrap/class.AttributeMgr.php index f73a40589..dc9e09cd9 100644 --- a/views/bootstrap/class.AttributeMgr.php +++ b/views/bootstrap/class.AttributeMgr.php @@ -346,58 +346,8 @@ $(document).ready( function() { getObjType()) { - case SeedDMS_Core_AttributeDefinition::objtype_all: - $ot = getMLText("all"); - break; - case SeedDMS_Core_AttributeDefinition::objtype_folder: - $ot = getMLText("folder"); - break; - case SeedDMS_Core_AttributeDefinition::objtype_document: - $ot = getMLText("document"); - break; - case SeedDMS_Core_AttributeDefinition::objtype_documentcontent: - $ot = getMLText("documentcontent"); - break; - } - switch($attrdef->getType()) { - case SeedDMS_Core_AttributeDefinition::type_int: - $t = getMLText("attrdef_type_int"); - break; - case SeedDMS_Core_AttributeDefinition::type_float: - $t = getMLText("attrdef_type_float"); - break; - case SeedDMS_Core_AttributeDefinition::type_string: - $t = getMLText("attrdef_type_string"); - break; - case SeedDMS_Core_AttributeDefinition::type_boolean: - $t = getMLText("attrdef_type_boolean"); - break; - case SeedDMS_Core_AttributeDefinition::type_date: - $t = getMLText("attrdef_type_date"); - break; - case SeedDMS_Core_AttributeDefinition::type_email: - $t = getMLText("attrdef_type_email"); - break; - case SeedDMS_Core_AttributeDefinition::type_url: - $t = getMLText("attrdef_type_url"); - break; - case SeedDMS_Core_AttributeDefinition::type_boolean: - $t = getMLText("attrdef_type_boolean"); - break; - case SeedDMS_Core_AttributeDefinition::type_folder: - $t = getMLText("attrdef_type_folder"); - break; - case SeedDMS_Core_AttributeDefinition::type_document: - $t = getMLText("attrdef_type_document"); - break; - case SeedDMS_Core_AttributeDefinition::type_user: - $t = getMLText("attrdef_type_user"); - break; - case SeedDMS_Core_AttributeDefinition::type_group: - $t = getMLText("attrdef_type_group"); - break; - } + $ot = getAttributeObjectTypeText($attrdef); + $t = getAttributeTypeText($attrdef); print ""; } echo ""; } else { From 2ab8cd52156759f895994b533a4368b572a06a87 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 26 Jan 2023 21:05:53 +0100 Subject: [PATCH 1817/2006] init $t and $ot --- inc/inc.Language.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/inc.Language.php b/inc/inc.Language.php index 9dbcc1819..47e32c6e9 100644 --- a/inc/inc.Language.php +++ b/inc/inc.Language.php @@ -263,6 +263,7 @@ function getOverallStatusText($status) { /* {{{ */ } /* }}} */ function getAttributeTypeText($attrdef) { /* {{{ */ + $t = ''; switch($attrdef->getType()) { case SeedDMS_Core_AttributeDefinition::type_int: $t = getMLText("attrdef_type_int"); @@ -305,6 +306,7 @@ function getAttributeTypeText($attrdef) { /* {{{ */ } /* }}} */ function getAttributeObjectTypeText($attrdef) { /* {{{ */ + $ot = ''; switch($attrdef->getObjType()) { case SeedDMS_Core_AttributeDefinition::objtype_all: $ot = getMLText("all"); From 81ff5aef939697917b739b02d5ac372431bde87f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 2 Feb 2023 19:15:54 +0100 Subject: [PATCH 1818/2006] fix indenting of line --- views/bootstrap/class.Settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 192233972..d7e3cec6a 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -39,7 +39,7 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style { } /* }}} */ protected function showEndPaneContent($name, $currenttab) { /* {{{ */ - echo ''; + echo ''; $this->contentContainerEnd(); parent::showEndPaneContent($name, $currenttab); } /* }}} */ From ef9e685f5524d323fb2444515aa2a3da59f02df1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 4 Feb 2023 15:14:38 +0100 Subject: [PATCH 1819/2006] set libfolder to null if not accessible, but do no issue a error --- out/out.AddDocument.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/out/out.AddDocument.php b/out/out.AddDocument.php index 84df7af84..9e7d3e331 100644 --- a/out/out.AddDocument.php +++ b/out/out.AddDocument.php @@ -59,13 +59,8 @@ if($settings->_quota > 0) { if($settings->_libraryFolder) { $libfolder = $dms->getFolder($settings->_libraryFolder); - if (!is_object($libfolder)) { - UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_folder_id"))),getMLText("invalid_folder_id")); - } - - if ($libfolder->getAccessMode($user) < M_READ) { + if (!is_object($libfolder) || $libfolder->getAccessMode($user) < M_READ) { $libfolder = null; -// UI::exitError(getMLText("folder_title", array("foldername" => htmlspecialchars($libfolder->getName()))), getMLText("access_denied")); } } else { $libfolder = null; From 477c79d5a45a5d7b72aaed181ab00c1a8a66da7c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 7 Feb 2023 12:37:16 +0100 Subject: [PATCH 1820/2006] add warning that preview images are recreated --- CHANGELOG | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 98db08582..aa61edd6e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,12 +6,13 @@ - 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 +- previews for png, txt, pdf in different directories. This will + enforce a recreation of all cached preview images, pdf and text files! - various improvements of fulltext service - show number of documents per category in category manager - show number of keywords per category in keyword manager - improve drag&drop with clipboard -- old pear packages for SeedDMS/Core, SeedDMS/Lucene, SeedDMS/Preview +- old pear packages SeedDMS/Core, SeedDMS/Lucene, SeedDMS/Preview are now based on composer and has moved into vendor dir -------------------------------------------------------------------------------- From ff4ebb0c38951f75ad2a031335f81b45ee5d050c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 7 Feb 2023 12:40:24 +0100 Subject: [PATCH 1821/2006] various minor translation updates --- 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 | 9 ++++++--- languages/es_ES/lang.inc | 3 +++ languages/fr_FR/lang.inc | 3 +++ languages/hr_HR/lang.inc | 7 +++++-- languages/hu_HU/lang.inc | 3 +++ 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 | 7 +++++-- 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, 90 insertions(+), 9 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index cd2d4efa8..53291a814 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -1400,6 +1400,8 @@ URL: [url]', 'settings_available_languages_desc' => 'اللغات الموجودة', 'settings_backupDir' => 'backupDir', 'settings_backupDir_desc' => 'backupDir', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'cacheDir', 'settings_cacheDir_desc' => 'cacheDir', 'settings_Calendar' => 'اعدادات التقويم', @@ -1852,6 +1854,7 @@ URL: [url]', 'splash_invalid_searchterm' => 'بحث غير صالح', 'splash_invalid_search_service' => '', 'splash_link_document' => 'رابط المستند', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'انتقلت الحافظة', 'splash_move_document' => 'نقل المستند', 'splash_move_folder' => 'نقل الملف', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index 638bee68a..b72bf52db 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -1263,6 +1263,8 @@ $text = array( 'settings_available_languages_desc' => '', 'settings_backupDir' => '', 'settings_backupDir_desc' => '', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Кеш папка', 'settings_cacheDir_desc' => 'къде се съхраняват превю картинките (най-добре да се избере папка която не е достъпна през web-server-а)', 'settings_Calendar' => 'Настройки календар', @@ -1715,6 +1717,7 @@ $text = array( 'splash_invalid_searchterm' => '', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => '', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index 6dc899353..376c8c35b 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -1268,6 +1268,8 @@ URL: [url]', 'settings_available_languages_desc' => '', 'settings_backupDir' => '', 'settings_backupDir_desc' => '', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => '', 'settings_cacheDir_desc' => '', 'settings_Calendar' => '', @@ -1720,6 +1722,7 @@ URL: [url]', 'splash_invalid_searchterm' => '', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => '', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index 5e1c17a38..ddbfe9d0a 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -1472,6 +1472,8 @@ Jméno: [username] 'settings_available_languages_desc' => 'Zvolí se pouze vybrané jazyky, které se zobrazí v seznamu jazyků. Výchozí jazyk bude vždy načten.', 'settings_backupDir' => 'Záložní adresář', 'settings_backupDir_desc' => 'Adresář, kde zálohovací nástroj ukládá zálohy. Pokud tento adresář není nastaven nebo není k němu přístup, zálohy budou uloženy v adresáři obsahu.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Adresář mezipaměti', 'settings_cacheDir_desc' => 'Kde jsou uloženy náhledy obrázků (nejlepší zvolit adresář, který není přístupný přes webový server)', 'settings_Calendar' => 'Nastavení kalendáře', @@ -1924,6 +1926,7 @@ Jméno: [username] 'splash_invalid_searchterm' => 'Neplatný vyhledávací dotaz', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Schránka přenesena do aktuální složky', 'splash_move_document' => 'Dokument přesunut', 'splash_move_folder' => 'Složka přesunuta', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index 5a6724d31..b05acb3b3 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 (3154), dgrutsch (22) +// Translators: Admin (3158), dgrutsch (22) $text = array( '2_factor_auth' => '2-Faktor Authentifizierung', @@ -1804,6 +1804,8 @@ Sollten Sie kein Passwort bekommen haben, dann nutzen Sie bitte die Passwort-Ver 'settings_available_languages_desc' => 'Nur die hier ausgewählten Sprachen werden geladen und erscheinen bei der Sprachauswahl. Die voreingestellte Sprache wird immer geladen.', 'settings_backupDir' => 'Sicherungs-Verzeichnis', 'settings_backupDir_desc' => 'Verzeichnis in dem das Backup-Tool die Sicherungen ablegt. Wenn hier kein Wert gesetzt wird oder auf das Verzeichnis nicht zugriffen werden kann, dann werden die Sicherungen im Content-Verzeichnis abgelegt.', +'settings_baseUrl' => 'Basis URL', +'settings_baseUrl_desc' => 'Dies ist die URL des Servers ohne das HTTP Wurzelverzeichnis. In der Regel kann SeedDMS dies selbst bestimmen. Hinter einem Proxy gelingt dies aber nicht zuverlässig. Für diesen Fall können Sie die Basis URL hier setzen.', 'settings_cacheDir' => 'Cache Verzeichnis', 'settings_cacheDir_desc' => 'Verzeichnis in dem Vorschaubilder abgelegt werden. Dies sollte ein Verzeichnis sein, auf das man über den Web-Browser keinen direkten Zugriff hat.', 'settings_Calendar' => 'Kalender-Einstellungen', @@ -2256,6 +2258,7 @@ Sollten Sie kein Passwort bekommen haben, dann nutzen Sie bitte die Passwort-Ver 'splash_invalid_searchterm' => 'Ungültiger Suchbegriff', 'splash_invalid_search_service' => 'Ungültiger Suchdienst', 'splash_link_document' => 'Link hinzugefügt', +'splash_mimetype_changed' => 'Mime-Type erfolgreich gerändert', 'splash_moved_clipboard' => 'Inhalt der Zwischenablage in aktuellen Ordner verschoben', 'splash_move_document' => 'Dokument verschoben', 'splash_move_folder' => 'Ordner verschoben', @@ -2358,7 +2361,7 @@ Sollten Sie kein Passwort bekommen haben, dann nutzen Sie bitte die Passwort-Ver 'task_description' => 'Beschreibung', 'task_disabled' => 'Deaktiviert', 'task_frequency' => 'Häufigkeit', -'task_frequency_placeholder' => 'm h d m dow', +'task_frequency_placeholder' => 'm h d m dow, or @daily, @hourly', 'task_last_run' => 'Letzte Ausführung', 'task_name' => 'Name', 'task_next_run' => 'Nächste Ausführung', diff --git a/languages/el_GR/lang.inc b/languages/el_GR/lang.inc index 6def8ae2b..6f4ba01f6 100644 --- a/languages/el_GR/lang.inc +++ b/languages/el_GR/lang.inc @@ -1274,6 +1274,8 @@ URL: [url]', 'settings_available_languages_desc' => '', 'settings_backupDir' => '', 'settings_backupDir_desc' => '', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => '', 'settings_cacheDir_desc' => '', 'settings_Calendar' => '', @@ -1726,6 +1728,7 @@ URL: [url]', 'splash_invalid_searchterm' => '', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => '', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index e9e6a6162..d71f837fd 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 (2248), archonwang (3), dgrutsch (9), netixw (14) +// Translators: Admin (2253), archonwang (3), dgrutsch (9), netixw (14) $text = array( '2_factor_auth' => '2-factor authentication', @@ -251,7 +251,7 @@ URL: [url]

    ', 'attribute_value_not_in_valueset' => 'Value not in value set', 'attr_malformed_boolean' => 'The attribute value \'[value]\' of attribute \'[attrname]\' is not a valid boolean.', 'attr_malformed_date' => 'The attribute value \'[value]\' of attribute \'[attrname]\' is not a valid date.', -'attr_malformed_email' => 'The attribute value \'[value]\' of attribute \'[attrname]\' is not a valid URL.', +'attr_malformed_email' => 'The attribute value \'[value]\' of attribute \'[attrname]\' is not a valid email.', 'attr_malformed_float' => 'The attribute value \'[value]\' of attribute \'[attrname]\' is not a valid float.', 'attr_malformed_int' => 'The attribute value \'[value]\' of attribute \'[attrname]\' is not a valid integer.', 'attr_malformed_url' => 'The attribute value \'[value]\' of attribute \'[attrname]\' is not a valid URL.', @@ -1807,6 +1807,8 @@ If you did not receive a password, please use the password forgotten function on 'settings_available_languages_desc' => 'Only the selected languages will be loaded and show up in the language selector. The default language will always be loaded.', 'settings_backupDir' => 'Backup directory', 'settings_backupDir_desc' => 'Directory where the backup tool saves backups. If this directory is not set or cannot be accessed, then the backups will be saved in the content directory.', +'settings_baseUrl' => 'Base URL', +'settings_baseUrl_desc' => 'This is the URL without the HTTP root dir. Usually, this is determined by SeedDMS. Behind a proxy this can fail and in this case set it manually.', 'settings_cacheDir' => 'Cache directory', 'settings_cacheDir_desc' => 'Where the preview images are stored (best to choose a directory that is not accessible through your web-server)', 'settings_Calendar' => 'Calendar settings', @@ -2259,6 +2261,7 @@ If you did not receive a password, please use the password forgotten function on 'splash_invalid_searchterm' => 'Invalid search term', 'splash_invalid_search_service' => 'Invalid search service', 'splash_link_document' => 'Link added', +'splash_mimetype_changed' => 'Mimetype changed successfully', 'splash_moved_clipboard' => 'Clipboard moved into current folder', 'splash_move_document' => 'Document moved', 'splash_move_folder' => 'Folder moved', @@ -2361,7 +2364,7 @@ If you did not receive a password, please use the password forgotten function on 'task_description' => 'Description', 'task_disabled' => 'Disabled', 'task_frequency' => 'Frequency', -'task_frequency_placeholder' => 'm h d m dow', +'task_frequency_placeholder' => 'm h d m dow, or @daily, @hourly', 'task_last_run' => 'Last run', 'task_name' => 'Name', 'task_next_run' => 'Next run', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index a982be52c..f4ef83a82 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -1427,6 +1427,8 @@ URL: [url]', 'settings_available_languages_desc' => 'Unicamente los lenguages seleccionados seran cargados y mostrados en el selector de lenguages. El lenguage por defecto siempre sera cargado', 'settings_backupDir' => 'Directorio de copia de seguridad', 'settings_backupDir_desc' => 'Directorio donde la herramienta de respaldos guarda los respaldos. Si este directorio no se crea o no puede ser accedido, entonces los respaldos serán guardados en el directorio de contenido.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Carpeta caché', 'settings_cacheDir_desc' => 'Donde están archivadas las imágenes anteriores (mejor elegir una carpeta que no sea accesible a través de su servidor web)', 'settings_Calendar' => 'Configuración de calendario', @@ -1879,6 +1881,7 @@ URL: [url]', 'splash_invalid_searchterm' => 'Término de búsqueda inválido', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Portapapeles movido a la carpeta actual', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index cac907550..0d92ba8fa 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -1790,6 +1790,8 @@ Nom : [username] 'settings_available_languages_desc' => 'Seules les langues sélectionnées seront chargées et proposées dans le sélecteur de langue. La langue par défaut est systématiquement chargée.', 'settings_backupDir' => 'Répertoire de sauvegarde', 'settings_backupDir_desc' => 'Répertoire dans lequel l’outil de sauvegarde stocke les sauvegardes. Si aucune valeur n’est définie ou si le répertoire n’est pas accessible, les sauvegardes seront stockées dans le répertoire de contenu.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Répertoire Cache', 'settings_cacheDir_desc' => 'Lieu de stockage des images de prévisualisation (choisir de préférence un dossier non accessible à travers le web-server)', 'settings_Calendar' => 'Paramètres de l\'agenda', @@ -2242,6 +2244,7 @@ Nom : [username] 'splash_invalid_searchterm' => 'Recherche invalide', 'splash_invalid_search_service' => '', 'splash_link_document' => 'Lien ajouté', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Contenu du presse-papier déplacé vers le dossier en cours', 'splash_move_document' => 'Document déplacé', 'splash_move_folder' => 'Dossier déplacé', diff --git a/languages/hr_HR/lang.inc b/languages/hr_HR/lang.inc index c9fafeb28..8b4537ec4 100644 --- a/languages/hr_HR/lang.inc +++ b/languages/hr_HR/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 (1250), marbanas (16) +// Translators: Admin (1251), marbanas (16) $text = array( '2_factor_auth' => '2-faktorska autentikacija', @@ -212,7 +212,7 @@ Internet poveznica: [url]', 'attribute_value_not_in_valueset' => '', 'attr_malformed_boolean' => '', 'attr_malformed_date' => '', -'attr_malformed_email' => 'Vrijednost atributa \'[value]\' za atribut \'[attrname]\' nije važeći URL.', +'attr_malformed_email' => 'Vrijednost atributa \'[value]\' za atribut \'[attrname]\' nije važeći email.', 'attr_malformed_float' => '', 'attr_malformed_int' => '', 'attr_malformed_url' => 'Vrijednost atributa \'[value]\' za atribut \'[attrname]\' nije važeći URL.', @@ -1436,6 +1436,8 @@ Internet poveznica: [url]', 'settings_available_languages_desc' => '', 'settings_backupDir' => 'Mapa za sigurnosnu kopiju', 'settings_backupDir_desc' => 'Mapa gdje alat za sigurnosne kopije sprema podatke. Ako ova mapa nije postavljena ili joj se ne može pristupiti, tada se sigurnosne kopije spremaju u mapu sadržaja.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Mapa predmemorije', 'settings_cacheDir_desc' => 'Gdje se spremaju slike pregleda (najbolje da odaberete mapu koja nije dostupna kroz vaš web-server)', 'settings_Calendar' => 'Postavke kalendara', @@ -1888,6 +1890,7 @@ Internet poveznica: [url]', 'splash_invalid_searchterm' => 'Nevažeći traženi pojam', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Međuspremnik je premješten u trenutnu mapu', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index d4f23f05b..33020bc6a 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -1414,6 +1414,8 @@ URL: [url]', 'settings_available_languages_desc' => '', 'settings_backupDir' => 'Mentés könyvtára', 'settings_backupDir_desc' => 'Könyvtár, ahol a biztonsági mentési eszköz mentéseket készít. Ha ez a könyvtár nincs beállítva vagy nem érhető el, akkor a biztonsági másolatot a tartalom könyvtárba menti.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Átmeneti állományok könyvtára', 'settings_cacheDir_desc' => 'Ahol az előnézeti képek tárolódnak (legjobb olyan könyvtárat választani, amit a web-kiszolgálón keresztül nem lehet elérni)', 'settings_Calendar' => 'Naptár beállítások', @@ -1866,6 +1868,7 @@ URL: [url]', 'splash_invalid_searchterm' => 'Érvénytelen keresési feltétel', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Vágólap tartalom áthelyezve az aktuális mappába', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/id_ID/lang.inc b/languages/id_ID/lang.inc index 0b1f69d52..e350f55ee 100644 --- a/languages/id_ID/lang.inc +++ b/languages/id_ID/lang.inc @@ -1488,6 +1488,8 @@ Jika Anda tidak menerima kata sandi, silakan gunakan fitur lupa kata sandi di ha 'settings_available_languages_desc' => 'Hanya bahasa yang dipilih yang akan dimuat dan muncul di pemilih bahasa. Bahasa default akan selalu dimuat.', 'settings_backupDir' => 'Direktori cadangan', 'settings_backupDir_desc' => 'Direktori tempat alat pencadangan menyimpan cadangan. Jika direktori ini tidak disetel atau tidak dapat diakses, maka cadangan akan disimpan di direktori konten.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Direktori cache', 'settings_cacheDir_desc' => 'Di mana gambar pratinjau disimpan (paling baik memilih direktori yang tidak dapat diakses melalui server web Anda)', 'settings_Calendar' => 'Pengaturan kalender', @@ -1940,6 +1942,7 @@ Jika Anda tidak menerima kata sandi, silakan gunakan fitur lupa kata sandi di ha 'splash_invalid_searchterm' => '', 'splash_invalid_search_service' => '', 'splash_link_document' => 'Tautan ditambahkan', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => '', 'splash_move_document' => 'Dokumen dipindahkan', 'splash_move_folder' => 'Folder dipindahkan', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index b329f50c7..4ca0d5e17 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -1463,6 +1463,8 @@ Name: [username] 'settings_available_languages_desc' => 'Solo le lingue selezionate verranno caricate e mostrate nel selettore. La lingua predefinita sarà sempre caricata.', 'settings_backupDir' => 'Directory di backup', 'settings_backupDir_desc' => 'Directory in cui lo strumento di backup salva i backup. Se questa directory non è impostato o non è possibile accedervi, quindi i backup vengono salvati nella directory dei contenuti.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Cartella di cache', 'settings_cacheDir_desc' => 'Cartella in cui vengono conservate le immagini di anteprima, si consiglia di scegliere una cartella sul web-server che non sia direttamente accessibile.', 'settings_Calendar' => 'Impostazioni calendario', @@ -1915,6 +1917,7 @@ Name: [username] 'splash_invalid_searchterm' => 'Termine di ricerca non valido', 'splash_invalid_search_service' => '', 'splash_link_document' => 'Collegamento aggiunto', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Appunti trasferiti nella cartella corrente', 'splash_move_document' => 'Documento spostato', 'splash_move_folder' => 'Cartella spostato', diff --git a/languages/ko_KR/lang.inc b/languages/ko_KR/lang.inc index 125527d64..854106a58 100644 --- a/languages/ko_KR/lang.inc +++ b/languages/ko_KR/lang.inc @@ -1430,6 +1430,8 @@ URL : [url]', 'settings_available_languages_desc' => '', 'settings_backupDir' => '백업 디랙토리', 'settings_backupDir_desc' => '백업 도구가 백업을 저장할 디렉토리. 이 디렉토리가 설정되어 있지 않거나 액세스 할 수 없는 경우 백업은 컨텐츠 디렉토리에 저장 됩니다.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => '캐시 디렉토리', 'settings_cacheDir_desc' => '미리보기 이미지 에 저장된다.(웹 서버를 통해 액세스 할 수없는 디렉토리를 선택하는 것이 좋습니다)', 'settings_Calendar' => '캘린더 설정', @@ -1882,6 +1884,7 @@ URL : [url]', 'splash_invalid_searchterm' => '잘못된 검색 범위', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => '클립 보드가 현재 폴더로 이동', 'splash_move_document' => '문서 옮겨짐', 'splash_move_folder' => '폴더 옮겨짐', diff --git a/languages/lo_LA/lang.inc b/languages/lo_LA/lang.inc index d8edb5a13..d91d7c9ee 100644 --- a/languages/lo_LA/lang.inc +++ b/languages/lo_LA/lang.inc @@ -1456,6 +1456,8 @@ URL: [url]', 'settings_available_languages_desc' => 'ລະບົບຈະໂຫລດສະເພາະພາສາທີ່ເລືອກແລະສະແດງໃນຕົວເລືອກ ພາສາເລີ້ມຕົ້ນຈະຖືກໂຫລດສະເໝີ', 'settings_backupDir' => 'ໄດເລັກທໍລີສຳຮອງ', 'settings_backupDir_desc' => 'ໄດເລິກທໍລີ້ເຄື່ອງມືສຳຮອງຈະບັນທຶກຂໍ້ມູນສຳຮອງ ຖ້າບບໍ່ມີການຕັ້ງຄ່າໄດ້ເລັກທໍລີ້ນີ້ຫຼືບໍ່ສາມາດເຂົ້າເຖິງໄດ້ການສຳຮອງຂໍ້ມູນຈະໄດ້ຮັບການບັນທຶກເນື້ອຫາໄວ້ໃນໄດເລັກທໍລີ້', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'ແຄຣໄດ້ເລັກທໍລີ້', 'settings_cacheDir_desc' => 'ບ່ອນເກັບຮູບພາບຕົວຢ່າງໄວ້ ເລືອກໄດເລັກທໍລີທີບໍ່ສາມາດເຂົ້າເຖິງໄດ້ຈາກເວັບເຊີເວີຂອງເຈົ້າ', 'settings_Calendar' => 'ການຕັ້ງຄ່າປະຕິທິນ', @@ -1908,6 +1910,7 @@ URL: [url]', 'splash_invalid_searchterm' => 'ຄຳຄົນຫາບໍ່ຖືກຕ້ອງ', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'ຍ້າຍຄິບບອດໄປທີ່ໂຟລເດີປັດຈຸບັນແລ້ວ', 'splash_move_document' => 'ຍ້າຍເອກະສານແລ້ວ', 'splash_move_folder' => 'ຍ້າຍໂຟລເດີແລ້ວ', diff --git a/languages/nb_NO/lang.inc b/languages/nb_NO/lang.inc index 621c36a29..b233e49fa 100644 --- a/languages/nb_NO/lang.inc +++ b/languages/nb_NO/lang.inc @@ -1469,6 +1469,8 @@ Bruker: [username] 'settings_available_languages_desc' => 'Bare de valgte språkene lastes inn og vises i språkvelgeren. Standardspråket lastes alltid.', 'settings_backupDir' => 'Sikkerhetskopi mappe', 'settings_backupDir_desc' => 'Mappe der sikkerhetskopieringsverktøyet lagrer sikkerhetskopier. Hvis denne mappen ikke er angitt eller ikke kan nås, vil sikkerhetskopiene lagres i innholdskatalogen.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Cache-mappe', 'settings_cacheDir_desc' => 'Hvor forhåndsvisningsbildene er lagret (best å velge en mappe som ikke er tilgjengelig via webserveren)', 'settings_Calendar' => 'Kalender innstillinger', @@ -1921,6 +1923,7 @@ Bruker: [username] 'splash_invalid_searchterm' => 'Ugyldig søkeord', 'splash_invalid_search_service' => '', 'splash_link_document' => 'Link lagt til', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Utklippstavlen flyttet inn i gjeldende mappe', 'splash_move_document' => 'Dokumentet flyttet', 'splash_move_folder' => 'Mappen flyttet', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index c5420ad25..0e6907585 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -1468,6 +1468,8 @@ Name: [username] 'settings_available_languages_desc' => 'Alleen de geselecteerde vertalingen worden beschikbaar in het taal-selectie-menu. De default-taal (EN) wordt altijd geladen.', 'settings_backupDir' => 'Instellingen backupmap', 'settings_backupDir_desc' => 'Instellingen vd backupmap', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'cache directory', 'settings_cacheDir_desc' => 'De map waar de voorbeeldafbeeldingen zijn opgeslagen (het is het beste om te kiezen voor een map die niet toegankelijk voor uw webserver)', 'settings_Calendar' => 'Instellingen van de agenda', @@ -1920,6 +1922,7 @@ Name: [username] 'splash_invalid_searchterm' => 'Ongeldige zoekterm', 'splash_invalid_search_service' => '', 'splash_link_document' => 'Link toegevoegd', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Klembord verplaatst naar de huidige map', 'splash_move_document' => 'Document verplaatst', 'splash_move_folder' => 'Map verplaatst', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 53770f872..2b63f19be 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/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 (1693), netixw (84), romi (93), uGn (112) +// Translators: Admin (1694), netixw (84), romi (93), uGn (112) $text = array( '2_factor_auth' => 'Uwierzytelnianie dwuetapowe', @@ -507,7 +507,7 @@ URL: [url]', 'dropfolder_metadata' => '', 'dropupload' => 'Szybki upload', 'drop_files_here' => 'Przeciągnij tu pliki!', -'drop_files_here_or_click' => '', +'drop_files_here_or_click' => 'Upuść plik lub kliknij aby dodać', 'dump_creation' => 'Utworzenie zrzutu bazy danych', 'dump_creation_warning' => 'Ta operacja utworzy plik będący zrzutem zawartości bazy danych. Po utworzeniu plik zrzutu będzie się znajdował w folderze danych na serwerze.', 'dump_list' => 'Istniejące pliki zrzutu', @@ -1399,6 +1399,8 @@ Name: [username] 'settings_available_languages_desc' => 'Tylko wybrane języki zostaną załadowane i będą widoczne w kontrolce wyboru języka. Domyślny język zawsze jest ładowany.', 'settings_backupDir' => 'Lokalizacja kopii zapasowej', 'settings_backupDir_desc' => 'Katalog, w którym narzędzie do tworzenia kopii zapasowych zapisuje kopie zapasowe. Jeśli ten katalog nie jest ustawiony lub nie można uzyskać do niego dostępu, kopie zapasowe zostaną zapisane w katalogu zawartości.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Folder bufora', 'settings_cacheDir_desc' => 'Miejsce przechowywania obrazków podglądu (najlepiej wybrać katalog niedostępny bezpośrednio dla web-serwera).', 'settings_Calendar' => 'Ustawienia kalendarza', @@ -1851,6 +1853,7 @@ Name: [username] 'splash_invalid_searchterm' => 'Nieprawidłowa wartość wyszukiwania', 'splash_invalid_search_service' => '', 'splash_link_document' => 'Dodano link', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Schowek został przeniesiony do bieżącego folderu', 'splash_move_document' => 'Dokument został przeniesiony', 'splash_move_folder' => 'Folder został przeniesiony', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 4d6f0ff28..387fe8297 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -1475,6 +1475,8 @@ Nome: [username] 'settings_available_languages_desc' => 'Apenas os idiomas selecionados serão carregados e mostrados no seletor de idioma. O idioma padrão sempre será carregado.', 'settings_backupDir' => 'Diretório de backup', 'settings_backupDir_desc' => 'Diretório onde a ferramenta de backup salva backups. Se esse diretório não estiver definido ou não puder ser acessado, os backups serão salvos no diretório de conteúdo.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Diretório de cache', 'settings_cacheDir_desc' => 'Onde as imagens de visualização são armazenadas (melhor escolher um diretório que não é acessível através de seu web-server)', 'settings_Calendar' => 'Configurações do calendário', @@ -1927,6 +1929,7 @@ Nome: [username] 'splash_invalid_searchterm' => 'Termo de pesquisa inválido', 'splash_invalid_search_service' => '', 'splash_link_document' => 'documento de link inicial', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Área de transferência movida para a pasta corrente', 'splash_move_document' => 'Documento movido', 'splash_move_folder' => 'Pasta movida', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index 95c207800..4801f802d 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -1437,6 +1437,8 @@ URL: [url]', 'settings_available_languages_desc' => 'Numai limbile selectate vor fii incarcate la accesare. Limba default va fii mereu incarcata', 'settings_backupDir' => '', 'settings_backupDir_desc' => '', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Director Cache', 'settings_cacheDir_desc' => 'Unde sunt stocate imaginile de previzualizare (este recomandat sa alegeti un director care nu este accesibil prin intermediul web-server-ului dumneavoastră)', 'settings_Calendar' => 'Setări calendar', @@ -1889,6 +1891,7 @@ URL: [url]', 'splash_invalid_searchterm' => 'Termen de căutare invalid', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Clipboard mutat în folderul curent', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index 6f2929ddc..2db444d2c 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -1444,6 +1444,8 @@ URL: [url]', 'settings_available_languages_desc' => 'Только выбранные языки будут загружены и доступны для выбора. Язык по умолчанию будет загружен всегда.', 'settings_backupDir' => 'Каталог резервного копирования', 'settings_backupDir_desc' => 'Каталог, в котором средство резервного копирования сохраняет резервные копии. Если этот каталог не установлен или в него отсутствует доступ, то резервные копии будут сохранены в каталоге содержимого.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Каталог кэша', 'settings_cacheDir_desc' => 'Где хранятся эскизы изображений (лучше выбрать каталог недоступный веб-серверу).', 'settings_Calendar' => 'Настройки календаря', @@ -1896,6 +1898,7 @@ URL: [url]', 'splash_invalid_searchterm' => 'Неверный поисковый запрос', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Буфер обмена перенесён в текущий каталог', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index a5915ef6f..4d3ec5b54 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -1477,6 +1477,8 @@ Meno: [username] 'settings_available_languages_desc' => 'Only the selected languages will be loaded and show up in the language selector. The default language will always be loaded.', 'settings_backupDir' => 'Zložka na zálohovanie', 'settings_backupDir_desc' => 'Directory where the backup tool saves backups. If this directory is not set or cannot be accessed, then the backups will be saved in the content directory.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Zložka medzipamäte', 'settings_cacheDir_desc' => 'Where the preview images are stored (best to choose a directory that is not accessible through your web-server)', 'settings_Calendar' => 'Nastavenie kalendára', @@ -1929,6 +1931,7 @@ Meno: [username] 'splash_invalid_searchterm' => 'Invalid search term', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Schránka sa presunula do aktuálnej zložky', 'splash_move_document' => 'Dokument bol presunutý', 'splash_move_folder' => 'Zložka bola presunutá', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index aa1f8b68a..050785cd5 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -1450,6 +1450,8 @@ Kommentar: [comment]', 'settings_available_languages_desc' => 'Bara de valda språken kommer att laddas och visas i språk väljaren. Det förvalda språket kommer alltid att laddas.', 'settings_backupDir' => 'Sökväg till backuper', 'settings_backupDir_desc' => 'Sökväg till katalogen dit backupverktyget skriver backuper. Om sökväg saknas eller åtkomst inte medges, skrivs backuper till dokumentkatalogen.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Cache-mapp', 'settings_cacheDir_desc' => 'Här kommer bilder för förhandsvisning att sparas. (Det är bäst att använda en mapp som inte är tillgänglig från webbservern)', 'settings_Calendar' => 'Kalenderinställningar', @@ -1902,6 +1904,7 @@ Kommentar: [comment]', 'splash_invalid_searchterm' => 'Ogiltigt sökord', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Urklipp flyttades till aktuell katalog', 'splash_move_document' => 'Dokumentet flyttat', 'splash_move_folder' => 'Katalogen flyttad', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 9bf9d1bb5..9217c1c7d 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -1416,6 +1416,8 @@ URL: [url]', 'settings_available_languages_desc' => 'Sil seçim kutucuğunda yalnızca seçili diller yüklenecek ve görüntülenecektir.', 'settings_backupDir' => '', 'settings_backupDir_desc' => '', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Cache klasörü', 'settings_cacheDir_desc' => 'Önizleme resimlerinin depolanacağı yer (web üzerinden erişilemeyen bir yer tercih etmeniz önerilir.)', 'settings_Calendar' => 'Takvim ayarları', @@ -1868,6 +1870,7 @@ URL: [url]', 'splash_invalid_searchterm' => 'Hatalı arama terimi', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Pano mevcut klasöre taşındı', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/uk_UA/lang.inc b/languages/uk_UA/lang.inc index 92ae8c0ca..1e80aaf1a 100644 --- a/languages/uk_UA/lang.inc +++ b/languages/uk_UA/lang.inc @@ -1437,6 +1437,8 @@ URL: [url]', 'settings_available_languages_desc' => '', 'settings_backupDir' => 'Каталог резервних копій', 'settings_backupDir_desc' => 'Каталог, в якому інструмент резервного копіювання зберігає резервні копії. Якщо цей каталог не встановлений або до нього не має доступу, то резервні копії будуть збережені в каталозі вмісту.', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Каталог кешу', 'settings_cacheDir_desc' => 'Де зберігаються ескізи зображень (краще вибрати каталог, недоступний веб-серверові).', 'settings_Calendar' => 'Налаштування календаря', @@ -1889,6 +1891,7 @@ URL: [url]', 'splash_invalid_searchterm' => 'Невірний пошуковий запит', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => 'Буфер обміну перенесено в поточний каталог', 'splash_move_document' => '', 'splash_move_folder' => '', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index 7913315c8..7f8c948f2 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -1424,6 +1424,8 @@ URL: [url]', 'settings_available_languages_desc' => '只有选中的语言会被显示在语言选>择框内。默认的语言始终可选。', 'settings_backupDir' => '备份目录', 'settings_backupDir_desc' => '备份保存的目录。如果该目录未设置或无法访问则备份将保存在内容目录中。', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => 'Cashe 缓存目录', 'settings_cacheDir_desc' => '预览图像存储的位置(最好选择一个无法通过网络服务器访问的目录)', 'settings_Calendar' => '日历设置', @@ -1876,6 +1878,7 @@ URL: [url]', 'splash_invalid_searchterm' => '无效的搜索项', 'splash_invalid_search_service' => '', 'splash_link_document' => '', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => '剪贴板移到当前文件夹', 'splash_move_document' => '文档已迁移', 'splash_move_folder' => '文件夹已迁移', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 51d638b7d..c37878e9d 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -1475,6 +1475,8 @@ URL: [url]', 'settings_available_languages_desc' => '僅所選語言會被加載並顯示在語言選擇器中。默認語言將始終被加載。', 'settings_backupDir' => '備份目錄', 'settings_backupDir_desc' => '備份工具保存備份的目錄。如果未設置此目錄或無法訪問該目錄,則備份將保存在內容目錄中。', +'settings_baseUrl' => '', +'settings_baseUrl_desc' => '', 'settings_cacheDir' => '緩存目錄', 'settings_cacheDir_desc' => '預覽圖像的存儲位置(最好選擇無法通過Web服務器訪問的目錄)', 'settings_Calendar' => '日曆設定', @@ -1927,6 +1929,7 @@ URL: [url]', 'splash_invalid_searchterm' => '搜尋字詞無效', 'splash_invalid_search_service' => '', 'splash_link_document' => '鏈接已添加', +'splash_mimetype_changed' => '', 'splash_moved_clipboard' => '剪貼簿已移至當前文件夾', 'splash_move_document' => '文件已移走', 'splash_move_folder' => '文件夾已移動', From 27b19f5c3ae33221048ddc6f7e21bb89f96714d5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 9 Feb 2023 06:50:15 +0100 Subject: [PATCH 1822/2006] start version 5.1.30 --- CHANGELOG | 4 ++++ inc/inc.Version.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index aa61edd6e..7627a500a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +-------------------------------------------------------------------------------- + Changes in version 5.1.30 +-------------------------------------------------------------------------------- + -------------------------------------------------------------------------------- Changes in version 5.1.29 -------------------------------------------------------------------------------- diff --git a/inc/inc.Version.php b/inc/inc.Version.php index 552f28df9..2003b0c1a 100644 --- a/inc/inc.Version.php +++ b/inc/inc.Version.php @@ -20,7 +20,7 @@ class SeedDMS_Version { /* {{{ */ - const _number = "5.1.29"; + const _number = "5.1.30"; const _string = "SeedDMS"; function __construct() { From 6fd8d3e7f5f6676a4d32a0803d8612a0775975c2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 9 Feb 2023 07:16:50 +0100 Subject: [PATCH 1823/2006] log error when execution of command fails --- inc/inc.ClassConversionServiceExec.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassConversionServiceExec.php b/inc/inc.ClassConversionServiceExec.php index 71e530732..b16ec08c3 100644 --- a/inc/inc.ClassConversionServiceExec.php +++ b/inc/inc.ClassConversionServiceExec.php @@ -49,6 +49,7 @@ class SeedDMS_ConversionServiceExec extends SeedDMS_ConversionServiceBase { ); $pipes = array(); + $orgtimeout = $timeout; $timeout += time(); // Putting an 'exec' before the command will not fork the command // and therefore not create any child process. proc_terminate will @@ -84,7 +85,7 @@ class SeedDMS_ConversionServiceExec extends SeedDMS_ConversionServiceBase { fclose($pipes[2]); if ($timeleft <= 0) { proc_terminate($process); - throw new Exception("command timeout on: " . $cmd); + throw new Exception("command timeout after ".$orgtimeout." secs on: " . $cmd); } else { $return_value = proc_close($process); return array('stdout'=>$output, 'stderr'=>$error, 'return'=>$return_value); @@ -169,6 +170,9 @@ class SeedDMS_ConversionServiceExec extends SeedDMS_ConversionServiceBase { if($hastempfile) unlink($tmpfile); $this->success = false; + if($this->logger) { + $this->logger->log('Conversion from '.$this->from.' to '.$this->to.' with cmd "'.$this->cmd.'" failed: '.$e->getMessage(), PEAR_LOG_ERR); + } return false; } $end = microtime(true); From 6c6b754e526d8c81c7fbbf136bce0de6d2674873 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 10 Feb 2023 10:17:16 +0100 Subject: [PATCH 1824/2006] remove duplicate class 'alert-warning' in drag&drop box for attachments --- views/bootstrap/class.ViewDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index a229be4a9..fd3c33fc6 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -1548,7 +1548,7 @@ $(document).ready( function() { if ($document->getAccessMode($user) >= M_READWRITE){ if($enableDropUpload){ ?> -
    html_link('AddFile', array('documentid'=>$documentid), array('class'=>'alert alert-warning'), getMLText('drop_files_here_or_click'), false, true); ?>
    +
    html_link('AddFile', array('documentid'=>$documentid), array(), getMLText('drop_files_here_or_click'), false, true); ?>
    html_link('AddFile', array('documentid'=>$documentid), array('class'=>'btn btn-primary'), getMLText("add"), false, true)."\n"; From d07219a213c01bcdb647f25b074dd6aae16c3934 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 12 Feb 2023 14:33:51 +0100 Subject: [PATCH 1825/2006] add list of conversion and notification services --- out/out.ConversionServices.php | 47 ++++++++++++++ out/out.NotificationServices.php | 2 +- views/bootstrap/class.ConversionServices.php | 68 ++++++++++++++++++++ 3 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 out/out.ConversionServices.php create mode 100644 views/bootstrap/class.ConversionServices.php diff --git a/out/out.ConversionServices.php b/out/out.ConversionServices.php new file mode 100644 index 000000000..53af0f5d5 --- /dev/null +++ b/out/out.ConversionServices.php @@ -0,0 +1,47 @@ +$dms, 'user'=>$user)); +$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); +if (!$settings->_enableDebugMode) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} +if (!$accessop->check_view_access($view, $_GET)) { + UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); +} + +if($view) { + $view->setParam('settings', $settings); + $view->setParam('accessobject', $accessop); + $view->setParam('conversionmgr', $conversionmgr); + $view($_GET); + exit; +} + diff --git a/out/out.NotificationServices.php b/out/out.NotificationServices.php index f985d37ed..0bfdd317a 100644 --- a/out/out.NotificationServices.php +++ b/out/out.NotificationServices.php @@ -29,7 +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, $user, $settings); +$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); if (!$settings->_enableDebugMode) { UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); } diff --git a/views/bootstrap/class.ConversionServices.php b/views/bootstrap/class.ConversionServices.php new file mode 100644 index 000000000..6f9635ed1 --- /dev/null +++ b/views/bootstrap/class.ConversionServices.php @@ -0,0 +1,68 @@ + + * @copyright Copyright (C) 2010-2023 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Class which outputs the html page for Conversion Services view + * + * @category DMS + * @package SeedDMS + * @author Uwe Steinmann + * @copyright Copyright (C) 2016 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_View_ConversionServices extends SeedDMS_Theme_Style { + + /** + * List all registered conversion services + * + */ + function list_conversion_services($conversionmgr) { /* {{{ */ + if(!$conversionmgr) + return; + + $allservices = $conversionmgr->getServices(); + + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo ""; + foreach($allservices as $from=>$tos) { + foreach($tos as $to=>$services) { + foreach($services as $service) { + echo ""; + } + } + } + echo ""; + echo "
    ".getMLText('service_list_from')."".getMLText('service_list_to')."".getMLText('class_name')."".getMLText('service_list_info')."
    ".$from."".$to."".get_class($service)."".$service->getInfo()."
    \n"; + } /* }}} */ + + function show() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $conversionmgr = $this->params['conversionmgr']; + + $this->htmlStartPage(getMLText("admin_tools")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + $this->contentHeading(getMLText("list_conversion_services")); + + self::list_conversion_services($conversionmgr); + + $this->contentEnd(); + $this->htmlEndPage(); + } /* }}} */ +} + From 73562364b057b3feefdab8b2fb29f12ddafdf7fd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 12 Feb 2023 14:34:31 +0100 Subject: [PATCH 1826/2006] add debug menu in admin tools --- views/bootstrap/class.Bootstrap.php | 12 ++++++++++++ views/bootstrap4/class.Bootstrap4.php | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 295715ef5..d42a25bc6 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -929,6 +929,18 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $menuitems['misc']['children']['version_info'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Info.php", 'label'=>getMLText('version_info')); } + if ($settings->_enableDebugMode) { + if($accessobject->check_view_access(array('Hooks', 'NotificationServices'))) { + $menuitems['debug'] = array('link'=>"#", 'label'=>getMLText('debug')); + if ($accessobject->check_view_access('Hooks')) + $menuitems['debug']['children']['hooks'] = array('link'=>"../out/out.Hooks.php", 'label'=>getMLText('list_hooks')); + if ($accessobject->check_view_access('NotificationServices')) + $menuitems['debug']['children']['notification_services'] = array('link'=>"../out/out.NotificationServices.php", 'label'=>getMLText('list_notification_services')); + if ($accessobject->check_view_access('ConversionServices')) + $menuitems['debug']['children']['conversion_services'] = array('link'=>"../out/out.ConversionServices.php", 'label'=>getMLText('list_conversion_services')); + } + } + /* Do not use $this->callHook() because $menuitems must be returned by the the * first hook and passed to next hook. $this->callHook() will just pass * the menuitems to each single hook. Hence, the last hook will win. diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index fc812ef38..dfe2eab70 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -917,6 +917,18 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $menuitems['misc']['children']['version_info'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Info.php", 'label'=>getMLText('version_info')); } + if ($settings->_enableDebugMode) { + if($accessobject->check_view_access(array('Hooks', 'NotificationServices'))) { + $menuitems['debug'] = array('link'=>"#", 'label'=>getMLText('debug')); + if ($accessobject->check_view_access('Hooks')) + $menuitems['debug']['children']['hooks'] = array('link'=>"../out/out.Hooks.php", 'label'=>getMLText('list_hooks')); + if ($accessobject->check_view_access('NotificationServices')) + $menuitems['debug']['children']['notification_services'] = array('link'=>"../out/out.NotificationServices.php", 'label'=>getMLText('list_notification_services')); + if ($accessobject->check_view_access('ConversionServices')) + $menuitems['debug']['children']['conversion_services'] = array('link'=>"../out/out.ConversionServices.php", 'label'=>getMLText('list_conversion_services')); + } + } + /* Do not use $this->callHook() because $menuitems must be returned by the the * first hook and passed to next hook. $this->callHook() will just pass * the menuitems to each single hook. Hence, the last hook will win. From d45f050e46c6c1483eb67b423de132e4afb84d6e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 15 Feb 2023 08:27:37 +0100 Subject: [PATCH 1827/2006] conversion from pdf to png replaces alpha channel with white --- CHANGELOG | 1 + inc/inc.ClassConversionServicePdfToImage.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 7627a500a..d396fba11 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ -------------------------------------------------------------------------------- Changes in version 5.1.30 -------------------------------------------------------------------------------- +- conversion from pdf to png replaces alpha channel with white -------------------------------------------------------------------------------- Changes in version 5.1.29 diff --git a/inc/inc.ClassConversionServicePdfToImage.php b/inc/inc.ClassConversionServicePdfToImage.php index 349565232..4a7f1ce2e 100644 --- a/inc/inc.ClassConversionServicePdfToImage.php +++ b/inc/inc.ClassConversionServicePdfToImage.php @@ -64,6 +64,10 @@ class SeedDMS_ConversionServicePdfToImage extends SeedDMS_ConversionServiceBase if($imagick->readImage($infile.'['.$page.']')) { if(!empty($params['width'])) $imagick->scaleImage(min((int) $params['width'], $imagick->getImageWidth()), 0); + /* Remove alpha channel and set to white */ + $imagick->setImageBackgroundColor('white'); + $imagick->setImageAlphaChannel(Imagick::ALPHACHANNEL_REMOVE); + $imagick->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN); $imagick->setImageFormat('png'); $end = microtime(true); if($this->logger) { From 7c973d9f3755a989e151c57a98e92d6b47254377 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 16 Feb 2023 11:35:19 +0100 Subject: [PATCH 1828/2006] fix inclusion of php files --- op/op.AddTransmittal.php | 2 +- op/op.ReceiptDocument.php | 3 +-- op/op.ReviseDocument.php | 3 +-- op/op.SetRecipients.php | 2 +- op/op.SetRevisors.php | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/op/op.AddTransmittal.php b/op/op.AddTransmittal.php index 9909fd9e4..2ffce61f7 100644 --- a/op/op.AddTransmittal.php +++ b/op/op.AddTransmittal.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.ReceiptDocument.php b/op/op.ReceiptDocument.php index 5bdfb8a5c..e90181ce5 100644 --- a/op/op.ReceiptDocument.php +++ b/op/op.ReceiptDocument.php @@ -19,13 +19,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"); include("../inc/inc.ClassController.php"); diff --git a/op/op.ReviseDocument.php b/op/op.ReviseDocument.php index 1a4254be5..6f2d0de22 100644 --- a/op/op.ReviseDocument.php +++ b/op/op.ReviseDocument.php @@ -19,13 +19,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"); include("../inc/inc.ClassController.php"); diff --git a/op/op.SetRecipients.php b/op/op.SetRecipients.php index 69d77fa45..ea8880224 100644 --- a/op/op.SetRecipients.php +++ b/op/op.SetRecipients.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.SetRevisors.php b/op/op.SetRevisors.php index 4c6b9568b..294ba0619 100644 --- a/op/op.SetRevisors.php +++ b/op/op.SetRevisors.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 bcd09778039c11e3781eb1ad3d8507821a8d5a69 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 16 Feb 2023 11:36:07 +0100 Subject: [PATCH 1829/2006] fix inclusion of php files --- op/op.AddToClipboard.php | 2 +- op/op.ChangePassword.php | 1 - op/op.Logout.php | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/op/op.AddToClipboard.php b/op/op.AddToClipboard.php index 27d33d62d..a2c2fe4b3 100644 --- a/op/op.AddToClipboard.php +++ b/op/op.AddToClipboard.php @@ -22,10 +22,10 @@ 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"); include("../inc/inc.Init.php"); include("../inc/inc.Extension.php"); +include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); diff --git a/op/op.ChangePassword.php b/op/op.ChangePassword.php index 1c92b28ca..9c386635e 100644 --- a/op/op.ChangePassword.php +++ b/op/op.ChangePassword.php @@ -27,7 +27,6 @@ include("../inc/inc.Extension.php"); include("../inc/inc.ClassSession.php"); include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); -require_once("../inc/inc.ClassAccessOperation.php"); function _printMessage($heading, $message) { diff --git a/op/op.Logout.php b/op/op.Logout.php index 06af4bcc9..70d089139 100644 --- a/op/op.Logout.php +++ b/op/op.Logout.php @@ -21,6 +21,7 @@ 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.ClassSession.php"); From 0b7d3cad2d08df739d3fe9992b9f4302841e39f2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 16 Feb 2023 17:28:37 +0100 Subject: [PATCH 1830/2006] add changes for 6.0.23 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 61c7db25e..8e4553e1f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Changes in version 6.0.22 -------------------------------------------------------------------------------- - merge changes up to 5.1.28 +- fix setting recipients and revisors -------------------------------------------------------------------------------- Changes in version 6.0.21 From 513343c89a59eac7e8ee39036c0bca1584580e1f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 16 Feb 2023 17:29:29 +0100 Subject: [PATCH 1831/2006] add changes for 6.0.23 --- CHANGELOG | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 8e4553e1f..8201046a9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,8 +1,12 @@ +-------------------------------------------------------------------------------- + Changes in version 6.0.23 +-------------------------------------------------------------------------------- +- fix setting recipients and revisors + -------------------------------------------------------------------------------- Changes in version 6.0.22 -------------------------------------------------------------------------------- - merge changes up to 5.1.28 -- fix setting recipients and revisors -------------------------------------------------------------------------------- Changes in version 6.0.21 From 3e5497a7fdedb4c82f24459bd6e99e959923d236 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Feb 2023 06:57:42 +0100 Subject: [PATCH 1832/2006] add more error checking when including extensions.php --- inc/inc.ClassExtensionMgr.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/inc/inc.ClassExtensionMgr.php b/inc/inc.ClassExtensionMgr.php index ae2e036c1..f409b6a51 100644 --- a/inc/inc.ClassExtensionMgr.php +++ b/inc/inc.ClassExtensionMgr.php @@ -122,9 +122,10 @@ class SeedDMS_Extension_Mgr { if(!file_exists($this->getExtensionsConfFile())) { $this->createExtensionConf(); } - include($this->getExtensionsConfFile()); - if(!empty($EXT_CONF)) { - $this->extconf = $EXT_CONF; + if(@include($this->getExtensionsConfFile())) { + if(!empty($EXT_CONF)) { + $this->extconf = $EXT_CONF; + } } } } /* }}} */ From bea6ab35a897ee98584dc53171fd0cce57507098 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Feb 2023 12:42:05 +0100 Subject: [PATCH 1833/2006] add changes in 5.1.30 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index d396fba11..732125b18 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Changes in version 5.1.30 -------------------------------------------------------------------------------- - conversion from pdf to png replaces alpha channel with white +- add list of conversion services in debug menu of admin tool -------------------------------------------------------------------------------- Changes in version 5.1.29 From 4e08744631471a26ea490cbc1e2025415a87ff19 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 17 Feb 2023 16:10:59 +0100 Subject: [PATCH 1834/2006] addDirSep() can check for arbitrary chars at end of string --- inc/inc.Utils.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php index 25d3a0ecb..ace755d68 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -663,16 +663,19 @@ function get_extension($mimetype) { /* {{{ */ } /* }}} */ /** - * Adds a missing front slash to a string + * Adds a missing directory separator (or any other char) to a string * * This function is used for making sure a directory name has a - * trailing directory separator + * trailing directory separator. It can also be used to add + * any other char at the end of a string, e.g. an URL which must + * end in '/' (DIRECTORY_SEPARATOR wouldn't be right in that case, + * because it is '\' on Windows) */ -function addDirSep($str) { /* {{{ */ +function addDirSep($str, $chr=DIRECTORY_SEPARATOR) { /* {{{ */ if(trim($str) == '') return ''; - if(substr(trim($str), -1, 1) != DIRECTORY_SEPARATOR) - return trim($str).DIRECTORY_SEPARATOR; + if(substr(trim($str), -1, 1) != $chr) + return trim($str).$chr; else return trim($str); } /* }}} */ From dc868bd83b5988350da90f7ccfc3e5205572e29b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 18 Feb 2023 15:49:04 +0100 Subject: [PATCH 1835/2006] getBaseUrl() checks for HTTP_X_FORWARDED_HOST and HTTP_X_FORWARDED_PROTO --- inc/inc.Utils.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php index ace755d68..b33a24199 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -803,12 +803,12 @@ function getBaseUrl() { /* {{{ */ if(!empty($settings->_baseUrl)) return $settings->_baseUrl; - if(isset($_SERVER['X-Forwarded-Host'])) - $host = $_SERVER['X-Forwarded-Host']; + if(isset($_SERVER['HTTP_X_FORWARDED_HOST'])) + $host = $_SERVER['HTTP_X_FORWARDED_HOST']; else $host = $_SERVER['HTTP_HOST']; - if(isset($_SERVER['X-Forwarded-Proto'])) - $ssl = $_SERVER['X-Forwarded-Proto'] == 'https'; + if(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) + $ssl = $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'; else $ssl = (isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)); From 535de29e7d890bc53fce9a99409cf50b80deaca6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 18 Feb 2023 15:49:55 +0100 Subject: [PATCH 1836/2006] check return value of postInitDMS --- inc/inc.DBInit.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/inc.DBInit.php b/inc/inc.DBInit.php index 9949c5e9f..2662bb2a0 100644 --- a/inc/inc.DBInit.php +++ b/inc/inc.DBInit.php @@ -61,7 +61,11 @@ $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, 'logger'=>$logger)); + $ret = $hookObj->postInitDMS(array('dms'=>$dms, 'settings'=>$settings, 'logger'=>$logger)); + if($ret === false) { + echo "Fatal error in postInitDMS Hook. No way to recover."; + exit; + } } } } From 2ffe130666a798c9494dcb634f3faba39e0d3f72 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2023 16:05:55 +0100 Subject: [PATCH 1837/2006] set theme to bootstrap4, fulltext engine to sqlitefts, turn on theme selector --- conf/settings.xml.template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/settings.xml.template b/conf/settings.xml.template index 01704a1ce..84c4b9437 100644 --- a/conf/settings.xml.template +++ b/conf/settings.xml.template @@ -15,7 +15,7 @@ footNote = "SeedDMS free document management system - www.seeddms.org" printDisclaimer = "true" language = "en_GB" - theme = "bootstrap" + theme = "bootstrap4" previewWidthList = "40" previewWidthDetail = "100" onePageMode="true" @@ -60,8 +60,8 @@ enableDropUpload = "false" enableRecursiveCount = "false" maxRecursiveCount = "0" - enableThemeSelector = "false" - fullSearchEngine = "lucene" + enableThemeSelector = "true" + fullSearchEngine = "sqlitefts" sortFoldersDefault = "u" defaultDocPosition = "end" defaultFolderPosition = "end" From 44d043ef21afde8033d83d7bd90efd6cce028f6c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2023 16:06:43 +0100 Subject: [PATCH 1838/2006] add fold marks --- inc/inc.ClassFulltextService.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inc/inc.ClassFulltextService.php b/inc/inc.ClassFulltextService.php index 23309cf6c..131a4f747 100644 --- a/inc/inc.ClassFulltextService.php +++ b/inc/inc.ClassFulltextService.php @@ -181,14 +181,14 @@ class SeedDMS_FulltextService { * document if its content is below the configured size. * @return object indexed Document ready for passing to the indexer */ - public function IndexedDocument($object, $forceupdate=false) { + public function IndexedDocument($object, $forceupdate=false) { /* {{{ */ if($object->isType('document')) $nocontent = $object->getLatestContent()->getFileSize() > $this->maxsize && $this->maxsize && !$forceupdate; else $nocontent = true; $convcallback = $this->getConversionWithPreviewCallback(); return new $this->services[0]['IndexedDocument']($object->getDMS(), $object, $convcallback /*$this->conversionmgr ? $this->conversionmgr : $this->converters*/, $nocontent, $this->cmdtimeout); - } + } /* }}} */ /** * Returns an instance of the indexer @@ -198,7 +198,7 @@ class SeedDMS_FulltextService { * * @return object instance of class specified in 'Indexer' */ - public function Indexer($recreate=false) { + public function Indexer($recreate=false) { /* {{{ */ if($this->index) return $this->index; @@ -210,9 +210,9 @@ class SeedDMS_FulltextService { return $this->index; } else return null; - } + } /* }}} */ - public function Search() { + public function Search() { /* {{{ */ if($this->search) return $this->search; if($this->services[0]) { @@ -221,7 +221,7 @@ class SeedDMS_FulltextService { } else { return null; } - } + } /* }}} */ } From a7b00ae22add12e10641d8ae582db6c9777767be Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2023 16:07:22 +0100 Subject: [PATCH 1839/2006] add new key 'attrcallback' to configuration of fulltext engine --- inc/inc.FulltextInit.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/inc/inc.FulltextInit.php b/inc/inc.FulltextInit.php index 450086571..53cfec9a5 100644 --- a/inc/inc.FulltextInit.php +++ b/inc/inc.FulltextInit.php @@ -1,5 +1,11 @@ getAllAttributeDefinitions(); + }; +} + $fulltextservice = null; if($settings->_enableFullSearch) { require_once("inc.ClassFulltextService.php"); @@ -10,7 +16,10 @@ if($settings->_enableFullSearch) { 'Indexer' => 'SeedDMS_SQLiteFTS_Indexer', 'Search' => 'SeedDMS_SQLiteFTS_Search', 'IndexedDocument' => 'SeedDMS_SQLiteFTS_IndexedDocument', - 'Conf' => array('indexdir' => $settings->_luceneDir) + 'Conf' => array( + 'indexdir' => $settings->_luceneDir, + 'attrcallback' => getAttributesCallback($dms) + ) ); $fulltextservice->addService('sqlitefts', $indexconf); From e21e301ea3048e79d79e1645e2a188f371c44ccd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Feb 2023 08:30:34 +0100 Subject: [PATCH 1840/2006] use chosen select for custom attributes --- CHANGELOG | 1 + views/bootstrap4/class.Bootstrap4.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 732125b18..92d1cd25d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ -------------------------------------------------------------------------------- - conversion from pdf to png replaces alpha channel with white - add list of conversion services in debug menu of admin tool +- use chosen select for custom attributes -------------------------------------------------------------------------------- Changes in version 5.1.29 diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index dfe2eab70..58fb5b981 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -1994,7 +1994,7 @@ $(document).ready(function() { default: if($valueset = $attrdef->getValueSetAsArray()) { $content .= "getId()."]\" value=\"\"/>"; - $content .= "getId()."\" name=\"".$fieldname."[".$attrdef->getId()."]"; if($attrdef->getMultipleValues() || $alwaysmultiple) { $content .= "[]\" multiple"; } else { From 9e6e13a041118983a2568bed3d9266283e092377 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Feb 2023 09:59:45 +0100 Subject: [PATCH 1841/2006] add method getContrastColor() --- inc/inc.ClassViewCommon.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index 05021234f..04e31cd10 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -355,4 +355,12 @@ class SeedDMS_View_Common { } echo "};\n"; } /* }}} */ + + public static function getContrastColor($hexcolor) { /* {{{ */ + $r = hexdec(substr($hexcolor, 1, 2)); + $g = hexdec(substr($hexcolor, 3, 2)); + $b = hexdec(substr($hexcolor, 5, 2)); + $yiq = (($r * 299) + ($g * 587) + ($b * 114)) / 1000; + return ($yiq >= 148) ? '000000' : 'ffffff'; + } /* }}} */ } From 05c0f296fca7d3d0e0903edd4e2bfa351589b843 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Feb 2023 10:00:31 +0100 Subject: [PATCH 1842/2006] place button with color of category in front of title in select menu --- views/bootstrap/class.Categories.php | 3 ++- views/bootstrap/styles/application.js | 2 ++ views/bootstrap4/styles/application.js | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Categories.php b/views/bootstrap/class.Categories.php index 356ed03db..53d4fa377 100644 --- a/views/bootstrap/class.Categories.php +++ b/views/bootstrap/class.Categories.php @@ -150,7 +150,8 @@ $(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(), array(array('data-subtitle', $category->countDocumentsByCategory().' '.getMLText('documents')))); + $color = substr(md5($category->getName()), 0, 6); + $options[] = array($category->getID(), htmlspecialchars($category->getName()), $selcat && $category->getID()==$selcat->getID(), array(array('data-before-title', " "), array('data-subtitle', $category->countDocumentsByCategory().' '.getMLText('documents')))); } $this->formField( null, //getMLText("selection"), diff --git a/views/bootstrap/styles/application.js b/views/bootstrap/styles/application.js index 23ef17802..1eb3d2243 100644 --- a/views/bootstrap/styles/application.js +++ b/views/bootstrap/styles/application.js @@ -12,6 +12,8 @@ chzn_template_func = function (state) { if($(state.element).data('warning')) warning = $(state.element).data('warning')+''; /* make sure it is a string */ var html = ''; + if($(state.element).data('before-title')) + html += $(state.element).data('before-title')+''; if($(state.element).data('icon-before')) html += ' '; html += state.text.replace(/ '; html += state.text.replace(/ Date: Wed, 22 Feb 2023 10:01:06 +0100 Subject: [PATCH 1843/2006] color category batch --- views/bootstrap/class.Bootstrap.php | 6 ++++-- views/bootstrap4/class.Bootstrap4.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index d42a25bc6..a5bd72e03 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -3166,8 +3166,10 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) } if($categories = $document->getCategories()) { $content .= "
    "; - foreach($categories as $category) - $content .= "".$category->getName()." "; + foreach($categories as $category) { + $color = substr(md5($category->getName()), 0, 6); + $content .= "".$category->getName()." "; + } } if(!empty($extracontent['bottom_title'])) $content .= $extracontent['bottom_title']; diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 58fb5b981..a4107fa80 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -3244,8 +3244,10 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) } if($categories = $document->getCategories()) { $content .= "
    "; - foreach($categories as $category) - $content .= "".$category->getName()." "; + foreach($categories as $category) { + $color = substr(md5($category->getName()), 0, 6); + $content .= "".$category->getName()." "; + } } if(!empty($extracontent['bottom_title'])) $content .= $extracontent['bottom_title']; From 6301e9228e08e7034410fd1321edeae575edff8f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Feb 2023 10:02:31 +0100 Subject: [PATCH 1844/2006] add changes for 5.1.30 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 92d1cd25d..19def9fbf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ - conversion from pdf to png replaces alpha channel with white - add list of conversion services in debug menu of admin tool - use chosen select for custom attributes +- color category (use first 6 chars of md5(category name) as hex color) -------------------------------------------------------------------------------- Changes in version 5.1.29 From 352446e9d8a7845b1ca5a4c51ee76904c3afab15 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Feb 2023 10:33:06 +0100 Subject: [PATCH 1845/2006] create missing preview images in category or attribute manager --- out/out.AttributeMgr.php | 1 + out/out.Categories.php | 1 + views/bootstrap/class.AttributeMgr.php | 6 ++++-- views/bootstrap/class.Categories.php | 3 +++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/out/out.AttributeMgr.php b/out/out.AttributeMgr.php index f769f6900..fba8266df 100644 --- a/out/out.AttributeMgr.php +++ b/out/out.AttributeMgr.php @@ -47,6 +47,7 @@ if(isset($_GET['attrdefid']) && $_GET['attrdefid']) { } if($view) { + $view->setParam('conversionmgr', $conversionmgr); $view->setParam('accessobject', $accessop); $view->setParam('onepage', $settings->_onePageMode); // do most navigation by reloading areas of pages with ajax $view->setParam('attrdefs', $attrdefs); diff --git a/out/out.Categories.php b/out/out.Categories.php index ea5462135..e1ab501dd 100644 --- a/out/out.Categories.php +++ b/out/out.Categories.php @@ -46,6 +46,7 @@ if(isset($_GET['categoryid']) && $_GET['categoryid']) { } if($view) { + $view->setParam('conversionmgr', $conversionmgr); $view->setParam('categories', $categories); $view->setParam('selcategory', $selcat); $view->setParam('accessobject', $accessop); diff --git a/views/bootstrap/class.AttributeMgr.php b/views/bootstrap/class.AttributeMgr.php index dc9e09cd9..097069356 100644 --- a/views/bootstrap/class.AttributeMgr.php +++ b/views/bootstrap/class.AttributeMgr.php @@ -67,6 +67,7 @@ $(document).ready( function() { function info() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; + $conversionmgr = $this->params['conversionmgr']; $attrdefs = $this->params['attrdefs']; $selattrdef = $this->params['selattrdef']; $cachedir = $this->params['cachedir']; @@ -134,13 +135,15 @@ $(document).ready( function() { } } + $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); + if($conversionmgr) + $previewer->setConversionMgr($conversionmgr); if($res['folders'] || $res['docs']) { print $this->folderListHeader(); print "\n"; foreach($res['folders'] as $subFolder) { echo $this->folderListRow($subFolder); } - $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); foreach($res['docs'] as $document) { echo $this->documentListRow($document, $previewer); } @@ -156,7 +159,6 @@ $(document).ready( function() { print "".getMLText("status")."\n"; print "".getMLText("action")."\n"; print "\n\n\n"; - $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); foreach($res['contents'] as $content) { $doc = $content->getDocument(); echo $this->documentListRow($doc, $previewer); diff --git a/views/bootstrap/class.Categories.php b/views/bootstrap/class.Categories.php index 53d4fa377..b623a3c10 100644 --- a/views/bootstrap/class.Categories.php +++ b/views/bootstrap/class.Categories.php @@ -51,6 +51,7 @@ $(document).ready( function() { function info() { /* {{{ */ $dms = $this->params['dms']; $selcat = $this->params['selcategory']; + $conversionmgr = $this->params['conversionmgr']; $cachedir = $this->params['cachedir']; $previewwidth = $this->params['previewWidthList']; $timeout = $this->params['timeout']; @@ -68,6 +69,8 @@ $(document).ready( function() { print $this->folderListHeader(); print "\n"; $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); + if($conversionmgr) + $previewer->setConversionMgr($conversionmgr); foreach($documents as $doc) { echo $this->documentListRow($doc, $previewer); } From b5be1c849052ca2582689b490a64c24811edb372 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Feb 2023 10:33:31 +0100 Subject: [PATCH 1846/2006] add changes for 5.1.30 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 19def9fbf..a399113f2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ - add list of conversion services in debug menu of admin tool - use chosen select for custom attributes - color category (use first 6 chars of md5(category name) as hex color) +- create missing preview images in category or attribute manager -------------------------------------------------------------------------------- Changes in version 5.1.29 From d8f79b846ec004e48dff4ed1ac74fb6b3c359af9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Feb 2023 07:17:17 +0100 Subject: [PATCH 1847/2006] pass correct depth in callback of SeedDMS_FolderTree --- 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 b33a24199..35c9df96d 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -1129,7 +1129,7 @@ class SeedDMS_FolderTree { /* {{{ */ $iter = new \SeedDMS\Core\RecursiveFolderIterator($folder); $iter2 = new RecursiveIteratorIterator($iter, RecursiveIteratorIterator::SELF_FIRST); foreach($iter2 as $ff) { - call_user_func($callback, $ff, $iter2->getDepth()); + call_user_func($callback, $ff, $iter2->getDepth()+1); // echo $ff->getID().': '.$ff->getFolderPathPlain().'-'.$ff->getName()."
    "; } } /* }}} */ From e2d94d2e567f0302c0177a89648480ac9bc2aef7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Feb 2023 07:18:14 +0100 Subject: [PATCH 1848/2006] depth is now one less then before --- 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 5549d0f44..ffd3fafad 100644 --- a/views/bootstrap/class.Indexer.php +++ b/views/bootstrap/class.Indexer.php @@ -37,7 +37,7 @@ class SeedDMS_View_Indexer_Process_Folder { /* {{{ */ public function process($folder, $depth=0) { /* {{{ */ $lucenesearch = $this->fulltextservice->Search(); - echo "
    ".$folder->getId().":".htmlspecialchars($folder->getFolderPathPlain()); + echo "
    ".$folder->getId().":".htmlspecialchars($folder->getFolderPathPlain()); /* If the document wasn't indexed before then just add it */ if(($this->numdocs == 0) || !($hit = $lucenesearch->getFolder($folder->getId()))) { echo " getID()."\" class=\"indexme indexstatus\" data-docid=\"F".$folder->getID()."\">".getMLText('index_waiting').""; From 04210265c03e338187bd12364ee2c2aef81a79f4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Feb 2023 08:24:11 +0100 Subject: [PATCH 1849/2006] add translations for conversion services --- languages/ar_EG/lang.inc | 4 ++++ languages/bg_BG/lang.inc | 4 ++++ languages/ca_ES/lang.inc | 4 ++++ languages/cs_CZ/lang.inc | 4 ++++ languages/de_DE/lang.inc | 6 +++++- languages/el_GR/lang.inc | 4 ++++ languages/en_GB/lang.inc | 6 +++++- languages/es_ES/lang.inc | 4 ++++ languages/fr_FR/lang.inc | 4 ++++ languages/hr_HR/lang.inc | 4 ++++ languages/hu_HU/lang.inc | 4 ++++ languages/id_ID/lang.inc | 4 ++++ languages/it_IT/lang.inc | 4 ++++ languages/ko_KR/lang.inc | 4 ++++ languages/lo_LA/lang.inc | 4 ++++ languages/nb_NO/lang.inc | 4 ++++ languages/nl_NL/lang.inc | 4 ++++ languages/pl_PL/lang.inc | 4 ++++ languages/pt_BR/lang.inc | 4 ++++ languages/ro_RO/lang.inc | 4 ++++ languages/ru_RU/lang.inc | 4 ++++ languages/sk_SK/lang.inc | 4 ++++ languages/sv_SE/lang.inc | 4 ++++ languages/tr_TR/lang.inc | 4 ++++ languages/uk_UA/lang.inc | 4 ++++ languages/zh_CN/lang.inc | 4 ++++ languages/zh_TW/lang.inc | 4 ++++ 27 files changed, 110 insertions(+), 2 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index 53291a814..d458b4f2a 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -845,6 +845,7 @@ URL: [url]', 'link_to_version' => 'رابط الإصدار', 'list_access_rights' => 'لائحة حقوق الدخول', 'list_contains_no_access_docs' => 'هذه الائحة لا تحتوي على مستندات للدخول', +'list_conversion_services' => '', 'list_hooks' => 'لائحة الدمج', 'list_notification_services' => '', 'list_tasks' => 'لائحة المهمات', @@ -1370,6 +1371,9 @@ URL: [url]', 'seq_keep' => 'حافظ على المرتبة', 'seq_start' => 'اول مرتبة', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'صفوف', 'setDateFromFile' => 'وضع تاريخ من الملف', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index b72bf52db..4c8906d39 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -774,6 +774,7 @@ $text = array( 'link_to_version' => '', 'list_access_rights' => 'Списък на права', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => '', 'list_notification_services' => '', 'list_tasks' => '', @@ -1233,6 +1234,9 @@ $text = array( 'seq_keep' => 'Съхрани позицията', 'seq_start' => 'Първа позиция', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index 376c8c35b..a4d0af160 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -779,6 +779,7 @@ URL: [url]', 'link_to_version' => '', 'list_access_rights' => 'Llista tots els tipus d\'accés...', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => '', 'list_notification_services' => '', 'list_tasks' => '', @@ -1238,6 +1239,9 @@ URL: [url]', 'seq_keep' => 'Mantenir posició', 'seq_start' => 'Primera posició', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index ddbfe9d0a..ec6645bb7 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -876,6 +876,7 @@ URL: [url]', 'link_to_version' => 'Provázat k verzi', 'list_access_rights' => 'Seznam všech přístupových práv ...', 'list_contains_no_access_docs' => 'Seznam obsahuje více dokumentů, ke kterým nemáte přístup a které se nezobrazují.', +'list_conversion_services' => '', 'list_hooks' => 'Seznam hooks', 'list_notification_services' => '', 'list_tasks' => 'Seznam úkolů', @@ -1442,6 +1443,9 @@ Jméno: [username] 'seq_keep' => 'Ponechat pozici', 'seq_start' => 'První pozice', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'seance', 'setDateFromFile' => '', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index b05acb3b3..c1c58c46e 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 (3158), dgrutsch (22) +// Translators: Admin (3162), dgrutsch (22) $text = array( '2_factor_auth' => '2-Faktor Authentifizierung', @@ -1019,6 +1019,7 @@ URL: [url]

    ', 'link_to_version' => 'An Version hängen', 'list_access_rights' => 'Alle Zugriffsrechte auflisten ...', 'list_contains_no_access_docs' => 'Die Liste enthält weitere Dokumente auf die Sie keinen Zugriff haben und deshalb nicht angezeigt werden.', +'list_conversion_services' => 'Liste der Konvertierer', 'list_hooks' => 'Liste der interne Aufrufe', 'list_notification_services' => 'Liste der Benachrichtigungsdienste', 'list_tasks' => 'Tasks auflisten', @@ -1774,6 +1775,9 @@ Sollten Sie kein Passwort bekommen haben, dann nutzen Sie bitte die Passwort-Ver 'seq_keep' => 'Beibehalten', 'seq_start' => 'An den Anfang', 'service_has_filter' => 'Service hat Filter', +'service_list_from' => 'Von', +'service_list_info' => 'Information', +'service_list_to' => 'Nach', 'service_name' => 'Service-Name', 'sessions' => 'Benutzer Online', 'setDateFromFile' => 'Datum von importierter Datei übernehmen', diff --git a/languages/el_GR/lang.inc b/languages/el_GR/lang.inc index 6f4ba01f6..88d675215 100644 --- a/languages/el_GR/lang.inc +++ b/languages/el_GR/lang.inc @@ -774,6 +774,7 @@ $text = array( 'link_to_version' => '', 'list_access_rights' => 'Εμφάνισε όλα τα δικαιώματα πρόσβασης', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => '', 'list_notification_services' => '', 'list_tasks' => '', @@ -1244,6 +1245,9 @@ URL: [url]', 'seq_keep' => 'Διατήρηση θέσης', 'seq_start' => 'Τοποθέτηση στην αρχή', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index d71f837fd..90cf775dc 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 (2253), archonwang (3), dgrutsch (9), netixw (14) +// Translators: Admin (2257), archonwang (3), dgrutsch (9), netixw (14) $text = array( '2_factor_auth' => '2-factor authentication', @@ -1020,6 +1020,7 @@ URL: [url]

    ', 'link_to_version' => 'Attach to version', 'list_access_rights' => 'List all access rights ...', 'list_contains_no_access_docs' => 'The list contains more documents you have no access to and are not displayed.', +'list_conversion_services' => 'List of conversion services', 'list_hooks' => 'List of hooks', 'list_notification_services' => 'List of notification services', 'list_tasks' => 'List tasks', @@ -1777,6 +1778,9 @@ If you did not receive a password, please use the password forgotten function on 'seq_keep' => 'Keep Position', 'seq_start' => 'First position', 'service_has_filter' => 'Service has filter', +'service_list_from' => 'From', +'service_list_info' => 'Information', +'service_list_to' => 'To', 'service_name' => 'Name of service', 'sessions' => 'Users online', 'setDateFromFile' => 'Take over date from imported file', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index f4ef83a82..0db0189ac 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -864,6 +864,7 @@ URL: [url]', 'link_to_version' => '', 'list_access_rights' => 'Listar los derechos de acceso', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => 'Mis bloques', 'list_notification_services' => '', 'list_tasks' => '', @@ -1397,6 +1398,9 @@ URL: [url]', 'seq_keep' => 'Mantener posición', 'seq_start' => 'Primera posición', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => 'Obtiene la fecha del archivo importado', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 0d92ba8fa..dfddd6c87 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -1006,6 +1006,7 @@ URL : [url]

    ', 'link_to_version' => 'Version', 'list_access_rights' => 'Liste des droits d’accès…', 'list_contains_no_access_docs' => 'La liste contient des documents auxquels vous n’avez pas accès et qui ne sont donc pas affichés.', +'list_conversion_services' => '', 'list_hooks' => 'Liste des appels internes', 'list_notification_services' => '', 'list_tasks' => 'Liste des tâches', @@ -1760,6 +1761,9 @@ Nom : [username] 'seq_keep' => 'Conserver la position', 'seq_start' => 'Première position', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'Utilisateurs en ligne', 'setDateFromFile' => 'Reprendre la date du fichier importé', diff --git a/languages/hr_HR/lang.inc b/languages/hr_HR/lang.inc index 8b4537ec4..4448d5beb 100644 --- a/languages/hr_HR/lang.inc +++ b/languages/hr_HR/lang.inc @@ -857,6 +857,7 @@ Internet poveznica: [url]', 'link_to_version' => '', 'list_access_rights' => 'Izlistaj sve dozvole pristupa', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => 'Kuke za popise', 'list_notification_services' => '', 'list_tasks' => '', @@ -1406,6 +1407,9 @@ Internet poveznica: [url]', 'seq_keep' => 'Zadrži poziciju', 'seq_start' => 'Na početak', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index 33020bc6a..21128b2c3 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -852,6 +852,7 @@ URL: [url]', 'link_to_version' => '', 'list_access_rights' => 'Összes jogosultság felsorolása...', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => 'Hook lista', 'list_notification_services' => '', 'list_tasks' => '', @@ -1384,6 +1385,9 @@ URL: [url]', 'seq_keep' => 'Pozci megtartßsa', 'seq_start' => 'Elejé‰re', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/id_ID/lang.inc b/languages/id_ID/lang.inc index e350f55ee..2cd68e6c2 100644 --- a/languages/id_ID/lang.inc +++ b/languages/id_ID/lang.inc @@ -908,6 +908,7 @@ URL: [url]

    ', 'link_to_version' => 'Lampirkan ke versi', 'list_access_rights' => 'Daftar semua hak akses ...', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => 'Daftar hooks', 'list_notification_services' => '', 'list_tasks' => 'Daftar tasks', @@ -1458,6 +1459,9 @@ Jika Anda tidak menerima kata sandi, silakan gunakan fitur lupa kata sandi di ha 'seq_keep' => 'Keep Position', 'seq_start' => 'Posisi awal', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'Pengguna Online', 'setDateFromFile' => 'Ambil alih tanggal dari file yang diimpor', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index 4ca0d5e17..371d91ee9 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -862,6 +862,7 @@ URL: [url]', 'link_to_version' => 'Collega alla versione', 'list_access_rights' => 'Elenca tutti i diritti di accesso...', 'list_contains_no_access_docs' => 'L\'elenco contiene più documenti ai quali non si ha accesso e non vengono visualizzati.', +'list_conversion_services' => '', 'list_hooks' => 'Elenco hooks', 'list_notification_services' => '', 'list_tasks' => 'Elenco attività', @@ -1433,6 +1434,9 @@ Name: [username] 'seq_keep' => 'Mantieni la posizione', 'seq_start' => 'Prima posizione', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'Utenti online', 'setDateFromFile' => 'Prende la data dal file importato', diff --git a/languages/ko_KR/lang.inc b/languages/ko_KR/lang.inc index 854106a58..250bf6186 100644 --- a/languages/ko_KR/lang.inc +++ b/languages/ko_KR/lang.inc @@ -858,6 +858,7 @@ URL: [url]', 'link_to_version' => '', 'list_access_rights' => '모든 접근 권한 나열', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => '', 'list_notification_services' => '', 'list_tasks' => '', @@ -1400,6 +1401,9 @@ URL : [url]', 'seq_keep' => '위치 유지', 'seq_start' => '첫 번째 위치', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/lo_LA/lang.inc b/languages/lo_LA/lang.inc index d91d7c9ee..f01c0a2bf 100644 --- a/languages/lo_LA/lang.inc +++ b/languages/lo_LA/lang.inc @@ -855,6 +855,7 @@ URL: [url]', 'link_to_version' => 'ແນບໄປພ້ອມກັບເວີຊັນ', 'list_access_rights' => 'ສະແດງສິດທິການເຂົ້າເຖິງທັງໝົດ ...', 'list_contains_no_access_docs' => 'ລິດລາຍການປະກອບດ້ວຍເອກະສານເພີ່ມເຕີມທີ່ເຈົ້າບໍ່ສາມາດເຂົ້າເຖິງໄດ້ ແລະບໍ່ສະແດງ', +'list_conversion_services' => '', 'list_hooks' => 'ລາບການ hooks', 'list_notification_services' => '', 'list_tasks' => '', @@ -1426,6 +1427,9 @@ URL: [url]', 'seq_keep' => 'ເກັບຕຳແໜ່ງໄວ້', 'seq_start' => 'ອັນດັບທຳອິດ', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'ຜູ້ໄຊ້ອອນລາຍ', 'setDateFromFile' => '', diff --git a/languages/nb_NO/lang.inc b/languages/nb_NO/lang.inc index b233e49fa..3421abc6b 100644 --- a/languages/nb_NO/lang.inc +++ b/languages/nb_NO/lang.inc @@ -876,6 +876,7 @@ URL: [url]', 'link_to_version' => 'Vedlegg til versjonen', 'list_access_rights' => 'Liste over alle rettigheter...', 'list_contains_no_access_docs' => 'Listen inneholder flere dokumenter du ikke har tilgang til og ikke vises.', +'list_conversion_services' => '', 'list_hooks' => 'Liste hooks', 'list_notification_services' => '', 'list_tasks' => 'Liste oppgaver', @@ -1439,6 +1440,9 @@ Bruker: [username] 'seq_keep' => 'Hold posisjon', 'seq_start' => 'Første possisjon', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'Brukere innlogget', 'setDateFromFile' => 'Overta dato fra importert fil', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 0e6907585..68073098b 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -869,6 +869,7 @@ URL: [url]', 'link_to_version' => 'Bijlage(n) bij versie', 'list_access_rights' => 'Toegangsrechten', 'list_contains_no_access_docs' => 'Geen toegankelijke documenten', +'list_conversion_services' => '', 'list_hooks' => 'Hooks', 'list_notification_services' => '', 'list_tasks' => 'Taken', @@ -1438,6 +1439,9 @@ Name: [username] 'seq_keep' => 'Behoud Positie', 'seq_start' => 'Eerste positie', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'sessies', 'setDateFromFile' => 'Gebruik de datum van de geïmporteerde file', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 2b63f19be..dbcecf4ba 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -845,6 +845,7 @@ URL: [url]', 'link_to_version' => 'Załącz do wersji', 'list_access_rights' => 'Pokaż uprawnienia dostępu', 'list_contains_no_access_docs' => 'Lista zawiera więcej dokumentów, do których nie masz dostępu i nie są wyświetlane.', +'list_conversion_services' => '', 'list_hooks' => 'Lista błędów', 'list_notification_services' => '', 'list_tasks' => 'Lista zadań', @@ -1369,6 +1370,9 @@ Name: [username] 'seq_keep' => 'Na tej samej pozycji', 'seq_start' => 'Na początku', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'Sesja', 'setDateFromFile' => 'Przejmij datę z importowanego pliku', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 387fe8297..2e6f43bb1 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -876,6 +876,7 @@ URL: [url]', 'link_to_version' => 'Anexar à versão', 'list_access_rights' => 'Listar todos os direitos de acesso...', 'list_contains_no_access_docs' => 'A lista contém mais documentos aos quais você não tem acesso e não são exibidos.', +'list_conversion_services' => '', 'list_hooks' => 'Listar ganchos', 'list_notification_services' => '', 'list_tasks' => 'Listar tarefas', @@ -1445,6 +1446,9 @@ Nome: [username] 'seq_keep' => 'Manter posição', 'seq_start' => 'Primeira posição', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'Online', 'setDateFromFile' => 'Assumir a data do arquivo importado', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index 4801f802d..a9b60a086 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -857,6 +857,7 @@ URL: [url]', 'link_to_version' => '', 'list_access_rights' => 'Listeaza toate drepturile de acces', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => '', 'list_notification_services' => '', 'list_tasks' => '', @@ -1407,6 +1408,9 @@ URL: [url]', 'seq_keep' => 'Păstrați poziția', 'seq_start' => 'Prima poziție', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index 2db444d2c..e0eadabba 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -857,6 +857,7 @@ URL: [url]', 'link_to_version' => '', 'list_access_rights' => 'Показать все права доступа', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => 'Список хуков', 'list_notification_services' => '', 'list_tasks' => '', @@ -1414,6 +1415,9 @@ URL: [url]', 'seq_keep' => 'Не изменять', 'seq_start' => 'В начале', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 4d3ec5b54..d363354d7 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -876,6 +876,7 @@ URL: [url]', 'link_to_version' => 'Pripojiť k verzii', 'list_access_rights' => 'Zobraziť všetky prístupové práva', 'list_contains_no_access_docs' => 'Zoznam obsahuje viac dokumentov, ku ktorým nemáte prístup a nie sú zobrazené.', +'list_conversion_services' => '', 'list_hooks' => 'List hooks', 'list_notification_services' => '', 'list_tasks' => 'List tasks', @@ -1447,6 +1448,9 @@ Meno: [username] 'seq_keep' => 'Ponechať pozíciu', 'seq_start' => 'Prvá pozícia', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'Používatelia online', 'setDateFromFile' => 'Prebrať dátumy z importovaných súborov', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 050785cd5..ba5ad1304 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -863,6 +863,7 @@ URL: [url]', 'link_to_version' => 'Kopppla till version', 'list_access_rights' => 'Lista alla rättigheter...', 'list_contains_no_access_docs' => 'Listan innehåller fler dokument som inte visas då du saknar rättigheter till dessa.', +'list_conversion_services' => '', 'list_hooks' => 'Lista hooks', 'list_notification_services' => '', 'list_tasks' => '', @@ -1420,6 +1421,9 @@ Kommentar: [comment]', 'seq_keep' => 'Behåll positionen', 'seq_start' => 'Första positionen', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => 'Användare online', 'setDateFromFile' => '', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 9217c1c7d..68c534c53 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -851,6 +851,7 @@ URL: [url]', 'link_to_version' => '', 'list_access_rights' => 'Tüm erişim haklarini listele', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => '', 'list_notification_services' => '', 'list_tasks' => '', @@ -1386,6 +1387,9 @@ URL: [url]', 'seq_keep' => 'Sırayı Koru', 'seq_start' => 'İlk sıra', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/uk_UA/lang.inc b/languages/uk_UA/lang.inc index 1e80aaf1a..611add06c 100644 --- a/languages/uk_UA/lang.inc +++ b/languages/uk_UA/lang.inc @@ -857,6 +857,7 @@ URL: [url]', 'link_to_version' => '', 'list_access_rights' => 'Повний список прав...', 'list_contains_no_access_docs' => '', +'list_conversion_services' => '', 'list_hooks' => '', 'list_notification_services' => '', 'list_tasks' => '', @@ -1407,6 +1408,9 @@ URL: [url]', 'seq_keep' => 'Не змінювати', 'seq_start' => 'На початку', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '', 'setDateFromFile' => '', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index 7f8c948f2..d9d1d7fa0 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -859,6 +859,7 @@ URL: [url]', 'link_to_version' => '附加到版本', 'list_access_rights' => '列出所有的访问权限', 'list_contains_no_access_docs' => '这个列表包含了更多你无法访问的文件也没有显示出来。', +'list_conversion_services' => '', 'list_hooks' => '钩子列表', 'list_notification_services' => '', 'list_tasks' => '任务列表', @@ -1394,6 +1395,9 @@ URL: [url]', 'seq_keep' => '当前', 'seq_start' => '首位', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '在线用户', 'setDateFromFile' => '导入文件接收日期', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index c37878e9d..0f65fc46e 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -876,6 +876,7 @@ URL: [url]', 'link_to_version' => '附加到版本', 'list_access_rights' => '列出權限', 'list_contains_no_access_docs' => '該列表包含更多您無法訪問且不會顯示的文檔。', +'list_conversion_services' => '', 'list_hooks' => '掛勾列表', 'list_notification_services' => '', 'list_tasks' => '工作列表', @@ -1445,6 +1446,9 @@ URL: [url]', 'seq_keep' => '當前', 'seq_start' => '首位', 'service_has_filter' => '', +'service_list_from' => '', +'service_list_info' => '', +'service_list_to' => '', 'service_name' => '', 'sessions' => '在線用戶', 'setDateFromFile' => '從導入的文件接管日期', From 4bfdc9cbf54a45135c064cc057cf9fcbe065a34e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Feb 2023 13:26:40 +0100 Subject: [PATCH 1850/2006] add selection of document in extension configuration --- views/bootstrap/class.Settings.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index d7e3cec6a..d931031a5 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -671,6 +671,9 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk)) case "folders": $this->formField(null, $this->getFolderChooserHtml("form".$extname.$confkey, M_READ, -1, $selections ? $dms->getFolder($selections[0]) : 0, 'extensions['.$extname."][".$confkey."]")); break; + case "documents": + $this->formField(null, $this->getDocumentChooserHtml("form".$extname.$confkey, $selections ? $dms->getDocument($selections[0]) : 0, 'extensions['.$extname."][".$confkey."]")); + break; } } break; From df6a2e79bcc5d5855e2e5b7aa097b7840e0504bf Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Feb 2023 14:20:33 +0100 Subject: [PATCH 1851/2006] adjust call of getDocumentChooserHtml() for 6.0.x --- views/bootstrap/class.Settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 42ead127f..0e9a39cc7 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -705,7 +705,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk)) $this->formField(null, $this->getFolderChooserHtml("form".$extname.$confkey, M_READ, -1, $selections ? $dms->getFolder($selections[0]) : 0, 'extensions['.$extname."][".$confkey."]")); break; case "documents": - $this->formField(null, $this->getDocumentChooserHtml("form".$extname.$confkey, $selections ? $dms->getDocument($selections[0]) : 0, 'extensions['.$extname."][".$confkey."]")); + $this->formField(null, $this->getDocumentChooserHtml("form".$extname.$confkey, M_READ, -1, $selections ? $dms->getDocument($selections[0]) : 0, 'extensions['.$extname."][".$confkey."]")); break; } } From 245092bb100e297ece879b0594e07295e212a24c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Feb 2023 19:36:14 +0100 Subject: [PATCH 1852/2006] fix get smtp parameters --- utils/expireddocs.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/expireddocs.php b/utils/expireddocs.php index 4c5dc2f3c..3f16aa1fd 100644 --- a/utils/expireddocs.php +++ b/utils/expireddocs.php @@ -277,10 +277,10 @@ foreach($users as $user) { $mail_params = array(); if($settings->_smtpServer) { $mail_params['host'] = $settings->_smtpServer; - if($settings->smtpPort) { + if($settings->_smtpPort) { $mail_params['port'] = $settings->_smtpPort; } - if($settings->smtpUser) { + if($settings->_smtpUser) { $mail_params['auth'] = true; $mail_params['username'] = $settings->_smtpUser; $mail_params['password'] = $settings->_smtpPassword; From 737e69876dd520797bf5be90df57f1e5367a3ef1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Feb 2023 10:44:25 +0100 Subject: [PATCH 1853/2006] fix nasty php error --- 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 e26137cb4..f7d7f5026 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -380,7 +380,7 @@ function utf8_basename($path, $suffix='') { /* {{{ */ * @return string valid file name */ function getFilenameByDocname($content) { /* {{{ */ - if(is_string) { + if(is_string($content)) { $filename = $content; } else { $document = $content->getDocument(); From 13a0646698fff30359b7639f89c258585608362a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Feb 2023 11:31:31 +0100 Subject: [PATCH 1854/2006] formField() evals allow_empty --- views/bootstrap/class.Bootstrap.php | 4 ++++ views/bootstrap4/class.Bootstrap4.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index a5bd72e03..1f9489f0e 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1138,17 +1138,21 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } elseif(is_array($value)) { switch($value['element']) { case 'select': + $allowempty = empty($value['allow_empty']) ? false : $value['allow_empty']; echo '"; if(isset($value['options']) && is_array($value['options'])) { + if($allowempty) + echo ""; foreach($value['options'] as $val) { if(is_string($val)) { echo ''; diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index a4107fa80..91f86b6a6 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -1122,17 +1122,21 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } elseif(is_array($value)) { switch($value['element']) { case 'select': + $allowempty = empty($value['allow_empty']) ? false : $value['allow_empty']; echo '"; if(isset($value['options']) && is_array($value['options'])) { + if($allowempty) + echo ""; foreach($value['options'] as $val) { if(is_string($val)) { echo ''; From 258914e884d6589d158cb13b6448d4515e79a17d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Feb 2023 12:54:56 +0100 Subject: [PATCH 1855/2006] override action to 'show' when showing error msg --- inc/inc.ClassUI.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/inc.ClassUI.php b/inc/inc.ClassUI.php index e29b69523..d3d174460 100644 --- a/inc/inc.ClassUI.php +++ b/inc/inc.ClassUI.php @@ -186,6 +186,10 @@ class UI extends UI_Default { global $theme, $dms, $user, $settings; $accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); $view = UI::factory($theme, 'ErrorDlg'); + $request = $view->getParam('request'); + if($request) { + $request->query->set('action', 'show'); + } $view->setParam('dms', $dms); $view->setParam('user', $user); $view->setParam('accessobject', $accessop); From 3d170ad18ccfa7aaee97d6d50e2d8450b602e424 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Feb 2023 13:09:33 +0100 Subject: [PATCH 1856/2006] add converter to png for videos --- doc/README.Converters | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/README.Converters b/doc/README.Converters index 730466e72..001b503d2 100644 --- a/doc/README.Converters +++ b/doc/README.Converters @@ -122,3 +122,7 @@ application/csv application/vnd.wordperfect unoconv -d document -e PageRange=1 -f pdf --stdout -v '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72x72 -sOutputFile=- -dFirstPage=1 -dLastPage=1 -q - | convert -resize %wx png:- 'png:%o' +video/webm +video/mp4 + This will take 12th frame of a video and converts into a png + convert -resize %wx '%f[12]' 'png:%o' From 05b95bd0ed915af68b1232f2b3aae6d84532ccd7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Feb 2023 13:10:16 +0100 Subject: [PATCH 1857/2006] note about required ffmpeg --- doc/README.Converters | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/README.Converters b/doc/README.Converters index 001b503d2..508bf46ae 100644 --- a/doc/README.Converters +++ b/doc/README.Converters @@ -124,5 +124,7 @@ application/vnd.wordperfect video/webm video/mp4 - This will take 12th frame of a video and converts into a png + This will take 12th frame of a video and converts into a png. It requires + ffmpeg to be installed. + convert -resize %wx '%f[12]' 'png:%o' From 198dc8c73053e379e143a1e165c281b900b23420 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 1 Mar 2023 12:16:41 +0100 Subject: [PATCH 1858/2006] use propper language names --- develop/transcomp.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/develop/transcomp.php b/develop/transcomp.php index e24d75fad..205530395 100644 --- a/develop/transcomp.php +++ b/develop/transcomp.php @@ -1,7 +1,7 @@ $value) { if(!isset($allkeys[$key])) { @@ -45,8 +45,8 @@ foreach(array('English', 'German', 'Italian', 'Slovak', 'Czech') as $lang) { exit; $fpout = fopen('php://stdout', 'w'); -foreach(array_keys($langarr['English']) as $key) { - $data = array($key, $langarr['English'][$key], $langarr['German'][$key]); +foreach(array_keys($langarr['en_GB']) as $key) { + $data = array($key, $langarr['en_GB'][$key], $langarr['de_DE'][$key]); fputcsv($fpout, $data); } ?> From 97778d3e2bac8da23339d7c0565ecf22ace4983f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 2 Mar 2023 09:55:08 +0100 Subject: [PATCH 1859/2006] use two column layout (left for check in, right for cancel checkout) --- views/bootstrap/class.CheckInDocument.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/views/bootstrap/class.CheckInDocument.php b/views/bootstrap/class.CheckInDocument.php index 42df6c10f..154311499 100644 --- a/views/bootstrap/class.CheckInDocument.php +++ b/views/bootstrap/class.CheckInDocument.php @@ -79,7 +79,6 @@ $(document).ready(function() { $this->globalNavigation($folder); $this->contentStart(); $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); - $this->contentHeading(getMLText("checkin_document")); if ($document->isLocked()) { @@ -120,7 +119,10 @@ $(document).ready(function() { } $checkoutinfo = $document->getCheckOutInfo(); + $this->rowStart(); if($checkoutstatus == 0) { + $this->columnStart(6); + $this->contentHeading(getMLText("checkin_document")); $latestContent = $document->getLatestContent(); $reviewStatus = $latestContent->getReviewStatus(); @@ -134,13 +136,13 @@ $(document).ready(function() { } } - $this->contentContainerStart(); ?>
    contentContainerStart(); if(!$nodocumentformfields || !in_array('version_comment', $nodocumentformfields)) { $this->formField( getMLText("comment"), @@ -664,18 +666,21 @@ $(document).ready(function() { ); } + $this->contentContainerEnd(); $this->formSubmit(getMLText('checkin_document')); ?>
    contentContainerEnd(); + $this->columnEnd(); + $this->columnStart(6); if(!empty($settings->_enableCancelCheckout)) { - $this->contentContainerStart(); + $this->contentHeading(getMLText("cancel_checkout_document")); $this->warningMsg(getMLText('cancel_checkout_warning')); ?>
    contentContainerStart(); echo createHiddenFieldWithKey('cancelcheckout'); $this->formField( getMLText("checkout_cancel_confirm"), @@ -686,13 +691,15 @@ $(document).ready(function() { 'value'=>1 ) ); + $this->contentContainerEnd(); $this->formSubmit(getMLText('cancel_checkout'), '', '', 'danger'); ?>
    contentContainerEnd(); } + $this->columnEnd(); } else { + $this->columnStart(12); ?>
    @@ -701,7 +708,9 @@ $(document).ready(function() { formSubmit(getMLText('cancel_checkout'),'','','danger');?>
    columnEnd(); } + $this->rowEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ From 39026ef4a8e1d37458b60d6db289fc7627df5837 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 3 Mar 2023 16:14:01 +0100 Subject: [PATCH 1860/2006] new algo for contrast color based on lightness --- inc/inc.ClassViewCommon.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index 04e31cd10..63d9f276d 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -360,7 +360,12 @@ class SeedDMS_View_Common { $r = hexdec(substr($hexcolor, 1, 2)); $g = hexdec(substr($hexcolor, 3, 2)); $b = hexdec(substr($hexcolor, 5, 2)); - $yiq = (($r * 299) + ($g * 587) + ($b * 114)) / 1000; - return ($yiq >= 148) ? '000000' : 'ffffff'; + if(0) { + $yiq = (($r * 299) + ($g * 587) + ($b * 114)) / 1000; + return ($yiq >= 148) ? '000000' : 'ffffff'; + } else { + $l = (max($r, max($g, $b)) + min($r, min($g, $b)))/2; + return ($l > 128) ? '000000' : 'ffffff'; + } } /* }}} */ } From 9e36d82873421debc17e491b5fb1cd26aaa34324 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 4 Mar 2023 09:04:58 +0100 Subject: [PATCH 1861/2006] initial support for attributes in full text search --- out/out.Search.php | 7 ++++- views/bootstrap/class.Search.php | 51 ++++++++++++++++++++++++-------- 2 files changed, 45 insertions(+), 13 deletions(-) diff --git a/out/out.Search.php b/out/out.Search.php index 99cdb822d..73af0259c 100644 --- a/out/out.Search.php +++ b/out/out.Search.php @@ -161,6 +161,11 @@ if($fullsearch) { else $record_type = array(); + if (isset($_GET["attributes"])) + $attributes = $_GET["attributes"]; + else + $attributes = array(); + // Check to see if the search has been restricted to a particular sub-tree in // the folder hierarchy. $startFolder = null; @@ -193,7 +198,7 @@ if($fullsearch) { 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)))); + $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, 'attributes'=>$attributes), ($pageNumber == 'all' ? array() : array('limit'=>$limit, 'offset'=>$limit * ($pageNumber-1)))); if($searchresult === false) { $session->setSplashMsg(array('type'=>'error', 'msg'=>getMLText('splash_invalid_searchterm'))); $dcount = 0; diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 72e70b053..d2da9d06d 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -877,6 +877,13 @@ function typeahead() { /* {{{ */ $option[] = true; $options[] = $option; } + } elseif(substr($facetname, 0, 5) == 'attr_') { + foreach($values as $v=>$c) { + $option = array($v, $v.' ('.$c.')'); + if(isset($attributes[$facetname]) && in_array($v, $attributes[$facetname])) + $option[] = true; + $options[] = $option; + } } else { foreach($values as $v=>$c) { $option = array($v, $v.' ('.$c.')'); @@ -885,18 +892,38 @@ function typeahead() { /* {{{ */ $options[] = $option; } } - $this->formField( - getMLText($facetname), - array( - 'element'=>'select', - 'id'=>$facetname, - 'name'=>$facetname."[]", - 'class'=>'chzn-select', - 'attributes'=>array(array('data-placeholder', getMLText('select_'.$facetname)), array('data-allow-clear', 'true')), - 'options'=>$options, - 'multiple'=>$multiple - ) - ); + if(substr($facetname, 0, 5) == 'attr_') { + $tmp = explode('_', $facetname); + if($attrdef = $dms->getAttributeDefinition($tmp[1])) + $dispname = $attrdef->getName(); + else + $dispname = getMLText($facetname); + $this->formField( + $dispname, + array( + 'element'=>'select', + 'id'=>$facetname, + 'name'=>'attributes['.$facetname.'][]', + 'class'=>'chzn-select', + 'attributes'=>array(array('data-placeholder', $dispname), array('data-allow-clear', 'true')), + 'options'=>$options, + 'multiple'=>$multiple + ) + ); + } else { + $this->formField( + getMLText($facetname), + array( + 'element'=>'select', + 'id'=>$facetname, + 'name'=>$facetname."[]", + 'class'=>'chzn-select', + 'attributes'=>array(array('data-placeholder', getMLText('select_'.$facetname)), array('data-allow-clear', 'true')), + 'options'=>$options, + 'multiple'=>$multiple + ) + ); + } } } $this->contentContainerEnd(); From 0e712c1554558468fa5d13564b503aab58f4f436 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 4 Mar 2023 10:09:05 +0100 Subject: [PATCH 1862/2006] empty password in csv file will not override an existing password --- op/op.ImportUsers.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/op/op.ImportUsers.php b/op/op.ImportUsers.php index af34d607c..515a2e28c 100644 --- a/op/op.ImportUsers.php +++ b/op/op.ImportUsers.php @@ -45,7 +45,8 @@ function renderBooleanData($colname, $objdata) { /* {{{ */ } /* }}} */ function getPasswordPlainData($colname, $coldata, $objdata) { /* {{{ */ - $objdata['passenc'] = seed_pass_hash($coldata); + /* Setting 'passenc' to null will not update the password */ + $objdata['passenc'] = $coldata ? seed_pass_hash($coldata) : null; return $objdata; } /* }}} */ @@ -245,7 +246,7 @@ if (isset($_FILES['userdata']) && $_FILES['userdata']['error'] == 0) { if($makeupdate) $eu->setEmail($u['email']); } - if(isset($u['passenc']) && $u['passenc'] != $eu->getPwd()) { + if(isset($u['passenc']) && !is_null($u['passenc']) && $u['passenc'] != $eu->getPwd()) { $log[$uhash][] = array('id'=>$eu->getLogin(), 'type'=>'success', 'msg'=> "Encrypted password of user updated. '".$u['passenc']."' != '".$eu->getPwd()."'"); if($makeupdate) $eu->setPwd($u['passenc']); From 742929002b9dcc3d3bdf41ab4c96b9e25b646576 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 6 Mar 2023 10:03:28 +0100 Subject: [PATCH 1863/2006] show number of occurances in subtitle of options --- views/bootstrap/class.Search.php | 37 +++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index d2da9d06d..5fd7ded68 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -854,9 +854,12 @@ function typeahead() { /* {{{ */ foreach($values as $v=>$c) { $uu = $dms->getUserByLogin($v); if($uu) { - $option = array($uu->getId(), $v.' ('.$c.')'); + $option = array($uu->getId(), $v/*.' ('.$c.')'*/); if(isset(${$facetname}) && in_array($uu->getId(), ${$facetname})) $option[] = true; + else + $option[] = false; + $option[] = array(array('data-subtitle', $c.' ×')); $options[] = $option; } } @@ -864,35 +867,48 @@ function typeahead() { /* {{{ */ foreach($values as $v=>$c) { $cat = $dms->getDocumentCategoryByName($v); if($cat) { - $option = array($cat->getId(), $v.' ('.$c.')'); + $option = array($cat->getId(), $v/*.' ('.$c.')'*/); if(isset(${$facetname}) && in_array($cat->getId(), ${$facetname})) $option[] = true; + else + $option[] = false; + $option[] = array(array('data-subtitle', $c.' ×')); $options[] = $option; } } } elseif($facetname == 'status') { foreach($values as $v=>$c) { - $option = array($v, getOverallStatusText($v).' ('.$c.')'); - if(isset(${$facetname}) && in_array($v, ${$facetname})) - $option[] = true; - $options[] = $option; + $option = array($v, getOverallStatusText($v)/*.' ('.$c.')'*/); + if(isset(${$facetname}) && in_array($v, ${$facetname})) + $option[] = true; + else + $option[] = false; + $option[] = array(array('data-subtitle', $c.' ×')); + $options[] = $option; } } elseif(substr($facetname, 0, 5) == 'attr_') { foreach($values as $v=>$c) { - $option = array($v, $v.' ('.$c.')'); - if(isset($attributes[$facetname]) && in_array($v, $attributes[$facetname])) - $option[] = true; - $options[] = $option; + $option = array($v, $v/*.' ('.$c.')'*/); + if(isset($attributes[$facetname]) && in_array($v, $attributes[$facetname])) + $option[] = true; + else + $option[] = false; + $option[] = array(array('data-subtitle', $c.' ×')); + $options[] = $option; } } else { foreach($values as $v=>$c) { $option = array($v, $v.' ('.$c.')'); if(isset(${$facetname}) && in_array($v, ${$facetname})) $option[] = true; + else + $option[] = false; + $option[] = array(array('data-subtitle', $c.' ×')); $options[] = $option; } } if(substr($facetname, 0, 5) == 'attr_') { + if($options) { $tmp = explode('_', $facetname); if($attrdef = $dms->getAttributeDefinition($tmp[1])) $dispname = $attrdef->getName(); @@ -910,6 +926,7 @@ function typeahead() { /* {{{ */ 'multiple'=>$multiple ) ); + } } else { $this->formField( getMLText($facetname), From 5d2ace6a14a3cd719af729661a180576e1f34ae0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 9 Mar 2023 08:10:12 +0100 Subject: [PATCH 1864/2006] take over attribute validation from op.UpdateDocument.php --- op/op.CheckInDocument.php | 43 ++++++++------------------------------- 1 file changed, 9 insertions(+), 34 deletions(-) diff --git a/op/op.CheckInDocument.php b/op/op.CheckInDocument.php index 47853f199..b870fc2ee 100644 --- a/op/op.CheckInDocument.php +++ b/op/op.CheckInDocument.php @@ -192,42 +192,17 @@ else foreach($attributes as $attrdefid=>$attribute) { $attrdef = $dms->getAttributeDefinition($attrdefid); if($attribute) { - if(!$attrdef->validate($attribute)) { - switch($attrdef->getValidationError()) { - case 5: - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_malformed_email", array("attrname"=>$attrdef->getName(), "value"=>$attribute))); - break; - case 4: - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_malformed_url", array("attrname"=>$attrdef->getName(), "value"=>$attribute))); - break; - case 3: - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_no_regex_match", array("attrname"=>$attrdef->getName(), "value"=>$attribute, "regex"=>$attrdef->getRegex()))); - break; - case 2: - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_max_values", array("attrname"=>$attrdef->getName()))); - break; - case 1: - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_min_values", array("attrname"=>$attrdef->getName()))); - break; - default: - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); - } + switch($attrdef->getType()) { + case SeedDMS_Core_AttributeDefinition::type_date: + $attribute = date('Y-m-d', makeTsFromDate($attribute)); + break; } - /* - if($attrdef->getRegex()) { - if(!preg_match($attrdef->getRegex(), $attribute)) { - UI::exitError(getMLText("document_title", array("documentname" => $folder->getName())),getMLText("attr_no_regex_match")); - } + if(!$attrdef->validate($attribute, null, true)) { + $errmsg = getAttributeValidationText($attrdef->getValidationError(), $attrdef->getName(), $attribute); + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())), $errmsg); } - if(is_array($attribute)) { - if($attrdef->getMinValues() > count($attribute)) { - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_min_values", array("attrname"=>$attrdef->getName()))); - } - if($attrdef->getMaxValues() && $attrdef->getMaxValues() < count($attribute)) { - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_max_values", array("attrname"=>$attrdef->getName()))); - } - } - */ + } elseif($attrdef->getMinValues() > 0) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("attr_min_values", array("attrname"=>$attrdef->getName()))); } } } else { From 2c5f661108193b80a61586108d34c03ae0b6db74 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 10 Mar 2023 17:58:27 +0100 Subject: [PATCH 1865/2006] support README of extension in different languages --- views/bootstrap/class.ExtensionMgr.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.ExtensionMgr.php b/views/bootstrap/class.ExtensionMgr.php index db44c3928..10fde5e5c 100644 --- a/views/bootstrap/class.ExtensionMgr.php +++ b/views/bootstrap/class.ExtensionMgr.php @@ -178,6 +178,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { function readme() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; + $session = $this->params['session']; $extdir = $this->params['extdir']; $extmgr = $this->params['extmgr']; $extname = $this->params['extname']; @@ -185,9 +186,10 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { if(isset($extconf[$extname])) { $extconf = $extconf[$extname]; - if(file_exists($extdir."/".$extname."/README.md")) { -// echo '
    '.file_get_contents($extdir."/".$extname."/README.md")."
    "; - $Parsedown = new Parsedown(); + $Parsedown = new Parsedown(); + if(file_exists($extdir."/".$extname."/README.".$session->getLanguage().".md")) { + echo $Parsedown->text(file_get_contents($extdir."/".$extname."/README.".$session->getLanguage().".md")); + } elseif(file_exists($extdir."/".$extname."/README.md")) { echo $Parsedown->text(file_get_contents($extdir."/".$extname."/README.md")); } } @@ -197,6 +199,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { $dms = $this->params['dms']; $user = $this->params['user']; $settings = $this->params['settings']; + $session = $this->params['session']; $httproot = $this->params['httproot']; $extmgr = $this->params['extmgr']; $extdir = $this->params['extdir']; @@ -237,7 +240,7 @@ class SeedDMS_View_ExtensionMgr extends SeedDMS_Theme_Style { echo ""; echo ""; echo "
    "; - if(file_exists($extdir."/".$extname."/README.md")) { + if(file_exists($extdir."/".$extname."/README.".$session->getLanguage().".md") || file_exists($extdir."/".$extname."/README.md")) { echo $this->getModalBoxLink(array('target'=>'extensionReadme', 'remote'=>'out.ExtensionMgr.php?action=readme&extensionname='.$extname, 'class'=>'', 'title'=>'', 'attributes'=>array('title'=>getMLText('show_extension_readme')))); } if(!empty($extconf['changelog']) && file_exists($extdir."/".$extname."/".$extconf['changelog'])) { From 2e818d54266a87a548aaeca40651dd84cfaffaf9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 10 Mar 2023 17:59:32 +0100 Subject: [PATCH 1866/2006] add changes for 5.1.30 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index a399113f2..865472f70 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ - use chosen select for custom attributes - color category (use first 6 chars of md5(category name) as hex color) - create missing preview images in category or attribute manager +- support README of extension in different languages -------------------------------------------------------------------------------- Changes in version 5.1.29 From 63adb75fbcc4bdc11a1823080f1dc694ed8da8aa Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 11 Mar 2023 18:57:17 +0100 Subject: [PATCH 1867/2006] fix regression when setting review by individual --- controllers/class.ReviewDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/class.ReviewDocument.php b/controllers/class.ReviewDocument.php index 8d8bea56f..685114306 100644 --- a/controllers/class.ReviewDocument.php +++ b/controllers/class.ReviewDocument.php @@ -45,7 +45,7 @@ class SeedDMS_Controller_ReviewDocument extends SeedDMS_Controller_Common { if($result === null) { if ($reviewtype == "ind") { - $reviewLogID > $content->setReviewByInd($user, $user, $reviewstatus, $comment, $file); + $reviewLogID = $content->setReviewByInd($user, $user, $reviewstatus, $comment, $file); if($reviewLogID === false || 0 > $reviewLogID) { $this->error = 1; $this->errormsg = "review_update_failed"; From da992a7bdd16dc7886e011b8791c2c7dd8302d6f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 11 Mar 2023 18:59:02 +0100 Subject: [PATCH 1868/2006] create 8-bit png instead of 16-bit --- inc/inc.ClassConversionServicePdfToImage.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/inc/inc.ClassConversionServicePdfToImage.php b/inc/inc.ClassConversionServicePdfToImage.php index 4a7f1ce2e..c7b178765 100644 --- a/inc/inc.ClassConversionServicePdfToImage.php +++ b/inc/inc.ClassConversionServicePdfToImage.php @@ -65,9 +65,14 @@ class SeedDMS_ConversionServicePdfToImage extends SeedDMS_ConversionServiceBase if(!empty($params['width'])) $imagick->scaleImage(min((int) $params['width'], $imagick->getImageWidth()), 0); /* Remove alpha channel and set to white */ - $imagick->setImageBackgroundColor('white'); - $imagick->setImageAlphaChannel(Imagick::ALPHACHANNEL_REMOVE); - $imagick->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN); + $imagick->setImageBackgroundColor('white'); + /* Setting the color-type and bit-depth produces much smaller images + * because the default depth appears to be 16 bit + */ + $imagick->setOption('png:color-type', 6); + $imagick->setOption('png:bit-depth', 8); + $imagick->setImageAlphaChannel(Imagick::ALPHACHANNEL_REMOVE); + $imagick->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN); $imagick->setImageFormat('png'); $end = microtime(true); if($this->logger) { From 37f64d0a3e38b96e2cb307e23a26e3063dd018b9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 11 Mar 2023 20:54:42 +0100 Subject: [PATCH 1869/2006] add menu item for adding folder/document to clipboard --- views/bootstrap/class.Bootstrap.php | 10 +++++++++- views/bootstrap/class.Clipboard.php | 2 +- views/bootstrap4/class.Bootstrap4.php | 8 ++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 1f9489f0e..daead2a8e 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -651,6 +651,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; private function folderNavigationBar($folder) { /* {{{ */ $dms = $this->params['dms']; + $enableClipboard = $this->params['enableclipboard']; $accessobject = $this->params['accessobject']; if (!is_object($folder) || !$folder->isType('folder')) { self::showNavigationBar(array()); @@ -689,7 +690,10 @@ background-image: linear-gradient(to bottom, #882222, #111111);; if ($accessobject->check_view_access('FolderNotify')) $menuitems['edit_existing_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.FolderNotify.php?folderid=". $folderID ."&showtree=". showtree(), 'label'=>getMLText('edit_existing_notify')); } - if ($this->params['user']->isAdmin() && $this->params['enablefullsearch']) { + if($enableClipboard) { + $menuitems['add_to_clipboard'] = array('class'=>'addtoclipboard', 'attributes'=>array(['rel', 'F'.$folder->getId()], ['msg', getMLText('splash_added_to_clipboard')], ['title', getMLText("add_to_clipboard")]), 'label'=>getMLText("add_to_clipboard")); + } + if ($accessobject->check_view_access('Indexer') && $this->params['enablefullsearch']) { $menuitems['index_folder'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Indexer.php?folderid=". $folderID."&showtree=".showtree(), 'label'=>getMLText('index_folder')); } @@ -711,6 +715,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; private function documentNavigationBar($document) { /* {{{ */ $accessobject = $this->params['accessobject']; + $enableClipboard = $this->params['enableclipboard']; $accessMode = $document->getAccessMode($this->params['user']); $docid=".php?documentid=" . $document->getID(); echo "params['settings']->_httpRoot."out/out.ViewDocument". $docid ."\" class=\"brand\">".getMLText("document")."\n"; @@ -754,6 +759,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);; if ($accessobject->check_view_access('DocumentNotify')) $menuitems['edit_existing_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.DocumentNotify". $docid, 'label'=>getMLText('edit_existing_notify')); } + if($enableClipboard) { + $menuitems['add_to_clipboard'] = array('class'=>'addtoclipboard', 'attributes'=>array(['rel', 'D'.$document->getId()], ['msg', getMLText('splash_added_to_clipboard')], ['title', getMLText("add_to_clipboard")]), 'label'=>getMLText("add_to_clipboard")); + } if ($accessobject->check_view_access('TransferDocument')) { $menuitems['transfer_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.TransferDocument". $docid, 'label'=>getMLText('transfer_document')); } diff --git a/views/bootstrap/class.Clipboard.php b/views/bootstrap/class.Clipboard.php index f1c97fa97..0bbc0c7b0 100644 --- a/views/bootstrap/class.Clipboard.php +++ b/views/bootstrap/class.Clipboard.php @@ -42,7 +42,7 @@ class SeedDMS_View_Clipboard extends SeedDMS_Theme_Style { */ public function menuClipboard() { /* {{{ */ $clipboard = $this->params['session']->getClipboard(); - if ($this->params['user']->isGuest() || (count($clipboard['docs']) + count($clipboard['folders'])) == 0) { + if (/*$this->params['user']->isGuest() ||*/ (count($clipboard['docs']) + count($clipboard['folders'])) == 0) { return ''; } diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 91f86b6a6..3902711ea 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -656,6 +656,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; private function folderNavigationBar($folder) { /* {{{ */ $dms = $this->params['dms']; + $enableClipboard = $this->params['enableclipboard']; $accessobject = $this->params['accessobject']; if (!is_object($folder) || !$folder->isType('folder')) { self::showNavigationBar(array()); @@ -692,6 +693,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);; if ($accessobject->check_view_access('FolderNotify')) $menuitems['edit_existing_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.FolderNotify.php?folderid=". $folderID ."&showtree=". showtree(), 'label'=>getMLText('edit_existing_notify')); } + if($enableClipboard) { + $menuitems['add_to_clipboard'] = array('class'=>'addtoclipboard', 'attributes'=>array(['rel', 'F'.$folder->getId()], ['msg', getMLText('splash_added_to_clipboard')], ['title', getMLText("add_to_clipboard")]), 'label'=>getMLText("add_to_clipboard")); + } if ($this->params['user']->isAdmin() && $this->params['enablefullsearch']) { $menuitems['index_folder'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Indexer.php?folderid=". $folderID."&showtree=".showtree(), 'label'=>getMLText('index_folder')); } @@ -712,6 +716,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; private function documentNavigationBar($document) { /* {{{ */ $accessobject = $this->params['accessobject']; + $enableClipboard = $this->params['enableclipboard']; $accessMode = $document->getAccessMode($this->params['user']); $docid=".php?documentid=" . $document->getID(); $menuitems = array(); @@ -753,6 +758,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);; if ($accessobject->check_view_access('DocumentNotify')) $menuitems['edit_existing_notify'] = array('link'=>$this->params['settings']->_httpRoot."out/out.DocumentNotify". $docid, 'label'=>getMLText('edit_existing_notify')); } + if($enableClipboard) { + $menuitems['add_to_clipboard'] = array('class'=>'addtoclipboard', 'attributes'=>array(['rel', 'D'.$document->getId()], ['msg', getMLText('splash_added_to_clipboard')], ['title', getMLText("add_to_clipboard")]), 'label'=>getMLText("add_to_clipboard")); + } if ($accessobject->check_view_access('TransferDocument')) { $menuitems['transfer_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.TransferDocument". $docid, 'label'=>getMLText('transfer_document')); } From d127b137ba7c6a054be653ba831a6f50050a1b72 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 11 Mar 2023 22:49:41 +0100 Subject: [PATCH 1870/2006] create missing preview files --- out/out.ExpiredDocuments.php | 1 + views/bootstrap/class.ExpiredDocuments.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/out/out.ExpiredDocuments.php b/out/out.ExpiredDocuments.php index c35d8de0b..70355aff4 100644 --- a/out/out.ExpiredDocuments.php +++ b/out/out.ExpiredDocuments.php @@ -47,6 +47,7 @@ if (isset($_GET["orderdir"]) && strlen($_GET["orderdir"])==1 ) { } if($view) { + $view->setParam('conversionmgr', $conversionmgr); $view->setParam('showtree', showtree()); $view->setParam('orderby', $orderby); $view->setParam('orderdir', $orderdir); diff --git a/views/bootstrap/class.ExpiredDocuments.php b/views/bootstrap/class.ExpiredDocuments.php index d16cca9c4..915cc6473 100644 --- a/views/bootstrap/class.ExpiredDocuments.php +++ b/views/bootstrap/class.ExpiredDocuments.php @@ -47,6 +47,7 @@ class SeedDMS_View_ExpiredDocuments extends SeedDMS_Theme_Style { $user = $this->params['user']; $orderby = $this->params['orderby']; $orderdir = $this->params['orderdir']; + $conversionmgr = $this->params['conversionmgr']; $cachedir = $this->params['cachedir']; $previewwidth = $this->params['previewWidthList']; $timeout = $this->params['timeout']; @@ -55,6 +56,8 @@ class SeedDMS_View_ExpiredDocuments extends SeedDMS_Theme_Style { $db = $dms->getDB(); $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); + if($conversionmgr) + $previewer->setConversionMgr($conversionmgr); $this->htmlStartPage(getMLText("expired_documents")); $this->globalNavigation(); @@ -77,7 +80,6 @@ class SeedDMS_View_ExpiredDocuments extends SeedDMS_Theme_Style { print "".getMLText("action")."\n"; print "\n\n\n"; - $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); foreach ($docs as $document) { echo $this->documentListRow($document, $previewer); } From fe0fd309712338240f3e38b1e3bfa1f760d25af5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 12 Mar 2023 09:18:30 +0100 Subject: [PATCH 1871/2006] add fold marks --- 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 f7d7f5026..3d10ee434 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -868,7 +868,7 @@ function seed_pass_verify($password, $hash) { /* {{{ */ return $hash == md5($password); } /* }}} */ -function resolveTask($task) { +function resolveTask($task) { /* {{{ */ global $dms, $user, $settings, $logger, $fulltextservice, $notifier, $conversionmgr; if(is_object($task)) @@ -879,7 +879,7 @@ function resolveTask($task) { } } return $task; -} +} /* }}} */ /** * Return nonce for CSP From 7ae5749bcf18b5183a2fef3e3fce5f633e80378f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 13 Mar 2023 10:18:14 +0100 Subject: [PATCH 1872/2006] add new method mayCheckIn() --- inc/inc.ClassAccessOperation.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/inc/inc.ClassAccessOperation.php b/inc/inc.ClassAccessOperation.php index 0cb5662ae..b17f8d6e4 100644 --- a/inc/inc.ClassAccessOperation.php +++ b/inc/inc.ClassAccessOperation.php @@ -411,6 +411,24 @@ class SeedDMS_AccessOperation { return false; } /* }}} */ + /** + * Check if document content may be checked in + * + * + */ + function mayCheckIn($document) { /* {{{ */ + if($document->isType('document')) { + $checkoutinfo = $document->getCheckOutInfo(); + if(!$checkoutinfo) + return false; + $info = $checkoutinfo[0]; + if($this->user->getID() == $info['userID'] || $document->getAccessMode($this->user) == M_ALL) { + return true; + } + } + return false; + } /* }}} */ + protected function check_view_legacy_access($view, $get=array()) { /* {{{ */ if($this->user->isAdmin()) return true; From 00fe788571e387ba465c98374e01bc12bf4f8adf Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 13 Mar 2023 10:22:30 +0100 Subject: [PATCH 1873/2006] check if document may be checked in --- op/op.CheckInDocument.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/op/op.CheckInDocument.php b/op/op.CheckInDocument.php index b870fc2ee..8a9c43757 100644 --- a/op/op.CheckInDocument.php +++ b/op/op.CheckInDocument.php @@ -26,6 +26,8 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); +$accessop = new SeedDMS_AccessOperation($dms, $user, $settings); + /* Check if the form data comes from a trusted request */ if(!checkFormKey('checkindocument')) { UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_request_token"))),getMLText("invalid_request_token")); @@ -62,6 +64,10 @@ if ($document->isLocked()) { else $document->setLocked(false); } +if(!$accessop->mayCheckIn($document)) { + UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); +} + if(isset($_POST["comment"])) $comment = $_POST["comment"]; else From 67d61910245166492f7deac681fb178a1a1cd8da Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 13 Mar 2023 10:22:54 +0100 Subject: [PATCH 1874/2006] echo splash msg --- op/op.CheckInDocument.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/op/op.CheckInDocument.php b/op/op.CheckInDocument.php index 8a9c43757..6b2039e31 100644 --- a/op/op.CheckInDocument.php +++ b/op/op.CheckInDocument.php @@ -219,6 +219,8 @@ else if (is_bool($contentResult) && !$contentResult) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); } elseif (is_bool($contentResult) && $contentResult) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_no_checkin")); + $session->setSplashMsg(array('type'=>'error', 'msg'=>getMLText('splash_error_checkin_ended'))); } else { // Send notification to subscribers. if ($notifier){ @@ -379,6 +381,7 @@ else UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); } } + $session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_checked_in'))); } add_log_line("?documentid=".$documentid); From a7579f47aef8265b6d8fc6d2f6edf67191493f34 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 13 Mar 2023 10:23:36 +0100 Subject: [PATCH 1875/2006] show message if document may not be checked in --- views/bootstrap/class.CheckInDocument.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.CheckInDocument.php b/views/bootstrap/class.CheckInDocument.php index 154311499..62c96d2a8 100644 --- a/views/bootstrap/class.CheckInDocument.php +++ b/views/bootstrap/class.CheckInDocument.php @@ -104,6 +104,21 @@ $(document).ready(function() { print "
    "; } + $checkoutinfo = $document->getCheckOutInfo(); + if(!$checkoutinfo) { + $this->errorMsg(getMLText('error_occured')); + $this->contentEnd(); + $this->htmlEndPage(); + exit; + } + $info = $checkoutinfo[0]; + if($user->getID() != $info['userID'] && $document->getAccessMode($user) < M_ALL) { + $this->errorMsg(getMLText('access_denied')); + $this->contentEnd(); + $this->htmlEndPage(); + exit; + } + if ($checkoutstatus = $document->checkOutStatus()) { switch($checkoutstatus) { case 1: @@ -117,7 +132,6 @@ $(document).ready(function() { break; } } - $checkoutinfo = $document->getCheckOutInfo(); $this->rowStart(); if($checkoutstatus == 0) { From ab72673379f344ec7cd9637a96aa4a1a77a91ca3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 13 Mar 2023 10:24:53 +0100 Subject: [PATCH 1876/2006] do not show menu item if document may not be checked in --- views/bootstrap/class.Bootstrap.php | 8 +++++--- views/bootstrap4/class.Bootstrap4.php | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index c03548cac..66d3e07f6 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -812,9 +812,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $menuitems['update_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.UpdateDocument".$docid, 'label'=>getMLText('update_document')); if($accessobject->check_controller_access('LockDocument')) $menuitems['lock_document'] = array('link'=>$this->params['settings']->_httpRoot."op/op.LockDocument".$docid."&formtoken=".createFormKey('lockdocument'), 'label'=>getMLText('lock_document')); - if($document->isCheckedOut()) - $menuitems['checkin_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.CheckInDocument".$docid, 'label'=>getMLText('checkin_document')); - else { + if($document->isCheckedOut()) { + if($accessobject->mayCheckIn($document)) { + $menuitems['checkin_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.CheckInDocument".$docid, 'label'=>getMLText('checkin_document')); + } + } else { if($this->params['checkoutdir']) { $menuitems['checkout_document'] = array('link'=>$this->params['settings']->_httpRoot."op/op.CheckOutDocument".$docid, 'label'=>getMLText('checkout_document')); } diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index e2248acd3..6713ddf13 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -733,9 +733,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $menuitems['update_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.UpdateDocument".$docid, 'label'=>getMLText('update_document')); if($accessobject->check_controller_access('LockDocument')) $menuitems['lock_document'] = array('link'=>$this->params['settings']->_httpRoot."op/op.LockDocument".$docid."&formtoken=".createFormKey('lockdocument'), 'label'=>getMLText('lock_document')); - if($document->isCheckedOut()) - $menuitems['checkin_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.CheckInDocument".$docid, 'label'=>getMLText('checkin_document')); - else { + if($document->isCheckedOut()) { + if($accessobject->mayCheckIn($document)) { + $menuitems['checkin_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.CheckInDocument".$docid, 'label'=>getMLText('checkin_document')); + } + } else { if($this->params['checkoutdir']) { $menuitems['checkout_document'] = array('link'=>$this->params['settings']->_httpRoot."op/op.CheckOutDocument".$docid, 'label'=>getMLText('checkout_document')); } From c099903f1263df0cf1b6592eb5f09e7e8e823b58 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 13 Mar 2023 10:26:22 +0100 Subject: [PATCH 1877/2006] fix html error in menu item if attributes are passed --- views/bootstrap/class.Bootstrap.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index daead2a8e..794c61977 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -576,11 +576,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);; if(!empty($submenuitem['divider'])) { $content .= "
  • \n"; } else { - $content .= "
  • "; + $content .= "
  • "; + $content .= ">".$menuitem['label'].""; } } } From 836a2b50a146ebc1e1dbf24ee4e8b8c4c839ace5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 13 Mar 2023 13:00:39 +0100 Subject: [PATCH 1878/2006] confirm checkbox is required --- views/bootstrap/class.CheckInDocument.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.CheckInDocument.php b/views/bootstrap/class.CheckInDocument.php index 62c96d2a8..f2c50b693 100644 --- a/views/bootstrap/class.CheckInDocument.php +++ b/views/bootstrap/class.CheckInDocument.php @@ -38,11 +38,15 @@ class SeedDMS_View_CheckInDocument extends SeedDMS_Theme_Style { $(document).ready(function() { $("#form1").validate({ messages: { - name: "", comment: "", keywords: "" } }); + $("#form2").validate({ + messages: { + confirm: "", + } + }); $('#presetexpdate').on('change', function(ev){ if($(this).val() == 'date') $('#control_expdate').show(); @@ -691,7 +695,7 @@ $(document).ready(function() { $this->contentHeading(getMLText("cancel_checkout_document")); $this->warningMsg(getMLText('cancel_checkout_warning')); ?> -
    + contentContainerStart(); @@ -702,7 +706,8 @@ $(document).ready(function() { 'element'=>'input', 'type'=>'checkbox', 'name'=>'confirm', - 'value'=>1 + 'value'=>1, + 'required'=>true ) ); $this->contentContainerEnd(); From 5ae461a157b397530514babb521bf4c6370fc609 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 13 Mar 2023 13:01:54 +0100 Subject: [PATCH 1879/2006] add changes for 6.0.23 --- CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 9b91d0bd4..d806844ca 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,8 @@ Changes in version 6.0.23 -------------------------------------------------------------------------------- - fix setting recipients and revisors +- check in of a document is allowed for the user having done the check out + or those users with unlimited access rights on the document -------------------------------------------------------------------------------- Changes in version 6.0.22 From 1c5977fca586a5b5e7128889ea1af687498ec8a6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Mar 2023 12:09:01 +0100 Subject: [PATCH 1880/2006] add missing config types when showing the empty form --- views/bootstrap/class.SchedulerTaskMgr.php | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/views/bootstrap/class.SchedulerTaskMgr.php b/views/bootstrap/class.SchedulerTaskMgr.php index 68726fe27..f5a9c08dc 100644 --- a/views/bootstrap/class.SchedulerTaskMgr.php +++ b/views/bootstrap/class.SchedulerTaskMgr.php @@ -260,6 +260,31 @@ $(document).ready( function() { ) ); break; + case "folder": + $this->formField( + getMLText('task_'.$extname."_".$taskname."_".$param['name']), + $this->getFolderChooserHtml("form".$extname.$taskname, M_READ, -1, 0, 'params['.$param['name']."]") + ); + break; + case "users": + $users = $dms->getAllUsers(); + $options = []; + foreach ($users as $currUser) { + if (!$currUser->isGuest()) + $options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin().' - '.$currUser->getFullName()), false, array(array('data-subtitle', htmlspecialchars($currUser->getEmail())))); + } + $this->formField( + getMLText('task_'.$extname."_".$taskname."_".$param['name']), + array( + 'element'=>'select', + 'class'=>'chzn-select', + 'name'=>'params['.$param['name'].']'.(!empty($param['multiple']) ? '[]' : ''), + '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_'.$extname."_".$taskname."_".$param['name']), From 33fe05fc6e19174199cb338b2f7abd48a8d26ea7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Mar 2023 12:09:33 +0100 Subject: [PATCH 1881/2006] fix unique id of folder chooser --- views/bootstrap/class.SchedulerTaskMgr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.SchedulerTaskMgr.php b/views/bootstrap/class.SchedulerTaskMgr.php index f5a9c08dc..1928c8c8b 100644 --- a/views/bootstrap/class.SchedulerTaskMgr.php +++ b/views/bootstrap/class.SchedulerTaskMgr.php @@ -453,7 +453,7 @@ $(document).ready( function() { $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']."]") + $this->getFolderChooserHtml("form".$task->getExtension().$taskid, M_READ, -1, $folderid ? $dms->getFolder($folderid) : 0, 'params['.$param['name']."]") ); break; case "users": From f1211f6c8096be4676fdc7b990ccb35be971cedb Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Mar 2023 12:09:45 +0100 Subject: [PATCH 1882/2006] init options to empty array for list of users --- 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 1928c8c8b..99e8137d0 100644 --- a/views/bootstrap/class.SchedulerTaskMgr.php +++ b/views/bootstrap/class.SchedulerTaskMgr.php @@ -462,6 +462,7 @@ $(document).ready( function() { else $userids = [$task->getParameter()[$param['name']]]; $users = $dms->getAllUsers(); + $options = []; 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())))); From 1bad1d2aa51d1e3ab4e6667fe24276e0ed4894c3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 15 Mar 2023 11:08:51 +0100 Subject: [PATCH 1883/2006] use require_once instead of include("Log.php") --- inc/inc.LogInit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/inc.LogInit.php b/inc/inc.LogInit.php index 2cc586873..647ef9f04 100644 --- a/inc/inc.LogInit.php +++ b/inc/inc.LogInit.php @@ -18,7 +18,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -include("Log.php"); +require_once("Log.php"); require_once("inc/inc.Utils.php"); $logger = getLogger(); From 782e4c2044bd6043aaf72caffba483dda203c67b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 15 Mar 2023 11:13:14 +0100 Subject: [PATCH 1884/2006] include Log.php early and use require_once --- restapi/index.php | 2 +- webdav/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/restapi/index.php b/restapi/index.php index ae2021838..541d9bfcf 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -1,9 +1,9 @@ Date: Sun, 19 Mar 2023 09:16:49 +0100 Subject: [PATCH 1885/2006] add note for pdftotext --- doc/README.Converters | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/README.Converters b/doc/README.Converters index 508bf46ae..034358ccf 100644 --- a/doc/README.Converters +++ b/doc/README.Converters @@ -9,6 +9,9 @@ application/csv application/pdf pdftotext -nopgbrk %s - | sed -e 's/ [a-zA-Z0-9.]\{1\} / /g' -e 's/[0-9.]//g' + If pdftotext takes too long on large document you may want to pass parameter + -l to specify the last page to be converted + mutool draw -F txt -q -N -o - %s application/vnd.openxmlformats-officedocument.wordprocessingml.document From 197a6e8824a5d876f4d76c1da2137c6c5d57abb9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 19 Mar 2023 09:17:08 +0100 Subject: [PATCH 1886/2006] set various callbacks to reindex document when it has changed --- inc/inc.FulltextInit.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/inc/inc.FulltextInit.php b/inc/inc.FulltextInit.php index 53cfec9a5..84b9d2930 100644 --- a/inc/inc.FulltextInit.php +++ b/inc/inc.FulltextInit.php @@ -6,6 +6,20 @@ function getAttributesCallback($dms) { }; } +function reindexDocumentOrFolderCallback($fulltextservice, $object) { + if($fulltextservice && ($index = $fulltextservice->Indexer())) { + $lucenesearch = $fulltextservice->Search(); + if($object->isType('document')) + $hit = $lucenesearch->getDocument($object->getId()); + elseif($object->isType('folder')) + $hit = $lucenesearch->getFolder($object->getId()); + if($hit) { + $index->reindexDocument($hit->id); + $index->commit(); + } + } +} + $fulltextservice = null; if($settings->_enableFullSearch) { require_once("inc.ClassFulltextService.php"); @@ -62,5 +76,13 @@ if($settings->_enableFullSearch) { if($conversionmgr) $txtpreviewer->setConversionMgr($conversionmgr); $fulltextservice->setPreviewer($txtpreviewer); + + $dms->addCallback('onPostSetFolder', 'reindexDocumentOrFolderCallback', $fulltextservice); + $dms->addCallback('onPostSetName', 'reindexDocumentOrFolderCallback', $fulltextservice); + $dms->addCallback('onPostSetComment', 'reindexDocumentOrFolderCallback', $fulltextservice); + $dms->addCallback('onPostSetKeywords', 'reindexDocumentOrFolderCallback', $fulltextservice); + $dms->addCallback('onPostSetKategories', 'reindexDocumentOrFolderCallback', $fulltextservice); + $dms->addCallback('onPostAddKategories', 'reindexDocumentOrFolderCallback', $fulltextservice); + $dms->addCallback('onPostRemoveKategories', 'reindexDocumentOrFolderCallback', $fulltextservice); } From 882b87c8855b213a0ddc7132c5186d204c5f6794 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 21 Mar 2023 11:25:08 +0100 Subject: [PATCH 1887/2006] check if logger is set before using it --- inc/inc.ClassAuthenticationService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassAuthenticationService.php b/inc/inc.ClassAuthenticationService.php index 41119877a..f04ac304d 100644 --- a/inc/inc.ClassAuthenticationService.php +++ b/inc/inc.ClassAuthenticationService.php @@ -66,7 +66,8 @@ class SeedDMS_AuthenticationService { public function authenticate($username, $password) { /* {{{ */ $user = null; foreach($this->services as $name => $service) { - $this->logger->log('Authentication service \''.$name.'\'', PEAR_LOG_INFO); + if($this->logger) + $this->logger->log('Authentication service \''.$name.'\'', PEAR_LOG_INFO); $user = $service->authenticate($username, $password); if($user === false) { $this->errors[$name] = false; From 057abec09c24f0d9ac2ccc37b1c8619a71f4fb0c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Mar 2023 11:17:16 +0100 Subject: [PATCH 1888/2006] fix sending calendar events --- inc/inc.Tasks.php | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/inc/inc.Tasks.php b/inc/inc.Tasks.php index 8fe23ba1a..3d5db933a 100644 --- a/inc/inc.Tasks.php +++ b/inc/inc.Tasks.php @@ -549,10 +549,10 @@ class SeedDMS_CalendarTask extends SeedDMS_SchedulerTaskBase { /* {{{ */ $logger = $this->logger; $settings = $this->settings; $taskparams = $task->getParameter(); - $tableformat = " %-10s %5d %-60s"; - $tableformathead = " %-10s %5s %-60s"; - $tableformathtml = "%s%d%s"; - $tableformatheadhtml = "%s%s%s"; + $tableformat = " %-10s %-60s"; + $tableformathead = " %-10s %-60s"; + $tableformathtml = "%s%s"; + $tableformatheadhtml = "%s%s"; require_once('inc/inc.ClassEmailNotify.php'); require_once('inc/inc.ClassCalendar.php'); @@ -565,16 +565,33 @@ class SeedDMS_CalendarTask extends SeedDMS_SchedulerTaskBase { /* {{{ */ $body = ''.$auser->getLogin()." <".$auser->getEmail().">\n\n"; $bodyhtml = '

    '.$auser->getLogin()." <".$auser->getEmail().">

    "; $calendar->setUser($auser); - $start = mktime(0,0,0, date('m'), date('d'), date('Y')); - $events = $calendar->getEventsInInterval($start, $start+7*86400); + if(isset($taskparams['days'])) + $days = intval($taskparams['days']); + else + $days = 7; + if($days < 0) { + $end = mktime(0,0,0, date('m'), date('d'), date('Y'))-1; + $start = $end+$days*86400+1; + } elseif($days > 0) { + $start = mktime(0,0,0, date('m'), date('d'), date('Y')); + $end = $start+$days*86400-1; + } else { + $start = mktime(0,0,0, date('m'), date('d'), date('Y')); + $end = $start+86400-1; + } + $events = $calendar->getEventsInInterval($start, $end); if($events && count($events)>0) { + $body .= getMLText('startdate', [], null, $auser->getLanguage()).': '.getLongReadableDate($start)."\n"; + $body .= getMLText('enddate', [], null, $auser->getLanguage()).': '.getLongReadableDate($end)."\n\n"; + $bodyhtml .= '

    '.getMLText('startdate', [], null, $auser->getLanguage()).': '.getLongReadableDate($start)."

    "; + $bodyhtml .= '

    '.getMLText('enddate', [], null, $auser->getLanguage()).': '.getLongReadableDate($end)."

    "; $bodyhtml .= "".PHP_EOL; - $bodyhtml .= sprintf($tableformatheadhtml."\n", getMLText("date", array(), ""), "ID", getMLText("name", array(), "")); - $body .= sprintf($tableformathead."\n", getMLText("expires", array(), ""), "ID", getMLText("name", array(), "")); + $bodyhtml .= sprintf($tableformatheadhtml."\n", getMLText("date", array(), null, $auser->getLanguage()), getMLText("name", array(), null, $auser->getLanguage())); + $body .= sprintf($tableformathead."\n", getMLText("date", array(), null, $auser->getLanguage()), getMLText("name", array(), null, $auser->getLanguage())); $body .= "---------------------------------------------------------------------------------\n"; foreach($events as $event) { - $body .= sprintf($tableformat."\n", getReadableDate($event['start']), 1, $event['name']); - $bodyhtml .= sprintf($tableformathtml."\n", getReadableDate($event['start']), 1, $event['name']); + $body .= sprintf($tableformat."\n", getReadableDate($event['start']), $event['name']); + $bodyhtml .= sprintf($tableformathtml."\n", getReadableDate($event['start']), $event['name']); } $bodyhtml .= "
    ".PHP_EOL; $params = array(); From f4ee945ab1b3b10095d39059f60d8beb92879d0b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Mar 2023 11:17:32 +0100 Subject: [PATCH 1889/2006] add new task for sending statistics --- inc/inc.Tasks.php | 108 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/inc/inc.Tasks.php b/inc/inc.Tasks.php index 3d5db933a..53e8e5fee 100644 --- a/inc/inc.Tasks.php +++ b/inc/inc.Tasks.php @@ -615,6 +615,113 @@ class SeedDMS_CalendarTask extends SeedDMS_SchedulerTaskBase { /* {{{ */ public function getAdditionalParams() { return array( + array( + 'name'=>'days', + 'type'=>'integer', + 'description'=> 'Number of days to look ahead starting from today. Negative values will look into the past ending today. 0 will just check for events of the current day.', + ), + ); + } +} /* }}} */ + +/** + * Class containing methods for running a scheduled task + * + * @author Uwe Steinmann + * @package SeedDMS + * @subpackage core + */ +class SeedDMS_StatisticTask extends SeedDMS_SchedulerTaskBase { /* {{{ */ + + /** + * Run the task + * + * @param SeedDMS_SchedulerTask $task task to be executed + * @return boolean true if task was executed succesfully, otherwise false + */ + public function execute(SeedDMS_SchedulerTask $task) { + $dms = $this->dms; + $user = $this->user; + $logger = $this->logger; + $settings = $this->settings; + $taskparams = $task->getParameter(); + $tableformat = " %-30s %5d"; + $tableformathead = " %-30s %5s"; + $tableformathtml = "%s%d"; + $tableformatheadhtml = "%s%s"; + + require_once('inc/inc.ClassEmailNotify.php'); + $email = new SeedDMS_EmailNotify($dms, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword); + + $userstotal = $dms->getStatisticalData('userstotal'); + $docstotal = $dms->getStatisticalData('docstotal'); + $folderstotal = $dms->getStatisticalData('folderstotal'); + $docsaccumulated = $dms->getStatisticalData('docsaccumulated'); + + $userids = $taskparams['users']; + foreach($userids as $userid) { + if(($auser = $dms->getUser((int) $userid)) && $auser->isAdmin() && !$auser->isDisabled() && $auser->getEmail()) { + /* Create individual mails, because the users may have different + * languages. + */ + $body = ''.$auser->getLogin()." <".$auser->getEmail().">\n\n"; + $bodyhtml = '

    '.$auser->getLogin()." <".$auser->getEmail().">

    "; + $bodyhtml .= "".PHP_EOL; + $bodyhtml .= sprintf($tableformatheadhtml."\n", getMLText("name", array(), null, $auser->getLanguage()), getMLText("number_count", array(), "")); + $body .= sprintf($tableformathead."\n", getMLText("name", array(), ""), getMLText("number_count", array(), null, $auser->getLanguage())); + $body .= "---------------------------------------------------------------------------------\n"; + + $bodyhtml .= sprintf($tableformathtml."\n", getMLText("users", array(), null, $auser->getLanguage()), $userstotal); + $body .= sprintf($tableformat."\n", getMLText("users", array(), null, $auser->getLanguage()), $userstotal); + $bodyhtml .= sprintf($tableformathtml."\n", getMLText("documents", array(), null, $auser->getLanguage()), $docstotal); + $body .= sprintf($tableformat."\n", getMLText("documents", array(), null, $auser->getLanguage()), $docstotal); + $bodyhtml .= sprintf($tableformathtml."\n", getMLText("folders", array(), null, $auser->getLanguage()), $folderstotal); + $body .= sprintf($tableformat."\n", getMLText("folders", array(), null, $auser->getLanguage()), $folderstotal); + $today = date('Y-m-d'); + $yesterday = date('Y-m-d', time()-86400); + if(isset($docsaccumulated[$today])) { + $docstoday = $docsaccumulated[$today]; + } else { + $docstoday = 0; + } + $bodyhtml .= sprintf($tableformathtml."\n", getMLText("new_documents_today", array(), null, $auser->getLanguage()), $docstoday); + $body .= sprintf($tableformat."\n", getMLText("new_documents_today", array(), null, $auser->getLanguage()), $docstoday); + if(isset($docsaccumulated[$yesterday])) { + $docsyesterday = $docsaccumulated[$yesterday]; + } else { + $docsyesterday = 0; + } + $bodyhtml .= sprintf($tableformathtml."\n", getMLText("new_documents_yesterday", array(), null, $auser->getLanguage()), $docsyesterday); + $body .= sprintf($tableformat."\n", getMLText("new_documents_yesterday", array(), null, $auser->getLanguage()), $docsyesterday); + + $bodyhtml .= "
    ".PHP_EOL; + + echo $body; + $params = array(); + $params['__body__'] = $body; + $params['__body_html__'] = $bodyhtml; + $params['sitename'] = $settings->_siteName; + //$email->toIndividual('', $auser, 'statistics_mail_subject', '', $params); + + $logger->log('Task \'statistics\': Sending statistics \'statistics_mail_subject\' to user \''.$auser->getLogin().'\'', PEAR_LOG_INFO); + } + } + + return true; + } + + public function getDescription() { + return 'Send statistics by email'; + } + + public function getAdditionalParams() { + return array( + array( + 'name'=>'users', + 'type'=>'users', + 'multiple'=>true, + 'description'=> 'Send statistics report to this users', + ) ); } } /* }}} */ @@ -624,3 +731,4 @@ $GLOBALS['SEEDDMS_SCHEDULER']['tasks']['core']['indexingdocs'] = 'SeedDMS_Indexi $GLOBALS['SEEDDMS_SCHEDULER']['tasks']['core']['checksum'] = 'SeedDMS_CheckSumTask'; $GLOBALS['SEEDDMS_SCHEDULER']['tasks']['core']['preview'] = 'SeedDMS_PreviewTask'; $GLOBALS['SEEDDMS_SCHEDULER']['tasks']['core']['calendar'] = 'SeedDMS_CalendarTask'; +$GLOBALS['SEEDDMS_SCHEDULER']['tasks']['core']['statistic'] = 'SeedDMS_StatisticTask'; From 8628e5b02c2ca32a941795ab474a8820c9775504 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Mar 2023 11:18:59 +0100 Subject: [PATCH 1890/2006] add new phrases --- languages/ar_EG/lang.inc | 9 +++++++++ languages/bg_BG/lang.inc | 9 +++++++++ languages/ca_ES/lang.inc | 9 +++++++++ languages/cs_CZ/lang.inc | 9 +++++++++ languages/de_DE/lang.inc | 11 ++++++++++- languages/el_GR/lang.inc | 9 +++++++++ languages/en_GB/lang.inc | 11 ++++++++++- languages/es_ES/lang.inc | 9 +++++++++ languages/fr_FR/lang.inc | 9 +++++++++ languages/hr_HR/lang.inc | 9 +++++++++ languages/hu_HU/lang.inc | 9 +++++++++ languages/id_ID/lang.inc | 9 +++++++++ languages/it_IT/lang.inc | 9 +++++++++ languages/ko_KR/lang.inc | 9 +++++++++ languages/lo_LA/lang.inc | 9 +++++++++ languages/nb_NO/lang.inc | 9 +++++++++ languages/nl_NL/lang.inc | 9 +++++++++ languages/pl_PL/lang.inc | 9 +++++++++ languages/pt_BR/lang.inc | 9 +++++++++ languages/ro_RO/lang.inc | 9 +++++++++ languages/ru_RU/lang.inc | 9 +++++++++ languages/sk_SK/lang.inc | 9 +++++++++ languages/sv_SE/lang.inc | 9 +++++++++ languages/tr_TR/lang.inc | 9 +++++++++ languages/uk_UA/lang.inc | 9 +++++++++ languages/zh_CN/lang.inc | 9 +++++++++ languages/zh_TW/lang.inc | 9 +++++++++ 27 files changed, 245 insertions(+), 2 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index d458b4f2a..6b33de47a 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -232,9 +232,11 @@ URL: [url]', 'bg_BG' => 'بلغارية', 'browse' => 'تصفح', 'calendar' => 'التقويم', +'calendar_events_mail_subject' => '', 'calendar_week' => 'التقويم الأسبوعي', 'cancel' => 'الغاء', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'لايمكن تعديل ملف مرفوض او مهمل', 'cannot_change_final_states' => 'تحذير: لا يمكن تعديل حالة مستند مرفوض او منتهى صلاحيته او رهن المراجعة او الموافقة', @@ -552,6 +554,7 @@ URL: [url]', 'empty_list' => 'الائحة خالية', 'empty_notify_list' => 'لايوجد مدخلات', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'الإنكليزية (GB)', 'equal_transition_states' => 'حالة البداية والنهاية متشابهة', 'error' => 'خطأ', @@ -738,6 +741,7 @@ URL: [url]', 'import_fs_warning' => 'تحذير النسخ من ملف النظام', 'import_users' => 'ﺎﺴﺘﻳﺭﺍﺩ ﻢﺴﺘﺧﺪﻤﻴﻧ', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => 'إضافة المحتوى', 'include_documents' => 'اشمل مستندات', @@ -927,6 +931,8 @@ URL: [url]', 'new_attrdef' => 'اضافة تعريف سمة', 'new_default_keywords' => 'اضافة كلمات بحث', 'new_default_keyword_category' => 'من فضلك اضف قسم', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'من فضلك اضف قسم', 'new_document_email' => 'مستند جديد', 'new_document_email_body' => 'مستند جديد @@ -1020,6 +1026,7 @@ URL: [url]', 'no_version_modification' => 'لا تعديل على الإصدار', 'no_workflows' => '', 'no_workflow_available' => 'لا يوجد سير عمل', +'number_count' => '', 'objectcheck' => 'التحقق من مستند/مجلد', 'object_check_critical' => 'التحقق من الشيء في حالة حرجة', 'object_check_warning' => 'تحذير في التحقق من شيء', @@ -1160,6 +1167,7 @@ URL: [url]', 'remove_marked_files' => 'ازالة الملفات المختارة', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'تم اصلاحه', 'repairing_objects' => 'تحضير المستندات والمجلدات.', 'replace_content_email_body' => '', @@ -1896,6 +1904,7 @@ URL: [url]', 'splash_transfer_document' => 'نقل المستند', 'splash_transfer_objects' => 'نقل الأشياء', 'splash_trigger_workflow' => 'تفعيل سير العمل', +'startdate' => '', 'state_and_next_state' => 'الحالة الحالية والحالة المقبلة', 'statistic' => 'إحصائيات', 'status' => 'الحالة', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index 4c8906d39..6141a0b7d 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -215,9 +215,11 @@ $text = array( 'bg_BG' => 'Български', 'browse' => 'Преглеждане', 'calendar' => 'Календар', +'calendar_events_mail_subject' => '', 'calendar_week' => '', 'cancel' => 'Отмяна', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'Невозможно е да се измени остарял или отклонен документ', 'cannot_change_final_states' => 'Невозможно е да се изменя статусът на отклонен, просрочен или чакащ рецензия или утверждаване', @@ -505,6 +507,7 @@ $text = array( 'empty_list' => '', 'empty_notify_list' => 'Няма записи', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'Английски (Великобритания)', 'equal_transition_states' => 'Началното и крайно състояние са еднакви', 'error' => 'Грешка', @@ -667,6 +670,7 @@ $text = array( 'import_fs_warning' => '', 'import_users' => '', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => '', 'include_documents' => 'Включи документи', @@ -856,6 +860,8 @@ $text = array( 'new_attrdef' => 'Добави дефиниция атрибути', 'new_default_keywords' => 'Добави ключови думи', 'new_default_keyword_category' => 'Добави категория', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Добави категория документ', 'new_document_email' => 'Нов документ', 'new_document_email_body' => '', @@ -925,6 +931,7 @@ $text = array( 'no_version_modification' => '', 'no_workflows' => '', 'no_workflow_available' => '', +'number_count' => '', 'objectcheck' => 'Проверка на Папка/Документ', 'object_check_critical' => '', 'object_check_warning' => '', @@ -1050,6 +1057,7 @@ $text = array( 'remove_marked_files' => '', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => '', 'repairing_objects' => 'Поправка на папки и документи', 'replace_content_email_body' => '', @@ -1759,6 +1767,7 @@ $text = array( 'splash_transfer_document' => '', 'splash_transfer_objects' => '', 'splash_trigger_workflow' => '', +'startdate' => '', 'state_and_next_state' => '', 'statistic' => '', 'status' => 'Статус', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index a4d0af160..e1368165c 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -220,9 +220,11 @@ URL: [url]', 'bg_BG' => 'Búlgar', 'browse' => 'Navega', 'calendar' => 'Calendari', +'calendar_events_mail_subject' => '', 'calendar_week' => '', 'cancel' => 'Cancel.lar', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'No es poden assignar nous revisors a un document que no està pendent de revisió o d\'aprovació.', 'cannot_change_final_states' => 'Atenció: No es pot canviar l\'estat de documents que han estat rebutjats, marcats com a obsolets o expirats.', @@ -510,6 +512,7 @@ URL: [url]', 'empty_list' => '', 'empty_notify_list' => 'No hi ha entrades', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'Anglès (Regne Unit)', 'equal_transition_states' => '', 'error' => '', @@ -672,6 +675,7 @@ URL: [url]', 'import_fs_warning' => 'Només funciona arrastrant carpetes.La operació importarà recursivament totes les carpetes i arxius.', 'import_users' => 'Importar usuaris', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => '', 'include_documents' => 'Incloure documents', @@ -861,6 +865,8 @@ URL: [url]', 'new_attrdef' => '', 'new_default_keywords' => 'Afegir mots clau', 'new_default_keyword_category' => 'Nova categoria', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Add category', 'new_document_email' => 'Nou document', 'new_document_email_body' => '', @@ -930,6 +936,7 @@ URL: [url]', 'no_version_modification' => '', 'no_workflows' => '', 'no_workflow_available' => '', +'number_count' => '', 'objectcheck' => 'Carpeta / Comprobació del document', 'object_check_critical' => '', 'object_check_warning' => '', @@ -1055,6 +1062,7 @@ URL: [url]', 'remove_marked_files' => '', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => '', 'repairing_objects' => '', 'replace_content_email_body' => '', @@ -1764,6 +1772,7 @@ URL: [url]', 'splash_transfer_document' => '', 'splash_transfer_objects' => '', 'splash_trigger_workflow' => '', +'startdate' => '', 'state_and_next_state' => '', 'statistic' => 'Estadístiques', 'status' => 'Estat', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index ec6645bb7..225d28b3a 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -244,9 +244,11 @@ URL: [url]', 'bg_BG' => 'Bulharština', 'browse' => 'Prohlížet', 'calendar' => 'Kalendář', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Kaledářní týden', 'cancel' => 'Zrušit', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'Není možné přidělit schvalovatele dokumentu, který nečeká na kontrolu nebo na schválení.', 'cannot_change_final_states' => 'Upozornění: Nemůžete měnit stav dokumentu: zamítnutého, s vypršenou platností, posuzovaného nebo schvalovaného.', @@ -576,6 +578,7 @@ URL: [url]', 'empty_list' => 'Žádné záznamy', 'empty_notify_list' => 'Žádné položky', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'Angličtina (GB)', 'equal_transition_states' => 'Počáteční a konečný stav transformace jsou stejné', 'error' => 'Error', @@ -769,6 +772,7 @@ URL: [url]', 'import_fs_warning' => 'To bude fungovat pouze pro složky ve vhazovací složce. Operace rekurzivně importuje všechny složky a soubory. Soubory budou okamžitě uvolněny.', 'import_users' => 'Import uživatelů', 'import_users_addnew' => 'Přidat nové uživatele', +'import_users_no_column_mapping' => '', 'import_users_update' => 'Aktualizovat existující uživatele', 'include_content' => 'Včetně obsahu', 'include_documents' => 'Včetně dokumentů', @@ -958,6 +962,8 @@ URL: [url]', 'new_attrdef' => 'Přidat definici atributu', 'new_default_keywords' => 'Přidat klíčová slova', 'new_default_keyword_category' => 'Přidat kategorii', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Přidat kategorii dokumentů', 'new_document_email' => 'Nový dokument', 'new_document_email_body' => 'Nový dokument @@ -1051,6 +1057,7 @@ URL: [url]', 'no_version_modification' => 'Žádná změna verze', 'no_workflows' => '', 'no_workflow_available' => 'Není k dispozici žádné workflow', +'number_count' => '', 'objectcheck' => 'Kontrola složky/dokumentu', 'object_check_critical' => 'Kritické chyby', 'object_check_warning' => 'Varování', @@ -1206,6 +1213,7 @@ URL: [url]', 'remove_marked_files' => 'Odstranit označené soubory', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'opraveno', 'repairing_objects' => 'Opravuji dokumenty a složky.', 'replace_content_email_body' => '', @@ -1968,6 +1976,7 @@ Jméno: [username] 'splash_transfer_document' => 'Dokument přenesen', 'splash_transfer_objects' => 'Objekt přenesen', 'splash_trigger_workflow' => 'Spuštěn přechod workflow', +'startdate' => '', 'state_and_next_state' => 'Stav / Další stav', 'statistic' => 'Statistika', 'status' => 'Stav', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index c1c58c46e..4169f3b6a 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 (3162), dgrutsch (22) +// Translators: Admin (3171), dgrutsch (22) $text = array( '2_factor_auth' => '2-Faktor Authentifizierung', @@ -283,9 +283,11 @@ URL: [url]

    ', 'bg_BG' => 'Bulgarisch', 'browse' => 'Durchsuchen', 'calendar' => 'Kalender', +'calendar_events_mail_subject' => 'Anstehende Ereignisse', 'calendar_week' => 'Kalenderwoche', 'cancel' => 'Abbrechen', 'cancel_checkout' => 'Auschecken abbrechen', +'cancel_checkout_document' => 'Bende Checkout ohne Speichern', 'cancel_checkout_warning' => 'Das Auschecken kann beendet werden, auch wenn bereits Änderung am ausgecheckten Dokument vorgenommen worden sind. In dem Fall wird die Datei gelöscht und die Änderungen gehen verloren.', 'cannot_assign_invalid_state' => 'Die Zuweisung eines neuen Prüfers zu einem Dokument, welches noch nachbearbeitet oder überprüft wird ist nicht möglich', 'cannot_change_final_states' => 'Warnung: Der Dokumentstatus für Dokumente, die zurückgewiesen worden sind oder als abgelaufen bzw. veraltert markiert wurden, kann nicht geändert werden.', @@ -677,6 +679,7 @@ URL: [url]

    ', 'empty_list' => 'Keine Einträge', 'empty_notify_list' => 'Keine Beobachter', 'enable_extension' => 'Erweiterunge aktivieren', +'enddate' => 'Enddatum', 'en_GB' => 'Englisch (GB)', 'equal_transition_states' => 'Start- und Endstatus ѕind gleich', 'error' => 'Fehler', @@ -912,6 +915,7 @@ URL: [url]

    ', 'import_fs_warning' => 'Der Import kann nur für Ordner im Ablageordner erfolgen. Alle Ordner und Dateien werden rekursiv importiert. Dateien werden sofort freigegeben.', 'import_users' => 'Importiere Benutzer', 'import_users_addnew' => 'Neue Benutzer anlegen', +'import_users_no_column_mapping' => 'Laden Sie eine Benutzerliste hoch', 'import_users_update' => 'Aktualisiere bestehende Benutzer', 'include_content' => 'Inhalte mit exportieren', 'include_documents' => 'Dokumente miteinbeziehen', @@ -1101,6 +1105,8 @@ URL: [url]

    ', 'new_attrdef' => 'Neue Attributdefinition', 'new_default_keywords' => 'Neue Vorlage', 'new_default_keyword_category' => 'Neue Kategorie', +'new_documents_today' => 'Neue Dokumente heute', +'new_documents_yesterday' => 'Neue Dokumente gestern', 'new_document_category' => 'Neue Kategorie', 'new_document_email' => 'Neues Dokument', 'new_document_email_body' => 'Neues Dokument @@ -1223,6 +1229,7 @@ URL: [url]

    ', 'no_version_modification' => 'Keine Modifikationen an einer Version', 'no_workflows' => 'Sie haben bisher keinen Workflow erstellt', 'no_workflow_available' => 'Kein Workflow verfügbar', +'number_count' => 'Anzahl', 'objectcheck' => 'Ordner- und Dokumentenprüfung', 'object_check_critical' => 'Kritische Fehler', 'object_check_warning' => 'Warnungen', @@ -1442,6 +1449,7 @@ URL: [url]

    ', 'remove_marked_files' => 'Markierte Dateien löschen', 'remove_review_log' => 'Einzelne Prüfung entfernen', 'remove_task' => 'Task entfernen', +'reorder' => 'Neu ortnen', 'repaired' => 'repariert', 'repairing_objects' => 'Repariere Dokumente und Ordner.', 'replace_content_email_body' => 'Die letzte Version des Dokuments wurde ersetzt. @@ -2300,6 +2308,7 @@ Sollten Sie kein Passwort bekommen haben, dann nutzen Sie bitte die Passwort-Ver 'splash_transfer_document' => 'Dokument übertragen', 'splash_transfer_objects' => 'Objekte übertragen', 'splash_trigger_workflow' => '', +'startdate' => 'Startdatum', 'state_and_next_state' => 'Status/Nächster Status', 'statistic' => 'Statistik', 'status' => 'Status', diff --git a/languages/el_GR/lang.inc b/languages/el_GR/lang.inc index 88d675215..3b39fa69f 100644 --- a/languages/el_GR/lang.inc +++ b/languages/el_GR/lang.inc @@ -215,9 +215,11 @@ $text = array( 'bg_BG' => 'Βουλγάρικα', 'browse' => '', 'calendar' => 'Ημερολόγιο', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Εβδομάδα', 'cancel' => 'Ακύρωση', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => '', 'cannot_change_final_states' => '', @@ -505,6 +507,7 @@ $text = array( 'empty_list' => '', 'empty_notify_list' => '', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'English (GB)/Αγγλικά', 'equal_transition_states' => '', 'error' => 'Λάθος', @@ -667,6 +670,7 @@ $text = array( 'import_fs_warning' => '', 'import_users' => 'Εισαγωγή χειριστών', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => '', 'include_documents' => '', @@ -856,6 +860,8 @@ $text = array( 'new_attrdef' => '', 'new_default_keywords' => '', 'new_default_keyword_category' => 'Προσθήκη Κατηγορίας', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Προσθήκη κατηγορίας', 'new_document_email' => 'Νέο Έγγραφο', 'new_document_email_body' => 'Νέο έγγραφο @@ -936,6 +942,7 @@ URL: [url]', 'no_version_modification' => '', 'no_workflows' => '', 'no_workflow_available' => '', +'number_count' => '', 'objectcheck' => 'Αναζήτηση σε αρχεία και φακέλους', 'object_check_critical' => '', 'object_check_warning' => '', @@ -1061,6 +1068,7 @@ URL: [url]', 'remove_marked_files' => '', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => '', 'repairing_objects' => '', 'replace_content_email_body' => '', @@ -1770,6 +1778,7 @@ URL: [url]', 'splash_transfer_document' => '', 'splash_transfer_objects' => '', 'splash_trigger_workflow' => '', +'startdate' => '', 'state_and_next_state' => '', 'statistic' => '', 'status' => 'κατάσταση', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index 90cf775dc..7fc250ebc 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 (2257), archonwang (3), dgrutsch (9), netixw (14) +// Translators: Admin (2266), archonwang (3), dgrutsch (9), netixw (14) $text = array( '2_factor_auth' => '2-factor authentication', @@ -283,9 +283,11 @@ URL: [url]

    ', 'bg_BG' => 'Bulgarian', 'browse' => 'Browse', 'calendar' => 'Calendar', +'calendar_events_mail_subject' => 'Upcomming events', 'calendar_week' => 'Calendar week', 'cancel' => 'Cancel', 'cancel_checkout' => 'Cancel checkout', +'cancel_checkout_document' => 'Cancel checkout', 'cancel_checkout_warning' => 'The check out can canceled thought the checked out file has been changed. In that case the file will be deleted from the check out space and your modification will be lost.', 'cannot_assign_invalid_state' => 'Cannot modify an obsolete or rejected document', 'cannot_change_final_states' => 'Warning: You cannot alter status for document rejected, expired or with pending review or approval', @@ -677,6 +679,7 @@ URL: [url]

    ', 'empty_list' => 'No entries', 'empty_notify_list' => 'No entries', 'enable_extension' => 'Enable extension', +'enddate' => 'End date', 'en_GB' => 'English (GB)', 'equal_transition_states' => 'Start and end state are equal', 'error' => 'Error', @@ -913,6 +916,7 @@ URL: [url]

    ', 'import_fs_warning' => 'This will only work for folders in the drop folder. The operation recursively imports all folders and files. Files will be released immediately.', 'import_users' => 'Import users', 'import_users_addnew' => 'Add new users', +'import_users_no_column_mapping' => 'Please upload a user list', 'import_users_update' => 'Update existing users', 'include_content' => 'Include content', 'include_documents' => 'Include documents', @@ -1102,6 +1106,8 @@ URL: [url]

    ', 'new_attrdef' => 'Add attribute definition', 'new_default_keywords' => 'Add keywords', 'new_default_keyword_category' => 'Add category', +'new_documents_today' => 'New documents today', +'new_documents_yesterday' => 'New documents yesterday', 'new_document_category' => 'Add category', 'new_document_email' => 'New document', 'new_document_email_body' => 'New document @@ -1226,6 +1232,7 @@ URL: [url]

    ', 'no_version_modification' => 'No version modification', 'no_workflows' => 'You have not created a workflow yet', 'no_workflow_available' => 'No workflow available', +'number_count' => 'number', 'objectcheck' => 'Folder/Document check', 'object_check_critical' => 'Critical errors', 'object_check_warning' => 'Warnings', @@ -1445,6 +1452,7 @@ URL: [url]

    ', 'remove_marked_files' => 'Remove marked files', 'remove_review_log' => 'Remove review', 'remove_task' => 'Remove task', +'reorder' => 'Reorder', 'repaired' => 'repaired', 'repairing_objects' => 'Repairing documents and folders.', 'replace_content_email_body' => 'The last version of the document has been replaced. @@ -2303,6 +2311,7 @@ If you did not receive a password, please use the password forgotten function on 'splash_transfer_document' => 'Document transfered', 'splash_transfer_objects' => 'Objects transfered', 'splash_trigger_workflow' => 'Triggered transition of workflow', +'startdate' => 'Start date', 'state_and_next_state' => 'State/Next state', 'statistic' => 'Statistic', 'status' => 'Status', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index 0db0189ac..f15893be7 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -239,9 +239,11 @@ URL: [url]', 'bg_BG' => 'Búlgaro', 'browse' => 'Listar', 'calendar' => 'Calendario', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Calendario semanal', 'cancel' => 'Cancelar', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'No se puede modificar un documento obsoleto o rechazado', 'cannot_change_final_states' => 'Cuidado: No se puede cambiar el estado de documentos que han sido rechazados, marcados como obsoletos o expirados.', @@ -565,6 +567,7 @@ URL: [url]', 'empty_list' => 'Sin registros', 'empty_notify_list' => 'Sin entradas', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'Ingless (GB)', 'equal_transition_states' => 'Estado inicial y final son iguales', 'error' => 'Error', @@ -757,6 +760,7 @@ URL: [url]', 'import_fs_warning' => 'Esto funciona únicamente con carpetas dentro de la carpeta destino. La operación importa recursivamente todos los archivos y carpetas. Los archivos serán liberados inmediatamente.', 'import_users' => 'Importar usuarios', 'import_users_addnew' => 'Agregar nuevos usuarios', +'import_users_no_column_mapping' => '', 'import_users_update' => 'Actualizar usuarios existentes', 'include_content' => 'Incluir contenido', 'include_documents' => 'Incluir documentos', @@ -946,6 +950,8 @@ URL: [url]', 'new_attrdef' => 'Nueva definición de atributo', 'new_default_keywords' => 'Agregar palabras claves', 'new_default_keyword_category' => 'Nueva categoría', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Añadir categoría', 'new_document_email' => 'Nuevo documento', 'new_document_email_body' => 'Nuevo documento @@ -1039,6 +1045,7 @@ URL: [url]', 'no_version_modification' => 'Ninguna Modificación de Versión', 'no_workflows' => '', 'no_workflow_available' => '', +'number_count' => '', 'objectcheck' => 'Chequeo de carpeta/documento', 'object_check_critical' => 'Errores críticos', 'object_check_warning' => 'Alertas', @@ -1187,6 +1194,7 @@ nURL: [url]', 'remove_marked_files' => 'Eliminar ficheros marcados', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'Reparado', 'repairing_objects' => 'Reparando documentos y carpetas.', 'replace_content_email_body' => '', @@ -1923,6 +1931,7 @@ URL: [url]', 'splash_transfer_document' => '', 'splash_transfer_objects' => '', 'splash_trigger_workflow' => '', +'startdate' => '', 'state_and_next_state' => 'Estado/Estado siguiente', 'statistic' => 'Estadística', 'status' => 'Estado', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index dfddd6c87..21d9ab80e 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -273,9 +273,11 @@ URL : [url]

    ', 'bg_BG' => 'Bulgare', 'browse' => 'Parcourir', 'calendar' => 'Agenda', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Semaine', 'cancel' => 'Annuler', 'cancel_checkout' => 'Annuler la vérification', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => 'La vérification peut être annulée même si des modifications ont été apportées au fichier. Dans ce cas, le fichier sera supprimé de l\'espace de vérification et votre modification sera perdue.', 'cannot_assign_invalid_state' => 'Impossible de modifier un document obsolète ou rejeté', 'cannot_change_final_states' => 'Attention : Vous ne pouvez pas modifier l’état d\'un document rejeté, expiré ou en attente de vérification ou d’approbation.', @@ -663,6 +665,7 @@ URL : [url]

    ', 'empty_list' => 'Aucune entrée', 'empty_notify_list' => 'Aucune entrée', 'enable_extension' => 'Activer l’extension', +'enddate' => '', 'en_GB' => 'Anglais (RU)', 'equal_transition_states' => 'États de début et de fin identiques', 'error' => 'Erreur', @@ -899,6 +902,7 @@ URL : [url]

    ', 'import_fs_warning' => 'L’importation peut se faire à partir du dossier de dépôt personnel uniquement. Tous les sous-dossiers et fichiers seront importés. Les fichiers seront immédiatement publiés.', 'import_users' => 'Importer des utilisateurs', 'import_users_addnew' => 'Ajouter de nouveaux utilisateurs', +'import_users_no_column_mapping' => '', 'import_users_update' => 'Mettre à jour des utilisateurs existants', 'include_content' => 'Inclure le contenu', 'include_documents' => 'Inclure les documents', @@ -1088,6 +1092,8 @@ URL : [url]

    ', 'new_attrdef' => 'Ajouter une définition d\'attribut', 'new_default_keywords' => 'Ajouter des mots-clés', 'new_default_keyword_category' => 'Ajouter une catégorie', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Ajouter une catégorie', 'new_document_email' => 'Nouveau document', 'new_document_email_body' => 'Nouveau document @@ -1213,6 +1219,7 @@ URL : [url]

    ', 'no_version_modification' => 'Pas de modification de version', 'no_workflows' => 'Vous n’avez pas encore créé de workflow', 'no_workflow_available' => 'Aucun workflow disponible', +'number_count' => '', 'objectcheck' => 'Vérification des dossiers et documents', 'object_check_critical' => 'Erreurs critiques', 'object_check_warning' => 'Avertissements', @@ -1430,6 +1437,7 @@ URL : [url]

    ', 'remove_marked_files' => 'Supprimer les fichiers sélectionnés', 'remove_review_log' => 'Vérification retirée', 'remove_task' => '', +'reorder' => '', 'repaired' => 'réparé', 'repairing_objects' => 'Réparation des documents et des dossiers.', 'replace_content_email_body' => 'La dernière version du document a été remplacée. @@ -2286,6 +2294,7 @@ Nom : [username] 'splash_transfer_document' => 'Document transféré', 'splash_transfer_objects' => 'Objets transférés', 'splash_trigger_workflow' => 'Transition de workflow déclenchée', +'startdate' => '', 'state_and_next_state' => 'État initial/suivant', 'statistic' => 'Statistiques', 'status' => 'Statut', diff --git a/languages/hr_HR/lang.inc b/languages/hr_HR/lang.inc index 4448d5beb..c734f6d4e 100644 --- a/languages/hr_HR/lang.inc +++ b/languages/hr_HR/lang.inc @@ -244,9 +244,11 @@ Internet poveznica: [url]', 'bg_BG' => 'Bugarski', 'browse' => 'Pretraži', 'calendar' => 'Kalendar', +'calendar_events_mail_subject' => '', 'calendar_week' => 'kalendarski tjedan', 'cancel' => 'Odustani', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'Ne možete mijenjati zastarjeli ili odbijeni dokument', 'cannot_change_final_states' => 'Upozorenje: Ne možete mijenjati status odbijenog, isteklog ili dokumenta koji čeka na ovjeru ili odobrenje', @@ -564,6 +566,7 @@ Internet poveznica: [url]', 'empty_list' => '', 'empty_notify_list' => 'Nema zapisa', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'Engleski (GB)', 'equal_transition_states' => 'Početni i završni status su jednaki', 'error' => 'Greška', @@ -750,6 +753,7 @@ Internet poveznica: [url]', 'import_fs_warning' => '', 'import_users' => 'Uvezi korisnike', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => 'Uključi sadržaj', 'include_documents' => 'Sadrži dokumente', @@ -939,6 +943,8 @@ Internet poveznica: [url]', 'new_attrdef' => 'Dodaj definiciju atributa', 'new_default_keywords' => 'Dodaj ključne riječi', 'new_default_keyword_category' => 'Dodaj kategoriju', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Dodaj kategoriju', 'new_document_email' => 'Novi dokument', 'new_document_email_body' => 'Novi dokument @@ -1031,6 +1037,7 @@ Internet poveznica: [url]', 'no_version_modification' => 'Nema modifikacije verzije', 'no_workflows' => '', 'no_workflow_available' => 'Nema dostupnog toka rada', +'number_count' => '', 'objectcheck' => 'Provjera mapa / dokumenata', 'object_check_critical' => '', 'object_check_warning' => '', @@ -1179,6 +1186,7 @@ Internet poveznica: [url]', 'remove_marked_files' => 'Ukloni označene datoteke', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'popravljeno', 'repairing_objects' => 'Popravljanje dokumenata ili mapa.', 'replace_content_email_body' => '', @@ -1932,6 +1940,7 @@ Internet poveznica: [url]', 'splash_transfer_document' => '', 'splash_transfer_objects' => '', 'splash_trigger_workflow' => '', +'startdate' => '', 'state_and_next_state' => 'Status/Slijedeći status', 'statistic' => 'Statistika', 'status' => 'Status', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index 21128b2c3..6a4ae00f4 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -239,9 +239,11 @@ URL: [url]', 'bg_BG' => 'Bulgár', 'browse' => 'Tallózás', 'calendar' => 'Naptár', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Naptári hét', 'cancel' => 'Mé‰gsem', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'Nem lehet új felülvizsgálót hozzárendelni olyan dokumentumhoz, amely nincs felülvizsgálat vagy jóváhagyás alatt.', 'cannot_change_final_states' => 'Figyelem: Nem lehet olyan dokumentum állapotát módosítani, amely visszautasított, elavultnak jelölt vagy lejárt.', @@ -559,6 +561,7 @@ URL: [url]', 'empty_list' => '', 'empty_notify_list' => 'Nincsenek bejegyzések', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'Angol (GB)', 'equal_transition_states' => 'A kezdő- és végállapot megegyezik', 'error' => 'Hiba', @@ -745,6 +748,7 @@ URL: [url]', 'import_fs_warning' => '', 'import_users' => 'Felhasználók importálása', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => '', 'include_documents' => 'Tartalmazó dokumentumok', @@ -934,6 +938,8 @@ URL: [url]', 'new_attrdef' => 'Jellemző meghatározás hozzáadása', 'new_default_keywords' => 'Kulcsszó hozzáadása', 'new_default_keyword_category' => 'Kategória hozzáadása', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Kategória hozzáadása', 'new_document_email' => 'Új dokumentum', 'new_document_email_body' => 'Új dokumentum @@ -1027,6 +1033,7 @@ URL: [url]', 'no_version_modification' => '', 'no_workflows' => '', 'no_workflow_available' => '', +'number_count' => '', 'objectcheck' => 'Mappa/Dokumentum ellenőrzés', 'object_check_critical' => '', 'object_check_warning' => '', @@ -1175,6 +1182,7 @@ URL: [url]', 'remove_marked_files' => 'Megjelölt állományok eltávolítása', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'javított', 'repairing_objects' => 'Dokumentumok és mappák helyreállítása', 'replace_content_email_body' => '', @@ -1910,6 +1918,7 @@ URL: [url]', 'splash_transfer_document' => '', 'splash_transfer_objects' => '', 'splash_trigger_workflow' => '', +'startdate' => '', 'state_and_next_state' => 'Állapot/Következő állapot', 'statistic' => 'Statisztika', 'status' => 'Állapot', diff --git a/languages/id_ID/lang.inc b/languages/id_ID/lang.inc index 2cd68e6c2..cfd218cb5 100644 --- a/languages/id_ID/lang.inc +++ b/languages/id_ID/lang.inc @@ -253,9 +253,11 @@ URL: [url]

    ', 'bg_BG' => 'Bulgaria', 'browse' => 'Jelajahi', 'calendar' => 'Kalender', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Kalender Mingguan', 'cancel' => 'Batal', 'cancel_checkout' => 'Batalkan pembayaran', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => 'Check out dapat dibatalkan jika berkas check out telah diubah. Dalam hal ini berkas akan dihapus dari ruang check out dan modifikasi Anda akan hilang.', 'cannot_assign_invalid_state' => '', 'cannot_change_final_states' => 'Peringatan: Anda tidak dapat mengubah status untuk dokumen yang ditolak, kedaluwarsa, atau dengan tinjauan atau persetujuan yang tertunda', @@ -603,6 +605,7 @@ URL: [url]

    ', 'empty_list' => 'Tidak ada entri', 'empty_notify_list' => 'Tidak ada entri', 'enable_extension' => 'Aktifkan ekstensi', +'enddate' => '', 'en_GB' => '', 'equal_transition_states' => 'Status awal dan akhir sama', 'error' => 'Galat', @@ -801,6 +804,7 @@ URL: [url]

    ', 'import_fs_warning' => '', 'import_users' => 'Impor pengguna', 'import_users_addnew' => 'Tambah pengguna baru', +'import_users_no_column_mapping' => '', 'import_users_update' => 'Perbarui pengguna yang ada', 'include_content' => '', 'include_documents' => 'Sertakan dokumen', @@ -990,6 +994,8 @@ URL: [url]

    ', 'new_attrdef' => 'Tambah definisi label', 'new_default_keywords' => 'Tambah kata kunci', 'new_default_keyword_category' => 'Tambah kategori', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Tambah kategori', 'new_document_email' => 'Tambah dokumen', 'new_document_email_body' => 'Tambah dokumen @@ -1097,6 +1103,7 @@ URL: [url]

    ', 'no_version_modification' => 'Tidak ada versi yang dimodifikasi', 'no_workflows' => 'Anda belum membuat alur kerja', 'no_workflow_available' => 'Tidak ada alur kerja yang tersedia', +'number_count' => '', 'objectcheck' => 'Pemeriksaan Folder/Dokumen', 'object_check_critical' => 'Kesalahan kritis', 'object_check_warning' => 'Peringatan', @@ -1268,6 +1275,7 @@ URL: [url]', 'remove_marked_files' => 'Hapus file yang ditandai', 'remove_review_log' => 'Hapus ulasan', 'remove_task' => '', +'reorder' => '', 'repaired' => 'diperbaiki', 'repairing_objects' => 'Memperbaiki dokumen dan folder.', 'replace_content_email_body' => '', @@ -1984,6 +1992,7 @@ Jika Anda tidak menerima kata sandi, silakan gunakan fitur lupa kata sandi di ha 'splash_transfer_document' => '', 'splash_transfer_objects' => '', 'splash_trigger_workflow' => '', +'startdate' => '', 'state_and_next_state' => '', 'statistic' => 'Statistik', 'status' => 'Status', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index 371d91ee9..f855e4d1c 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -244,9 +244,11 @@ URL: [url]', 'bg_BG' => 'Bulgaro', 'browse' => 'Scegli file', 'calendar' => 'Calendario', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Calendario settimanale', 'cancel' => 'Annulla', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'Non è possibile modificare le assegnazioni di un documento obsoleto o rifiutato', 'cannot_change_final_states' => 'Attenzione: non si può modificare lo stato dei documenti rifiutati, scaduti o in attesa di revisione o approvazione', @@ -569,6 +571,7 @@ URL: [url]', 'empty_list' => 'Nessuna voce', 'empty_notify_list' => 'Nessun record', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'Inglese (GB)', 'equal_transition_states' => 'Lo stato iniziale e quello finale sono identici', 'error' => 'Errore', @@ -755,6 +758,7 @@ URL: [url]', 'import_fs_warning' => 'Questo funziona solo per le cartelle nella cartella per lasciare. L\'operazione importa in modo ricorsivo tutte le cartelle e file. I file saranno pubblicati immediatamente.', 'import_users' => 'Importa utenti', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => 'Includi contenuto', 'include_documents' => 'Includi documenti', @@ -944,6 +948,8 @@ URL: [url]', 'new_attrdef' => 'Nuovo attributo', 'new_default_keywords' => 'Aggiungi parole-chiave', 'new_default_keyword_category' => 'Nuova categoria', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Nuova categoria', 'new_document_email' => 'Nuovo documento', 'new_document_email_body' => 'Nuovo documento @@ -1037,6 +1043,7 @@ URL: [url]', 'no_version_modification' => 'Nessuna modifica versione', 'no_workflows' => '', 'no_workflow_available' => 'Nessun flusso di lavoro disponibile', +'number_count' => '', 'objectcheck' => 'Controllo cartelle o documenti', 'object_check_critical' => 'Errori critici', 'object_check_warning' => 'Avvertenze', @@ -1196,6 +1203,7 @@ URL: [url]', 'remove_marked_files' => 'Rimuovi i files contrassegnati', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'riparato', 'repairing_objects' => 'Riparazione documenti e cartelle in corso...', 'replace_content_email_body' => '', @@ -1959,6 +1967,7 @@ Name: [username] 'splash_transfer_document' => 'Documento trasferito', 'splash_transfer_objects' => 'Oggetti trasferito', 'splash_trigger_workflow' => 'Attivata transizione del flusso di lavoro', +'startdate' => '', 'state_and_next_state' => 'Stato/Prossimo stato', 'statistic' => 'Statistiche', 'status' => 'Stato', diff --git a/languages/ko_KR/lang.inc b/languages/ko_KR/lang.inc index 250bf6186..15f2d7d9e 100644 --- a/languages/ko_KR/lang.inc +++ b/languages/ko_KR/lang.inc @@ -246,9 +246,11 @@ URL: [url]', 'bg_BG' => '불가리아', 'browse' => '검색', 'calendar' => '달력', +'calendar_events_mail_subject' => '', 'calendar_week' => '주', 'cancel' => '취소', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => '사용되지 않거나 거부된 문서는 수정 불가', 'cannot_change_final_states' => '경고 : 거부, 만료 또는 검토나 승인보류 중인 문서의 상태는 변경할 수 없습니다.', @@ -565,6 +567,7 @@ URL: [url]', 'empty_list' => '', 'empty_notify_list' => '항목을 입력하세요', 'enable_extension' => '', +'enddate' => '', 'en_GB' => '영어 (GB)', 'equal_transition_states' => '시작 및 종료가 동일한 상태', 'error' => '오류', @@ -751,6 +754,7 @@ URL: [url]', 'import_fs_warning' => '', 'import_users' => '', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => '내용을 포함', 'include_documents' => '문서 포함', @@ -940,6 +944,8 @@ URL: [url]', 'new_attrdef' => '속성 정의 추가', 'new_default_keywords' => '키워드 추가', 'new_default_keyword_category' => '카테고리 추가', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => '카테고리 추가', 'new_document_email' => '새 문서', 'new_document_email_body' => '새 문서 @@ -1033,6 +1039,7 @@ URL : [url]', 'no_version_modification' => '버전의 변동사항이 없습니다.', 'no_workflows' => '', 'no_workflow_available' => '사용 가능한 워크 플로우 없습니다.', +'number_count' => '', 'objectcheck' => '폴더 / 문서 확인', 'object_check_critical' => '치명적 오류', 'object_check_warning' => 'Warnings', @@ -1173,6 +1180,7 @@ URL: [url]', 'remove_marked_files' => '마크 파일을 제거', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => '복구', 'repairing_objects' => '문서 및 폴더 복구', 'replace_content_email_body' => '', @@ -1926,6 +1934,7 @@ URL : [url]', 'splash_transfer_document' => '', 'splash_transfer_objects' => '', 'splash_trigger_workflow' => '', +'startdate' => '', 'state_and_next_state' => '상태 / 다음 상태', 'statistic' => '통계', 'status' => '상태', diff --git a/languages/lo_LA/lang.inc b/languages/lo_LA/lang.inc index f01c0a2bf..12db8a598 100644 --- a/languages/lo_LA/lang.inc +++ b/languages/lo_LA/lang.inc @@ -242,9 +242,11 @@ URL: [url]', 'bg_BG' => 'ບັດແກເຣີຍ', 'browse' => 'ໝວດ', 'calendar' => 'ປະຕຶທຶນ', +'calendar_events_mail_subject' => '', 'calendar_week' => 'ປະຕຶທຶນປະຈຳອາທຶດ', 'cancel' => 'ຍົກເລີກ', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'ບໍ່ສາມາດແກ້ໄຂເອກະສານທີ່ລ້າສະໄຫມ ຫຼື ເອກະສານທີ່ຖືກປະຕິເສດໄດ້', 'cannot_change_final_states' => 'ຄຳເຕືອນ: ເຈົ້າບໍ່ສາມາດປ່ຽນແປງສະຖານະຂອງເອກະສານທີ່ຖືກປະຕິເສດ, ໝົດອາຍຸ ຫຼື ລໍຖ້າການກວດຄືນ ຫຼື ອະນຸມັດ', @@ -562,6 +564,7 @@ URL: [url]', 'empty_list' => '', 'empty_notify_list' => 'ບໍ່ມີລາຍການ', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'ອັງກິດ (GB)', 'equal_transition_states' => 'ສະຖານະເລີມຕົ້ນແລະສິນສຸດມີຄ່າເທົ່າກັນ', 'error' => 'ຂໍ້ຜິດພາດ', @@ -748,6 +751,7 @@ URL: [url]', 'import_fs_warning' => 'ຊື່ງຈະໄຊ້ໄດ້ສະເພາະກັບໂຟລເດີໃນໂຟລເດີແບບເລືອນລົງເທົ່ານັ້ນ ການດຳເນີນການນີ້ຈະນຳເຂົ້າໄຟລແລະໂຟລເດີທັງຫມົດໄຟລຈະໄດ້ຮັບການເຜີຍແຜ່ທັນທີ', 'import_users' => '', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => 'ລວມເນື້ອຫາ', 'include_documents' => 'ລວມເອກະສານ', @@ -937,6 +941,8 @@ URL: [url]', 'new_attrdef' => 'ເພີ່ມການຈຳກັດຄວາມຂອງແອັດທີບິວ', 'new_default_keywords' => 'ເພີ່ມຄຳຫລັກ', 'new_default_keyword_category' => 'ເພີ່ມຫມວດໝູ່', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'ເພີ່ມຫມວດໝູ່', 'new_document_email' => 'ເອກະສານໄຫມ່', 'new_document_email_body' => 'ເອກະສານໄຫມ່ @@ -1030,6 +1036,7 @@ URL: [url]', 'no_version_modification' => 'ບໍ່ມີການປ່ຽນເວີຊັນ', 'no_workflows' => '', 'no_workflow_available' => 'ບໍ່ມີເວີກໂຟລທີ່ພ້ອມໄຊ້ງານ', +'number_count' => '', 'objectcheck' => 'ການກວດສອບໂຟລເດີ / ເອກະສານ', 'object_check_critical' => 'ຂໍ້ຜິດພາດທີ່ສຳຄັນ', 'object_check_warning' => 'ຄຳເຕືອນ', @@ -1189,6 +1196,7 @@ URL: [url]', 'remove_marked_files' => 'ລົບໄຟລທີມີເຄື່ອງໝາຍໄວ້', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'ການສ້ອມແປງ', 'repairing_objects' => 'ການສ້ອມແປງເອກະສານແລະໂຟລເດີ', 'replace_content_email_body' => '', @@ -1952,6 +1960,7 @@ URL: [url]', 'splash_transfer_document' => '', 'splash_transfer_objects' => 'ຖ່າຍໂອນວັດຖຸຮຽບຮ້ອຍແລ້ວ', 'splash_trigger_workflow' => '', +'startdate' => '', 'state_and_next_state' => 'ລັດ/ລັດຖັດໄປ', 'statistic' => 'ສະຖິຕິ', 'status' => 'ສະຖານະ', diff --git a/languages/nb_NO/lang.inc b/languages/nb_NO/lang.inc index 3421abc6b..5a529d305 100644 --- a/languages/nb_NO/lang.inc +++ b/languages/nb_NO/lang.inc @@ -244,9 +244,11 @@ URL: [url]', 'bg_BG' => 'Bulgaria', 'browse' => 'Bla', 'calendar' => 'Kalender', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Kalenderuke', 'cancel' => 'Avbryt', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'Kan ikke endre et foreldet eller avvist dokument', 'cannot_change_final_states' => 'Advarsel: Du kan ikke endre status for dokument som er avvist, utløpt eller i påvente av gjennomgang eller godkjenning', @@ -576,6 +578,7 @@ URL: [url]', 'empty_list' => 'Ingen oppføringer', 'empty_notify_list' => 'Ingen oppføringer', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'Engelsk (GB)', 'equal_transition_states' => 'Status for start og slutt er lik', 'error' => 'Feil', @@ -769,6 +772,7 @@ URL: [url]', 'import_fs_warning' => 'Dette fungerer bare for mapper i slippmappen. Operasjonen importerer rekursivt alle mapper og filer. Filer vil bli gitt ut umiddelbart.', 'import_users' => '', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => 'Inkludere innhold', 'include_documents' => 'Inkludere dokument', @@ -958,6 +962,8 @@ URL: [url]', 'new_attrdef' => 'Legg til egenskapsdefinisjon', 'new_default_keywords' => 'Legg til søkeord', 'new_default_keyword_category' => 'Legg til kategori for søkeord', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Legg til kategori', 'new_document_email' => 'Nytt dokument', 'new_document_email_body' => 'Nytt dokument @@ -1051,6 +1057,7 @@ URL: [url]', 'no_version_modification' => 'Ingen versjonsendring', 'no_workflows' => '', 'no_workflow_available' => 'Ingen arbeidsflyt tilgjengelig', +'number_count' => '', 'objectcheck' => 'Mappe/dokument sjekk', 'object_check_critical' => 'Kritisk feil!!', 'object_check_warning' => 'Advarsel!', @@ -1204,6 +1211,7 @@ URL: [url]', 'remove_marked_files' => 'Fjern markerte filer', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'reparert', 'repairing_objects' => 'Reparere dokumenter og mapper.', 'replace_content_email_body' => '', @@ -1965,6 +1973,7 @@ Bruker: [username] 'splash_transfer_document' => 'Dokumentet er øverført', 'splash_transfer_objects' => 'Objekt er øverført', 'splash_trigger_workflow' => 'Utløst overgang av arbeidsflyt', +'startdate' => '', 'state_and_next_state' => 'Status/Neste status', 'statistic' => 'Statistikk', 'status' => 'Status', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 68073098b..92aded6d7 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -237,9 +237,11 @@ URL: [url]', 'bg_BG' => 'Bulgaars', 'browse' => 'Browse', 'calendar' => 'Kalender', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Weekkalender', 'cancel' => 'Annuleren', 'cancel_checkout' => 'stop', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'Kan het document niet aanpassen in deze status', 'cannot_change_final_states' => 'Waarschuwing: U kunt de Status [afgewezen], [vervallen], [in afwachting van] (nog) niet wijzigen.', @@ -569,6 +571,7 @@ URL: [url]', 'empty_list' => 'Lijst is leeg', 'empty_notify_list' => 'Geen gegevens', 'enable_extension' => 'Activeer de extensie', +'enddate' => '', 'en_GB' => 'Engels (GB)', 'equal_transition_states' => 'Begin- en eind-status zijn hetzelfde', 'error' => 'Fout', @@ -762,6 +765,7 @@ URL: [url]', 'import_fs_warning' => 'Dit werkt alleen in de dropfolder. Mappen en bestanden worden recursief geïmporteerd. Bestanden worden direct ter beschikking gesteld.', 'import_users' => 'Gebruikers importeren', 'import_users_addnew' => 'Voeg nieuwe gebruikers toe', +'import_users_no_column_mapping' => '', 'import_users_update' => 'Werk gebruikers bij', 'include_content' => 'inclusief inhoud', 'include_documents' => 'Inclusief documenten', @@ -951,6 +955,8 @@ URL: [url]', 'new_attrdef' => 'Voeg een attribuutdefinitie toe', 'new_default_keywords' => 'Sleutelwoorden toevoegen', 'new_default_keyword_category' => 'Categorie Toevoegen', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Categorie toevoegen', 'new_document_email' => 'Nieuw document', 'new_document_email_body' => 'Nieuw Document @@ -1043,6 +1049,7 @@ URL: [url]', 'no_version_modification' => 'Geen versiewijziging', 'no_workflows' => '', 'no_workflow_available' => 'Geen workflow beschikbaar', +'number_count' => '', 'objectcheck' => 'Mappen en documenten controleren', 'object_check_critical' => 'Ernstige fouten', 'object_check_warning' => 'Waarschuwingen', @@ -1202,6 +1209,7 @@ URL: [url]', 'remove_marked_files' => 'Geselecteerde bestanden worden verwijderd', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'Gerepareerd', 'repairing_objects' => 'Documenten en mappen repareren.', 'replace_content_email_body' => '', @@ -1964,6 +1972,7 @@ Name: [username] 'splash_transfer_document' => 'Document verzonden', 'splash_transfer_objects' => 'Objecten verzonden', 'splash_trigger_workflow' => 'Triggered transition van de workflow', +'startdate' => '', 'state_and_next_state' => 'status/ volgende status', 'statistic' => 'Statistieken', 'status' => 'Status', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index dbcecf4ba..20f5e7365 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -232,9 +232,11 @@ URL: [url]', 'bg_BG' => 'Bułgarski', 'browse' => 'Przeglądaj', 'calendar' => 'Kalendarz', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Kalendarz tygodniowy', 'cancel' => 'Anuluj', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'Nie można modyfikować zdezaktualizowanego lub odrzuconego dokumentu', 'cannot_change_final_states' => 'Ostrzeżenie: Nie można zmienić statusu dla dokumentu odrzuconego, wygasłego, w trakcie recenzowania lub zatwierdzania.', @@ -552,6 +554,7 @@ URL: [url]', 'empty_list' => 'Brak wpisów', 'empty_notify_list' => 'Brak dokumentów', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'Angielski (GB)', 'equal_transition_states' => 'Stan rozpoczęcia i ukończenia jest taki sam', 'error' => 'Błąd', @@ -738,6 +741,7 @@ URL: [url]', 'import_fs_warning' => 'Będzie to działać tylko w przypadku folderów w folderze zrzutu. Operacja rekurencyjnie importuje wszystkie foldery i pliki. Pliki zostaną natychmiast zwolnione.', 'import_users' => 'Import użytkowników', 'import_users_addnew' => 'Dodaj nowych użytkowników', +'import_users_no_column_mapping' => '', 'import_users_update' => 'Aktualizuj istniejących użytkowników', 'include_content' => 'Dołącz treść', 'include_documents' => 'Uwzględnij dokumenty', @@ -927,6 +931,8 @@ URL: [url]', 'new_attrdef' => 'Dodaj definicję atrybutu', 'new_default_keywords' => 'Dodaj słowa kluczowe', 'new_default_keyword_category' => 'Dodaj kategorię', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Dodaj kategorię', 'new_document_email' => 'Nowy dokument', 'new_document_email_body' => 'Nowy dokument @@ -1020,6 +1026,7 @@ URL: [url]', 'no_version_modification' => 'Bez modyfikacji wersji', 'no_workflows' => '', 'no_workflow_available' => 'Brak przepływu pracy', +'number_count' => '', 'objectcheck' => 'Sprawdź Katalog/Dokument', 'object_check_critical' => 'Błędy krytyczne', 'object_check_warning' => 'Ostrzeżenia', @@ -1168,6 +1175,7 @@ URL: [url]', 'remove_marked_files' => 'Usuń zaznaczone pliki', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'naprawiony', 'repairing_objects' => 'Naprawa dokumentów i katalogów.', 'replace_content_email_body' => '', @@ -1895,6 +1903,7 @@ Name: [username] 'splash_transfer_document' => 'Dokument przesłany', 'splash_transfer_objects' => 'Obiekty przekazane', 'splash_trigger_workflow' => 'Wyzwalane przejście przepływu pracy', +'startdate' => '', 'state_and_next_state' => 'Status/Następny status', 'statistic' => 'Statystyka', 'status' => 'Status', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 2e6f43bb1..453e7b980 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -244,9 +244,11 @@ URL: [url]', 'bg_BG' => 'Bulgaro', 'browse' => 'Procurar', 'calendar' => 'Calendário', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Calendário semanal', 'cancel' => 'Cancelar', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'Não é possível atribuir novos revisores a um documento que não está pendente de revisão ou aprovação pendente.', 'cannot_change_final_states' => 'Aviso: Você não pode alterar o estado do documento rejeitado, expirado ou com revisão ou aprovação.', @@ -576,6 +578,7 @@ URL: [url]', 'empty_list' => 'Nenhuma entrada', 'empty_notify_list' => 'Sem entradas', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'Inglês (GB)', 'equal_transition_states' => 'Estado de início e fim são iguais', 'error' => 'Erro', @@ -769,6 +772,7 @@ URL: [url]', 'import_fs_warning' => 'Isso só funcionará para pastas na pasta-alvo. A operação importa recursivamente todas as pastas e arquivos. Os arquivos serão liberados imediatamente.', 'import_users' => 'Importar utilizadores', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => 'Incluir conteúdo', 'include_documents' => 'Include documents', @@ -958,6 +962,8 @@ URL: [url]', 'new_attrdef' => 'Adicionar definição de atributo', 'new_default_keywords' => 'Adicionar palavras-chave', 'new_default_keyword_category' => 'Adicionar categoria', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Adicionar categoria', 'new_document_email' => 'Novo documento', 'new_document_email_body' => 'Novo documento @@ -1050,6 +1056,7 @@ URL: [url]', 'no_version_modification' => 'Nenhuma modificação de versão', 'no_workflows' => '', 'no_workflow_available' => 'Nenhum fluxo de trabalho disponível', +'number_count' => '', 'objectcheck' => 'Verificação da Pasta/Documento', 'object_check_critical' => 'Erros críticos', 'object_check_warning' => 'Avisos', @@ -1209,6 +1216,7 @@ URL: [url]', 'remove_marked_files' => 'Remover arquivos marcados', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'reparado', 'repairing_objects' => 'Reparando documentos e pastas', 'replace_content_email_body' => '', @@ -1971,6 +1979,7 @@ Nome: [username] 'splash_transfer_document' => 'Documento transferido', 'splash_transfer_objects' => 'Objetos transferidos', 'splash_trigger_workflow' => 'Acionada transição do fluxo de trabalho', +'startdate' => '', 'state_and_next_state' => 'Estado/Próximo estado', 'statistic' => 'Estatística', 'status' => 'Status', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index a9b60a086..9e540e863 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -244,9 +244,11 @@ URL: [url]', 'bg_BG' => 'Bulgară', 'browse' => 'Browse', 'calendar' => 'Calendar', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Săptămână calendar', 'cancel' => 'Anulare', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'Nu se poate modifica un document învechit(absolete) sau respins(rejected)', 'cannot_change_final_states' => 'Atenție: Nu puteți modifica status-ul unui document respins, expirat sau in așteptarea revizuirii/aprobarii', @@ -564,6 +566,7 @@ URL: [url]', 'empty_list' => '', 'empty_notify_list' => 'Nu există înregistrări', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'Engleza (GB)', 'equal_transition_states' => 'Starea de start și de stop sunt egale', 'error' => 'Eroare', @@ -750,6 +753,7 @@ URL: [url]', 'import_fs_warning' => '', 'import_users' => 'Importa utilizatori', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => '', 'include_documents' => 'Include documente', @@ -939,6 +943,8 @@ URL: [url]', 'new_attrdef' => 'Adaugă definitie atribut', 'new_default_keywords' => 'Adaugă cuvinte cheie', 'new_default_keyword_category' => 'Adaugă categorie', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Adaugă categorie', 'new_document_email' => 'Document nou', 'new_document_email_body' => 'Document nou @@ -1032,6 +1038,7 @@ URL: [url]', 'no_version_modification' => '', 'no_workflows' => '', 'no_workflow_available' => 'Nici un workflow disponibil', +'number_count' => '', 'objectcheck' => 'Verificare folder/document', 'object_check_critical' => '', 'object_check_warning' => '', @@ -1180,6 +1187,7 @@ URL: [url]', 'remove_marked_files' => 'Eliminați fișierele marcate', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'reparat', 'repairing_objects' => 'Reparare documente și foldere.', 'replace_content_email_body' => '', @@ -1933,6 +1941,7 @@ URL: [url]', 'splash_transfer_document' => '', 'splash_transfer_objects' => '', 'splash_trigger_workflow' => '', +'startdate' => '', 'state_and_next_state' => 'Stare/Stare urmatoare', 'statistic' => 'Statistic', 'status' => 'Status', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index e0eadabba..e25392d24 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -244,9 +244,11 @@ URL: [url]', 'bg_BG' => 'Болгарский', 'browse' => 'Выбрать', 'calendar' => 'Календарь', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Неделя', 'cancel' => 'Отмена', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'Невозможно изменить устаревший или отклонённый документ', 'cannot_change_final_states' => 'Нельзя изменять статус отклонённого, устаревшего или ожидающего рецензии или утверждения', @@ -564,6 +566,7 @@ URL: [url]', 'empty_list' => 'Записи отсутствуют', 'empty_notify_list' => 'Нет записей', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'English (GB)', 'equal_transition_states' => 'Одинаковые начальный и конечный статусы', 'error' => 'Ошибка', @@ -750,6 +753,7 @@ URL: [url]', 'import_fs_warning' => 'Предупреждение импорта из ФС', 'import_users' => 'Импорт пользователей', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => 'Включая содержимое', 'include_documents' => 'Включая документы', @@ -939,6 +943,8 @@ URL: [url]', 'new_attrdef' => 'Добавить определение атрибута', 'new_default_keywords' => 'Добавить метки', 'new_default_keyword_category' => 'Добавить метку', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Добавить категорию', 'new_document_email' => 'Новый документ', 'new_document_email_body' => 'Новый документ @@ -1031,6 +1037,7 @@ URL: [url]', 'no_version_modification' => 'Отсутствует модификация версии', 'no_workflows' => '', 'no_workflow_available' => 'Отсутствует процесс', +'number_count' => '', 'objectcheck' => 'Проверка целостности', 'object_check_critical' => '', 'object_check_warning' => '', @@ -1182,6 +1189,7 @@ URL: [url]', 'remove_marked_files' => 'Удалить выбранные файлы', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'исправлено', 'repairing_objects' => 'Восстановление каталогов и документов', 'replace_content_email_body' => '', @@ -1940,6 +1948,7 @@ URL: [url]', 'splash_transfer_document' => '', 'splash_transfer_objects' => '', 'splash_trigger_workflow' => '', +'startdate' => '', 'state_and_next_state' => 'Статус / следующий статус', 'statistic' => 'Статистика', 'status' => 'Статус', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index d363354d7..43963e85b 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -244,9 +244,11 @@ URL: [url]', 'bg_BG' => 'Bulharsky', 'browse' => 'Prehľadávať', 'calendar' => 'Kalendár', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Kalendárny týždeň', 'cancel' => 'Zrušiť', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'Cannot modify an obsolete or rejected document', 'cannot_change_final_states' => 'Warning: You cannot alter status for document rejected, expired or with pending review or approval', @@ -576,6 +578,7 @@ URL: [url]', 'empty_list' => 'Žiadne položky', 'empty_notify_list' => 'Žiadne položky', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'Angličtina (UK)', 'equal_transition_states' => 'Začiatok a koniec sú rovnaké', 'error' => 'Chyba', @@ -769,6 +772,7 @@ URL: [url]', 'import_fs_warning' => 'This will only work for folders in the drop folder. The operation recursively imports all folders and files. Files will be released immediately.', 'import_users' => 'Importovať užívateľov', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => 'Zahrnúť obsah', 'include_documents' => 'Vrátane súborov', @@ -958,6 +962,8 @@ URL: [url]', 'new_attrdef' => 'Pridať definíciu atribútu', 'new_default_keywords' => 'Pridať kľúčové slová', 'new_default_keyword_category' => 'Pridať kategóriu', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Pridať kategóriu', 'new_document_email' => 'Nový dokument', 'new_document_email_body' => 'Nový dokument @@ -1051,6 +1057,7 @@ URL: [url]', 'no_version_modification' => 'Žiadne zmeny', 'no_workflows' => '', 'no_workflow_available' => 'Nie je k dispozícii žiaden workflow', +'number_count' => '', 'objectcheck' => 'Kontrola Adresárov/Dokumentov', 'object_check_critical' => 'Kritické chyby', 'object_check_warning' => 'Varovanie', @@ -1210,6 +1217,7 @@ URL: [url]', 'remove_marked_files' => 'Odstrániť označené súbory', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'opravené', 'repairing_objects' => 'Oprava dokumentov a zložiek.', 'replace_content_email_body' => '', @@ -1973,6 +1981,7 @@ Meno: [username] 'splash_transfer_document' => 'Document transfered', 'splash_transfer_objects' => 'Objects transfered', 'splash_trigger_workflow' => '', +'startdate' => '', 'state_and_next_state' => 'State/Next state', 'statistic' => 'Štatistika', 'status' => 'Stav', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index ba5ad1304..14dd293a6 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -245,9 +245,11 @@ URL: [url]', 'bg_BG' => 'Bulgariska', 'browse' => 'Bläddra', 'calendar' => 'Kalender', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Kalendervecka', 'cancel' => 'Avbryt', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'Kan inte ändra ett dokument som har gått ut eller avvisats.', 'cannot_change_final_states' => 'OBS: Du kan inte ändra status för ett dokument som har avvisats, gått ut eller som väntar på att bli godkänt.', @@ -570,6 +572,7 @@ URL: [url]', 'empty_list' => '', 'empty_notify_list' => 'Inga meddelanden', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'Engelska (GB)', 'equal_transition_states' => 'Status för start och slut är lika', 'error' => 'Fel', @@ -756,6 +759,7 @@ URL: [url]', 'import_fs_warning' => 'Detta fungerar endast för kataloger i mellanlagringsmappen. Filer och mappar får godkänd status direkt efter importen.', 'import_users' => 'Importera användare', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => 'Inkudera innehåll', 'include_documents' => 'Inkludera dokument', @@ -945,6 +949,8 @@ URL: [url]', 'new_attrdef' => 'Lägg till attributdefinition', 'new_default_keywords' => 'Lägg till nyckelord', 'new_default_keyword_category' => 'Lägg till nyckelordskategori', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Lägg till kategori', 'new_document_email' => 'Nytt dokument', 'new_document_email_body' => 'Nytt dokument @@ -1038,6 +1044,7 @@ URL: [url]', 'no_version_modification' => 'Ingen versionsförändring', 'no_workflows' => '', 'no_workflow_available' => 'Arbetsflöde saknas', +'number_count' => '', 'objectcheck' => 'Kontroll av Katalog/Dokument', 'object_check_critical' => 'Kritiska fel', 'object_check_warning' => 'Varningar', @@ -1183,6 +1190,7 @@ URL: [url]', 'remove_marked_files' => 'Ta bort markerade filer', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'reparerat', 'repairing_objects' => 'Reparerar dokument och kataloger.', 'replace_content_email_body' => '', @@ -1946,6 +1954,7 @@ Kommentar: [comment]', 'splash_transfer_document' => 'Dokument överfört', 'splash_transfer_objects' => 'Objekt överförda', 'splash_trigger_workflow' => '', +'startdate' => '', 'state_and_next_state' => 'Status/Nästa status', 'statistic' => 'Statistik', 'status' => 'Status', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 68c534c53..2805967ff 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -238,9 +238,11 @@ URL: [url]', 'bg_BG' => 'Bulgarca', 'browse' => 'Tara', 'calendar' => 'Takvim', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Takvim haftası', 'cancel' => 'İptal', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'Geçersiz veya reddedilmiş doküman değiştirilemez.', 'cannot_change_final_states' => 'Dikkat: Reddedilen, süresi dolan, kontrol veya onay bekleyen dokümanın durumununu değiştiremezsiniz.', @@ -558,6 +560,7 @@ URL: [url]', 'empty_list' => '', 'empty_notify_list' => 'Giriş yok', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'İngilizce', 'equal_transition_states' => 'Başlangıç ve bitiş durumları eşit', 'error' => 'Hata', @@ -744,6 +747,7 @@ URL: [url]', 'import_fs_warning' => '', 'import_users' => 'Kullanıcıları İçe Aktar', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => '', 'include_documents' => 'Dokümanları kapsa', @@ -933,6 +937,8 @@ URL: [url]', 'new_attrdef' => 'Nitelik tanımı ekle', 'new_default_keywords' => 'Anahtar kelime ekle', 'new_default_keyword_category' => 'Kategori ekle', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Kategori ekle', 'new_document_email' => 'Yeni doküman', 'new_document_email_body' => 'Yeni doküman @@ -1026,6 +1032,7 @@ URL: [url]', 'no_version_modification' => 'Versiyon değişikliği yapılmamış', 'no_workflows' => '', 'no_workflow_available' => 'Uygun iş akışı yok', +'number_count' => '', 'objectcheck' => 'Klasör/Doküman kontrol', 'object_check_critical' => '', 'object_check_warning' => '', @@ -1176,6 +1183,7 @@ URL: [url]', 'remove_marked_files' => 'İşaretli dosyaları sil', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'onarıldı', 'repairing_objects' => 'Doküman ve klasörler onarılıyor.', 'replace_content_email_body' => '', @@ -1912,6 +1920,7 @@ URL: [url]', 'splash_transfer_document' => '', 'splash_transfer_objects' => '', 'splash_trigger_workflow' => '', +'startdate' => '', 'state_and_next_state' => 'Durum/Sonraki durum', 'statistic' => 'İstatistik', 'status' => 'Durum', diff --git a/languages/uk_UA/lang.inc b/languages/uk_UA/lang.inc index 611add06c..63183621d 100644 --- a/languages/uk_UA/lang.inc +++ b/languages/uk_UA/lang.inc @@ -244,9 +244,11 @@ URL: [url]', 'bg_BG' => 'Bulgarian', 'browse' => 'Вибрати', 'calendar' => 'Календар', +'calendar_events_mail_subject' => '', 'calendar_week' => 'Тиждень', 'cancel' => 'Відміна', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => 'Неможливо змінити застарілий чи відхилений документ', 'cannot_change_final_states' => 'Не можна змінювати статус відхиленого, застарілого документа або документа, що очікує на рецензію чи затвердження', @@ -564,6 +566,7 @@ URL: [url]', 'empty_list' => '', 'empty_notify_list' => 'Немає записів', 'enable_extension' => '', +'enddate' => '', 'en_GB' => 'English (GB)', 'equal_transition_states' => 'Однакові початковий і кінцевий статуси', 'error' => 'Помилка', @@ -750,6 +753,7 @@ URL: [url]', 'import_fs_warning' => '', 'import_users' => '', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => 'Включно з вмістом', 'include_documents' => 'Включно з документами', @@ -939,6 +943,8 @@ URL: [url]', 'new_attrdef' => 'Додати визначення атрибуту', 'new_default_keywords' => 'Додати ключові слова', 'new_default_keyword_category' => 'Додати категорію ключових слів', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => 'Додати категорію', 'new_document_email' => 'Новий документ', 'new_document_email_body' => 'Новий документ @@ -1031,6 +1037,7 @@ URL: [url]', 'no_version_modification' => 'Відсутня модифікація версії', 'no_workflows' => '', 'no_workflow_available' => 'Немає доступних процесів', +'number_count' => '', 'objectcheck' => 'Перевірка каталогу чи документа', 'object_check_critical' => '', 'object_check_warning' => '', @@ -1182,6 +1189,7 @@ URL: [url]', 'remove_marked_files' => 'Видалити обрані файли', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => 'виправлено', 'repairing_objects' => 'Відновлення каталогів і документів', 'replace_content_email_body' => '', @@ -1933,6 +1941,7 @@ URL: [url]', 'splash_transfer_document' => '', 'splash_transfer_objects' => '', 'splash_trigger_workflow' => '', +'startdate' => '', 'state_and_next_state' => 'Статус / наступний статус', 'statistic' => 'Статистика', 'status' => 'Статус', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index d9d1d7fa0..935894e1c 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -236,9 +236,11 @@ URL: [url]', 'bg_BG' => '保加利亚语', 'browse' => '浏览', 'calendar' => '日历', +'calendar_events_mail_subject' => '', 'calendar_week' => '周历', 'cancel' => '取消', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => '不能修改文档的最终状态', 'cannot_change_final_states' => '警告:您不能更改文档的拒绝、过期、待校对、或是待审核等状态', @@ -564,6 +566,7 @@ URL: [url]', 'empty_list' => '没有条目', 'empty_notify_list' => '没有条目', 'enable_extension' => '', +'enddate' => '', 'en_GB' => '英语', 'equal_transition_states' => '开始状态和下一个状态相同!', 'error' => '错误', @@ -752,6 +755,7 @@ URL: [url]', 'import_fs_warning' => '这将只适用于拖动文件夹。该操作将递归导入所有文件夹和文件。文件将立即释放。', 'import_users' => '导入用户', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => '包括内容', 'include_documents' => '包含文档', @@ -941,6 +945,8 @@ URL: [url]', 'new_attrdef' => '添加属性', 'new_default_keywords' => '添加关键字', 'new_default_keyword_category' => '添加类别', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => '增加分类', 'new_document_email' => '添加新文档', 'new_document_email_body' => '新建文档 @@ -1034,6 +1040,7 @@ URL: [url]', 'no_version_modification' => '版本未修改', 'no_workflows' => '', 'no_workflow_available' => '工作流不可用', +'number_count' => '', 'objectcheck' => '文件夹/文件检查', 'object_check_critical' => '重大错误', 'object_check_warning' => '警告', @@ -1187,6 +1194,7 @@ URL: [url]', 'remove_marked_files' => '删除选中的文件', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => '已修复', 'repairing_objects' => '修复文件和文件夹', 'replace_content_email_body' => '', @@ -1920,6 +1928,7 @@ URL: [url]', 'splash_transfer_document' => '文档转移', 'splash_transfer_objects' => '对象转移', 'splash_trigger_workflow' => '触发工作流过渡', +'startdate' => '', 'state_and_next_state' => '状态/下一个状态', 'statistic' => '统计', 'status' => '状态', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 0f65fc46e..fd5132025 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -244,9 +244,11 @@ URL: [url]', 'bg_BG' => '保加利亞語', 'browse' => '瀏覽', 'calendar' => '日曆', +'calendar_events_mail_subject' => '', 'calendar_week' => '日曆週', 'cancel' => '取消', 'cancel_checkout' => '', +'cancel_checkout_document' => '', 'cancel_checkout_warning' => '', 'cannot_assign_invalid_state' => '不能修改文件的最終狀態', 'cannot_change_final_states' => '警告:您不能更改文件的拒絕、過期、待校對、或是待審核等狀態', @@ -576,6 +578,7 @@ URL: [url]', 'empty_list' => '沒有條目', 'empty_notify_list' => '沒有條目', 'enable_extension' => '', +'enddate' => '', 'en_GB' => '英語', 'equal_transition_states' => '起始狀態和結束狀態相等', 'error' => '錯誤', @@ -769,6 +772,7 @@ URL: [url]', 'import_fs_warning' => '這僅適用於放置文件夾中的文件夾。該操作以遞歸方式導入所有文件夾和文件。文件將立即釋放。', 'import_users' => '導入用戶', 'import_users_addnew' => '', +'import_users_no_column_mapping' => '', 'import_users_update' => '', 'include_content' => '包含內容', 'include_documents' => '包含文件', @@ -958,6 +962,8 @@ URL: [url]', 'new_attrdef' => '新增屬性', 'new_default_keywords' => '新增關鍵字', 'new_default_keyword_category' => '新增類別', +'new_documents_today' => '', +'new_documents_yesterday' => '', 'new_document_category' => '增加分類', 'new_document_email' => '新增新文件', 'new_document_email_body' => '新文件 @@ -1051,6 +1057,7 @@ URL: [url]', 'no_version_modification' => '沒有版本修改', 'no_workflows' => '', 'no_workflow_available' => '沒有可用的工作流程', +'number_count' => '', 'objectcheck' => '資料夾/檔檢查', 'object_check_critical' => '嚴重錯誤', 'object_check_warning' => '警告', @@ -1208,6 +1215,7 @@ URL: [url]', 'remove_marked_files' => '刪除勾選的檔案', 'remove_review_log' => '', 'remove_task' => '', +'reorder' => '', 'repaired' => '修復', 'repairing_objects' => '修復文檔和文件夾。', 'replace_content_email_body' => '', @@ -1971,6 +1979,7 @@ URL: [url]', 'splash_transfer_document' => '文件已轉移', 'splash_transfer_objects' => '轉移的物件', 'splash_trigger_workflow' => '觸發工作流程過渡', +'startdate' => '', 'state_and_next_state' => '狀態/下一個狀態', 'statistic' => '統計', 'status' => '狀態', From 668ee243b22e4bbd3b5e1e3fb3979adec66ea2e6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Mar 2023 15:37:29 +0100 Subject: [PATCH 1891/2006] actually send mail --- inc/inc.Tasks.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/inc/inc.Tasks.php b/inc/inc.Tasks.php index 53e8e5fee..ccf1dc05a 100644 --- a/inc/inc.Tasks.php +++ b/inc/inc.Tasks.php @@ -696,12 +696,11 @@ class SeedDMS_StatisticTask extends SeedDMS_SchedulerTaskBase { /* {{{ */ $bodyhtml .= "".PHP_EOL; - echo $body; $params = array(); $params['__body__'] = $body; $params['__body_html__'] = $bodyhtml; $params['sitename'] = $settings->_siteName; - //$email->toIndividual('', $auser, 'statistics_mail_subject', '', $params); + $email->toIndividual('', $auser, 'statistics_mail_subject', '', $params); $logger->log('Task \'statistics\': Sending statistics \'statistics_mail_subject\' to user \''.$auser->getLogin().'\'', PEAR_LOG_INFO); } From ed27dbcf4b7a2128904ff79ecaa93d6f11414857 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Mar 2023 16:33:17 +0100 Subject: [PATCH 1892/2006] add open office formats to get_extension --- inc/inc.Utils.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php index 35c9df96d..444cded70 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -651,6 +651,9 @@ function get_extension($mimetype) { /* {{{ */ case 'application/postscript': return '.ps'; case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': return '.docx'; case 'application/vnd.openxmlformats-officedocument.presentationml.presentation': return '.pptx'; + case 'application/vnd.oasis.opendocument.text': return '.odt'; + case 'application/vnd.oasis.opendocument.spreadsheet': return '.ods'; + case 'application/vnd.oasis.opendocument.presentation': return '.odp'; case 'text/plain': return '.txt'; case 'text/csv': return '.csv'; case 'text/rtf': return '.rtf'; From b25776eaad212d2f84d416dede3f15c5d86182ae Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Mar 2023 14:30:56 +0200 Subject: [PATCH 1893/2006] complete changes of 6.0.23 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index d806844ca..6f3bf292f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ - fix setting recipients and revisors - check in of a document is allowed for the user having done the check out or those users with unlimited access rights on the document +- merge changes up to 5.1.30 -------------------------------------------------------------------------------- Changes in version 6.0.22 From a13e1121e38af155610ab8e3eadd8aeb8dd7844b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Mar 2023 09:03:58 +0200 Subject: [PATCH 1894/2006] no need to include vendor/autoload.php. It's done in inc.Settings.php --- index.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/index.php b/index.php index af3d42456..ce750c740 100644 --- a/index.php +++ b/index.php @@ -17,7 +17,7 @@ // 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"); +require("inc/inc.Settings.php"); if(true) { require_once("inc/inc.Utils.php"); @@ -27,8 +27,6 @@ if(true) { require_once("inc/inc.Extension.php"); require_once("inc/inc.DBInit.php"); - require "vendor/autoload.php"; - $c = new \Slim\Container(); //Create Your container $c['notFoundHandler'] = function ($c) use ($settings, $dms) { return function ($request, $response) use ($c, $settings, $dms) { From 0280a8adc0e4e74f0a76d3bbacfcd8873cfc1770 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Mar 2023 20:38:48 +0200 Subject: [PATCH 1895/2006] show current password expiration --- views/bootstrap/class.UsrMgr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.UsrMgr.php b/views/bootstrap/class.UsrMgr.php index a32e29263..7bed35a89 100644 --- a/views/bootstrap/class.UsrMgr.php +++ b/views/bootstrap/class.UsrMgr.php @@ -283,7 +283,7 @@ $(document).ready( function() { if($passwordexpiration > 0 && (!$currUser || !$currUser->isAdmin())) { $options = array(); if($currUser) - $options[] = array('', getMLText("keep")); + $options[] = array('', getMLText("keep").($currUser->getPwdExpiration() ? ' ('.getLongReadableDate($currUser->getPwdExpiration()).')' : '')); $options[] = array('now', getMLText('now')); $options[] = array(date('Y-m-d H:i:s', time()+$passwordexpiration*86400), getMLText("according_settings")); $options[] = array('never', getMLText("never")); From 382e78855da89606b9b2480a92b150c739a0a397 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Mar 2023 20:48:07 +0200 Subject: [PATCH 1896/2006] do not force password change if in substitute user mode --- CHANGELOG | 1 + inc/inc.Authentication.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 865472f70..abaab0767 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,7 @@ - color category (use first 6 chars of md5(category name) as hex color) - create missing preview images in category or attribute manager - support README of extension in different languages +- do not force password change if in substitute user mode -------------------------------------------------------------------------------- Changes in version 5.1.29 diff --git a/inc/inc.Authentication.php b/inc/inc.Authentication.php index ade988137..6255b1dcc 100644 --- a/inc/inc.Authentication.php +++ b/inc/inc.Authentication.php @@ -103,11 +103,11 @@ if(file_exists($settings->_rootDir . "view/".$theme."/languages/" . $lang . "/la /* Check if password needs to be changed because it expired. If it needs * to be changed redirect to out/out.ForcePasswordChange.php. Do this * check only if password expiration is turned on, we are not on the - * page to change the password or the page that changes the password, and - * it is not admin */ + * page to change the password or the page that changes the password, + * it is not admin, and there is currently no user substitution */ if (!$user->isAdmin()) { - if($settings->_passwordExpiration > 0) { + if(!$resArr['su'] && $settings->_passwordExpiration > 0) { if(basename($_SERVER['SCRIPT_NAME']) != 'out.ForcePasswordChange.php' && basename($_SERVER['SCRIPT_NAME']) != 'op.EditUserData.php' && basename($_SERVER['SCRIPT_NAME']) != 'op.Logout.php') { $pwdexp = $user->getPwdExpiration(); if(substr($pwdexp, 0, 10) != '0000-00-00') { From 476c726a45ecf236c2dbb442db01ed3f5ed767e4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Mar 2023 20:57:48 +0200 Subject: [PATCH 1897/2006] improve password expiration --- inc/inc.Authentication.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/inc/inc.Authentication.php b/inc/inc.Authentication.php index 6255b1dcc..49f87a02a 100644 --- a/inc/inc.Authentication.php +++ b/inc/inc.Authentication.php @@ -103,14 +103,14 @@ if(file_exists($settings->_rootDir . "view/".$theme."/languages/" . $lang . "/la /* Check if password needs to be changed because it expired. If it needs * to be changed redirect to out/out.ForcePasswordChange.php. Do this * check only if password expiration is turned on, we are not on the - * page to change the password or the page that changes the password, - * it is not admin, and there is currently no user substitution */ + * page to change the password or the page that changes the password, the + * current user is not admin, and no user substitution has occured. */ -if (!$user->isAdmin()) { - if(!$resArr['su'] && $settings->_passwordExpiration > 0) { +if (!$user->isAdmin() && !$resArr['su']) { + if($settings->_passwordExpiration > 0) { if(basename($_SERVER['SCRIPT_NAME']) != 'out.ForcePasswordChange.php' && basename($_SERVER['SCRIPT_NAME']) != 'op.EditUserData.php' && basename($_SERVER['SCRIPT_NAME']) != 'op.Logout.php') { $pwdexp = $user->getPwdExpiration(); - if(substr($pwdexp, 0, 10) != '0000-00-00') { + if($pwdexp && substr($pwdexp, 0, 10) != '0000-00-00') { $pwdexpts = strtotime($pwdexp); // + $pwdexp*86400; if($pwdexpts > 0 && $pwdexpts < time()) { header("Location: ../out/out.ForcePasswordChange.php"); From 8609fdee74bcbf310f6cf840c3c72733059b0b37 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 30 Mar 2023 12:02:31 +0200 Subject: [PATCH 1898/2006] do not show warning that document is released if initial status is draft --- views/bootstrap/class.UpdateDocument.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index 5b0815a47..c0a60af1b 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -338,7 +338,8 @@ console.log(element); ) ); } - $this->warningMsg(getMLText("add_doc_workflow_warning")); + if($settings->_initialDocumentStatus == S_RELEASED) + $this->warningMsg(getMLText("add_doc_workflow_warning")); } elseif($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { if($workflowmode == 'traditional') { $this->contentSubHeading(getMLText("assign_reviewers")); From 23a94f8ac84b3eb353e94e0ce69b96e40bac36d1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 30 Mar 2023 12:26:35 +0200 Subject: [PATCH 1899/2006] put reviewer and approver into own content container --- views/bootstrap/class.AddDocument.php | 4 +++- views/bootstrap/class.UpdateDocument.php | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index cb1698c10..93f6d8945 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -446,7 +446,6 @@ console.log(params); echo $arrs; } - $this->contentContainerEnd(); if($workflowmode == 'advanced') { $mandatoryworkflows = $user->getMandatoryWorkflows(); if($mandatoryworkflows) { @@ -494,6 +493,7 @@ console.log(params); $this->warningMsg(getMLText("add_doc_workflow_warning")); } elseif($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { if($workflowmode == 'traditional') { + $this->contentContainerEnd(); $this->contentSubHeading(getMLText("assign_reviewers")); $this->contentContainerStart(); @@ -699,6 +699,8 @@ console.log(params); } $this->contentContainerEnd(); $this->warningMsg(getMLText("add_doc_reviewer_approver_warning")); + } else { + $this->contentContainerEnd(); } $this->columnEnd(); $this->rowEnd(); diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index 45a93e522..b12e3fe66 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -329,10 +329,13 @@ console.log(element); ) ); } + $this->contentContainerEnd(); $this->warningMsg(getMLText("add_doc_workflow_warning")); } elseif($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { if($workflowmode == 'traditional') { + $this->contentContainerEnd(); $this->contentSubHeading(getMLText("assign_reviewers")); + $this->contentContainerStart(); $res=$user->getMandatoryReviewers(); $options = array(); foreach ($docAccess["users"] as $usr) { @@ -480,9 +483,11 @@ console.log(element); } } } + $this->contentContainerEnd(); } $this->contentSubHeading(getMLText("assign_approvers")); + $this->contentContainerStart(); $options = array(); $res=$user->getMandatoryApprovers(); foreach ($docAccess["users"] as $usr) { @@ -631,9 +636,11 @@ console.log(element); } } } + $this->contentContainerEnd(); $this->warningMsg(getMLText("add_doc_reviewer_approver_warning")); + } else { + $this->contentContainerEnd(); } - $this->contentContainerEnd(); $this->formSubmit(getMLText('update_document')); ?> From 3fb9d140fa2fdc4efaedb81a2d75c001ccc1b826 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 30 Mar 2023 12:33:46 +0200 Subject: [PATCH 1900/2006] fix translations for recipients --- views/bootstrap/class.UpdateDocument.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index fbae17527..0d59ab82c 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -687,6 +687,8 @@ console.log(element); $this->contentContainerEnd(); } if($enablereceiptworkflow) { + $this->contentSubHeading(getMLText("assign_recipients")); + $this->contentContainerStart(); $options = array(); foreach ($docAccess["users"] as $usr) { if (!$enableselfreceipt && $usr->getID()==$user->getID()) continue; @@ -703,7 +705,7 @@ console.log(element); $fieldwrap = array('', $this->getSelectPresetButtonHtml("IndRecipient", $tmp)); } $this->formField( - getMLText("assign_recipients"), + getMLText("individuals"), array( 'element'=>'select', 'name'=>'indRecipients[]', @@ -748,7 +750,7 @@ console.log(element); $fieldwrap = array('', $this->getSelectPresetButtonHtml("GrpRecipient", $tmp)); } $this->formField( - getMLText("assign_recipients"), + getMLText("groups"), array( 'element'=>'select', 'name'=>'grpRecipients[]', @@ -761,8 +763,8 @@ console.log(element); array('field_wrap'=>$fieldwrap) ); + $this->contentContainerEnd(); } - $this->contentContainerEnd(); $this->formSubmit(getMLText('update_document')); ?> From 7790f483f0f7f040364a396f64830ba9ca0d9164 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 31 Mar 2023 12:00:56 +0200 Subject: [PATCH 1901/2006] no need to create notification service a second time --- op/op.Ajax.php | 22 +--------------------- restapi/index.php | 22 ---------------------- webdav/index.php | 22 ---------------------- 3 files changed, 1 insertion(+), 65 deletions(-) diff --git a/op/op.Ajax.php b/op/op.Ajax.php index 9999186b8..d9dad164e 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -27,6 +27,7 @@ require_once("../inc/inc.ClassNotificationService.php"); require_once("../inc/inc.ClassEmailNotify.php"); require_once("../inc/inc.ClassUI.php"); require_once("../inc/inc.ClassController.php"); +require_once("../inc/inc.Notification.php"); require_once("../inc/inc.ClassSession.php"); require_once("../inc/inc.ClassPasswordStrength.php"); @@ -63,27 +64,6 @@ if (isset($_COOKIE["mydms_session"])) { $dms->setRootFolderID($user->getHomeFolder()); } - global $logger; - $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); - } - } - } - - if($settings->_enableEmail) { - $notifier->addService(new SeedDMS_EmailNotify($dms, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword), 'email'); - } - - if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) { - foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) { - if(method_exists($notificationObj, 'postAddService')) { - $notificationObj->postAddService($dms, $notifier); - } - } - } include $settings->_rootDir . "languages/" . $resArr["language"] . "/lang.inc"; } else { $user = null; diff --git a/restapi/index.php b/restapi/index.php index 541d9bfcf..4ae5efece 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -15,28 +15,6 @@ require_once("../inc/inc.ClassEmailNotify.php"); require_once("../inc/inc.Notification.php"); 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); - } - } -} - -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"; use Psr\Container\ContainerInterface; diff --git a/webdav/index.php b/webdav/index.php index e148a8029..a70b701d4 100644 --- a/webdav/index.php +++ b/webdav/index.php @@ -15,28 +15,6 @@ require_once("../inc/inc.ClassEmailNotify.php"); require_once("../inc/inc.Notification.php"); 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); - } - } -} - -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); - } - } -} - include("webdav.php"); $server = new HTTP_WebDAV_Server_SeedDMS(); $server->ServeRequest($dms, $settings, $logger, $notifier, $authenticator); From 3a8b897d61ff4a374877022f620af4250fcbacb6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 3 Apr 2023 12:02:21 +0200 Subject: [PATCH 1902/2006] more consice layout, add test for directories on disc --- views/bootstrap/class.Info.php | 65 +++++++++++++++++----------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/views/bootstrap/class.Info.php b/views/bootstrap/class.Info.php index 78350783a..71b9a030b 100644 --- a/views/bootstrap/class.Info.php +++ b/views/bootstrap/class.Info.php @@ -102,57 +102,56 @@ class SeedDMS_View_Info extends SeedDMS_Theme_Style { $this->contentHeading(getMLText("installed_php_extensions")); $phpextensions = get_loaded_extensions(false); - echo "\n"; - echo "\n\n"; - echo "\n"; - echo "\n\n\n"; - foreach($phpextensions as $extname) - echo "\n"; - echo "\n
    ".getMLText("name"); - echo "
    ".$extname.""."
    \n"; + echo implode(', ', $phpextensions); $this->contentHeading(getMLText("missing_php_extensions")); - echo "\n"; - echo "\n\n"; - echo "\n"; - echo "\n\n\n"; $requiredext = array('zip', 'xml', 'xsl', 'json', 'intl', 'fileinfo', 'mbstring', 'curl', 'sqlite3', 'imagick'); - foreach(array_diff($requiredext, $phpextensions) as $extname) - echo "\n"; - echo "\n
    ".getMLText("name"); - echo "
    ".$extname.""."
    \n"; + echo implode(', ', array_diff($requiredext, $phpextensions)); $this->contentHeading(getMLText("missing_php_functions_and_classes")); - echo "\n"; - echo "\n\n"; - echo "\n"; - echo "\n\n\n"; + $missingfunc = []; foreach(array('proc_open') as $funcname) { if(!function_exists($funcname)) { - echo ""; + $missingfunc[] = $funcname; //getMLText('func_'.$funcname."_missing") } } + $missingclass = []; foreach(array('finfo') as $classname) { if(!class_exists($classname)) { - echo ""; + $missingclass[] = $classname; //getMLText('func_'.$classname."_missing") } } - echo "\n
    ".getMLText("name"); - echo "".getMLText("missing_func_class_note"); - echo "
    ".$funcname."".getMLText('func_'.$funcname."_missing")."
    ".$classname."".getMLText('class_'.$classname."_missing")."
    \n"; + echo '

    '.implode(', ', $missingfunc).'

    '; + echo '

    '.implode(', ', $missingclass).'

    '; if(function_exists('apache_get_modules')) { $this->contentHeading(getMLText("installed_apache_extensions")); $apacheextensions = apache_get_modules(); - echo "\n"; - echo "\n\n"; - echo "\n"; - echo "\n\n\n"; - foreach($apacheextensions as $extname) - echo "\n"; - echo "\n
    ".getMLText("name"); - echo "
    ".$extname.""."
    \n"; + echo implode(', ', $apacheextensions); } + + function check_result($name, $res) { + echo "".getMLText($name)."".getMLText($res ? 'check_passed' : 'check_failed')."\n"; + } + $this->contentHeading(getMLText("check_directory_layout")); + echo "\n"; + echo "\n\n"; + echo "\n"; + echo "\n"; + echo "\n\n\n"; + check_result('directory_check_ext_exists', is_dir($settings->_rootDir."/ext")); + check_result('directory_check_ext_writable', is_writable($settings->_rootDir."/ext")); + check_result('directory_check_data_exists', is_dir($settings->_contentDir)); + check_result('directory_check_data_writable', is_writable($settings->_contentDir)); + check_result('directory_check_cache_exists', is_dir($settings->_cacheDir)); + check_result('directory_check_cache_writable', is_writable($settings->_cacheDir)); + check_result('directory_check_index_exists', is_dir($settings->_luceneDir)); + check_result('directory_check_index_writable', is_writable($settings->_luceneDir)); + check_result('directory_check_conf_writable', is_writable($settings->_configFilePath)); + $res = !str_starts_with($settings->_contentDir, $settings->_rootDir); + check_result('directory_check_data_below_root', $res); + echo "\n
    ".getMLText("directory_check")."".getMLText("directory_check_result")."
    \n"; + } $this->columnEnd(); $this->rowEnd(); From 8b087325a3d2657921e558ee2c3f1e63e2e0895d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 3 Apr 2023 12:03:55 +0200 Subject: [PATCH 1903/2006] add phrases for directory check --- languages/ar_EG/lang.inc | 16 ++++++++++++++++ languages/bg_BG/lang.inc | 16 ++++++++++++++++ languages/ca_ES/lang.inc | 16 ++++++++++++++++ languages/cs_CZ/lang.inc | 16 ++++++++++++++++ languages/de_DE/lang.inc | 18 +++++++++++++++++- languages/el_GR/lang.inc | 16 ++++++++++++++++ languages/en_GB/lang.inc | 18 +++++++++++++++++- languages/es_ES/lang.inc | 16 ++++++++++++++++ languages/fr_FR/lang.inc | 16 ++++++++++++++++ languages/hr_HR/lang.inc | 16 ++++++++++++++++ languages/hu_HU/lang.inc | 16 ++++++++++++++++ languages/id_ID/lang.inc | 16 ++++++++++++++++ languages/it_IT/lang.inc | 16 ++++++++++++++++ languages/ko_KR/lang.inc | 16 ++++++++++++++++ languages/lo_LA/lang.inc | 16 ++++++++++++++++ languages/nb_NO/lang.inc | 16 ++++++++++++++++ languages/nl_NL/lang.inc | 16 ++++++++++++++++ languages/pl_PL/lang.inc | 16 ++++++++++++++++ languages/pt_BR/lang.inc | 16 ++++++++++++++++ languages/ro_RO/lang.inc | 16 ++++++++++++++++ languages/ru_RU/lang.inc | 16 ++++++++++++++++ languages/sk_SK/lang.inc | 16 ++++++++++++++++ languages/sv_SE/lang.inc | 16 ++++++++++++++++ languages/tr_TR/lang.inc | 16 ++++++++++++++++ languages/uk_UA/lang.inc | 16 ++++++++++++++++ languages/zh_CN/lang.inc | 16 ++++++++++++++++ languages/zh_TW/lang.inc | 16 ++++++++++++++++ 27 files changed, 434 insertions(+), 2 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index 6b33de47a..575cecbd7 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -282,6 +282,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => 'سحب الملف', 'checkout_is_disabled' => 'السحب معطل', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'من فضلك اختر تعريف السمة', 'choose_attrdefgroup' => 'من فضلك اختر تعريف سمة المجموعة', 'choose_category' => 'من فضلك اختر القسم', @@ -362,6 +365,18 @@ URL: [url]', 'details' => 'تفاصيل', 'details_version' => 'تفاصيل هذا الاصدار: [version]', 'de_DE' => 'الألمانية', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'هذه المنطقة محظورة. الدخول فقط مسموح للموظفين المعتمدين. اي اختراق سيتم التعامل معه وفقا للقوانين المحلية والدولية.', 'discspace' => 'مساحة القرص', @@ -1907,6 +1922,7 @@ URL: [url]', 'startdate' => '', 'state_and_next_state' => 'الحالة الحالية والحالة المقبلة', 'statistic' => 'إحصائيات', +'statistics_mail_subject' => '', 'status' => 'الحالة', 'status_approval_rejected' => 'مسودة مرفوضة', 'status_approved' => 'تمت الموافقة', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index 6141a0b7d..82734c38f 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -265,6 +265,9 @@ $text = array( 'checkout_cancel_confirm' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Изберете attribute definition', 'choose_attrdefgroup' => '', 'choose_category' => 'Изберете', @@ -345,6 +348,18 @@ $text = array( 'details' => 'Детайли', 'details_version' => 'Детайли за версия: [version]', 'de_DE' => 'Немски', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'Работим аккуратно и задълбочено. От това зависи бъдeщето на нашата страна и благополучието на народа.nПетилетката за три години!nДа не оставим неодрусана слива в наше село!', 'discspace' => '', @@ -1770,6 +1785,7 @@ $text = array( 'startdate' => '', 'state_and_next_state' => '', 'statistic' => '', +'statistics_mail_subject' => '', 'status' => 'Статус', 'status_approval_rejected' => 'Чернова отказана', 'status_approved' => 'Утвърден', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index e1368165c..116b9f701 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -270,6 +270,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => '', 'choose_attrdefgroup' => '', 'choose_category' => 'Elegir categoria', @@ -350,6 +353,18 @@ URL: [url]', 'details' => 'Detalls', 'details_version' => 'Detalls de la versió: [version]', 'de_DE' => 'Alemany', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'Aquesta és una àrea restringida. Només es permet l\'accés a usuaris autoritzats. Qualsevol intrusió es perseguirà d\'acord amb les lleis internacionals.', 'discspace' => '', @@ -1775,6 +1790,7 @@ URL: [url]', 'startdate' => '', 'state_and_next_state' => '', 'statistic' => 'Estadístiques', +'statistics_mail_subject' => '', 'status' => 'Estat', 'status_approval_rejected' => 'Esborrany rebutjat', 'status_approved' => 'Aprovat', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index 225d28b3a..b34ebba2d 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -294,6 +294,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => 'Zkontrolovat', 'checkout_is_disabled' => 'Kontrola dokumentů je zakázána v konfiguraci.', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Zvolte definici atributů', 'choose_attrdefgroup' => 'Vybrat skupinu atributů', 'choose_category' => 'Vyberte prosím', @@ -374,6 +377,18 @@ URL: [url]', 'details' => 'Podrobnosti', 'details_version' => 'Podrobnosti verze: [version]', 'de_DE' => 'Němčina', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'Toto je neveřejná oblast. Přístup povolen pouze oprávněným uživatelům. Jakékoliv narušení bude stíháno podle platných právních norem.', 'discspace' => 'Místo na disku', @@ -1979,6 +1994,7 @@ Jméno: [username] 'startdate' => '', 'state_and_next_state' => 'Stav / Další stav', 'statistic' => 'Statistika', +'statistics_mail_subject' => '', 'status' => 'Stav', 'status_approval_rejected' => 'Návrh zamítnut', 'status_approved' => 'Schválen', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index 4169f3b6a..e6a9bd6b3 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 (3171), dgrutsch (22) +// Translators: Admin (3189), dgrutsch (22) $text = array( '2_factor_auth' => '2-Faktor Authentifizierung', @@ -333,6 +333,9 @@ URL: [url]

    ', 'checkout_cancel_confirm' => 'Beenden des Checkouts bestätigen', 'checkout_document' => 'Auschecken', 'checkout_is_disabled' => 'Auschecken von Dokumenten ist in der Konfiguration ausgeschaltet.', +'check_directory_layout' => 'Prüfe Verzeichnise', +'check_failed' => 'fehlgeschlagen', +'check_passed' => 'erfolgreich', 'choose_attrdef' => 'Attributdefinition wählen', 'choose_attrdefgroup' => 'Attributgruppe wählen', 'choose_category' => 'Kategorie wählen', @@ -413,6 +416,18 @@ URL: [url]

    ', 'details' => 'Details', 'details_version' => 'Details für Version: [version]', 'de_DE' => 'Deutsch', +'directory_check' => 'Prüfung', +'directory_check_cache_exists' => 'Prüfe, ob Verzeichnis für Cache existiert', +'directory_check_cache_writable' => 'Prüfe, ob Verzeichnis für den Cache beschreibar ist', +'directory_check_conf_writable' => 'Prüfe, ob Verzeichnis für die Konfiguration beschreibar ist', +'directory_check_data_below_root' => 'Prüfe, ob Datenverzeichnis nicht unterhalb des Web-Verzeichnisses liegt', +'directory_check_data_exists' => 'Prüfe, ob Verzeichnis für Daten existiert', +'directory_check_data_writable' => 'Prüfe, ob Verzeichnis für die Daten beschreibar ist', +'directory_check_ext_exists' => 'Prüfe, ob Verzeichnis für Erweiterungen existiert', +'directory_check_ext_writable' => 'Prüfe, ob Verzeichnis für Erweiterungen beschreibar ist', +'directory_check_index_exists' => 'Prüfe, ob Verzeichnis für den Volltextindex existiert', +'directory_check_index_writable' => 'Prüfe, ob Verzeichnis für Volltextindex beschreibar ist', +'directory_check_result' => 'Ergebnis', 'disable_extension' => 'Erweiterung deaktivieren', 'disclaimer' => 'Dies ist ein geschützter Bereich. Nur authorisiertes Personal hat Zugriff. Jegliche Verstöße werden nach geltendem Recht (Englisch und International) verfolgt.', 'discspace' => 'Plattenplatz', @@ -2311,6 +2326,7 @@ Sollten Sie kein Passwort bekommen haben, dann nutzen Sie bitte die Passwort-Ver 'startdate' => 'Startdatum', 'state_and_next_state' => 'Status/Nächster Status', 'statistic' => 'Statistik', +'statistics_mail_subject' => 'Statistiken', 'status' => 'Status', 'status_approval_rejected' => 'abgelehnt', 'status_approved' => 'freigegeben', diff --git a/languages/el_GR/lang.inc b/languages/el_GR/lang.inc index 3b39fa69f..5e72be9a8 100644 --- a/languages/el_GR/lang.inc +++ b/languages/el_GR/lang.inc @@ -265,6 +265,9 @@ $text = array( 'checkout_cancel_confirm' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => '', 'choose_attrdefgroup' => '', 'choose_category' => 'Επιλέξτε', @@ -345,6 +348,18 @@ $text = array( 'details' => 'Λεπτομέρειες', 'details_version' => 'Λεπτομέρειες για την έκδοση: [version]', 'de_DE' => 'German/Γερμανικά', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'Διαβαθμισμένη περιοχή. Η πρόσβαση επιτρέπεται μόνο σε εξουσιοδοτημένο προσωπικό. Κάθε παράβαση διώκεται σύμφωνα με τους εθνικούς και διεθνής νόμους.', 'discspace' => '', @@ -1781,6 +1796,7 @@ URL: [url]', 'startdate' => '', 'state_and_next_state' => '', 'statistic' => '', +'statistics_mail_subject' => '', 'status' => 'κατάσταση', 'status_approval_rejected' => '', 'status_approved' => '', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index 7fc250ebc..1b4e4b582 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 (2266), archonwang (3), dgrutsch (9), netixw (14) +// Translators: Admin (2283), archonwang (3), dgrutsch (9), netixw (14) $text = array( '2_factor_auth' => '2-factor authentication', @@ -333,6 +333,9 @@ URL: [url]

    ', 'checkout_cancel_confirm' => 'Confirm to cancel checkout', 'checkout_document' => 'Check out', 'checkout_is_disabled' => 'Check out of documents is disabled in the configuration.', +'check_directory_layout' => 'Check directory layout', +'check_failed' => 'failed', +'check_passed' => 'passed', 'choose_attrdef' => 'Please choose attribute definition', 'choose_attrdefgroup' => 'Choose attribute group', 'choose_category' => 'Please choose', @@ -413,6 +416,18 @@ URL: [url]

    ', 'details' => 'Details', 'details_version' => 'Details for version: [version]', 'de_DE' => 'German', +'directory_check' => 'Check', +'directory_check_cache_exists' => 'Check, if directory for cache exists', +'directory_check_cache_writable' => 'Check, if directory for extensions is writable', +'directory_check_conf_writable' => 'Check, if directory for configuration is writable', +'directory_check_data_below_root' => 'Check, if data directory is not below web directory', +'directory_check_data_exists' => 'Check, if directory for data exists', +'directory_check_data_writable' => 'Check, if directory for data is writable', +'directory_check_ext_exists' => 'Check, if directory for extensions exists', +'directory_check_ext_writable' => 'Check, if directory for extensions is writable', +'directory_check_index_exists' => 'Check, if directory for fulltext index exists', +'directory_check_index_writable' => 'Check, if directory for fulltext index is writable', +'directory_check_result' => 'Result', 'disable_extension' => 'Disable extension', 'disclaimer' => 'This is a classified area. Access is permitted only to authorized personnel. Any violation will be prosecuted according to the national and international laws.', 'discspace' => 'Disc space', @@ -2314,6 +2329,7 @@ If you did not receive a password, please use the password forgotten function on 'startdate' => 'Start date', 'state_and_next_state' => 'State/Next state', 'statistic' => 'Statistic', +'statistics_mail_subject' => 'Statistics', 'status' => 'Status', 'status_approval_rejected' => 'rejected', 'status_approved' => 'Approved', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index f15893be7..b81d10a68 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -289,6 +289,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Por favor, seleccione definición de atributo', 'choose_attrdefgroup' => '', 'choose_category' => 'Seleccione categoría', @@ -369,6 +372,18 @@ URL: [url]', 'details' => 'Detalles', 'details_version' => 'Detalles de la versión: [version]', 'de_DE' => 'Aleman', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'Esta es un área restringida. Se permite el acceso únicamente a personal autorizado. Cualquier intrusión se perseguirá conforme a las leyes internacionales.', 'discspace' => 'Espacio en disco', @@ -1934,6 +1949,7 @@ URL: [url]', 'startdate' => '', 'state_and_next_state' => 'Estado/Estado siguiente', 'statistic' => 'Estadística', +'statistics_mail_subject' => '', 'status' => 'Estado', 'status_approval_rejected' => 'Borrador rechazado', 'status_approved' => 'Aprobado', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 21d9ab80e..53bd01582 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -323,6 +323,9 @@ URL : [url]

    ', 'checkout_cancel_confirm' => 'Veuillez confirmer l’annulation de la vérification.', 'checkout_document' => 'Bloquer (check-out)', 'checkout_is_disabled' => 'Le blocage (check-out) de documents est désactivé dans la configuration.', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Choisissez une définition d\'attribut', 'choose_attrdefgroup' => 'Choisir un groupe d’attributs', 'choose_category' => 'Sélectionnez une catégorie', @@ -403,6 +406,18 @@ URL : [url]

    ', 'details' => 'Détails', 'details_version' => 'Détails de la version: [version]', 'de_DE' => 'Allemand', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => 'Désactiver l’extension', 'disclaimer' => 'Cet espace est protégé. Son accès est strictement réservé aux utilisateurs autorisés.
    Tout accès non autorisé est punissable par les lois internationales.', 'discspace' => 'Espace disque', @@ -2297,6 +2312,7 @@ Nom : [username] 'startdate' => '', 'state_and_next_state' => 'État initial/suivant', 'statistic' => 'Statistiques', +'statistics_mail_subject' => '', 'status' => 'Statut', 'status_approval_rejected' => 'Ébauche rejetée', 'status_approved' => 'Approuvé', diff --git a/languages/hr_HR/lang.inc b/languages/hr_HR/lang.inc index c734f6d4e..ddfaf7e96 100644 --- a/languages/hr_HR/lang.inc +++ b/languages/hr_HR/lang.inc @@ -294,6 +294,9 @@ Internet poveznica: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => 'Odjava', 'checkout_is_disabled' => 'Odjava dokumenata je onemogućena u konfiguraciji.', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Molim odaberite definiciju atributa', 'choose_attrdefgroup' => '', 'choose_category' => 'Molim odaberite', @@ -374,6 +377,18 @@ Internet poveznica: [url]', 'details' => 'Detalji', 'details_version' => 'Detalji za verziju: [version]', 'de_DE' => 'Njemački', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'Ovo je klasificirano područje. Pristup je omogućen samo ovlaštenim osobama. Sa svakim kršenjem bit će postupano sukladno nacionalnim i međunarodnim zakonima.', 'discspace' => 'Prostor na disku', @@ -1943,6 +1958,7 @@ Internet poveznica: [url]', 'startdate' => '', 'state_and_next_state' => 'Status/Slijedeći status', 'statistic' => 'Statistika', +'statistics_mail_subject' => '', 'status' => 'Status', 'status_approval_rejected' => 'Skica odbijena', 'status_approved' => 'Odobreno', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index 6a4ae00f4..e78e70581 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -289,6 +289,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Kérem válasszon jellemző meghatározást', 'choose_attrdefgroup' => '', 'choose_category' => 'Kérjük válasszon', @@ -369,6 +372,18 @@ URL: [url]', 'details' => 'Részletek', 'details_version' => 'Verzió részletek: [version]', 'de_DE' => 'Német', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'Ez egy bizalmas terület. Hozzáférés kizárólag a meghatalmazott személyek részére engedélyezett. Bárminemű megsértését a nemzeti, illetve a nemzetközi jog szerint fogják büntetni.', 'discspace' => 'Lemezterület', @@ -1921,6 +1936,7 @@ URL: [url]', 'startdate' => '', 'state_and_next_state' => 'Állapot/Következő állapot', 'statistic' => 'Statisztika', +'statistics_mail_subject' => '', 'status' => 'Állapot', 'status_approval_rejected' => 'Piszkozat elutasítva', 'status_approved' => 'Jóváhagyott', diff --git a/languages/id_ID/lang.inc b/languages/id_ID/lang.inc index cfd218cb5..81755dac7 100644 --- a/languages/id_ID/lang.inc +++ b/languages/id_ID/lang.inc @@ -303,6 +303,9 @@ URL: [url]

    ', 'checkout_cancel_confirm' => 'Konfirmasi untuk membatalkan checkout', 'checkout_document' => '', 'checkout_is_disabled' => 'Check out dokumen dinonaktifkan dalam konfigurasi', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Harap memilih definisi label', 'choose_attrdefgroup' => 'Pilih kelompok label', 'choose_category' => 'Harap pilih', @@ -383,6 +386,18 @@ URL: [url]

    ', 'details' => 'Rincian', 'details_version' => 'Rincian versi: [version]', 'de_DE' => 'Jerman', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => 'Nonaktifkan ekstensi', 'disclaimer' => 'Ini adalah area rahasia. Akses hanya diizinkan untuk personel yang berwenang. Setiap pelanggaran akan dituntut sesuai dengan hukum nasional dan internasional.', 'discspace' => 'Ruang penyimpanan', @@ -1995,6 +2010,7 @@ Jika Anda tidak menerima kata sandi, silakan gunakan fitur lupa kata sandi di ha 'startdate' => '', 'state_and_next_state' => '', 'statistic' => 'Statistik', +'statistics_mail_subject' => '', 'status' => 'Status', 'status_approval_rejected' => 'ditolak', 'status_approved' => 'Disetujui', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index f855e4d1c..a0e6a13bf 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -294,6 +294,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => 'Approvato', 'checkout_is_disabled' => 'Approvazione dei documenti disabilitata', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Seleziona l\'Attributo', 'choose_attrdefgroup' => 'Scegli gruppo di attributi', 'choose_category' => 'Seleziona', @@ -374,6 +377,18 @@ URL: [url]', 'details' => 'Dettagli', 'details_version' => 'Dettagli versione: [version]', 'de_DE' => 'Tedesco', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'Questa è un\'area riservata. L\'accesso è consentito solo agli utenti autorizzati. Qualunque violazione sarà perseguita a norma delle leggi italiane ed internazionali.', 'discspace' => 'Spazio su disco', @@ -1970,6 +1985,7 @@ Name: [username] 'startdate' => '', 'state_and_next_state' => 'Stato/Prossimo stato', 'statistic' => 'Statistiche', +'statistics_mail_subject' => '', 'status' => 'Stato', 'status_approval_rejected' => 'Bozza rifiutata', 'status_approved' => 'Approvato', diff --git a/languages/ko_KR/lang.inc b/languages/ko_KR/lang.inc index 15f2d7d9e..d3b657733 100644 --- a/languages/ko_KR/lang.inc +++ b/languages/ko_KR/lang.inc @@ -296,6 +296,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => '체크아웃', 'checkout_is_disabled' => '체크아웃된 문서는 설정에서 비활성화됩니다.', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => '속성의 정의를 선택하세요', 'choose_attrdefgroup' => '', 'choose_category' => '선택하세요', @@ -377,6 +380,18 @@ URL: [url]', 'details' => '세부사항', 'details_version' => '버전에 대한 상세 사항 : [version]', 'de_DE' => '독일어', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => '본 사이트는 접근이 허가된 자에게만 사용이 허용된 곳 입니다. 허가받지 않은 접근이나 불법행위는 국내 및 국제법에 따라 기소 될 것입니다.', 'discspace' => '디스크 공간', @@ -1937,6 +1952,7 @@ URL : [url]', 'startdate' => '', 'state_and_next_state' => '상태 / 다음 상태', 'statistic' => '통계', +'statistics_mail_subject' => '', 'status' => '상태', 'status_approval_rejected' => '거부된 초안', 'status_approved' => '승인', diff --git a/languages/lo_LA/lang.inc b/languages/lo_LA/lang.inc index 12db8a598..6fab15352 100644 --- a/languages/lo_LA/lang.inc +++ b/languages/lo_LA/lang.inc @@ -292,6 +292,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => 'ເຊັກເອົາ', 'checkout_is_disabled' => 'ໃນການກຳນົດຄ່າເຊັກເອົາເອກະສານໄດ້ຖືກປິດໄຊ້ງານ', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'ກະລຸນາເລືອກນິຍາມແອັດທິບິວ', 'choose_attrdefgroup' => 'ເລືອກກຸ່ມແອັດທິບິວ', 'choose_category' => 'ກະລຸນາເລືອກ', @@ -372,6 +375,18 @@ URL: [url]', 'details' => 'ລາຍລະອຽດ', 'details_version' => 'ລາຍລະອຽດສຳລັບລຸ້ນ: [version]', 'de_DE' => 'ເຢຍລະມັນ', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'ນີ້ແມ່ນພື້ນທີ່ທີ່ຈຳແນກ ອະນຸຍາດໃຫ້ເຂົ້າເຖິງສະເພາະຜູ້ທີໄດ້ຮັບອານຸຍາດເທົ່ານັ້ນ ຖ້າມີການລະເມີດໄດ້ໆ ຈະຖືກຟ້ອງຮ້ອງຕາມກົດໝາຍຂອງພາຍໃນ ແລະ ຕ່າງປະເທດ', 'discspace' => 'ຟື້ນທີ່ວ່າງໃນດິສ', @@ -1963,6 +1978,7 @@ URL: [url]', 'startdate' => '', 'state_and_next_state' => 'ລັດ/ລັດຖັດໄປ', 'statistic' => 'ສະຖິຕິ', +'statistics_mail_subject' => '', 'status' => 'ສະຖານະ', 'status_approval_rejected' => 'ຮ່າງຖືກປະຕິເສດ', 'status_approved' => 'ໄດ້ຮັບການອະນຸມັດ', diff --git a/languages/nb_NO/lang.inc b/languages/nb_NO/lang.inc index 5a529d305..8a4bd4350 100644 --- a/languages/nb_NO/lang.inc +++ b/languages/nb_NO/lang.inc @@ -294,6 +294,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => 'Utsjekking', 'checkout_is_disabled' => 'Sjekk ut av dokumentene er deaktivert i konfigurasjonen.', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Velg egenskaps definition', 'choose_attrdefgroup' => 'Velg egenskaps gruppe', 'choose_category' => 'Venligst velg', @@ -374,6 +377,18 @@ URL: [url]', 'details' => 'Detaljer', 'details_version' => 'Detaljer for versjon: [version]', 'de_DE' => 'Tysk', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'Dette er et klassifisert område. Tilgang er bare tillatt for autorisert personell. Ethvert brudd vil bli tiltalt i henhold til nasjonale og internasjonale lover.', 'discspace' => 'Diskplass', @@ -1976,6 +1991,7 @@ Bruker: [username] 'startdate' => '', 'state_and_next_state' => 'Status/Neste status', 'statistic' => 'Statistikk', +'statistics_mail_subject' => '', 'status' => 'Status', 'status_approval_rejected' => 'Utkast forkastet', 'status_approved' => 'Godkjent', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 92aded6d7..5fc545804 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -287,6 +287,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => 'Checkout-document', 'checkout_is_disabled' => 'Checkout is niet mogelijk', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Kies een attribuutdefinitie', 'choose_attrdefgroup' => 'Kies een attribuutdefinitie-groep', 'choose_category' => 'Selecteer a.u.b.', @@ -367,6 +370,18 @@ URL: [url]', 'details' => 'Details', 'details_version' => 'Details voor versie: [version]', 'de_DE' => 'Duits', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => 'Schakel de extensie uit', 'disclaimer' => 'Dit is een beveiligde omgeving. Gebruik is alleen toegestaan voor geautoriseerde leden. Ongeautoriseerde toegang kan worden bestraft overeenkomstig (inter)nationale wetgeving.', 'discspace' => 'Schijfruimte', @@ -1975,6 +1990,7 @@ Name: [username] 'startdate' => '', 'state_and_next_state' => 'status/ volgende status', 'statistic' => 'Statistieken', +'statistics_mail_subject' => '', 'status' => 'Status', 'status_approval_rejected' => 'Klad Goedkeuring [Afgewezen]', 'status_approved' => 'Goedgekeurd', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 20f5e7365..1df84f033 100644 --- a/languages/pl_PL/lang.inc +++ b/languages/pl_PL/lang.inc @@ -282,6 +282,9 @@ URL: [url]', 'checkout_cancel_confirm' => 'Potwierdź anulowanie wymeldowania', 'checkout_document' => 'Wymelduj się', 'checkout_is_disabled' => 'Wyewidencjonowywanie dokumentów jest wyłączone w konfiguracji.', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Proszę wybrać definicję atrybutu', 'choose_attrdefgroup' => 'Wybierz grupę atrybutów', 'choose_category' => 'Proszę wybrać', @@ -362,6 +365,18 @@ URL: [url]', 'details' => 'Szczegóły', 'details_version' => 'Szczegóły dla wersji: [version]', 'de_DE' => 'Niemiecki', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'To jest zastrzeżona strefa. Dostęp do niej ma wyłącznie wyznaczony personel. Wszelkie naruszenia będą ścigane zgodnie z prawem krajowym i międzynarodowym.', 'discspace' => 'Zajęta przestrzeń dyskowa', @@ -1906,6 +1921,7 @@ Name: [username] 'startdate' => '', 'state_and_next_state' => 'Status/Następny status', 'statistic' => 'Statystyka', +'statistics_mail_subject' => '', 'status' => 'Status', 'status_approval_rejected' => 'Szkic odrzucony', 'status_approved' => 'Zatwierdzone', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 453e7b980..6233df42f 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -294,6 +294,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => 'Retirada', 'checkout_is_disabled' => 'A retirada de documentos está desativada na configuração.', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Por favor escolha a definição de atributo', 'choose_attrdefgroup' => 'Escolher o grupo de atributos', 'choose_category' => 'Por favor escolha', @@ -374,6 +377,18 @@ URL: [url]', 'details' => 'Detalhes', 'details_version' => 'Detalhes para a versão: [version]', 'de_DE' => 'Alemão', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'Esta é uma área restrita, o acesso é permitido apenas ao pessoal autorizado. Qualquer violação será tratado de acordo com as normas internas e leis vigentes.', 'discspace' => 'Espaço em Disco', @@ -1982,6 +1997,7 @@ Nome: [username] 'startdate' => '', 'state_and_next_state' => 'Estado/Próximo estado', 'statistic' => 'Estatística', +'statistics_mail_subject' => '', 'status' => 'Status', 'status_approval_rejected' => 'Rascunho rejeitado', 'status_approved' => 'Aprovado', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index 9e540e863..e61151bf2 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -294,6 +294,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => 'Verifica', 'checkout_is_disabled' => 'Verificarea documentelor este dezactivata in configurari.', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Vă rugăm să alegeți definiția atributului', 'choose_attrdefgroup' => '', 'choose_category' => 'Vă rugăm să alegeți', @@ -374,6 +377,18 @@ URL: [url]', 'details' => 'Detalii', 'details_version' => 'Detalii pentru versiunea: [version]', 'de_DE' => 'Germana', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'Aceasta este o zonă clasificată. Accesul este permis numai personalului autorizat. Orice încălcare va fi urmărită penal în conformitate cu legile naționale și internaționale.', 'discspace' => 'Spațiu pe disc', @@ -1944,6 +1959,7 @@ URL: [url]', 'startdate' => '', 'state_and_next_state' => 'Stare/Stare urmatoare', 'statistic' => 'Statistic', +'statistics_mail_subject' => '', 'status' => 'Status', 'status_approval_rejected' => 'Proiect respins', 'status_approved' => 'Aprobat', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index e25392d24..81d844a22 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -294,6 +294,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => 'Загрузка', 'checkout_is_disabled' => 'Загрузка отключена.', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Выберите атрибут', 'choose_attrdefgroup' => 'Выберите группу атрибута', 'choose_category' => 'Выберите категорию', @@ -374,6 +377,18 @@ URL: [url]', 'details' => 'Подробности', 'details_version' => 'Подробная информация о версии: [version]', 'de_DE' => 'German', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'Работник, помни! От тебя зависит успех фирмы и всей страны!', 'discspace' => 'Дисковое пространство', @@ -1951,6 +1966,7 @@ URL: [url]', 'startdate' => '', 'state_and_next_state' => 'Статус / следующий статус', 'statistic' => 'Статистика', +'statistics_mail_subject' => '', 'status' => 'Статус', 'status_approval_rejected' => 'Черновик отклонён', 'status_approved' => 'Утверждён', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 43963e85b..b96ae9129 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -294,6 +294,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => 'Pozrieť sa na dokument', 'checkout_is_disabled' => 'Kontrola dokumentov je zakázaná v konfigurácii.', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Vyberte prosím definíciu atribútu', 'choose_attrdefgroup' => 'Vyberte skupinu atribútov', 'choose_category' => 'Vyberte prosím', @@ -374,6 +377,18 @@ URL: [url]', 'details' => 'Podrobnosti', 'details_version' => 'Podrobnosti verzie: [version]', 'de_DE' => 'Nemčina', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'Toto je zabezpečená zóna. Prístup je povolený len autorizovaným osobám.', 'discspace' => 'Priestor na disku', @@ -1984,6 +1999,7 @@ Meno: [username] 'startdate' => '', 'state_and_next_state' => 'State/Next state', 'statistic' => 'Štatistika', +'statistics_mail_subject' => '', 'status' => 'Stav', 'status_approval_rejected' => 'Návrh zamietnutý', 'status_approved' => 'Schválený', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 14dd293a6..411f7ac31 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -295,6 +295,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => 'Utcheckning', 'checkout_is_disabled' => 'Utcheckning av dokument är invaktiverad i systemets inställningar.', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Välj attributdefinition', 'choose_attrdefgroup' => 'Välj gruppattribut', 'choose_category' => 'Välj', @@ -375,6 +378,18 @@ URL: [url]', 'details' => 'Detaljer', 'details_version' => 'Detaljer för version: [version]', 'de_DE' => 'Tyska', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'Detta är ett sekretessbelagt område. Bara auktoriserade personer äger tillträde. Vid överträdelse kommer åtal att väckas i enlighet med nationella och internationella lagar.', 'discspace' => 'Diskutrymme', @@ -1957,6 +1972,7 @@ Kommentar: [comment]', 'startdate' => '', 'state_and_next_state' => 'Status/Nästa status', 'statistic' => 'Statistik', +'statistics_mail_subject' => '', 'status' => 'Status', 'status_approval_rejected' => 'Utkast avvisat', 'status_approved' => 'Godkänt', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index 2805967ff..d9790fed2 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -288,6 +288,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Lütfen nitelik tanımını seçiniz', 'choose_attrdefgroup' => '', 'choose_category' => 'Lütfen seçiniz', @@ -368,6 +371,18 @@ URL: [url]', 'details' => 'Detaylar', 'details_version' => '[version] versiyonu detayları', 'de_DE' => 'Almanca', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'Bu sisteme sadece yetkilendirilmiş personel yetki seviyesine göre erişebilir. Herhangi bir ihlalde veya ihlal girişiminde, ulusal ve uluslararası yasalara göre takibat yapılacaktır.', 'discspace' => 'Disk alanı', @@ -1923,6 +1938,7 @@ URL: [url]', 'startdate' => '', 'state_and_next_state' => 'Durum/Sonraki durum', 'statistic' => 'İstatistik', +'statistics_mail_subject' => '', 'status' => 'Durum', 'status_approval_rejected' => 'Taslak reddedildi', 'status_approved' => 'Onaylandı', diff --git a/languages/uk_UA/lang.inc b/languages/uk_UA/lang.inc index 63183621d..26f1f22ef 100644 --- a/languages/uk_UA/lang.inc +++ b/languages/uk_UA/lang.inc @@ -294,6 +294,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => 'Завантаження', 'checkout_is_disabled' => 'Завантаження відключене', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => 'Оберіть атрибут', 'choose_attrdefgroup' => '', 'choose_category' => 'Оберіть категорію', @@ -374,6 +377,18 @@ URL: [url]', 'details' => 'Деталі', 'details_version' => 'Детальна інформація про версію: [version]', 'de_DE' => 'German', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => 'Авторизована зона. Несанкціонований доступ переслідується згідно національного законодавства.', 'discspace' => 'Дисковий простір', @@ -1944,6 +1959,7 @@ URL: [url]', 'startdate' => '', 'state_and_next_state' => 'Статус / наступний статус', 'statistic' => 'Статистика', +'statistics_mail_subject' => '', 'status' => 'Статус', 'status_approval_rejected' => 'Чернетку відхилено', 'status_approved' => 'Затверджено', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index 935894e1c..ca75a09c1 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -286,6 +286,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => '签出', 'checkout_is_disabled' => '不允许签出', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => '请选择属性', 'choose_attrdefgroup' => '选择属性组', 'choose_category' => '请选择', @@ -368,6 +371,18 @@ URL: [url]', 'details' => '详细情况', 'details_version' => '版本详情:[version]', 'de_DE' => '德国语', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => '警告:这是机密区.只有授权用户才被允许访问.任何违反行为将受到法律制裁', 'discspace' => '磁盘空间', @@ -1931,6 +1946,7 @@ URL: [url]', 'startdate' => '', 'state_and_next_state' => '状态/下一个状态', 'statistic' => '统计', +'statistics_mail_subject' => '', 'status' => '状态', 'status_approval_rejected' => '拟拒绝', 'status_approved' => '批准', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index fd5132025..6fddaf52e 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -294,6 +294,9 @@ URL: [url]', 'checkout_cancel_confirm' => '', 'checkout_document' => '簽出', 'checkout_is_disabled' => '在配置中禁用了簽出文件功能。', +'check_directory_layout' => '', +'check_failed' => '', +'check_passed' => '', 'choose_attrdef' => '請選擇屬性', 'choose_attrdefgroup' => '選擇屬性組', 'choose_category' => '請選擇', @@ -374,6 +377,18 @@ URL: [url]', 'details' => '詳細情況', 'details_version' => '版本詳情:[version]', 'de_DE' => '德國語', +'directory_check' => '', +'directory_check_cache_exists' => '', +'directory_check_cache_writable' => '', +'directory_check_conf_writable' => '', +'directory_check_data_below_root' => '', +'directory_check_data_exists' => '', +'directory_check_data_writable' => '', +'directory_check_ext_exists' => '', +'directory_check_ext_writable' => '', +'directory_check_index_exists' => '', +'directory_check_index_writable' => '', +'directory_check_result' => '', 'disable_extension' => '', 'disclaimer' => '警告:這是機密區.只有授權使用者才被允許訪問.任何違反行為將受到法律制裁', 'discspace' => '磁碟空間', @@ -1982,6 +1997,7 @@ URL: [url]', 'startdate' => '', 'state_and_next_state' => '狀態/下一個狀態', 'statistic' => '統計', +'statistics_mail_subject' => '', 'status' => '狀態', 'status_approval_rejected' => '擬拒絕', 'status_approved' => '批准', From 8776173ec99bddb0df2ced4edb1a880b2acbfe59 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 3 Apr 2023 12:26:04 +0200 Subject: [PATCH 1904/2006] set propper html language --- views/bootstrap/class.Bootstrap.php | 8 +++++++- views/bootstrap4/class.Bootstrap4.php | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 794c61977..c7878b6af 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -85,7 +85,13 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common { if($this->hasHook('startPage')) $this->callHook('startPage'); echo "\n"; - echo "\n\n"; + echo "params['session'] && ($slang = $this->params['session']->getLanguage())) { + echo str_replace('_', '-', $slang); + } else { + echo str_replace('_', '-', $settings->_language); + } + echo "\">\n\n"; echo "\n"; echo ''."\n"; if($base) diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 3902711ea..3388e9151 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -87,7 +87,13 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common { if($this->hasHook('startPage')) $this->callHook('startPage'); echo "\n"; - echo "\n\n"; + echo "params['session'] && ($slang = $this->params['session']->getLanguage())) { + echo str_replace('_', '-', $slang); + } else { + echo str_replace('_', '-', $settings->_language); + } + echo "\">\n\n"; echo "\n"; echo ''."\n"; if($base) From d0c5905c0e7c73f5dc6bfe51b50b36e37fcbf3bb Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 3 Apr 2023 15:50:40 +0200 Subject: [PATCH 1905/2006] check for access rights of documents --- views/bootstrap/class.Calendar.php | 36 +++++++++++++++++------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/views/bootstrap/class.Calendar.php b/views/bootstrap/class.Calendar.php index 504801f28..70fc2d99f 100644 --- a/views/bootstrap/class.Calendar.php +++ b/views/bootstrap/class.Calendar.php @@ -192,14 +192,16 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style { if(mktime(23,59,59, $end[1], $end[2], $end[0]) > time()) { $documents = $dms->getDocumentsExpired($this->params['end']); foreach ($documents as $document){ - $arr[] = array( - 'start'=>date('Y-m-d', $document->getExpires()), - 'allDay'=>true, - 'color'=>'#ff4455', - 'title'=>$document->getName()."\nexpires", - 'documentid'=> $document->getID(), - 'eventtype'=> $eventtype, - ); + if($document->getAccessMode($user) >= M_READ) { + $arr[] = array( + 'start'=>date('Y-m-d', $document->getExpires()), + 'allDay'=>true, + 'color'=>'#ff4455', + 'title'=>$document->getName()."\nexpires", + 'documentid'=> $document->getID(), + 'eventtype'=> $eventtype, + ); + } } } break; @@ -210,14 +212,16 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style { if($attrdef->getType() == \SeedDMS_Core_AttributeDefinition::type_date) { $documents = $attrdef->getObjects($this->params['start'], 0, O_GTEQ); foreach ($documents['docs'] as $document){ - $arr[] = array( - 'start'=>$document->getAttribute($attrdef)->getValue(), - 'allDay'=>true, - 'color'=>'#4455ff', - 'title'=>$document->getName()."\n".$attrdef->getName(), - 'documentid'=> $document->getID(), - 'eventtype'=> $eventtype, - ); + if($document->getAccessMode($user) >= M_READ) { + $arr[] = array( + 'start'=>$document->getAttribute($attrdef)->getValue(), + 'allDay'=>true, + 'color'=>'#4455ff', + 'title'=>$document->getName()."\n".$attrdef->getName(), + 'documentid'=> $document->getID(), + 'eventtype'=> $eventtype, + ); + } } } } From 33249dea351454590774e02e4f63a0f2c791e8a4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 3 Apr 2023 16:28:39 +0200 Subject: [PATCH 1906/2006] set platform to php 7.4 --- composer-dist.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/composer-dist.json b/composer-dist.json index 8cc97ee60..af3de13f3 100644 --- a/composer-dist.json +++ b/composer-dist.json @@ -1,4 +1,10 @@ { + "config": { + "platform": { + "php": "7.4" + } + }, + "require": { "sabre/dav": "^3.", "slim/slim": "^3.0", From ac3c62355f5b1b68b4e328bd2a82901e50cb6357 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 Apr 2023 12:31:09 +0200 Subject: [PATCH 1907/2006] start new version 5.1.31 --- CHANGELOG | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index abaab0767..94b2c0554 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +-------------------------------------------------------------------------------- + Changes in version 5.1.31 +-------------------------------------------------------------------------------- +- rest api returns error msg and not just http status + -------------------------------------------------------------------------------- Changes in version 5.1.30 -------------------------------------------------------------------------------- From 99fe2244fbfb72efc2573e2524990269f3327bae Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 Apr 2023 12:31:20 +0200 Subject: [PATCH 1908/2006] return message and not just status --- restapi/index.php | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/restapi/index.php b/restapi/index.php index 4ae5efece..3eceae4f0 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -435,7 +435,7 @@ class RestapiController { /* {{{ */ return $response->withJson(array('success'=>false, 'message'=>'No access', 'data'=>''), 403); } } else { - return $response->withStatus(404); + return $response->withJson(array('success'=>false, 'message'=>'No such folder', 'data'=>''), 404); } } } /* }}} */ @@ -2136,7 +2136,7 @@ class RestapiController { /* {{{ */ } return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$data), 200); } else { - return $response->withStatus(404); + return $response->withJson(array('success'=>false, 'message'=>'No such group', 'data'=>''), 404); } } /* }}} */ @@ -2241,7 +2241,7 @@ class RestapiController { /* {{{ */ $success = ($folder->inheritsAccess() == $inherit); return $response->withJson(array('success'=>$success, 'message'=>'', 'data'=>$data), 200); } else { - return $response->withStatus(404); + return $response->withJson(array('success'=>false, 'message'=>'No such folder', 'data'=>''), 404); } } /* }}} */ @@ -2275,7 +2275,7 @@ class RestapiController { /* {{{ */ $folder = $dms->getfolderByName($args['id']); } if (!$folder) { - return $response->withStatus(404); + return $response->withJson(array('success'=>false, 'message'=>'No such folder', 'data'=>''), 404); } $params = $request->getParsedBody(); @@ -2550,7 +2550,7 @@ class RestapiController { /* {{{ */ $folder = $dms->getFolderByName($args['id']); } if (!$folder) { - return $response->withStatus(404); + return $response->withJson(array('success'=>false, 'message'=>'No such folder', 'data'=>''), 404); } if (!$folder->clearAccessList()) { return $response->withJson(array('success'=>false, 'message'=>'Something went wrong. Could not clear access list for this folder.', 'data'=>''), 500); @@ -2645,17 +2645,17 @@ class RestapiAuth { /* {{{ */ $logger->log("Received preflight options request", PEAR_LOG_DEBUG); } elseif(!in_array($request->getUri()->getPath(), array('login')) && substr($request->getUri()->getPath(), 0, 5) != 'echo/' && $request->getUri()->getPath() != 'version') { $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); - } - } else { - return $response->withStatus(403); - } - $logger->log("Login with apikey as '".$userobj->getLogin()."' successful", PEAR_LOG_INFO); - } else { + 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->withJson(array('success'=>false, 'message'=>'Invalid user associated with api key', 'data'=>''), 403); + } + } else { + return $response->withJson(array('success'=>false, 'message'=>'Wrong api key', 'data'=>''), 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()); if (isset($_COOKIE["mydms_session"])) { @@ -2665,7 +2665,7 @@ class RestapiAuth { /* {{{ */ /* 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); + return $response->withJson(array('success'=>false, 'message'=>'Session has gone', 'data'=>''), 403); } /* Load user data */ @@ -2675,20 +2675,20 @@ class RestapiAuth { /* {{{ */ setcookie("mydms_session", $dms_session, time()-3600, $settings->_httpRoot); if($settings->_enableGuestLogin) { if(!($userobj = $dms->getUser($settings->_guestID))) - return $response->withStatus(403); + return $response->withJson(array('success'=>false, 'message'=>'Could not get guest login', 'data'=>''), 403); } else - return $response->withStatus(403); + return $response->withJson(array('success'=>false, 'message'=>'Login as guest disabled', 'data'=>''), 403); } if($userobj->isAdmin()) { if($resArr["su"]) { if(!($userobj = $dms->getUser($resArr["su"]))) - return $response->withStatus(403); + return $response->withJson(array('success'=>false, 'message'=>'Cannot substitute user', 'data'=>''), 403); } } // $logger->log("Login with user name '".$userobj->getLogin()."' successful", PEAR_LOG_INFO); $dms->setUser($userobj); } else { - return $response->withStatus(403); + return $response->withJson(array('success'=>false, 'message'=>'Missing session cookie', 'data'=>''), 403); } } $this->container['userobj'] = $userobj; From d4fbae1a4c21cdc80260aab2d4f271539bdf5a71 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 Apr 2023 12:31:52 +0200 Subject: [PATCH 1909/2006] new version 5.1.31 --- inc/inc.Version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/inc.Version.php b/inc/inc.Version.php index 2003b0c1a..a1876b726 100644 --- a/inc/inc.Version.php +++ b/inc/inc.Version.php @@ -20,7 +20,7 @@ class SeedDMS_Version { /* {{{ */ - const _number = "5.1.30"; + const _number = "5.1.31"; const _string = "SeedDMS"; function __construct() { From 9092eeb0a3be63691c87f193e374a3905209b8a2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 Apr 2023 17:46:08 +0200 Subject: [PATCH 1910/2006] comment of document, documentcontent and folder can be rendered as markdown --- CHANGELOG | 2 ++ inc/inc.ClassSettings.php | 4 ++++ op/op.Settings.php | 1 + views/bootstrap/class.Settings.php | 1 + views/bootstrap/class.ViewDocument.php | 18 ++++++++++++++++-- views/bootstrap/class.ViewFolder.php | 9 ++++++++- 6 files changed, 32 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 94b2c0554..6143e8c93 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,8 @@ Changes in version 5.1.31 -------------------------------------------------------------------------------- - rest api returns error msg and not just http status +- comment of document, documentcontent and folder can be rendered as + markdown -------------------------------------------------------------------------------- Changes in version 5.1.30 diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 002bb3312..fdfd9c277 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -290,6 +290,8 @@ class Settings { /* {{{ */ var $_maxItemsPerPage = 0; // number of documents/folders fetched when scrolling to bottom of ViewFolder page var $_incItemsPerPage = 0; + // parse comments of folders and documents as markdown + var $_markdownComments = false; // Show form to submit missing translations at end of page var $_showMissingTranslations = false; // Extra Path to additional software, will be added to include path @@ -498,6 +500,7 @@ class Settings { /* {{{ */ $this->_maxItemsPerPage = intval($tab["maxItemsPerPage"]); if(isset($tab["incItemsPerPage"])) $this->_incItemsPerPage = intval($tab["incItemsPerPage"]); + $this->_markdownComments = Settings::boolVal($tab["markdownComments"]); // XML Path: /configuration/site/edition $node = $xml->xpath('/configuration/site/edition'); @@ -882,6 +885,7 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "convertToPdf", $this->_convertToPdf); $this->setXMLAttributValue($node, "maxItemsPerPage", $this->_maxItemsPerPage); $this->setXMLAttributValue($node, "incItemsPerPage", $this->_incItemsPerPage); + $this->setXMLAttributValue($node, "markdownComments", $this->_markdownComments); // XML Path: /configuration/site/edition $node = $this->getXMLNode($xml, '/configuration/site', 'edition'); diff --git a/op/op.Settings.php b/op/op.Settings.php index dfd8206d4..cd9217325 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -115,6 +115,7 @@ if ($action == "saveSettings") setBoolValue('convertToPdf'); setIntValue('maxItemsPerPage'); setIntValue('incItemsPerPage'); + setBoolValue('markdownComments'); // SETTINGS - SITE - EDITION setBoolValue('strictFormCheck'); diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index d931031a5..a67406f00 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -330,6 +330,7 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site')); showConfigCheckbox('settings_convertToPdf', 'convertToPdf'); ?> showConfigText('settings_maxItemsPerPage', 'maxItemsPerPage'); ?> showConfigText('settings_incItemsPerPage', 'incItemsPerPage'); ?> +showConfigCheckbox('settings_markdownComments', 'markdownComments'); ?>