From 307abdf49323584a95946bd260468acd919a950c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 11 Feb 2017 15:19:36 +0100 Subject: [PATCH 001/194] pass tablename to getInsertID(), add pgsql as new db driver --- SeedDMS_Core/Core/inc.ClassDMS.php | 16 ++++++------ SeedDMS_Core/Core/inc.ClassDocument.php | 34 ++++++++++++------------- SeedDMS_Core/Core/inc.ClassFolder.php | 4 +-- SeedDMS_Core/Core/inc.ClassObject.php | 5 +++- SeedDMS_Core/Core/inc.ClassWorkflow.php | 2 +- SeedDMS_Core/Core/inc.DBAccessPDO.php | 23 ++++++++++++----- 6 files changed, 48 insertions(+), 36 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 7319fba43..7afdcb2d4 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -1288,7 +1288,7 @@ class SeedDMS_Core_DMS { if (!$res) return false; - $user = $this->getUser($this->db->getInsertID()); + $user = $this->getUser($this->db->getInsertID('tblUsers')); /* Check if 'onPostAddUser' callback is set */ if(isset($this->_dms->callbacks['onPostAddUser'])) { @@ -1350,7 +1350,7 @@ class SeedDMS_Core_DMS { if (!$this->db->getResult($queryStr)) return false; - $group = $this->getGroup($this->db->getInsertID()); + $group = $this->getGroup($this->db->getInsertID('tblGroups')); /* Check if 'onPostAddGroup' callback is set */ if(isset($this->_dms->callbacks['onPostAddGroup'])) { @@ -1439,7 +1439,7 @@ class SeedDMS_Core_DMS { if (!$this->db->getResult($queryStr)) return false; - $category = $this->getKeywordCategory($this->db->getInsertID()); + $category = $this->getKeywordCategory($this->db->getInsertID('tblKeywordCategories')); /* Check if 'onPostAddKeywordCategory' callback is set */ if(isset($this->_dms->callbacks['onPostAddKeywordCategory'])) { @@ -1515,7 +1515,7 @@ class SeedDMS_Core_DMS { if (!$this->db->getResult($queryStr)) return false; - $category = $this->getDocumentCategory($this->db->getInsertID()); + $category = $this->getDocumentCategory($this->db->getInsertID('tblCategory')); /* Check if 'onPostAddDocumentCategory' callback is set */ if(isset($this->_dms->callbacks['onPostAddDocumentCategory'])) { @@ -1714,7 +1714,7 @@ class SeedDMS_Core_DMS { if (!$res) return false; - return $this->getAttributeDefinition($this->db->getInsertID()); + return $this->getAttributeDefinition($this->db->getInsertID('tblAttributeDefinitions')); } /* }}} */ /** @@ -1815,7 +1815,7 @@ class SeedDMS_Core_DMS { if (!$res) return false; - return $this->getWorkflow($db->getInsertID()); + return $this->getWorkflow($db->getInsertID('tblWorkflows')); } /* }}} */ /** @@ -1908,7 +1908,7 @@ class SeedDMS_Core_DMS { if (!$res) return false; - return $this->getWorkflowState($db->getInsertID()); + return $this->getWorkflowState($db->getInsertID('tblWorkflowStates')); } /* }}} */ /** @@ -1998,7 +1998,7 @@ class SeedDMS_Core_DMS { if (!$res) return false; - return $this->getWorkflowAction($db->getInsertID()); + return $this->getWorkflowAction($db->getInsertID('tblWorkflowActions')); } /* }}} */ /** diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index eb2a04e05..6611a7ba3 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -1242,7 +1242,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return false; } - $contentID = $db->getInsertID(); + $contentID = $db->getInsertID('tblDocumentContent'); // copy file if (!SeedDMS_Core_File::makeDir($this->_dms->contentDir . $dir)) { @@ -1288,7 +1288,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return false; } - $statusID = $db->getInsertID(); + $statusID = $db->getInsertID('tblDocumentStatus', 'statusID'); if($workflow) $content->setWorkflow($workflow, $user); @@ -1791,7 +1791,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ "(".$db->qstr($comment).", ".$db->getCurrentTimestamp().", ".$db->qstr($dir).", ".$this->_id.", ".$db->qstr($fileType).", ".$db->qstr($mimeType).", ".$db->qstr($orgFileName).",".$user->getID().",".$db->qstr($name).")"; if (!$db->getResult($queryStr)) return false; - $id = $db->getInsertID(); + $id = $db->getInsertID('tblDocumentFiles'); $file = $this->getDocumentFile($id); if (is_bool($file) && !$file) return false; @@ -2788,7 +2788,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ $db->rollbackTransaction(); return false; } - $reviewID = $db->getInsertID(); + $reviewID = $db->getInsertID('tblDocumentReviewers', 'reviewID'); $reviewlog = array_reverse($review['logs']); foreach($reviewlog as $log) { if(!SeedDMS_Core_DMS::checkDate($log['date'], 'Y-m-d H:i:s')) { @@ -2801,7 +2801,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ $db->rollbackTransaction(); return false; } - $reviewLogID = $db->getInsertID(); + $reviewLogID = $db->getInsertID('tblDocumentReviewLog', 'reviewLogID'); if(!empty($log['file'])) { SeedDMS_Core_File::copyFile($log['file'], $this->_dms->contentDir . $this->_document->getDir() . 'r' . $reviewLogID); } @@ -2916,7 +2916,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ $db->rollbackTransaction(); return false; } - $reviewID = $db->getInsertID(); + $reviewID = $db->getInsertID('tblDocumentApprovers', 'approveID'); $reviewlog = array_reverse($review['logs']); foreach($reviewlog as $log) { if(!SeedDMS_Core_DMS::checkDate($log['date'], 'Y-m-d H:i:s')) { @@ -2929,7 +2929,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ $db->rollbackTransaction(); return false; } - $approveLogID = $db->getInsertID(); + $approveLogID = $db->getInsertID('tblDocumentApproveLog', 'approveLogID'); if(!empty($log['file'])) { SeedDMS_Core_File::copyFile($log['file'], $this->_dms->contentDir . $this->_document->getDir() . 'a' . $approveLogID); } @@ -2987,7 +2987,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (is_bool($res) && !$res) { return -1; } - $reviewID = $db->getInsertID(); + $reviewID = $db->getInsertID('tblDocumentReviewers', 'reviewID'); } else { $reviewID = isset($indstatus["reviewID"]) ? $indstatus["reviewID"] : NULL; @@ -3045,7 +3045,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (is_bool($res) && !$res) { return -1; } - $reviewID = $db->getInsertID(); + $reviewID = $db->getInsertID('tblDocumentReviewers', 'reviewID'); } else { $reviewID = isset($reviewStatus[0]["reviewID"])?$reviewStatus[0]["reviewID"]:NULL; @@ -3115,7 +3115,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (is_bool($res) && !$res) return -1; - $reviewLogID = $db->getInsertID(); + $reviewLogID = $db->getInsertID('tblDocumentReviewLog', 'reviewLogID'); if($file) { SeedDMS_Core_File::copyFile($file, $this->_dms->contentDir . $this->_document->getDir() . 'r' . $reviewLogID); } @@ -3167,7 +3167,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (is_bool($res) && !$res) return -1; else { - $reviewLogID = $db->getInsertID(); + $reviewLogID = $db->getInsertID('tblDocumentReviewLog', 'reviewLogID'); if($file) { SeedDMS_Core_File::copyFile($file, $this->_dms->contentDir . $this->_document->getDir() . 'r' . $reviewLogID); } @@ -3220,7 +3220,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (is_bool($res) && !$res) { return -1; } - $approveID = $db->getInsertID(); + $approveID = $db->getInsertID('tblDocumentApprovers', 'approveID'); } else { $approveID = isset($indstatus["approveID"]) ? $indstatus["approveID"] : NULL; @@ -3233,7 +3233,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ return -1; } - $approveLogID = $db->getInsertID(); + $approveLogID = $db->getInsertID('tblDocumentApproveLog', 'approveLogID'); return $approveLogID; } /* }}} */ @@ -3276,7 +3276,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (is_bool($res) && !$res) { return -1; } - $approveID = $db->getInsertID(); + $approveID = $db->getInsertID('tblDocumentApprovers', 'approveID'); } else { $approveID = isset($approvalStatus[0]["approveID"])?$approvalStatus[0]["approveID"]:NULL; @@ -3292,7 +3292,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ // Add approver to event notification table. //$this->_document->addNotify($groupID, false); - $approveLogID = $db->getInsertID(); + $approveLogID = $db->getInsertID('tblDocumentApproveLog', 'approveLogID'); return $approveLogID; } /* }}} */ @@ -3350,7 +3350,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (is_bool($res) && !$res) return -1; - $approveLogID = $db->getInsertID(); + $approveLogID = $db->getInsertID('tblDocumentApproveLog', 'approveLogID'); if($file) { SeedDMS_Core_File::copyFile($file, $this->_dms->contentDir . $this->_document->getDir() . 'a' . $approveLogID); } @@ -3394,7 +3394,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ if (is_bool($res) && !$res) return -1; - $approveLogID = $db->getInsertID(); + $approveLogID = $db->getInsertID('tblDocumentApproveLog', 'approveLogID'); if($file) { SeedDMS_Core_File::copyFile($file, $this->_dms->contentDir . $this->_document->getDir() . 'a' . $approveLogID); } diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index 42c992d5c..874832bdb 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -520,7 +520,7 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { $db->rollbackTransaction(); return false; } - $newFolder = $this->_dms->getFolder($db->getInsertID()); + $newFolder = $this->_dms->getFolder($db->getInsertID('tblFolders')); unset($this->_subFolders); if($attributes) { @@ -825,7 +825,7 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { return false; } - $document = $this->_dms->getDocument($db->getInsertID()); + $document = $this->_dms->getDocument($db->getInsertID('tblDocuments')); // if ($version_comment!="") $res = $document->addContent($version_comment, $owner, $tmpFile, $orgFileName, $fileType, $mimeType, $reviewers, $approvers, $reqversion, $version_attributes, $workflow); diff --git a/SeedDMS_Core/Core/inc.ClassObject.php b/SeedDMS_Core/Core/inc.ClassObject.php index e0cd1cbfb..4a9df2a30 100644 --- a/SeedDMS_Core/Core/inc.ClassObject.php +++ b/SeedDMS_Core/Core/inc.ClassObject.php @@ -223,12 +223,15 @@ class SeedDMS_Core_Object { /* {{{ */ if(!isset($this->_attributes[$attrdef->getId()])) { switch(get_class($this)) { case $this->_dms->getClassname('document'): + $tablename = 'tblDocumentAttributes'; $queryStr = "INSERT INTO `tblDocumentAttributes` (`document`, `attrdef`, `value`) VALUES (".$this->_id.", ".$attrdef->getId().", ".$db->qstr($value).")"; break; case $this->_dms->getClassname('documentcontent'): + $tablename = 'tblDocumentContentAttributes'; $queryStr = "INSERT INTO `tblDocumentContentAttributes` (`content`, `attrdef`, `value`) VALUES (".$this->_id.", ".$attrdef->getId().", ".$db->qstr($value).")"; break; case $this->_dms->getClassname('folder'): + $tablename = 'tblFolderAttributes'; $queryStr = "INSERT INTO `tblFolderAttributes` (`folder`, `attrdef`, `value`) VALUES (".$this->_id.", ".$attrdef->getId().", ".$db->qstr($value).")"; break; default: @@ -238,7 +241,7 @@ class SeedDMS_Core_Object { /* {{{ */ if (!$res) return false; - $attr = new SeedDMS_Core_Attribute($db->getInsertID(), $this, $attrdef, $value); + $attr = new SeedDMS_Core_Attribute($db->getInsertID($tablename), $this, $attrdef, $value); $attr->setDMS($this->_dms); $this->_attributes[$attrdef->getId()] = $attr; return true; diff --git a/SeedDMS_Core/Core/inc.ClassWorkflow.php b/SeedDMS_Core/Core/inc.ClassWorkflow.php index 579098427..474ae3c3c 100644 --- a/SeedDMS_Core/Core/inc.ClassWorkflow.php +++ b/SeedDMS_Core/Core/inc.ClassWorkflow.php @@ -264,7 +264,7 @@ class SeedDMS_Core_Workflow { /* {{{ */ * transitions are added in a row, without reloading the workflow */ $this->_transitions = array(); - $transition = $this->getTransition($db->getInsertID()); + $transition = $this->getTransition($db->getInsertID('tblWorkflowTransitions')); foreach($users as $user) { $queryStr = "INSERT INTO `tblWorkflowTransitionUsers` (`transition`, `userid`) VALUES (".$transition->getID().", ".$user->getID().")"; diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index f59355cd3..d17ab7ccc 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -164,6 +164,7 @@ class SeedDMS_Core_DatabaseAccess { case 'mysql': case 'mysqli': case 'mysqlnd': + case 'pgsql': $dsn = $this->_driver.":dbname=".$this->_database.";host=".$this->_hostname; if($this->_port) $dsn .= ";port=".$this->_port; @@ -220,7 +221,7 @@ class SeedDMS_Core_DatabaseAccess { * @return string sanitized string */ function rbt($text) { /* {{{ */ - return str_replace('`', '"'); + return str_replace('`', '"', $text); } /* }}} */ /** @@ -231,9 +232,12 @@ class SeedDMS_Core_DatabaseAccess { * @param string $queryStr sql query * @return array/boolean data if query could be executed otherwise false */ - function getResultArray($queryStr) { /* {{{ */ + function getResultArray($queryStr, $retick=true) { /* {{{ */ $resArr = array(); + if($retick && $this->_driver == 'pgsql') { + $queryStr = $this->rbt($queryStr); + } $res = $this->_conn->query($queryStr); if ($res === false) { if($this->_debug) @@ -251,11 +255,13 @@ class SeedDMS_Core_DatabaseAccess { * Call this function only with sql query which do not return data records. * * @param string $queryStr sql query - * @param boolean $silent not used anymore. This was used when this method - * still issued an error message + * @param boolean $retick replace all '`' by '"' * @return boolean true if query could be executed otherwise false */ - function getResult($queryStr, $silent=false) { /* {{{ */ + function getResult($queryStr, $retick=true) { /* {{{ */ + if($retick && $this->_driver == 'pgsql') { + $queryStr = $this->rbt($queryStr); + } $res = $this->_conn->exec($queryStr); if($res === false) { if($this->_debug) @@ -293,8 +299,11 @@ class SeedDMS_Core_DatabaseAccess { * * @return integer id used in last autoincrement */ - function getInsertID() { /* {{{ */ - return $this->_conn->lastInsertId(); + function getInsertID($tablename='', $fieldname='id') { /* {{{ */ + if($this->_driver == 'pgsql') + return $this->_conn->lastInsertId($tablename.'_'.$fieldname.'_seq'); + else + return $this->_conn->lastInsertId(); } /* }}} */ function getErrorMsg() { /* {{{ */ From 3bfeba738f4c800783714f62a1148670b65b21aa Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 13 Feb 2017 09:23:12 +0100 Subject: [PATCH 002/194] adjust date function to postgresql --- SeedDMS_Core/Core/inc.DBAccessPDO.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index d17ab7ccc..33bfa4b89 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -469,6 +469,16 @@ class SeedDMS_Core_DatabaseAccess { case 'sqlite': return "strftime(".$this->qstr($format).", `".$fieldname."`, 'unixepoch')"; break; + case 'pgsql': + switch($format) { + case '%Y-%m': + return "to_char(to_timestamp(`".$fieldname."`), 'YYYY-MM')"; + break; + default: + return "to_char(to_timestamp(`".$fieldname."`), 'YYYY-MM-DD')"; + break; + } + break; } return ''; } /* }}} */ @@ -487,6 +497,9 @@ class SeedDMS_Core_DatabaseAccess { case 'sqlite': return "datetime('now', 'localtime')"; break; + case 'pgsql': + return "now()"; + break; } return ''; } /* }}} */ @@ -504,6 +517,9 @@ class SeedDMS_Core_DatabaseAccess { case 'sqlite': return "strftime('%s', 'now')"; break; + case 'pgsql': + return "date_part('epoch',CURRENT_TIMESTAMP)::int"; + break; } return ''; } /* }}} */ From b7c32d8295cc32e458a026add74cd99457643c5f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 13 Feb 2017 20:09:43 +0100 Subject: [PATCH 003/194] add database layout for postgres --- install/create_tables-postgres.sql | 624 +++++++++++++++++++++++++++++ 1 file changed, 624 insertions(+) create mode 100644 install/create_tables-postgres.sql diff --git a/install/create_tables-postgres.sql b/install/create_tables-postgres.sql new file mode 100644 index 000000000..467f62f8e --- /dev/null +++ b/install/create_tables-postgres.sql @@ -0,0 +1,624 @@ +-- +-- Table structure for table "tblACLs" +-- + +CREATE TABLE "tblACLs" ( + "id" SERIAL UNIQUE, + "target" INTEGER NOT NULL default '0', + "targetType" INTEGER NOT NULL default '0', + "userID" INTEGER NOT NULL default '-1', + "groupID" INTEGER NOT NULL default '-1', + "mode" INTEGER NOT NULL default '0' +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblCategory" +-- + +CREATE TABLE "tblCategory" ( + "id" SERIAL UNIQUE, + "name" text NOT NULL +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblAttributeDefinitions" +-- + +CREATE TABLE "tblAttributeDefinitions" ( + "id" SERIAL UNIQUE, + "name" varchar(100) default NULL, + "objtype" INTEGER NOT NULL default '0', + "type" INTEGER NOT NULL default '0', + "multiple" INTEGER NOT NULL default '0', + "minvalues" INTEGER NOT NULL default '0', + "maxvalues" INTEGER NOT NULL default '0', + "valueset" TEXT default NULL, + "regex" TEXT DEFAULT NULL, + UNIQUE("name") +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblUsers" +-- + +CREATE TABLE "tblUsers" ( + "id" SERIAL UNIQUE, + "login" varchar(50) default NULL, + "pwd" varchar(50) default NULL, + "fullName" varchar(100) default NULL, + "email" varchar(70) default NULL, + "language" varchar(32) NOT NULL, + "theme" varchar(32) NOT NULL, + "comment" text NOT NULL, + "role" INTEGER NOT NULL default '0', + "hidden" INTEGER NOT NULL default '0', + "pwdExpiration" TIMESTAMP default NULL, + "loginfailures" INTEGER NOT NULL default '0', + "disabled" INTEGER NOT NULL default '0', + "quota" INTEGER, + "homefolder" INTEGER default NULL, + UNIQUE ("login") +); + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblUserPasswordRequest" +-- + +CREATE TABLE "tblUserPasswordRequest" ( + "id" SERIAL UNIQUE, + "userID" INTEGER NOT NULL default '0' REFERENCES "tblUsers" (id) ON DELETE CASCADE, + "hash" varchar(50) default NULL, + "date" TIMESTAMP default NULL +); + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblUserPasswordHistory" +-- + +CREATE TABLE "tblUserPasswordHistory" ( + "id" SERIAL UNIQUE, + "userID" INTEGER NOT NULL default '0' REFERENCES "tblUsers" ("id") ON DELETE CASCADE, + "pwd" varchar(50) default NULL, + "date" TIMESTAMP default NULL +); + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblUserImages" +-- + +CREATE TABLE "tblUserImages" ( + "id" SERIAL UNIQUE, + "userID" INTEGER NOT NULL default '0' REFERENCES "tblUsers" ("id") ON DELETE CASCADE, + "image" TEXT NOT NULL, + "mimeType" varchar(10) NOT NULL default '' +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblFolders" +-- + +CREATE TABLE "tblFolders" ( + "id" SERIAL UNIQUE, + "name" varchar(70) default NULL, + "parent" INTEGER default NULL, + "folderList" text NOT NULL, + "comment" text, + "date" INTEGER default NULL, + "owner" INTEGER default NULL REFERENCES "tblUsers" ("id"), + "inheritAccess" INTEGER NOT NULL default '1', + "defaultAccess" INTEGER NOT NULL default '0', + "sequence" REAL NOT NULL default '0' +) ; + +ALTER TABLE "tblUsers" ADD FOREIGN KEY("homefolder") REFERENCES "tblFolders"("id"); + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblFolderAttributes" +-- + +CREATE TABLE "tblFolderAttributes" ( + "id" SERIAL UNIQUE, + "folder" INTEGER default NULL REFERENCES "tblFolders" ("id") ON DELETE CASCADE, + "attrdef" INTEGER default NULL REFERENCES "tblAttributeDefinitions" ("id"), + "value" text default NULL, + UNIQUE (folder, attrdef) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblDocuments" +-- + +CREATE TABLE "tblDocuments" ( + "id" SERIAL UNIQUE, + "name" varchar(150) default NULL, + "comment" text, + "date" INTEGER default NULL, + "expires" INTEGER default NULL, + "owner" INTEGER default NULL REFERENCES "tblUsers" ("id"), + "folder" INTEGER default NULL REFERENCES "tblFolders" ("id"), + "folderList" text NOT NULL, + "inheritAccess" INTEGER NOT NULL default '1', + "defaultAccess" INTEGER NOT NULL default '0', + "locked" INTEGER NOT NULL default '-1', + "keywords" text NOT NULL, + "sequence" REAL NOT NULL default '0' +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblDocumentAttributes" +-- + +CREATE TABLE "tblDocumentAttributes" ( + "id" SERIAL UNIQUE, + "document" INTEGER default NULL REFERENCES "tblDocuments" ("id") ON DELETE CASCADE, + "attrdef" INTEGER default NULL REFERENCES "tblAttributeDefinitions" ("id"), + "value" text default NULL, + UNIQUE (document, attrdef) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblDocumentApprovers" +-- + +CREATE TABLE "tblDocumentApprovers" ( + "approveID" SERIAL UNIQUE, + "documentID" INTEGER NOT NULL default '0' REFERENCES "tblDocuments" ("id") ON DELETE CASCADE, + "version" INTEGER 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 "tblDocumentApproveLog" +-- + +CREATE TABLE "tblDocumentApproveLog" ( + "approveLogID" SERIAL UNIQUE, + "approveID" INTEGER NOT NULL default '0' REFERENCES "tblDocumentApprovers" ("approveID") ON DELETE CASCADE, + "status" INTEGER NOT NULL default '0', + "comment" TEXT NOT NULL, + "date" TIMESTAMP default NULL, + "userID" INTEGER NOT NULL default '0' REFERENCES "tblUsers" ("id") ON DELETE CASCADE +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblDocumentContent" +-- + +CREATE TABLE "tblDocumentContent" ( + "id" SERIAL UNIQUE, + "document" INTEGER NOT NULL default '0' REFERENCES "tblDocuments" ("id"), + "version" INTEGER NOT NULL, + "comment" text, + "date" INTEGER default NULL, + "createdBy" INTEGER default NULL, + "dir" varchar(255) NOT NULL default '', + "orgFileName" varchar(150) NOT NULL default '', + "fileType" varchar(10) NOT NULL default '', + "mimeType" varchar(70) NOT NULL default '', + "fileSize" INTEGER, + "checksum" char(32), + UNIQUE ("document","version") +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblDocumentContentAttributes" +-- + +CREATE TABLE "tblDocumentContentAttributes" ( + "id" SERIAL UNIQUE, + "content" INTEGER default NULL REFERENCES "tblDocumentContent" ("id") ON DELETE CASCADE, + "attrdef" INTEGER default NULL REFERENCES "tblAttributeDefinitions" ("id"), + "value" text default NULL, + UNIQUE (content, attrdef) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblDocumentLinks" +-- + +CREATE TABLE "tblDocumentLinks" ( + "id" SERIAL UNIQUE, + "document" INTEGER NOT NULL default 0 REFERENCES "tblDocuments" ("id") ON DELETE CASCADE, + "target" INTEGER NOT NULL default 0 REFERENCES "tblDocuments" ("id") ON DELETE CASCADE, + "userID" INTEGER NOT NULL default 0 REFERENCES "tblUsers" ("id"), + "public" INTEGER NOT NULL default 0 +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblDocumentFiles" +-- + +CREATE TABLE "tblDocumentFiles" ( + "id" SERIAL UNIQUE, + "document" INTEGER NOT NULL default 0 REFERENCES "tblDocuments" ("id"), + "userID" INTEGER NOT NULL default 0 REFERENCES "tblUsers" ("id"), + "comment" text, + "name" varchar(150) default NULL, + "date" INTEGER default NULL, + "dir" varchar(255) NOT NULL default '', + "orgFileName" varchar(150) NOT NULL default '', + "fileType" varchar(10) NOT NULL default '', + "mimeType" varchar(70) NOT NULL default '' +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblDocumentLocks" +-- + +CREATE TABLE "tblDocumentLocks" ( + "document" INTEGER REFERENCES "tblDocuments" ("id") ON DELETE CASCADE, + "userID" INTEGER NOT NULL default '0' REFERENCES "tblUsers" ("id") +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblDocumentReviewers" +-- + +CREATE TABLE "tblDocumentReviewers" ( + "reviewID" SERIAL UNIQUE, + "documentID" INTEGER NOT NULL default '0' REFERENCES "tblDocuments" ("id") ON DELETE CASCADE, + "version" INTEGER 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 "tblDocumentReviewLog" +-- + +CREATE TABLE "tblDocumentReviewLog" ( + "reviewLogID" SERIAL UNIQUE, + "reviewID" INTEGER NOT NULL default 0 REFERENCES "tblDocumentReviewers" ("reviewID") ON DELETE CASCADE, + "status" INTEGER NOT NULL default 0, + "comment" TEXT NOT NULL, + "date" TIMESTAMP NOT NULL, + "userID" INTEGER NOT NULL default 0 REFERENCES "tblUsers" ("id") ON DELETE CASCADE +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblDocumentStatus" +-- + +CREATE TABLE "tblDocumentStatus" ( + "statusID" SERIAL UNIQUE, + "documentID" INTEGER NOT NULL default '0' REFERENCES "tblDocuments" ("id") ON DELETE CASCADE, + "version" INTEGER NOT NULL default '0', + UNIQUE ("documentID","version") +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblDocumentStatusLog" +-- + +CREATE TABLE "tblDocumentStatusLog" ( + "statusLogID" SERIAL UNIQUE, + "statusID" INTEGER NOT NULL default '0' REFERENCES "tblDocumentStatus" ("statusID") ON DELETE CASCADE, + "status" INTEGER NOT NULL default '0', + "comment" text NOT NULL, + "date" TIMESTAMP default NULL, + "userID" INTEGER NOT NULL default '0' REFERENCES "tblUsers" ("id") ON DELETE CASCADE +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblGroups" +-- + +CREATE TABLE "tblGroups" ( + "id" SERIAL UNIQUE, + "name" varchar(50) default NULL, + "comment" text NOT NULL +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblGroupMembers" +-- + +CREATE TABLE "tblGroupMembers" ( + "groupID" INTEGER NOT NULL default '0' REFERENCES "tblGroups" ("id") ON DELETE CASCADE, + "userID" INTEGER NOT NULL default '0' REFERENCES "tblUsers" ("id") ON DELETE CASCADE, + "manager" INTEGER NOT NULL default '0', + UNIQUE ("groupID","userID") +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblKeywordCategories" +-- + +CREATE TABLE "tblKeywordCategories" ( + "id" SERIAL UNIQUE, + "name" varchar(255) NOT NULL default '', + "owner" INTEGER NOT NULL default '0' +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblKeywords" +-- + +CREATE TABLE "tblKeywords" ( + "id" SERIAL UNIQUE, + "category" INTEGER NOT NULL default '0' REFERENCES "tblKeywordCategories" ("id") ON DELETE CASCADE, + "keywords" text NOT NULL +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblDocumentCategory" +-- + +CREATE TABLE "tblDocumentCategory" ( + "categoryID" INTEGER NOT NULL default '0' REFERENCES "tblCategory" ("id") ON DELETE CASCADE, + "documentID" INTEGER NOT NULL default '0' REFERENCES "tblDocuments" ("id") ON DELETE CASCADE +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblNotify" +-- + +CREATE TABLE "tblNotify" ( + "target" INTEGER NOT NULL default '0', + "targetType" INTEGER NOT NULL default '0', + "userID" INTEGER NOT NULL default '-1', + "groupID" INTEGER NOT NULL default '-1', + UNIQUE ("target","targetType","userID","groupID") +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for table "tblSessions" +-- + +CREATE TABLE "tblSessions" ( + "id" varchar(50) PRIMARY KEY, + "userID" INTEGER NOT NULL default '0' REFERENCES "tblUsers" ("id") ON DELETE CASCADE, + "lastAccess" INTEGER NOT NULL default '0', + "theme" varchar(30) NOT NULL default '', + "language" varchar(30) NOT NULL default '', + "clipboard" text default NULL, + "su" INTEGER DEFAULT NULL, + "splashmsg" text default NULL +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for mandatory reviewers +-- + +CREATE TABLE "tblMandatoryReviewers" ( + "userID" INTEGER NOT NULL default '0' REFERENCES "tblUsers" ("id") ON DELETE CASCADE, + "reviewerUserID" INTEGER NOT NULL default '0', + "reviewerGroupID" INTEGER NOT NULL default '0', + UNIQUE ("userID","reviewerUserID","reviewerGroupID") +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for mandatory approvers +-- + +CREATE TABLE "tblMandatoryApprovers" ( + "userID" INTEGER NOT NULL default '0' REFERENCES "tblUsers" ("id") ON DELETE CASCADE, + "approverUserID" INTEGER NOT NULL default '0', + "approverGroupID" INTEGER NOT NULL default '0', + UNIQUE ("userID","approverUserID","approverGroupID") +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for events (calendar) +-- + +CREATE TABLE "tblEvents" ( + "id" SERIAL UNIQUE, + "name" varchar(150) default NULL, + "comment" text, + "start" INTEGER default NULL, + "stop" INTEGER default NULL, + "date" INTEGER default NULL, + "userID" INTEGER NOT NULL default '0' +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for workflow states +-- + +CREATE TABLE "tblWorkflowStates" ( + "id" SERIAL UNIQUE, + "name" text NOT NULL, + "visibility" INTEGER DEFAULT 0, + "maxtime" INTEGER DEFAULT 0, + "precondfunc" text DEFAULT NULL, + "documentstatus" INTEGER DEFAULT NULL +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for workflow actions +-- + +CREATE TABLE "tblWorkflowActions" ( + "id" SERIAL UNIQUE, + "name" text NOT NULL +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for workflows +-- + +CREATE TABLE "tblWorkflows" ( + "id" SERIAL UNIQUE, + "name" text NOT NULL, + "initstate" INTEGER NOT NULL REFERENCES "tblWorkflowStates" ("id") ON DELETE CASCADE +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for workflow transitions +-- + +CREATE TABLE "tblWorkflowTransitions" ( + "id" SERIAL UNIQUE, + "workflow" INTEGER default NULL REFERENCES "tblWorkflows" ("id") ON DELETE CASCADE, + "state" INTEGER default NULL REFERENCES "tblWorkflowStates" ("id") ON DELETE CASCADE, + "action" INTEGER default NULL REFERENCES "tblWorkflowActions" ("id") ON DELETE CASCADE, + "nextstate" INTEGER default NULL REFERENCES "tblWorkflowStates" ("id") ON DELETE CASCADE, + "maxtime" INTEGER DEFAULT 0 +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for workflow transition users +-- + +CREATE TABLE "tblWorkflowTransitionUsers" ( + "id" SERIAL UNIQUE, + "transition" INTEGER default NULL REFERENCES "tblWorkflowTransitions" ("id") ON DELETE CASCADE, + "userid" INTEGER default NULL REFERENCES "tblUsers" ("id") ON DELETE CASCADE +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for workflow transition groups +-- + +CREATE TABLE "tblWorkflowTransitionGroups" ( + "id" SERIAL UNIQUE, + "transition" INTEGER default NULL REFERENCES "tblWorkflowTransitions" ("id") ON DELETE CASCADE, + "groupid" INTEGER default NULL REFERENCES "tblGroups" ("id") ON DELETE CASCADE, + "minusers" INTEGER default NULL +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for workflow log +-- + +CREATE TABLE "tblWorkflowLog" ( + "id" SERIAL UNIQUE, + "document" INTEGER default NULL REFERENCES "tblDocuments" ("id") ON DELETE CASCADE, + "version" INTEGER default NULL, + "workflow" INTEGER default NULL REFERENCES "tblWorkflows" ("id") ON DELETE CASCADE, + "userid" INTEGER default NULL REFERENCES "tblUsers" ("id") ON DELETE CASCADE, + "transition" INTEGER default NULL REFERENCES "tblWorkflowTransitions" ("id") ON DELETE CASCADE, + "date" TIMESTAMP default NULL, + "comment" text +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for workflow document relation +-- + +CREATE TABLE "tblWorkflowDocumentContent" ( + "parentworkflow" INTEGER DEFAULT 0, + "workflow" INTEGER DEFAULT NULL REFERENCES "tblWorkflows" ("id") ON DELETE CASCADE, + "document" INTEGER DEFAULT NULL REFERENCES "tblDocuments" ("id") ON DELETE CASCADE, + "version" INTEGER DEFAULT NULL, + "state" INTEGER DEFAULT NULL REFERENCES "tblWorkflowStates" ("id") ON DELETE CASCADE, + "date" TIMESTAMP default NULL +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for mandatory workflows +-- + +CREATE TABLE "tblWorkflowMandatoryWorkflow" ( + "userid" INTEGER default NULL REFERENCES "tblUsers" ("id") ON DELETE CASCADE, + "workflow" INTEGER default NULL REFERENCES "tblWorkflows" ("id") ON DELETE CASCADE, + UNIQUE(userid, workflow) +) ; + +-- -------------------------------------------------------- + +-- +-- Table structure for version +-- + +CREATE TABLE "tblVersion" ( + "date" TIMESTAMP default NULL, + "major" INTEGER, + "minor" INTEGER, + "subminor" INTEGER +) ; + +-- -------------------------------------------------------- + +-- +-- Initial content for database +-- + +INSERT INTO "tblUsers" VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'Administrator', 'address@server.com', '', '', '', 1, 0, NULL, 0, 0, 0, NULL); +INSERT INTO "tblUsers" VALUES (2, 'guest', NULL, 'Guest User', NULL, '', '', '', 2, 0, NULL, 0, 0, 0, NULL); +INSERT INTO "tblFolders" VALUES (1, 'DMS', 0, '', 'DMS root', extract(epoch from now()), 1, 0, 2, 0); +INSERT INTO "tblVersion" VALUES (CURRENT_TIMESTAMP, 5, 0, 0); From 7ebd92d53a262f669fc079b937312f222c3e35a2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 13 Feb 2017 20:11:44 +0100 Subject: [PATCH 004/194] add '"' arount sequence in getInsertID() --- 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 33bfa4b89..d49927cdb 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -301,7 +301,7 @@ class SeedDMS_Core_DatabaseAccess { */ function getInsertID($tablename='', $fieldname='id') { /* {{{ */ if($this->_driver == 'pgsql') - return $this->_conn->lastInsertId($tablename.'_'.$fieldname.'_seq'); + return $this->_conn->lastInsertId('"'.$tablename.'_'.$fieldname.'_seq"'); else return $this->_conn->lastInsertId(); } /* }}} */ From 20491cd8e33a454ea7fc8941dd2f120b1a585a9e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Feb 2017 07:12:34 +0100 Subject: [PATCH 005/194] add creation of temp table ttcontentid --- SeedDMS_Core/Core/inc.DBAccessPDO.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index d49927cdb..04849da14 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -428,6 +428,14 @@ class SeedDMS_Core_DatabaseAccess { "GROUP BY `tblDocumentContent`.`document` ". "ORDER BY `tblDocumentContent`.`document`"; break; + case 'pgsql': + $queryStr = "CREATE TEMPORARY TABLE `ttcontentid` (`document` INTEGER, `maxVersion` INTEGER, PRIMARY KEY (`document`)); ". + "INSERT INTO `ttcontentid` SELECT `tblDocumentContent`.`document` AS `document`, ". + "MAX(`tblDocumentContent`.`version`) AS `maxVersion` ". + "FROM `tblDocumentContent` ". + "GROUP BY `tblDocumentContent`.`document` ". + "ORDER BY `tblDocumentContent`.`document`"; + break; default: $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttcontentid` (PRIMARY KEY (`document`), INDEX (`maxVersion`)) ". "SELECT `tblDocumentContent`.`document`, ". From e020ebaf393a515412b81c62b02068f4b864dff5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Feb 2017 08:18:06 +0100 Subject: [PATCH 006/194] add create of temp table ttstatid --- SeedDMS_Core/Core/inc.DBAccessPDO.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index 04849da14..77344e26d 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -395,6 +395,14 @@ class SeedDMS_Core_DatabaseAccess { "GROUP BY `tblDocumentStatusLog`.`statusID` ". "ORDER BY `maxLogID`"; break; + case 'pgsql': + $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttstatid` (`statusID` INTEGER, `maxLogID` INTEGER, PRIMARY KEY (`statusID`));". + "INSERT INTO `ttstatid` SELECT `tblDocumentStatusLog`.`statusID`, ". + "MAX(`tblDocumentStatusLog`.`statusLogID`) AS `maxLogID` ". + "FROM `tblDocumentStatusLog` ". + "GROUP BY `tblDocumentStatusLog`.`statusID` ". + "ORDER BY `maxLogID`"; + break; default: $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttstatid` (PRIMARY KEY (`statusID`), INDEX (`maxLogID`)) ". "SELECT `tblDocumentStatusLog`.`statusID`, ". @@ -429,7 +437,7 @@ class SeedDMS_Core_DatabaseAccess { "ORDER BY `tblDocumentContent`.`document`"; break; case 'pgsql': - $queryStr = "CREATE TEMPORARY TABLE `ttcontentid` (`document` INTEGER, `maxVersion` INTEGER, PRIMARY KEY (`document`)); ". + $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttcontentid` (`document` INTEGER, `maxVersion` INTEGER, PRIMARY KEY (`document`)); ". "INSERT INTO `ttcontentid` SELECT `tblDocumentContent`.`document` AS `document`, ". "MAX(`tblDocumentContent`.`version`) AS `maxVersion` ". "FROM `tblDocumentContent` ". From 3da6d66ee142bc4e4aaf34021b4306ac5877c186 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Feb 2017 08:56:40 +0100 Subject: [PATCH 007/194] add method castToText() it takes a fieldname and returns it with a cast to 'text' --- SeedDMS_Core/Core/inc.DBAccessPDO.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index 77344e26d..4da84168d 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -539,6 +539,20 @@ class SeedDMS_Core_DatabaseAccess { } return ''; } /* }}} */ + + /** + * Return sql statement for returning the current timestamp + * + * @return string sql code + */ + function castToText($field) { /* {{{ */ + switch($this->_driver) { + case 'pgsql': + return $field."::TEXT"; + break; + } + return $field; + } /* }}} */ } ?> From 00532138561b061c8ee778c7935ff2e847e43e17 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Feb 2017 08:57:32 +0100 Subject: [PATCH 008/194] pass $dms to getSearchFields() and cast id to text --- SeedDMS_Core/Core/inc.ClassDMS.php | 4 ++-- SeedDMS_Core/Core/inc.ClassDocument.php | 6 ++++-- SeedDMS_Core/Core/inc.ClassFolder.php | 6 ++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 7afdcb2d4..182fdbf5f 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -699,7 +699,7 @@ class SeedDMS_Core_DMS { $searchKey = ""; $classname = $this->classnames['folder']; - $searchFields = $classname::getSearchFields($searchin); + $searchFields = $classname::getSearchFields($this, $searchin); if (count($searchFields)>0) { foreach ($tkeys as $key) { @@ -840,7 +840,7 @@ class SeedDMS_Core_DMS { $searchKey = ""; $classname = $this->classnames['document']; - $searchFields = $classname::getSearchFields($searchin); + $searchFields = $classname::getSearchFields($this, $searchin); if (count($searchFields)>0) { foreach ($tkeys as $key) { diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 6611a7ba3..6176a0304 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -175,7 +175,9 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ * 4=attributes) * @return array list of database fields */ - public static function getSearchFields($searchin) { /* {{{ */ + public static function getSearchFields($dms, $searchin) { /* {{{ */ + $db = $dms->getDB(); + $searchFields = array(); if (in_array(1, $searchin)) { $searchFields[] = "`tblDocuments`.`keywords`"; @@ -192,7 +194,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $searchFields[] = "`tblDocumentContentAttributes`.`value`"; } if (in_array(5, $searchin)) { - $searchFields[] = "`tblDocuments`.`id`"; + $searchFields[] = $db->castToText("`tblDocuments`.`id`"); } return $searchFields; diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index 874832bdb..f92bb8ff2 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -95,7 +95,9 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { * 4=attributes) * @return array list of database fields */ - public static function getSearchFields($searchin) { /* {{{ */ + public static function getSearchFields($dms, $searchin) { /* {{{ */ + $db = $dms->getDB(); + $searchFields = array(); if (in_array(2, $searchin)) { $searchFields[] = "`tblFolders`.`name`"; @@ -107,7 +109,7 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { $searchFields[] = "`tblFolderAttributes`.`value`"; } if (in_array(5, $searchin)) { - $searchFields[] = "`tblFolders`.`id`"; + $searchFields[] = $db->castToText("`tblFolders`.`id`"); } return $searchFields; } /* }}} */ From 0cf35641d1d1177b8e3ceda21efcf0d5f3f263d7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Feb 2017 10:38:52 +0100 Subject: [PATCH 009/194] add sql for creating temp tables ttreviewid and ttapproveid --- SeedDMS_Core/Core/inc.DBAccessPDO.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index 4da84168d..0f6b32907 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -329,6 +329,14 @@ class SeedDMS_Core_DatabaseAccess { "GROUP BY `tblDocumentReviewLog`.`reviewID` ". "ORDER BY `maxLogID`"; break; + case 'pgsql': + $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttreviewid` (`reviewID` INTEGER, `maxLogID` INTEGER, PRIMARY INDEX (`reviewID`));". + "INSERT INTO `ttreviewid` SELECT `tblDocumentReviewLog`.`reviewID`, ". + "MAX(`tblDocumentReviewLog`.`reviewLogID`) AS `maxLogID` ". + "FROM `tblDocumentReviewLog` ". + "GROUP BY `tblDocumentReviewLog`.`reviewID` ". + "ORDER BY `maxLogID`"; + break; default: $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttreviewid` (PRIMARY KEY (`reviewID`), INDEX (`maxLogID`)) ". "SELECT `tblDocumentReviewLog`.`reviewID`, ". @@ -362,6 +370,14 @@ class SeedDMS_Core_DatabaseAccess { "GROUP BY `tblDocumentApproveLog`.`approveID` ". "ORDER BY `maxLogID`"; break; + case 'pgsql': + $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttapproveid` (`approveID` INTEGER, `maxLogID` INTEGER, PRIMARY KEY (`approveID`));". + "INSERT INTO `ttapproveid` SELECT `tblDocumentApproveLog`.`approveID`, ". + "MAX(`tblDocumentApproveLog`.`approveLogID`) AS `maxLogID` ". + "FROM `tblDocumentApproveLog` ". + "GROUP BY `tblDocumentApproveLog`.`approveID` ". + "ORDER BY `maxLogID`"; + break; default: $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttapproveid` (PRIMARY KEY (`approveID`), INDEX (`maxLogID`)) ". "SELECT `tblDocumentApproveLog`.`approveID`, ". From 90cca10460b2de2c62494b6804150c03e8a815aa Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Feb 2017 11:31:49 +0100 Subject: [PATCH 010/194] set pwdExpiration to NULL instead of '0000-00-00 ...' --- SeedDMS_Core/Core/inc.ClassUser.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassUser.php b/SeedDMS_Core/Core/inc.ClassUser.php index 87e951d82..6fce7d18f 100644 --- a/SeedDMS_Core/Core/inc.ClassUser.php +++ b/SeedDMS_Core/Core/inc.ClassUser.php @@ -268,11 +268,13 @@ class SeedDMS_Core_User { /* {{{ */ function setPwdExpiration($newPwdExpiration) { /* {{{ */ $db = $this->_dms->getDB(); - if(trim($newPwdExpiration) == '' || trim($newPwdExpiration) == 'never') - $newPwdExpiration = '0000-00-00 00:00:00'; - elseif(trim($newPwdExpiration) == 'now') - $newPwdExpiration = date('Y-m-d H:i:s'); - $queryStr = "UPDATE `tblUsers` SET `pwdExpiration` =".$db->qstr($newPwdExpiration)." WHERE `id` = " . $this->_id; + if(trim($newPwdExpiration) == '' || trim($newPwdExpiration) == 'never') { + $queryStr = "UPDATE `tblUsers` SET `pwdExpiration` = NULL WHERE `id` = " . $this->_id; + } else { + if(trim($newPwdExpiration) == 'now') + $newPwdExpiration = date('Y-m-d H:i:s'); + $queryStr = "UPDATE `tblUsers` SET `pwdExpiration` =".$db->qstr($newPwdExpiration)." WHERE `id` = " . $this->_id; + } $res = $db->getResult($queryStr); if (!$res) return false; From 7c84cc1b52ab1cfc0957136bc702a1d9e0473486 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Feb 2017 11:37:41 +0100 Subject: [PATCH 011/194] set pwdexpiration to null if no date is set --- SeedDMS_Core/Core/inc.ClassDMS.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 182fdbf5f..33ab9d61b 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -1280,10 +1280,10 @@ class SeedDMS_Core_DMS { if($role == '') $role = '0'; if(trim($pwdexpiration) == '' || trim($pwdexpiration) == 'never') - $pwdexpiration = '0000-00-00 00:00:00'; + $pwdexpiration = null; elseif(trim($pwdexpiration) == 'now') $pwdexpiration = date('Y-m-d H:i:s'); - $queryStr = "INSERT INTO `tblUsers` (`login`, `pwd`, `fullName`, `email`, `language`, `theme`, `comment`, `role`, `hidden`, `disabled`, `pwdExpiration`, `quota`, `homefolder`) VALUES (".$db->qstr($login).", ".$db->qstr($pwd).", ".$db->qstr($fullName).", ".$db->qstr($email).", '".$language."', '".$theme."', ".$db->qstr($comment).", '".intval($role)."', '".intval($isHidden)."', '".intval($isDisabled)."', ".$db->qstr($pwdexpiration).", '".intval($quota)."', ".($homefolder ? intval($homefolder) : "NULL").")"; + $queryStr = "INSERT INTO `tblUsers` (`login`, `pwd`, `fullName`, `email`, `language`, `theme`, `comment`, `role`, `hidden`, `disabled`, `pwdExpiration`, `quota`, `homefolder`) VALUES (".$db->qstr($login).", ".$db->qstr($pwd).", ".$db->qstr($fullName).", ".$db->qstr($email).", '".$language."', '".$theme."', ".$db->qstr($comment).", '".intval($role)."', '".intval($isHidden)."', '".intval($isDisabled)."', ".($pwdexpiration === null ? 'NULL' : $db->qstr($pwdexpiration)).", '".intval($quota)."', ".($homefolder ? intval($homefolder) : "NULL").")"; $res = $this->db->getResult($queryStr); if (!$res) return false; From ff486fdcd98c454dae293eedf1d510357ca4571c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Feb 2017 14:55:13 +0100 Subject: [PATCH 012/194] fix sql error --- 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 0f6b32907..89b64fdec 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -330,7 +330,7 @@ class SeedDMS_Core_DatabaseAccess { "ORDER BY `maxLogID`"; break; case 'pgsql': - $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttreviewid` (`reviewID` INTEGER, `maxLogID` INTEGER, PRIMARY INDEX (`reviewID`));". + $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttreviewid` (`reviewID` INTEGER, `maxLogID` INTEGER, PRIMARY KEY (`reviewID`));". "INSERT INTO `ttreviewid` SELECT `tblDocumentReviewLog`.`reviewID`, ". "MAX(`tblDocumentReviewLog`.`reviewLogID`) AS `maxLogID` ". "FROM `tblDocumentReviewLog` ". From e320d4a37646b879cc5d0126cac2f4c2e731d857 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Feb 2017 17:27:38 +0100 Subject: [PATCH 013/194] add sql statement for pgsql in TableList() --- SeedDMS_Core/Core/inc.DBAccessPDO.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index 89b64fdec..19fe6208d 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -107,6 +107,9 @@ class SeedDMS_Core_DatabaseAccess { case 'sqlite': $sql = "select tbl_name as name from sqlite_master where type='table'"; break; + case 'pgsql': + $sql = "select tablename as name from pg_catalog.pg_tables where schemaname='public'"; + break; default: return false; } From 96967aee5bd4482859f4970a74222827ec09c988 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 15 Feb 2017 08:26:12 +0100 Subject: [PATCH 014/194] increment sequences after inserting initial records --- install/create_tables-postgres.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/create_tables-postgres.sql b/install/create_tables-postgres.sql index 467f62f8e..cf6f93613 100644 --- a/install/create_tables-postgres.sql +++ b/install/create_tables-postgres.sql @@ -619,6 +619,9 @@ CREATE TABLE "tblVersion" ( -- INSERT INTO "tblUsers" VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'Administrator', 'address@server.com', '', '', '', 1, 0, NULL, 0, 0, 0, NULL); +SELECT nextval('"tblUsers_id_seq"'); INSERT INTO "tblUsers" VALUES (2, 'guest', NULL, 'Guest User', NULL, '', '', '', 2, 0, NULL, 0, 0, 0, NULL); +SELECT nextval('"tblUsers_id_seq"'); INSERT INTO "tblFolders" VALUES (1, 'DMS', 0, '', 'DMS root', extract(epoch from now()), 1, 0, 2, 0); +SELECT nextval('"tblFolders_id_seq"'); INSERT INTO "tblVersion" VALUES (CURRENT_TIMESTAMP, 5, 0, 0); From 053da3bdaa66dd30a29007f51696f032546d801d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 16 Feb 2017 15:24:49 +0100 Subject: [PATCH 015/194] make fields for mimetypes longer --- install/create_tables-postgres.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/create_tables-postgres.sql b/install/create_tables-postgres.sql index cf6f93613..37baec511 100644 --- a/install/create_tables-postgres.sql +++ b/install/create_tables-postgres.sql @@ -222,7 +222,7 @@ CREATE TABLE "tblDocumentContent" ( "dir" varchar(255) NOT NULL default '', "orgFileName" varchar(150) NOT NULL default '', "fileType" varchar(10) NOT NULL default '', - "mimeType" varchar(70) NOT NULL default '', + "mimeType" varchar(100) NOT NULL default '', "fileSize" INTEGER, "checksum" char(32), UNIQUE ("document","version") @@ -272,7 +272,7 @@ CREATE TABLE "tblDocumentFiles" ( "dir" varchar(255) NOT NULL default '', "orgFileName" varchar(150) NOT NULL default '', "fileType" varchar(10) NOT NULL default '', - "mimeType" varchar(70) NOT NULL default '' + "mimeType" varchar(100) NOT NULL default '' ) ; -- -------------------------------------------------------- From ded86e7c0e5404d01cb97b8b68f457b793609ccc Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 16 Feb 2017 15:41:04 +0100 Subject: [PATCH 016/194] turn off debugging --- utils/xmlimport.php | 1 - 1 file changed, 1 deletion(-) diff --git a/utils/xmlimport.php b/utils/xmlimport.php index 1a3553e55..6262b590b 100644 --- a/utils/xmlimport.php +++ b/utils/xmlimport.php @@ -1681,7 +1681,6 @@ require_once("SeedDMS/Core.php"); $db = new SeedDMS_Core_DatabaseAccess($settings->_dbDriver, $settings->_dbHostname, $settings->_dbUser, $settings->_dbPass, $settings->_dbDatabase); $db->connect() or die ("Could not connect to db-server \"" . $settings->_dbHostname . "\""); -$db->_debug = 1; $dms = new SeedDMS_Core_DMS($db, $settings->_contentDir.$settings->_contentOffsetDir); if(!$settings->_doNotCheckDBVersion && !$dms->checkVersion()) { From a5e984587d4e0730c5a14aa8a4deabe803ab0ae0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 18 Feb 2017 07:37:45 +0100 Subject: [PATCH 017/194] add getDriver() which returns the database driver --- 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 19fe6208d..26d157f39 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -157,6 +157,15 @@ class SeedDMS_Core_DatabaseAccess { $this->_debug = false; } /* }}} */ + /** + * Return driver + * + * @return string name of driver as set in constructor + */ + public function getDriver() { /* {{{ */ + return $this->_driver; + } /* }}} */ + /** * Connect to database * From 5921b1e731f107e2197e15813c826ccf1eafa956 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 18 Feb 2017 07:38:26 +0100 Subject: [PATCH 018/194] set default value for pwdExpiration when unsetting it --- SeedDMS_Core/Core/inc.ClassDMS.php | 14 +++++++++----- SeedDMS_Core/Core/inc.ClassUser.php | 5 ++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 33ab9d61b..bb1b94f90 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -1279,11 +1279,15 @@ class SeedDMS_Core_DMS { } if($role == '') $role = '0'; - if(trim($pwdexpiration) == '' || trim($pwdexpiration) == 'never') - $pwdexpiration = null; - elseif(trim($pwdexpiration) == 'now') - $pwdexpiration = date('Y-m-d H:i:s'); - $queryStr = "INSERT INTO `tblUsers` (`login`, `pwd`, `fullName`, `email`, `language`, `theme`, `comment`, `role`, `hidden`, `disabled`, `pwdExpiration`, `quota`, `homefolder`) VALUES (".$db->qstr($login).", ".$db->qstr($pwd).", ".$db->qstr($fullName).", ".$db->qstr($email).", '".$language."', '".$theme."', ".$db->qstr($comment).", '".intval($role)."', '".intval($isHidden)."', '".intval($isDisabled)."', ".($pwdexpiration === null ? 'NULL' : $db->qstr($pwdexpiration)).", '".intval($quota)."', ".($homefolder ? intval($homefolder) : "NULL").")"; + if(trim($pwdexpiration) == '' || trim($pwdexpiration) == 'never') { + if($db->getDriver() == 'sqlite') + $pwdexpiration = $db->qstr('0000-00-00 00:00:00'); + else + $pwdexpiration = 'DEFAULT'; + } elseif(trim($pwdexpiration) == 'now') + $pwdexpiration = $db->qstr(date('Y-m-d H:i:s')); + $queryStr = "INSERT INTO `tblUsers` (`login`, `pwd`, `fullName`, `email`, `language`, `theme`, `comment`, `role`, `hidden`, `disabled`, `pwdExpiration`, `quota`, `homefolder`) VALUES (".$db->qstr($login).", ".$db->qstr($pwd).", ".$db->qstr($fullName).", ".$db->qstr($email).", '".$language."', '".$theme."', ".$db->qstr($comment).", '".intval($role)."', '".intval($isHidden)."', '".intval($isDisabled)."', ".$pwdexpiration.", '".intval($quota)."', ".($homefolder ? intval($homefolder) : "NULL").")"; + echo $queryStr; $res = $this->db->getResult($queryStr); if (!$res) return false; diff --git a/SeedDMS_Core/Core/inc.ClassUser.php b/SeedDMS_Core/Core/inc.ClassUser.php index 6fce7d18f..be2dd2c9e 100644 --- a/SeedDMS_Core/Core/inc.ClassUser.php +++ b/SeedDMS_Core/Core/inc.ClassUser.php @@ -269,7 +269,10 @@ class SeedDMS_Core_User { /* {{{ */ $db = $this->_dms->getDB(); if(trim($newPwdExpiration) == '' || trim($newPwdExpiration) == 'never') { - $queryStr = "UPDATE `tblUsers` SET `pwdExpiration` = NULL WHERE `id` = " . $this->_id; + if($db->getDriver() == 'sqlite') + $queryStr = "UPDATE `tblUsers` SET `pwdExpiration` = '0000-00-00 00:00:00' WHERE `id` = " . $this->_id; + else + $queryStr = "UPDATE `tblUsers` SET `pwdExpiration` = DEFAULT WHERE `id` = " . $this->_id; } else { if(trim($newPwdExpiration) == 'now') $newPwdExpiration = date('Y-m-d H:i:s'); From 534e93d7d91a4eb7cd235aee596f5b4829bc73df Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 08:55:29 +0100 Subject: [PATCH 019/194] new version 5.1.0 --- Makefile | 2 +- SeedDMS_Core/Core/inc.ClassDMS.php | 2 +- SeedDMS_Core/package.xml | 24 ++++++++++++++++++++---- inc/inc.Version.php | 2 +- install/install.php | 2 +- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 39ac4c2b3..65459bda6 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION=5.0.9 +VERSION=5.1.0 SRC=CHANGELOG inc conf utils index.php languages views op out controllers doc styles TODO LICENSE webdav install restapi pdfviewer # webapp diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index bb1b94f90..b4e930749 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -344,7 +344,7 @@ class SeedDMS_Core_DMS { $this->callbacks = array(); $this->version = '@package_version@'; if($this->version[0] == '@') - $this->version = '5.0.9'; + $this->version = '5.1.0'; } /* }}} */ /** diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 6bc09f684..e6c1d83a6 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -12,11 +12,11 @@ uwe@steinmann.cx yes - 2016-11-02 + 2017-02-20 - 5.0.9 - 5.0.9 + 5.1.0 + 5.1.0 stable @@ -24,7 +24,7 @@ GPL License -- all changes from 4.3.32 merged +- added postgres support @@ -1277,5 +1277,21 @@ SeedDMS_Core_DMS::getNotificationsByUser() are deprecated - all changes from 4.3.31 merged + + 2016-11-02 + + + 5.0.9 + 5.0.9 + + + stable + stable + + GPL License + +- all changes from 4.3.32 merged + + diff --git a/inc/inc.Version.php b/inc/inc.Version.php index 4cc8a9dd1..0cef2e0ce 100644 --- a/inc/inc.Version.php +++ b/inc/inc.Version.php @@ -20,7 +20,7 @@ class SeedDMS_Version { - public $_number = "5.0.9"; + public $_number = "5.1.0"; private $_string = "SeedDMS"; function __construct() { diff --git a/install/install.php b/install/install.php index 92139344e..f8bb1ddb5 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.9"); +define("SEEDDMS_VERSION", "5.1.0"); require_once('../inc/inc.ClassSettings.php'); From 5f9894b7b4a02a370d3bfb46994fa1d5941ba943 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 09:12:19 +0100 Subject: [PATCH 020/194] add db changes for version 5.1.0 --- install/update-5.1.0/update.sql | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 install/update-5.1.0/update.sql diff --git a/install/update-5.1.0/update.sql b/install/update-5.1.0/update.sql new file mode 100644 index 000000000..f5b2d8aee --- /dev/null +++ b/install/update-5.1.0/update.sql @@ -0,0 +1,20 @@ +START TRANSACTION; + +ALTER TABLE `tblDocumentContent` CHANGE `mimeType` `mimeType` varchar(100) NOT NULL default ''; + +ALTER TABLE `tblDocumentFiles` CHANGE `mimeType` `mimeType` varchar(100) NOT NULL default ''; + +ALTER TABLE `tblUsers` CHANGE `pwdExpiration` `pwdExpiration` datetime default NULL; + +ALTER TABLE `tblUserPasswordRequest` CHANGE `date` `date` datetime NOT NULL; + +ALTER TABLE `tblUserPasswordHistory` CHANGE `date` `date` datetime NOT NULL; + +ALTER TABLE `tblDocumentApproveLog` CHANGE `date` `date` datetime NOT NULL; + +ALTER TABLE `tblDocumentReviewLog` CHANGE `date` `date` datetime NOT NULL; + +ALTER TABLE `tblDocumentStatusLog` CHANGE `date` `date` datetime NOT NULL; + +COMMIT; + From f3aea6f842e9972b6911c094bfafabe35d36fc23 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 11:51:59 +0100 Subject: [PATCH 021/194] fix all datetime fields, enlarge mimeType fields --- install/create_tables-innodb.sql | 20 ++++++++++---------- install/create_tables-sqlite3.sql | 24 ++++++++++++------------ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/install/create_tables-innodb.sql b/install/create_tables-innodb.sql index 88ca4958a..d64213e35 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -61,7 +61,7 @@ CREATE TABLE `tblUsers` ( `comment` text NOT NULL, `role` smallint(1) NOT NULL default '0', `hidden` smallint(1) NOT NULL default '0', - `pwdExpiration` datetime NOT NULL default '0000-00-00 00:00:00', + `pwdExpiration` datetime default NULL, `loginfailures` tinyint(4) NOT NULL default '0', `disabled` smallint(1) NOT NULL default '0', `quota` bigint, @@ -80,7 +80,7 @@ CREATE TABLE `tblUserPasswordRequest` ( `id` int(11) NOT NULL auto_increment, `userID` int(11) NOT NULL default '0', `hash` varchar(50) default NULL, - `date` datetime NOT NULL default '0000-00-00 00:00:00', + `date` datetime NOT NULL, PRIMARY KEY (`id`), CONSTRAINT `tblUserPasswordRequest_user` FOREIGN KEY (`userID`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -95,7 +95,7 @@ CREATE TABLE `tblUserPasswordHistory` ( `id` int(11) NOT NULL auto_increment, `userID` int(11) NOT NULL default '0', `pwd` varchar(50) default NULL, - `date` datetime NOT NULL default '0000-00-00 00:00:00', + `date` datetime NOT NULL, PRIMARY KEY (`id`), CONSTRAINT `tblUserPasswordHistory_user` FOREIGN KEY (`userID`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -110,7 +110,7 @@ CREATE TABLE `tblUserImages` ( `id` int(11) NOT NULL auto_increment, `userID` int(11) NOT NULL default '0', `image` blob NOT NULL, - `mimeType` varchar(10) NOT NULL default '', + `mimeType` varchar(100) NOT NULL default '', PRIMARY KEY (`id`), CONSTRAINT `tblUserImages_user` FOREIGN KEY (`userID`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -226,7 +226,7 @@ CREATE TABLE `tblDocumentApproveLog` ( `approveID` 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', + `date` datetime NOT NULL, `userID` int(11) NOT NULL default '0', PRIMARY KEY (`approveLogID`), CONSTRAINT `tblDocumentApproveLog_approve` FOREIGN KEY (`approveID`) REFERENCES `tblDocumentApprovers` (`approveID`) ON DELETE CASCADE, @@ -358,7 +358,7 @@ CREATE TABLE `tblDocumentReviewLog` ( `reviewID` 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', + `date` datetime NOT NULL, `userID` int(11) NOT NULL default '0', PRIMARY KEY (`reviewLogID`), CONSTRAINT `tblDocumentReviewLog_review` FOREIGN KEY (`reviewID`) REFERENCES `tblDocumentReviewers` (`reviewID`) ON DELETE CASCADE, @@ -391,7 +391,7 @@ CREATE TABLE `tblDocumentStatusLog` ( `statusID` 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', + `date` datetime NOT NULL, `userID` int(11) NOT NULL default '0', PRIMARY KEY (`statusLogID`), KEY `statusID` (`statusID`), @@ -651,7 +651,7 @@ CREATE TABLE `tblWorkflowLog` ( `workflow` int(11) default NULL, `userid` int(11) default NULL, `transition` int(11) default NULL, - `date` datetime NOT NULL default '0000-00-00 00:00:00', + `date` datetime NOT NULL, `comment` text, PRIMARY KEY (`id`), CONSTRAINT `tblWorkflowLog_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, @@ -672,7 +672,7 @@ CREATE TABLE `tblWorkflowDocumentContent` ( `document` int(11) DEFAULT NULL, `version` smallint(5) DEFAULT NULL, `state` int(11) DEFAULT NULL, - `date` datetime NOT NULL default '0000-00-00 00:00:00', + `date` datetime NOT NULL, CONSTRAINT `tblWorkflowDocument_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, CONSTRAINT `tblWorkflowDocument_workflow` FOREIGN KEY (`workflow`) REFERENCES `tblWorkflows` (`id`) ON DELETE CASCADE, CONSTRAINT `tblWorkflowDocument_state` FOREIGN KEY (`state`) REFERENCES `tblWorkflowStates` (`id`) ON DELETE CASCADE @@ -699,7 +699,7 @@ CREATE TABLE `tblWorkflowMandatoryWorkflow` ( -- CREATE TABLE `tblVersion` ( - `date` datetime, + `date` datetime NOT NULL, `major` smallint, `minor` smallint, `subminor` smallint diff --git a/install/create_tables-sqlite3.sql b/install/create_tables-sqlite3.sql index 64b517fd1..ba8117803 100644 --- a/install/create_tables-sqlite3.sql +++ b/install/create_tables-sqlite3.sql @@ -58,7 +58,7 @@ CREATE TABLE `tblUsers` ( `comment` text NOT NULL, `role` INTEGER NOT NULL default '0', `hidden` INTEGER NOT NULL default '0', - `pwdExpiration` TEXT NOT NULL default '0000-00-00 00:00:00', + `pwdExpiration` TEXT default NULL, `loginfailures` INTEGER NOT NULL default '0', `disabled` INTEGER NOT NULL default '0', `quota` INTEGER, @@ -76,7 +76,7 @@ CREATE TABLE `tblUserPasswordRequest` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, `hash` varchar(50) default NULL, - `date` TEXT NOT NULL default '0000-00-00 00:00:00' + `date` TEXT NOT NULL ); -- -------------------------------------------------------- @@ -89,7 +89,7 @@ CREATE TABLE `tblUserPasswordHistory` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, `pwd` varchar(50) default NULL, - `date` TEXT NOT NULL default '0000-00-00 00:00:00' + `date` TEXT NOT NULL ); -- -------------------------------------------------------- @@ -102,7 +102,7 @@ CREATE TABLE `tblUserImages` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, `image` blob NOT NULL, - `mimeType` varchar(10) NOT NULL default '' + `mimeType` varchar(100) NOT NULL default '' ) ; -- -------------------------------------------------------- @@ -200,7 +200,7 @@ CREATE TABLE `tblDocumentApproveLog` ( `approveID` INTEGER NOT NULL default '0' REFERENCES `tblDocumentApprovers` (`approveID`) ON DELETE CASCADE, `status` INTEGER NOT NULL default '0', `comment` TEXT NOT NULL, - `date` TEXT NOT NULL default '0000-00-00 00:00:00', + `date` TEXT NOT NULL, `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE ) ; @@ -220,7 +220,7 @@ CREATE TABLE `tblDocumentContent` ( `dir` varchar(255) NOT NULL default '', `orgFileName` varchar(150) NOT NULL default '', `fileType` varchar(10) NOT NULL default '', - `mimeType` varchar(70) NOT NULL default '', + `mimeType` varchar(100) NOT NULL default '', `fileSize` INTEGER, `checksum` char(32), UNIQUE (`document`,`version`) @@ -270,7 +270,7 @@ CREATE TABLE `tblDocumentFiles` ( `dir` varchar(255) NOT NULL default '', `orgFileName` varchar(150) NOT NULL default '', `fileType` varchar(10) NOT NULL default '', - `mimeType` varchar(70) NOT NULL default '' + `mimeType` varchar(100) NOT NULL default '' ) ; -- -------------------------------------------------------- @@ -310,7 +310,7 @@ CREATE TABLE `tblDocumentReviewLog` ( `reviewID` INTEGER NOT NULL default 0 REFERENCES `tblDocumentReviewers` (`reviewID`) ON DELETE CASCADE, `status` INTEGER NOT NULL default 0, `comment` TEXT NOT NULL, - `date` TEXT NOT NULL default '0000-00-00 00:00:00', + `date` TEXT NOT NULL, `userID` INTEGER NOT NULL default 0 REFERENCES `tblUsers` (`id`) ON DELETE CASCADE ) ; @@ -338,7 +338,7 @@ CREATE TABLE `tblDocumentStatusLog` ( `statusID` INTEGER NOT NULL default '0' REFERENCES `tblDocumentStatus` (`statusID`) ON DELETE CASCADE, `status` INTEGER NOT NULL default '0', `comment` text NOT NULL, - `date` TEXT NOT NULL default '0000-00-00 00:00:00', + `date` TEXT NOT NULL, `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE ) ; @@ -566,7 +566,7 @@ CREATE TABLE `tblWorkflowLog` ( `workflow` INTEGER default NULL REFERENCES `tblWorkflows` (`id`) ON DELETE CASCADE, `userid` INTEGER default NULL REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, `transition` INTEGER default NULL REFERENCES `tblWorkflowTransitions` (`id`) ON DELETE CASCADE, - `date` datetime NOT NULL default '0000-00-00 00:00:00', + `date` datetime NOT NULL, `comment` text ) ; @@ -582,7 +582,7 @@ CREATE TABLE `tblWorkflowDocumentContent` ( `document` INTEGER DEFAULT NULL REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, `version` INTEGER DEFAULT NULL, `state` INTEGER DEFAULT NULL REFERENCES `tblWorkflowStates` (`id`) ON DELETE CASCADE, - `date` datetime NOT NULL default '0000-00-00 00:00:00' + `date` datetime NOT NULL ) ; -- -------------------------------------------------------- @@ -604,7 +604,7 @@ CREATE TABLE `tblWorkflowMandatoryWorkflow` ( -- CREATE TABLE `tblVersion` ( - `date` TEXT NOT NULL default '0000-00-00 00:00:00', + `date` TEXT NOT NULL, `major` INTEGER, `minor` INTEGER, `subminor` INTEGER From f24b627817628462c0f45d0aadff26324d9e116b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 11:55:09 +0100 Subject: [PATCH 022/194] fix more dates and mimetypes --- install/update-5.1.0/update.sql | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install/update-5.1.0/update.sql b/install/update-5.1.0/update.sql index f5b2d8aee..12336bd89 100644 --- a/install/update-5.1.0/update.sql +++ b/install/update-5.1.0/update.sql @@ -4,6 +4,8 @@ ALTER TABLE `tblDocumentContent` CHANGE `mimeType` `mimeType` varchar(100) NOT N ALTER TABLE `tblDocumentFiles` CHANGE `mimeType` `mimeType` varchar(100) NOT NULL default ''; +ALTER TABLE `tblUserImages` CHANGE `mimeType` `mimeType` varchar(100) NOT NULL default ''; + ALTER TABLE `tblUsers` CHANGE `pwdExpiration` `pwdExpiration` datetime default NULL; ALTER TABLE `tblUserPasswordRequest` CHANGE `date` `date` datetime NOT NULL; @@ -16,5 +18,11 @@ ALTER TABLE `tblDocumentReviewLog` CHANGE `date` `date` datetime NOT NULL; ALTER TABLE `tblDocumentStatusLog` CHANGE `date` `date` datetime NOT NULL; +ALTER TABLE `tblWorkflowLog` CHANGE `date` `date` datetime NOT NULL; + +ALTER TABLE `tblWorkflowDocumentContent` CHANGE `date` `date` datetime NOT NULL; + +ALTER TABLE `tblVersion` CHANGE `date` `date` datetime NOT NULL; + COMMIT; From ec94cdde554720a7346a03aff6acbf93363ace89 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 11:55:26 +0100 Subject: [PATCH 023/194] use bigint for filesize --- install/create_tables-postgres.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/create_tables-postgres.sql b/install/create_tables-postgres.sql index 37baec511..869b97ab2 100644 --- a/install/create_tables-postgres.sql +++ b/install/create_tables-postgres.sql @@ -223,7 +223,7 @@ CREATE TABLE "tblDocumentContent" ( "orgFileName" varchar(150) NOT NULL default '', "fileType" varchar(10) NOT NULL default '', "mimeType" varchar(100) NOT NULL default '', - "fileSize" INTEGER, + "fileSize" BIGINT, "checksum" char(32), UNIQUE ("document","version") ) ; From f3d00db04d0fdead4d379f90ac4f567a677bcc2a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 11:56:01 +0100 Subject: [PATCH 024/194] add update script for sqlite3 --- install/update-5.1.0/update-sqlite3.sql | 199 ++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 install/update-5.1.0/update-sqlite3.sql diff --git a/install/update-5.1.0/update-sqlite3.sql b/install/update-5.1.0/update-sqlite3.sql new file mode 100644 index 000000000..89902e015 --- /dev/null +++ b/install/update-5.1.0/update-sqlite3.sql @@ -0,0 +1,199 @@ +BEGIN; + +CREATE TABLE `__tblVersion` ( + `date` TEXT default NULL, + `major` INTEGER, + `minor` INTEGER, + `subminor` INTEGER +); + +INSERT INTO `__tblVersion` SELECT * FROM `tblVersion`; + +DROP TABLE `tblVersion`; + +ALTER TABLE `__tblVersion` RENAME TO `tblVersion`; + +CREATE TABLE `__tblUserImages` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, + `image` blob NOT NULL, + `mimeType` varchar(100) NOT NULL default '' +); + +INSERT INTO `__tblUserImages` SELECT * FROM `tblUserImages`; + +DROP TABLE `tblUserImages`; + +ALTER TABLE `__tblUserImages` RENAME TO `tblUserImages`; + +CREATE TABLE `__tblDocumentContent` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `document` INTEGER NOT NULL default '0' REFERENCES `tblDocuments` (`id`), + `version` INTEGER unsigned NOT NULL, + `comment` text, + `date` INTEGER default NULL, + `createdBy` INTEGER default NULL, + `dir` varchar(255) NOT NULL default '', + `orgFileName` varchar(150) NOT NULL default '', + `fileType` varchar(10) NOT NULL default '', + `mimeType` varchar(100) NOT NULL default '', + `fileSize` INTEGER, + `checksum` char(32), + UNIQUE (`document`,`version`) +); + +INSERT INTO `__tblDocumentContent` SELECT * FROM `tblDocumentContent`; + +DROP TABLE `tblDocumentContent`; + +ALTER TABLE `__tblDocumentContent` RENAME TO `tblDocumentContent`; + +CREATE TABLE `__tblDocumentFiles` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `document` INTEGER NOT NULL default 0 REFERENCES `tblDocuments` (`id`), + `userID` INTEGER NOT NULL default 0 REFERENCES `tblUsers` (`id`), + `comment` text, + `name` varchar(150) default NULL, + `date` INTEGER default NULL, + `dir` varchar(255) NOT NULL default '', + `orgFileName` varchar(150) NOT NULL default '', + `fileType` varchar(10) NOT NULL default '', + `mimeType` varchar(100) NOT NULL default '' +) ; + +INSERT INTO `__tblDocumentFiles` SELECT * FROM `tblDocumentFiles`; + +DROP TABLE `tblDocumentFiles`; + +ALTER TABLE `__tblDocumentFiles` RENAME TO `tblDocumentFiles`; + +CREATE TABLE `__tblUsers` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `login` varchar(50) default NULL, + `pwd` varchar(50) default NULL, + `fullName` varchar(100) default NULL, + `email` varchar(70) default NULL, + `language` varchar(32) NOT NULL, + `theme` varchar(32) NOT NULL, + `comment` text NOT NULL, + `role` INTEGER NOT NULL default '0', + `hidden` INTEGER NOT NULL default '0', + `pwdExpiration` TEXT default NULL, + `loginfailures` INTEGER NOT NULL default '0', + `disabled` INTEGER NOT NULL default '0', + `quota` INTEGER, + `homefolder` INTEGER default NULL REFERENCES `tblFolders` (`id`), + UNIQUE (`login`) +); + +INSERT INTO `__tblUsers` SELECT * FROM `tblUsers`; + +DROP TABLE `tblUsers`; + +ALTER TABLE `__tblUsers` RENAME TO `tblUsers`; + +CREATE TABLE `__tblUserPasswordRequest` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, + `hash` varchar(50) default NULL, + `date` TEXT NOT NULL +); + +INSERT INTO `__tblUserPasswordRequest` SELECT * FROM `tblUserPasswordRequest`; + +DROP TABLE `tblUserPasswordRequest`; + +ALTER TABLE `__tblUserPasswordRequest` RENAME TO `tblUserPasswordRequest`; + +CREATE TABLE `__tblUserPasswordHistory` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, + `pwd` varchar(50) default NULL, + `date` TEXT NOT NULL +); + +INSERT INTO `__tblUserPasswordHistory` SELECT * FROM `tblUserPasswordHistory`; + +DROP TABLE `tblUserPasswordHistory`; + +ALTER TABLE `__tblUserPasswordHistory` RENAME TO `tblUserPasswordHistory`; + +CREATE TABLE `__tblDocumentReviewLog` ( + `reviewLogID` INTEGER PRIMARY KEY AUTOINCREMENT, + `reviewID` INTEGER NOT NULL default 0 REFERENCES `tblDocumentReviewers` (`reviewID`) ON DELETE CASCADE, + `status` INTEGER NOT NULL default 0, + `comment` TEXT NOT NULL, + `date` TEXT NOT NULL, + `userID` INTEGER NOT NULL default 0 REFERENCES `tblUsers` (`id`) ON DELETE CASCADE +); + +INSERT INTO `__tblDocumentReviewLog` SELECT * FROM `tblDocumentReviewLog`; + +DROP TABLE `tblDocumentReviewLog`; + +ALTER TABLE `__tblDocumentReviewLog` RENAME TO `tblDocumentReviewLog`; + +CREATE TABLE `__tblDocumentStatusLog` ( + `statusLogID` INTEGER PRIMARY KEY AUTOINCREMENT, + `statusID` INTEGER NOT NULL default '0' REFERENCES `tblDocumentStatus` (`statusID`) ON DELETE CASCADE, + `status` INTEGER NOT NULL default '0', + `comment` text NOT NULL, + `date` TEXT NOT NULL, + `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE +) ; + +INSERT INTO `__tblDocumentStatusLog` SELECT * FROM `tblDocumentStatusLog`; + +DROP TABLE `tblDocumentStatusLog`; + +ALTER TABLE `__tblDocumentStatusLog` RENAME TO `tblDocumentStatusLog`; + +CREATE TABLE `__tblDocumentApproveLog` ( + `approveLogID` INTEGER PRIMARY KEY AUTOINCREMENT, + `approveID` INTEGER NOT NULL default '0' REFERENCES `tblDocumentApprovers` (`approveID`) ON DELETE CASCADE, + `status` INTEGER NOT NULL default '0', + `comment` TEXT NOT NULL, + `date` TEXT NOT NULL, + `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE +); + +INSERT INTO `__tblDocumentApproveLog` SELECT * FROM `tblDocumentApproveLog`; + +DROP TABLE `tblDocumentApproveLog`; + +ALTER TABLE `__tblDocumentApproveLog` RENAME TO `tblDocumentApproveLog`; + +CREATE TABLE `__tblWorkflowLog` ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT, + `document` INTEGER default NULL REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, + `version` INTEGER default NULL, + `workflow` INTEGER default NULL REFERENCES `tblWorkflows` (`id`) ON DELETE CASCADE, + `userid` INTEGER default NULL REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, + `transition` INTEGER default NULL REFERENCES `tblWorkflowTransitions` (`id`) ON DELETE CASCADE, + `date` datetime NOT NULL, + `comment` text +); + +INSERT INTO `__tblWorkflowLog` SELECT * FROM `tblWorkflowLog`; + +DROP TABLE `tblWorkflowLog`; + +ALTER TABLE `__tblWorkflowLog` RENAME TO `tblWorkflowLog`; + +CREATE TABLE `__tblWorkflowDocumentContent` ( + `parentworkflow` INTEGER DEFAULT 0, + `workflow` INTEGER DEFAULT NULL REFERENCES `tblWorkflows` (`id`) ON DELETE CASCADE, + `document` INTEGER DEFAULT NULL REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, + `version` INTEGER DEFAULT NULL, + `state` INTEGER DEFAULT NULL REFERENCES `tblWorkflowStates` (`id`) ON DELETE CASCADE, + `date` datetime NOT NULL +); + +INSERT INTO `__tblWorkflowDocumentContent` SELECT * FROM `tblWorkflowDocumentContent`; + +DROP TABLE `tblWorkflowDocumentContent`; + +ALTER TABLE `__tblWorkflowDocumentContent` RENAME TO `tblWorkflowDocumentContent`; + +COMMIT; + From 8665826211e0cbf3f5483691dcb8a79841ce7d13 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 12:57:54 +0100 Subject: [PATCH 025/194] update version --- install/update-5.1.0/update-sqlite3.sql | 2 ++ install/update-5.1.0/update.sql | 2 ++ 2 files changed, 4 insertions(+) diff --git a/install/update-5.1.0/update-sqlite3.sql b/install/update-5.1.0/update-sqlite3.sql index 89902e015..466cad648 100644 --- a/install/update-5.1.0/update-sqlite3.sql +++ b/install/update-5.1.0/update-sqlite3.sql @@ -195,5 +195,7 @@ DROP TABLE `tblWorkflowDocumentContent`; ALTER TABLE `__tblWorkflowDocumentContent` RENAME TO `tblWorkflowDocumentContent`; +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 12336bd89..5309448b2 100644 --- a/install/update-5.1.0/update.sql +++ b/install/update-5.1.0/update.sql @@ -24,5 +24,7 @@ ALTER TABLE `tblWorkflowDocumentContent` CHANGE `date` `date` datetime NOT NULL; ALTER TABLE `tblVersion` CHANGE `date` `date` datetime NOT NULL; +UPDATE tblVersion set major=5, minor=1, subminor=0; + COMMIT; From 24f63bb40d5629ce1692b45f239a610301b3ab92 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 14:51:43 +0100 Subject: [PATCH 026/194] add notes on update --- install/update-5.1.0/update.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 install/update-5.1.0/update.txt diff --git a/install/update-5.1.0/update.txt b/install/update-5.1.0/update.txt new file mode 100644 index 000000000..38e9af41b --- /dev/null +++ b/install/update-5.1.0/update.txt @@ -0,0 +1,10 @@ +Caution when you update an sqlite database +========================================== + +The database changes for this version will require to change the +definition of various columns. This is not easily possible when using +sqlite. Therefore, the affected tables are first renamed, than +new tables with the modified columns are created in the old table +content will be copied into the new table. The old tables will not +be removed and are prefixed with '__'. You may manunally remove them +once you have successfully checked the update. From 3d97644dbf51031c04b2bd63a93e6cbb52c895ea Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 14:52:07 +0100 Subject: [PATCH 027/194] change order of operation to prevent 'table locked' error --- install/update-5.1.0/update-sqlite3.sql | 98 ++++++++++--------------- 1 file changed, 37 insertions(+), 61 deletions(-) diff --git a/install/update-5.1.0/update-sqlite3.sql b/install/update-5.1.0/update-sqlite3.sql index 466cad648..c67c61a4c 100644 --- a/install/update-5.1.0/update-sqlite3.sql +++ b/install/update-5.1.0/update-sqlite3.sql @@ -1,32 +1,30 @@ BEGIN; -CREATE TABLE `__tblVersion` ( +ALTER TABLE `tblVersion` RENAME TO `__tblVersion`; + +CREATE TABLE `tblVersion` ( `date` TEXT default NULL, `major` INTEGER, `minor` INTEGER, `subminor` INTEGER ); -INSERT INTO `__tblVersion` SELECT * FROM `tblVersion`; +INSERT INTO `tblVersion` SELECT * FROM `__tblVersion`; -DROP TABLE `tblVersion`; +ALTER TABLE `tblUserImages` RENAME TO `__tblUserImages`; -ALTER TABLE `__tblVersion` RENAME TO `tblVersion`; - -CREATE TABLE `__tblUserImages` ( +CREATE TABLE `tblUserImages` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, `image` blob NOT NULL, `mimeType` varchar(100) NOT NULL default '' ); -INSERT INTO `__tblUserImages` SELECT * FROM `tblUserImages`; +INSERT INTO `tblUserImages` SELECT * FROM `__tblUserImages`; -DROP TABLE `tblUserImages`; +ALTER TABLE `tblDocumentContent` RENAME TO `__tblDocumentContent`; -ALTER TABLE `__tblUserImages` RENAME TO `tblUserImages`; - -CREATE TABLE `__tblDocumentContent` ( +CREATE TABLE `tblDocumentContent` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `document` INTEGER NOT NULL default '0' REFERENCES `tblDocuments` (`id`), `version` INTEGER unsigned NOT NULL, @@ -42,13 +40,11 @@ CREATE TABLE `__tblDocumentContent` ( UNIQUE (`document`,`version`) ); -INSERT INTO `__tblDocumentContent` SELECT * FROM `tblDocumentContent`; +INSERT INTO `tblDocumentContent` SELECT * FROM `__tblDocumentContent`; -DROP TABLE `tblDocumentContent`; +ALTER TABLE `tblDocumentFiles` RENAME TO `__tblDocumentFiles`; -ALTER TABLE `__tblDocumentContent` RENAME TO `tblDocumentContent`; - -CREATE TABLE `__tblDocumentFiles` ( +CREATE TABLE `tblDocumentFiles` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `document` INTEGER NOT NULL default 0 REFERENCES `tblDocuments` (`id`), `userID` INTEGER NOT NULL default 0 REFERENCES `tblUsers` (`id`), @@ -61,13 +57,11 @@ CREATE TABLE `__tblDocumentFiles` ( `mimeType` varchar(100) NOT NULL default '' ) ; -INSERT INTO `__tblDocumentFiles` SELECT * FROM `tblDocumentFiles`; +INSERT INTO `tblDocumentFiles` SELECT * FROM `__tblDocumentFiles`; -DROP TABLE `tblDocumentFiles`; +ALTER TABLE `tblUsers` RENAME TO `__tblUsers`; -ALTER TABLE `__tblDocumentFiles` RENAME TO `tblDocumentFiles`; - -CREATE TABLE `__tblUsers` ( +CREATE TABLE `tblUsers` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `login` varchar(50) default NULL, `pwd` varchar(50) default NULL, @@ -86,39 +80,33 @@ CREATE TABLE `__tblUsers` ( UNIQUE (`login`) ); -INSERT INTO `__tblUsers` SELECT * FROM `tblUsers`; +INSERT INTO `tblUsers` SELECT * FROM `__tblUsers`; -DROP TABLE `tblUsers`; +ALTER TABLE `tblUserPasswordRequest` RENAME TO `__tblUserPasswordRequest`; -ALTER TABLE `__tblUsers` RENAME TO `tblUsers`; - -CREATE TABLE `__tblUserPasswordRequest` ( +CREATE TABLE `tblUserPasswordRequest` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, `hash` varchar(50) default NULL, `date` TEXT NOT NULL ); -INSERT INTO `__tblUserPasswordRequest` SELECT * FROM `tblUserPasswordRequest`; +INSERT INTO `tblUserPasswordRequest` SELECT * FROM `__tblUserPasswordRequest`; -DROP TABLE `tblUserPasswordRequest`; +ALTER TABLE `tblUserPasswordHistory` RENAME TO `__tblUserPasswordHistory`; -ALTER TABLE `__tblUserPasswordRequest` RENAME TO `tblUserPasswordRequest`; - -CREATE TABLE `__tblUserPasswordHistory` ( +CREATE TABLE `tblUserPasswordHistory` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, `pwd` varchar(50) default NULL, `date` TEXT NOT NULL ); -INSERT INTO `__tblUserPasswordHistory` SELECT * FROM `tblUserPasswordHistory`; +INSERT INTO `tblUserPasswordHistory` SELECT * FROM `__tblUserPasswordHistory`; -DROP TABLE `tblUserPasswordHistory`; +ALTER TABLE `tblDocumentReviewLog` RENAME TO `__tblDocumentReviewLog`; -ALTER TABLE `__tblUserPasswordHistory` RENAME TO `tblUserPasswordHistory`; - -CREATE TABLE `__tblDocumentReviewLog` ( +CREATE TABLE `tblDocumentReviewLog` ( `reviewLogID` INTEGER PRIMARY KEY AUTOINCREMENT, `reviewID` INTEGER NOT NULL default 0 REFERENCES `tblDocumentReviewers` (`reviewID`) ON DELETE CASCADE, `status` INTEGER NOT NULL default 0, @@ -127,13 +115,11 @@ CREATE TABLE `__tblDocumentReviewLog` ( `userID` INTEGER NOT NULL default 0 REFERENCES `tblUsers` (`id`) ON DELETE CASCADE ); -INSERT INTO `__tblDocumentReviewLog` SELECT * FROM `tblDocumentReviewLog`; +INSERT INTO `tblDocumentReviewLog` SELECT * FROM `__tblDocumentReviewLog`; -DROP TABLE `tblDocumentReviewLog`; +ALTER TABLE `tblDocumentStatusLog` RENAME TO `__tblDocumentStatusLog`; -ALTER TABLE `__tblDocumentReviewLog` RENAME TO `tblDocumentReviewLog`; - -CREATE TABLE `__tblDocumentStatusLog` ( +CREATE TABLE `tblDocumentStatusLog` ( `statusLogID` INTEGER PRIMARY KEY AUTOINCREMENT, `statusID` INTEGER NOT NULL default '0' REFERENCES `tblDocumentStatus` (`statusID`) ON DELETE CASCADE, `status` INTEGER NOT NULL default '0', @@ -142,13 +128,11 @@ CREATE TABLE `__tblDocumentStatusLog` ( `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE ) ; -INSERT INTO `__tblDocumentStatusLog` SELECT * FROM `tblDocumentStatusLog`; +INSERT INTO `tblDocumentStatusLog` SELECT * FROM `__tblDocumentStatusLog`; -DROP TABLE `tblDocumentStatusLog`; +ALTER TABLE `tblDocumentApproveLog` RENAME TO `__tblDocumentApproveLog`; -ALTER TABLE `__tblDocumentStatusLog` RENAME TO `tblDocumentStatusLog`; - -CREATE TABLE `__tblDocumentApproveLog` ( +CREATE TABLE `tblDocumentApproveLog` ( `approveLogID` INTEGER PRIMARY KEY AUTOINCREMENT, `approveID` INTEGER NOT NULL default '0' REFERENCES `tblDocumentApprovers` (`approveID`) ON DELETE CASCADE, `status` INTEGER NOT NULL default '0', @@ -157,13 +141,11 @@ CREATE TABLE `__tblDocumentApproveLog` ( `userID` INTEGER NOT NULL default '0' REFERENCES `tblUsers` (`id`) ON DELETE CASCADE ); -INSERT INTO `__tblDocumentApproveLog` SELECT * FROM `tblDocumentApproveLog`; +INSERT INTO `tblDocumentApproveLog` SELECT * FROM `__tblDocumentApproveLog`; -DROP TABLE `tblDocumentApproveLog`; +ALTER TABLE `tblWorkflowLog` RENAME TO `__tblWorkflowLog`; -ALTER TABLE `__tblDocumentApproveLog` RENAME TO `tblDocumentApproveLog`; - -CREATE TABLE `__tblWorkflowLog` ( +CREATE TABLE `tblWorkflowLog` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `document` INTEGER default NULL REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, `version` INTEGER default NULL, @@ -174,13 +156,11 @@ CREATE TABLE `__tblWorkflowLog` ( `comment` text ); -INSERT INTO `__tblWorkflowLog` SELECT * FROM `tblWorkflowLog`; +INSERT INTO `tblWorkflowLog` SELECT * FROM `__tblWorkflowLog`; -DROP TABLE `tblWorkflowLog`; +ALTER TABLE `tblWorkflowDocumentContent` RENAME TO `__tblWorkflowDocumentContent`; -ALTER TABLE `__tblWorkflowLog` RENAME TO `tblWorkflowLog`; - -CREATE TABLE `__tblWorkflowDocumentContent` ( +CREATE TABLE `tblWorkflowDocumentContent` ( `parentworkflow` INTEGER DEFAULT 0, `workflow` INTEGER DEFAULT NULL REFERENCES `tblWorkflows` (`id`) ON DELETE CASCADE, `document` INTEGER DEFAULT NULL REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, @@ -189,11 +169,7 @@ CREATE TABLE `__tblWorkflowDocumentContent` ( `date` datetime NOT NULL ); -INSERT INTO `__tblWorkflowDocumentContent` SELECT * FROM `tblWorkflowDocumentContent`; - -DROP TABLE `tblWorkflowDocumentContent`; - -ALTER TABLE `__tblWorkflowDocumentContent` RENAME TO `tblWorkflowDocumentContent`; +INSERT INTO `tblWorkflowDocumentContent` SELECT * FROM `__tblWorkflowDocumentContent`; UPDATE tblVersion set major=5, minor=1, subminor=0; From 8996c14a1287e4a8f6873c43f28d8636f3e9153f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 14:56:25 +0100 Subject: [PATCH 028/194] sync with innodb --- install/create_tables-postgres.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/create_tables-postgres.sql b/install/create_tables-postgres.sql index 869b97ab2..92307df5b 100644 --- a/install/create_tables-postgres.sql +++ b/install/create_tables-postgres.sql @@ -61,7 +61,7 @@ CREATE TABLE "tblUsers" ( "pwdExpiration" TIMESTAMP default NULL, "loginfailures" INTEGER NOT NULL default '0', "disabled" INTEGER NOT NULL default '0', - "quota" INTEGER, + "quota" BIGINT, "homefolder" INTEGER default NULL, UNIQUE ("login") ); @@ -102,7 +102,7 @@ CREATE TABLE "tblUserImages" ( "id" SERIAL UNIQUE, "userID" INTEGER NOT NULL default '0' REFERENCES "tblUsers" ("id") ON DELETE CASCADE, "image" TEXT NOT NULL, - "mimeType" varchar(10) NOT NULL default '' + "mimeType" varchar(100) NOT NULL default '' ) ; -- -------------------------------------------------------- @@ -606,7 +606,7 @@ CREATE TABLE "tblWorkflowMandatoryWorkflow" ( -- CREATE TABLE "tblVersion" ( - "date" TIMESTAMP default NULL, + "date" TIMESTAMP NOT NULL, "major" INTEGER, "minor" INTEGER, "subminor" INTEGER From 2b154cc468a19ae7d523af7063ff4186d37ea006 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 15:01:58 +0100 Subject: [PATCH 029/194] set pwdExpiration to null --- SeedDMS_Core/Core/inc.ClassDMS.php | 5 +---- SeedDMS_Core/Core/inc.ClassUser.php | 7 ++----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index b4e930749..0ced85d72 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -1280,10 +1280,7 @@ class SeedDMS_Core_DMS { if($role == '') $role = '0'; if(trim($pwdexpiration) == '' || trim($pwdexpiration) == 'never') { - if($db->getDriver() == 'sqlite') - $pwdexpiration = $db->qstr('0000-00-00 00:00:00'); - else - $pwdexpiration = 'DEFAULT'; + $pwdexpiration = 'NULL'; } elseif(trim($pwdexpiration) == 'now') $pwdexpiration = $db->qstr(date('Y-m-d H:i:s')); $queryStr = "INSERT INTO `tblUsers` (`login`, `pwd`, `fullName`, `email`, `language`, `theme`, `comment`, `role`, `hidden`, `disabled`, `pwdExpiration`, `quota`, `homefolder`) VALUES (".$db->qstr($login).", ".$db->qstr($pwd).", ".$db->qstr($fullName).", ".$db->qstr($email).", '".$language."', '".$theme."', ".$db->qstr($comment).", '".intval($role)."', '".intval($isHidden)."', '".intval($isDisabled)."', ".$pwdexpiration.", '".intval($quota)."', ".($homefolder ? intval($homefolder) : "NULL").")"; diff --git a/SeedDMS_Core/Core/inc.ClassUser.php b/SeedDMS_Core/Core/inc.ClassUser.php index be2dd2c9e..567f45458 100644 --- a/SeedDMS_Core/Core/inc.ClassUser.php +++ b/SeedDMS_Core/Core/inc.ClassUser.php @@ -134,7 +134,7 @@ class SeedDMS_Core_User { /* {{{ */ const role_admin = '1'; const role_guest = '2'; - function __construct($id, $login, $pwd, $fullName, $email, $language, $theme, $comment, $role, $isHidden=0, $isDisabled=0, $pwdExpiration='0000-00-00 00:00:00', $loginFailures=0, $quota=0, $homeFolder=null) { + function __construct($id, $login, $pwd, $fullName, $email, $language, $theme, $comment, $role, $isHidden=0, $isDisabled=0, $pwdExpiration='', $loginFailures=0, $quota=0, $homeFolder=null) { $this->_id = $id; $this->_login = $login; $this->_pwd = $pwd; @@ -269,10 +269,7 @@ class SeedDMS_Core_User { /* {{{ */ $db = $this->_dms->getDB(); if(trim($newPwdExpiration) == '' || trim($newPwdExpiration) == 'never') { - if($db->getDriver() == 'sqlite') - $queryStr = "UPDATE `tblUsers` SET `pwdExpiration` = '0000-00-00 00:00:00' WHERE `id` = " . $this->_id; - else - $queryStr = "UPDATE `tblUsers` SET `pwdExpiration` = DEFAULT WHERE `id` = " . $this->_id; + $queryStr = "UPDATE `tblUsers` SET `pwdExpiration` = NULL WHERE `id` = " . $this->_id; } else { if(trim($newPwdExpiration) == 'now') $newPwdExpiration = date('Y-m-d H:i:s'); From 6faef438b9131a03282006859dfef55f0b1c102c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 15:19:41 +0100 Subject: [PATCH 030/194] started version 5.1.0 --- CHANGELOG | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index debab71d3..37fbce8d2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +-------------------------------------------------------------------------------- + Changes in version 5.1.0 +-------------------------------------------------------------------------------- +- added support for postgresql + -------------------------------------------------------------------------------- Changes in version 5.0.9 -------------------------------------------------------------------------------- From 75f21ddf02dda9531e0e7fd3b3edb19d16629ccf Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 24 Nov 2016 11:42:37 +0100 Subject: [PATCH 031/194] add filterDocumentFiles() --- SeedDMS_Core/Core/inc.ClassDMS.php | 74 ++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 7319fba43..25834e267 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -315,6 +315,80 @@ class SeedDMS_Core_DMS { return $tmp; } /* }}} */ + /** + * Filter out document attachments which can not be accessed by a given user + * + * Returns a filtered list of files which are accessible by the + * given user. A file is only accessible, if it is publically visible, + * owned by the user, or the accessing user is an administrator. + * + * @param array $files list of objects of type SeedDMS_Core_DocumentFile + * @param object $user user for which access is being checked + * @return array filtered list of files + */ + static function filterDocumentFiles($user, $files) { /* {{{ */ + $tmp = array(); + foreach ($files as $file) + if ($file->isPublic() || ($file->getUser()->getID() == $user->getID()) || $user->isAdmin()) + array_push($tmp, $file); + return $tmp; + } /* }}} */ + + /** + * Merge access lists + * + * Merges two access lists. Objects of the second list will override objects + * in the first list. + * + * @param array $first list of access rights as returned by + * SeedDMS_Core_Document:: getAccessList() or SeedDMS_Core_Folder::getAccessList() + * @param array $secont list of access rights + * @return array merged list + */ + static function mergeAccessLists($first, $second) { /* {{{ */ + if($first && !$second) + return $first; + if(!$first && $second) + return $second; + + $tmp = array('users'=>array(), 'groups'=>array()); + if(!isset($first['users']) || !isset($first['groups']) || + !isset($second['users']) || !isset($second['groups'])) + return false; + + foreach ($first['users'] as $f) { + $new = $f; + foreach ($second['users'] as $i=>$s) { + if($f->getUserID() == $s->getUserID()) { + $new = $s; + unset($second['users'][$i]); + break; + } + } + array_push($tmp['users'], $new); + } + foreach ($seconf['users'] as $f) { + array_push($tmp['users'], $f); + } + + foreach ($first['groups'] as $f) { + $new = $f; + foreach ($second['groups'] as $i=>$s) { + if($f->getGroupID() == $s->getGroupID()) { + $new = $s; + unset($second['groups'][$i]); + break; + } + } + array_push($tmp['groups'], $new); + } + foreach ($second['groups'] as $f) { + array_push($tmp['groups'], $f); + } + + return $tmp; + } /* }}} */ + /** * Create a new instance of the dms * From 9346fa6072f9c69d7a9e220704b7ff3730726083 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 24 Nov 2016 11:42:53 +0100 Subject: [PATCH 032/194] use new function filterDocumentFiles() --- views/bootstrap/class.Bootstrap.php | 3 +- .../bootstrap/class.DocumentVersionDetail.php | 87 +++++++++++++++++++ views/bootstrap/class.ViewDocument.php | 4 +- 3 files changed, 92 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 55e8a374b..9fed9d232 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1929,7 +1929,8 @@ $(document).ready( function() { } /* Retrieve attacheѕ files */ - $files = $document->getDocumentFiles(); + $files = $document->getDocumentFiles($latestContent->getVersion()); + $files = SeedDMS_Core_DMS::filterDocumentFiles($user, $files); /* Retrieve linked documents */ $links = $document->getDocumentLinks(); diff --git a/views/bootstrap/class.DocumentVersionDetail.php b/views/bootstrap/class.DocumentVersionDetail.php index dca652f1d..9e3859242 100644 --- a/views/bootstrap/class.DocumentVersionDetail.php +++ b/views/bootstrap/class.DocumentVersionDetail.php @@ -364,6 +364,93 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Bootstrap_Style { $this->contentContainerEnd(); + $tmpfiles = $document->getDocumentFiles($version->getVersion()); + /* Do the regular filtering by isPublic and access rights */ + $tmpfiles = SeedDMS_Core_DMS::filterDocumentFiles($user, $tmpfiles); + /* Also filter only those files belonging to this version and skip files + * belonging to the document (version = 0) + */ + $files = array(); + foreach($tmpfiles as $file) { + if($file->getVersion() == $version->getVersion()) + $files[] = $file; + } + + if (count($files) > 0) { + $this->contentHeading(getMLText("linked_files")); + $this->contentContainerStart(); + + $documentid = $document->getID(); + + print ""; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + + foreach($files as $file) { + if($file->getVersion() != $version->getVersion()) + continue; + + $file_exists=file_exists($dms->contentDir . $file->getPath()); + + $responsibleUser = $file->getUser(); + + print ""; + print ""; + + print ""; + print ""; + + print ""; + + print ""; + } + print "\n
".getMLText("file")."".getMLText("comment")."
"; + $previewer->createPreview($file, $previewwidthdetail); + if($file_exists) { + if ($viewonlinefiletypes && in_array(strtolower($file->getFileType()), $viewonlinefiletypes)) { + print "getID()."\">"; + } else { + print "getID()."\">"; + } + } + if($previewer->hasPreview($file)) { + print("getID()."&file=".$file->getID()."&width=".$previewwidthdetail."\" title=\"".htmlspecialchars($file->getMimeType())."\">"); + } else { + print "getMimeIcon($file->getFileType())."\" title=\"".htmlspecialchars($file->getMimeType())."\">"; + } + if($file_exists) { + print ""; + } + print "
    \n"; + print "
  • ".htmlspecialchars($file->getName())."
  • \n"; + print "
  • ".htmlspecialchars($file->getOriginalFileName())."
  • \n"; + if ($file_exists) + print "
  • ".SeedDMS_Core_File::format_filesize(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())."
  • "; + if($file->getVersion()) + print "
  • ".getMLText('linked_to_this_version')."
  • "; + print "
".htmlspecialchars($file->getComment())."
\n"; + + $this->contentContainerEnd(); + } + if($user->isAdmin()) { $this->contentHeading(getMLText("status")); $this->contentContainerStart(); diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index b2edfded3..6d0da492e 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -413,7 +413,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } /* Retrieve attacheѕ files */ - $files = $document->getDocumentFiles(); + $latestContent = $document->getLatestContent(); + $files = $document->getDocumentFiles($latestContent->getVersion()); + $files = SeedDMS_Core_DMS::filterDocumentFiles($user, $files); /* Retrieve linked documents */ $links = $document->getDocumentLinks(); From 32d484a9245c2a6dd44154515d16de3bfd29855f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 24 Nov 2016 12:00:54 +0100 Subject: [PATCH 033/194] remove mergeAccessList() --- SeedDMS_Core/Core/inc.ClassDMS.php | 55 ------------------------------ 1 file changed, 55 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 25834e267..e0433bad0 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -334,61 +334,6 @@ class SeedDMS_Core_DMS { return $tmp; } /* }}} */ - /** - * Merge access lists - * - * Merges two access lists. Objects of the second list will override objects - * in the first list. - * - * @param array $first list of access rights as returned by - * SeedDMS_Core_Document:: getAccessList() or SeedDMS_Core_Folder::getAccessList() - * @param array $secont list of access rights - * @return array merged list - */ - static function mergeAccessLists($first, $second) { /* {{{ */ - if($first && !$second) - return $first; - if(!$first && $second) - return $second; - - $tmp = array('users'=>array(), 'groups'=>array()); - if(!isset($first['users']) || !isset($first['groups']) || - !isset($second['users']) || !isset($second['groups'])) - return false; - - foreach ($first['users'] as $f) { - $new = $f; - foreach ($second['users'] as $i=>$s) { - if($f->getUserID() == $s->getUserID()) { - $new = $s; - unset($second['users'][$i]); - break; - } - } - array_push($tmp['users'], $new); - } - foreach ($seconf['users'] as $f) { - array_push($tmp['users'], $f); - } - - foreach ($first['groups'] as $f) { - $new = $f; - foreach ($second['groups'] as $i=>$s) { - if($f->getGroupID() == $s->getGroupID()) { - $new = $s; - unset($second['groups'][$i]); - break; - } - } - array_push($tmp['groups'], $new); - } - foreach ($second['groups'] as $f) { - array_push($tmp['groups'], $f); - } - - return $tmp; - } /* }}} */ - /** * Create a new instance of the dms * From 606effb759b78c4c0099032863c07844a9cfe240 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 2 Dec 2016 12:24:27 +0100 Subject: [PATCH 034/194] fix sql to retrieve attachments --- SeedDMS_Core/Core/inc.ClassDocument.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index eb2a04e05..b9f346bc0 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -1769,7 +1769,15 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ if (!isset($this->_documentFiles)) { $db = $this->_dms->getDB(); - $queryStr = "SELECT * FROM `tblDocumentFiles` WHERE `document` = " . $this->_id." ORDER BY `date` DESC"; + $queryStr = "SELECT * FROM `tblDocumentFiles` WHERE `document` = " . $this->_id; + if($version) { + $queryStr .= " AND (`version`=0 OR `version`=".(int) $version.")"; + } + $queryStr .= " ORDER BY "; + if($version) { + $queryStr .= "`version` DESC,"; + } + $queryStr .= "`date` DESC"; $resArr = $db->getResultArray($queryStr); if (is_bool($resArr) && !$resArr) return false; From 19f77a37c865dc62d09524a53c6424ca200f09e0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 8 Dec 2016 16:15:05 +0100 Subject: [PATCH 035/194] add missing changes which got lost during last rebase --- SeedDMS_Core/Core/inc.ClassDocument.php | 30 ++++++++++++++++----- op/op.AddFile.php | 11 ++++++-- views/bootstrap/class.AddFile.php | 36 ++++++++++++++++--------- views/bootstrap/class.ViewDocument.php | 4 +++ 4 files changed, 59 insertions(+), 22 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index b9f346bc0..3a872209e 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -1762,10 +1762,10 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ if ((is_bool($resArr) && !$resArr) || count($resArr)==0) return false; $resArr = $resArr[0]; - return new SeedDMS_Core_DocumentFile($resArr["id"], $this, $resArr["userID"], $resArr["comment"], $resArr["date"], $resArr["dir"], $resArr["fileType"], $resArr["mimeType"], $resArr["orgFileName"], $resArr["name"]); + return 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"]); } /* }}} */ - function getDocumentFiles() { /* {{{ */ + function getDocumentFiles($version=0) { /* {{{ */ if (!isset($this->_documentFiles)) { $db = $this->_dms->getDB(); @@ -1784,19 +1784,19 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $this->_documentFiles = array(); foreach ($resArr as $row) { - array_push($this->_documentFiles, new SeedDMS_Core_DocumentFile($row["id"], $this, $row["userID"], $row["comment"], $row["date"], $row["dir"], $row["fileType"], $row["mimeType"], $row["orgFileName"], $row["name"])); + array_push($this->_documentFiles, 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"])); } } return $this->_documentFiles; } /* }}} */ - function addDocumentFile($name, $comment, $user, $tmpFile, $orgFileName,$fileType, $mimeType ) { /* {{{ */ + function addDocumentFile($name, $comment, $user, $tmpFile, $orgFileName,$fileType, $mimeType,$version=0,$public=1) { /* {{{ */ $db = $this->_dms->getDB(); $dir = $this->getDir(); - $queryStr = "INSERT INTO `tblDocumentFiles` (`comment`, `date`, `dir`, `document`, `fileType`, `mimeType`, `orgFileName`, `userID`, `name`) VALUES ". - "(".$db->qstr($comment).", ".$db->getCurrentTimestamp().", ".$db->qstr($dir).", ".$this->_id.", ".$db->qstr($fileType).", ".$db->qstr($mimeType).", ".$db->qstr($orgFileName).",".$user->getID().",".$db->qstr($name).")"; + $queryStr = "INSERT INTO `tblDocumentFiles` (`comment`, `date`, `dir`, `document`, `fileType`, `mimeType`, `orgFileName`, `userID`, `name`, `version`, `public`) VALUES ". + "(".$db->qstr($comment).", ".$db->getCurrentTimestamp().", ".$db->qstr($dir).", ".$this->_id.", ".$db->qstr($fileType).", ".$db->qstr($mimeType).", ".$db->qstr($orgFileName).",".$user->getID().",".$db->qstr($name).", ".((int) $version).", ".($public ? 1 : 0).")"; if (!$db->getResult($queryStr)) return false; $id = $db->getInsertID(); @@ -4378,6 +4378,16 @@ class SeedDMS_Core_DocumentFile { /* {{{ */ */ protected $_date; + /** + * @var integer version of document this file is attached to + */ + protected $_version; + + /** + * @var integer 1 if this link is public, or 0 if is only visible to the owner + */ + protected $_public; + /** * @var string directory where the file is stored. This is the * document id with a proceding '/'. @@ -4406,7 +4416,7 @@ class SeedDMS_Core_DocumentFile { /* {{{ */ */ protected $_name; - function __construct($id, $document, $userID, $comment, $date, $dir, $fileType, $mimeType, $orgFileName,$name) { + function __construct($id, $document, $userID, $comment, $date, $dir, $fileType, $mimeType, $orgFileName,$name,$version,$public) { $this->_id = $id; $this->_document = $document; $this->_userID = $userID; @@ -4417,6 +4427,8 @@ class SeedDMS_Core_DocumentFile { /* {{{ */ $this->_mimeType = $mimeType; $this->_orgFileName = $orgFileName; $this->_name = $name; + $this->_version = $version; + $this->_public = $public; } function getID() { return $this->_id; } @@ -4440,6 +4452,10 @@ class SeedDMS_Core_DocumentFile { /* {{{ */ return $this->_document->getDir() . "f" .$this->_id . $this->_fileType; } + function getVersion() { return $this->_version; } + + function isPublic() { return $this->_public; } + } /* }}} */ // diff --git a/op/op.AddFile.php b/op/op.AddFile.php index a1507cf13..05d630bdb 100644 --- a/op/op.AddFile.php +++ b/op/op.AddFile.php @@ -77,6 +77,13 @@ for ($file_num=0;$file_numgetContentByVersion($version); + if(!$v) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_occured")); + } $userfiletmp = $_FILES["userfile"]["tmp_name"][$file_num]; $userfiletype = $_FILES["userfile"]["type"][$file_num]; @@ -90,8 +97,8 @@ for ($file_num=0;$file_numaddDocumentFile($name, $comment, $user, $userfiletmp, - basename($userfilename),$fileType, $userfiletype ); - + basename($userfilename),$fileType, $userfiletype, $version, $public); + if (is_bool($res) && !$res) { UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_occured")); } else { diff --git a/views/bootstrap/class.AddFile.php b/views/bootstrap/class.AddFile.php index 8804ee128..571e88245 100644 --- a/views/bootstrap/class.AddFile.php +++ b/views/bootstrap/class.AddFile.php @@ -143,7 +143,6 @@ $(document).ready( function() {
-
@@ -155,28 +154,39 @@ $(document).ready( function() { ?>
- - +
+ +
+
-
- -
+
- -
- - -
- "> +getAccessMode($user) >= M_READWRITE) { + print "
"; + print "
"; + print ""; + print "
"; + } +?> +
+ +
">
- contentContainerEnd(); diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 6d0da492e..e6de33bbc 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -1215,6 +1215,10 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "
  • ".getMLText("uploaded_by")." getEmail()."\">".htmlspecialchars($responsibleUser->getFullName())."
  • "; print "
  • ".getLongReadableDate($file->getDate())."
  • "; + if($file->getVersion()) + print "
  • ".getMLText('linked_to_current_version')."
  • "; + else + print "
  • ".getMLText('linked_to_document')."
  • "; print ""; print "".htmlspecialchars($file->getComment()).""; From 675648ef2029ca7eabf669539f9ffa6c54d538f9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 8 Dec 2016 17:20:44 +0100 Subject: [PATCH 036/194] =?UTF-8?q?add=20change=D1=95=20to=20database=20ta?= =?UTF-8?q?bles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/create_tables-innodb.sql | 2 ++ install/create_tables-sqlite3.sql | 2 ++ 2 files changed, 4 insertions(+) diff --git a/install/create_tables-innodb.sql b/install/create_tables-innodb.sql index 88ca4958a..147e5d3b5 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -301,7 +301,9 @@ CREATE TABLE `tblDocumentLinks` ( CREATE TABLE `tblDocumentFiles` ( `id` int(11) NOT NULL auto_increment, `document` int(11) NOT NULL default '0', + `version` smallint(5) unsigned NOT NULL default '0', `userID` int(11) NOT NULL default '0', + `public` tinyint(1) NOT NULL default '0', `comment` text, `name` varchar(150) default NULL, `date` int(12) default NULL, diff --git a/install/create_tables-sqlite3.sql b/install/create_tables-sqlite3.sql index 64b517fd1..7f8abc821 100644 --- a/install/create_tables-sqlite3.sql +++ b/install/create_tables-sqlite3.sql @@ -263,7 +263,9 @@ CREATE TABLE `tblDocumentLinks` ( CREATE TABLE `tblDocumentFiles` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `document` INTEGER NOT NULL default 0 REFERENCES `tblDocuments` (`id`), + `version` INTEGER unsigned NOT NULL default '0', `userID` INTEGER NOT NULL default 0 REFERENCES `tblUsers` (`id`), + `public` INTEGER NOT NULL default '0', `comment` text, `name` varchar(150) default NULL, `date` INTEGER default NULL, From 007f7c7f2c5a59a23a9c3a149ecbab201109036e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 17 Jan 2017 06:45:06 +0100 Subject: [PATCH 037/194] check if version is set --- op/op.AddFile.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/op/op.AddFile.php b/op/op.AddFile.php index 05d630bdb..0f5eee622 100644 --- a/op/op.AddFile.php +++ b/op/op.AddFile.php @@ -80,9 +80,11 @@ for ($file_num=0;$file_numgetContentByVersion($version); - if(!$v) { - UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_occured")); + if($version) { + $v = $document->getContentByVersion($version); + if(!$v) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_occured")); + } } $userfiletmp = $_FILES["userfile"]["tmp_name"][$file_num]; From ef46f612cbd4de455f6643cd2bdc7fab10a4aa9e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 15:41:44 +0100 Subject: [PATCH 038/194] add columns version and public to tblDocumentFiles --- install/create_tables-postgres.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/create_tables-postgres.sql b/install/create_tables-postgres.sql index 92307df5b..1d72069a6 100644 --- a/install/create_tables-postgres.sql +++ b/install/create_tables-postgres.sql @@ -266,6 +266,8 @@ CREATE TABLE "tblDocumentFiles" ( "id" SERIAL UNIQUE, "document" INTEGER NOT NULL default 0 REFERENCES "tblDocuments" ("id"), "userID" INTEGER NOT NULL default 0 REFERENCES "tblUsers" ("id"), + "version" INTEGER NOT NULL default '0', + "public" INTEGER NOT NULL default '0', "comment" text, "name" varchar(150) default NULL, "date" INTEGER default NULL, From 97c967cc9a8629997ff544ac20cdc0c003668bdc Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 15:49:57 +0100 Subject: [PATCH 039/194] add new columns public and version to tblDocumentFiles --- install/update-5.1.0/update-sqlite3.sql | 4 ++++ install/update-5.1.0/update.sql | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/install/update-5.1.0/update-sqlite3.sql b/install/update-5.1.0/update-sqlite3.sql index c67c61a4c..c1b915a18 100644 --- a/install/update-5.1.0/update-sqlite3.sql +++ b/install/update-5.1.0/update-sqlite3.sql @@ -171,6 +171,10 @@ CREATE TABLE `tblWorkflowDocumentContent` ( INSERT INTO `tblWorkflowDocumentContent` SELECT * FROM `__tblWorkflowDocumentContent`; +ALTER TABLE `tblDocumentFiles` ADD COLUMN `public` INTEGER NOT NULL default '0'; + +ALTER TABLE `tblDocumentFiles` ADD COLUMN `version` INTEGER NOT NULL default '0'; + 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 5309448b2..d30473dce 100644 --- a/install/update-5.1.0/update.sql +++ b/install/update-5.1.0/update.sql @@ -6,6 +6,10 @@ ALTER TABLE `tblDocumentFiles` CHANGE `mimeType` `mimeType` varchar(100) NOT NUL ALTER TABLE `tblUserImages` CHANGE `mimeType` `mimeType` varchar(100) NOT NULL default ''; +ALTER TABLE `tblDocumentFiles` ADD COLUMN `public` INTEGER NOT NULL default '0' AFTER `document`; + +ALTER TABLE `tblDocumentFiles` ADD COLUMN `version` INTEGER NOT NULL default '0' AFTER `document`; + ALTER TABLE `tblUsers` CHANGE `pwdExpiration` `pwdExpiration` datetime default NULL; ALTER TABLE `tblUserPasswordRequest` CHANGE `date` `date` datetime NOT NULL; From 71892eba6ca988c1218e3276cb7c76e9ab2bde33 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 20:10:05 +0100 Subject: [PATCH 040/194] new version 5.1.0 --- 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 7a6b53239..7d6ecf636 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -15,8 +15,8 @@ 2017-02-20 - 5.0.10 - 5.0.10 + 5.1.0 + 5.1.0 stable From f440f7b0abbe9878fcee565c5fe6e188407f3bdd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 20:10:19 +0100 Subject: [PATCH 041/194] set initial version in database to 5.1.0 --- install/create_tables-innodb.sql | 2 +- install/create_tables-postgres.sql | 2 +- install/create_tables-sqlite3.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install/create_tables-innodb.sql b/install/create_tables-innodb.sql index 048bd636e..d5382f7b4 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -716,4 +716,4 @@ CREATE TABLE `tblVersion` ( INSERT INTO tblUsers VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'Administrator', 'address@server.com', '', '', '', 1, 0, '0000-00-00 00:00:00', 0, 0, 0, NULL); INSERT INTO tblUsers VALUES (2, 'guest', NULL, 'Guest User', NULL, '', '', '', 2, 0, '0000-00-00 00:00:00', 0, 0, 0, NULL); INSERT INTO tblFolders VALUES (1, 'DMS', 0, '', 'DMS root', UNIX_TIMESTAMP(), 1, 0, 2, 0); -INSERT INTO tblVersion VALUES (NOW(), 5, 0, 0); +INSERT INTO tblVersion VALUES (NOW(), 5, 1, 0); diff --git a/install/create_tables-postgres.sql b/install/create_tables-postgres.sql index 1d72069a6..19f0f84d1 100644 --- a/install/create_tables-postgres.sql +++ b/install/create_tables-postgres.sql @@ -626,4 +626,4 @@ INSERT INTO "tblUsers" VALUES (2, 'guest', NULL, 'Guest User', NULL, '', '', '', SELECT nextval('"tblUsers_id_seq"'); INSERT INTO "tblFolders" VALUES (1, 'DMS', 0, '', 'DMS root', extract(epoch from now()), 1, 0, 2, 0); SELECT nextval('"tblFolders_id_seq"'); -INSERT INTO "tblVersion" VALUES (CURRENT_TIMESTAMP, 5, 0, 0); +INSERT INTO "tblVersion" VALUES (CURRENT_TIMESTAMP, 5, 1, 0); diff --git a/install/create_tables-sqlite3.sql b/install/create_tables-sqlite3.sql index 0ae41fcd1..417e3e771 100644 --- a/install/create_tables-sqlite3.sql +++ b/install/create_tables-sqlite3.sql @@ -621,4 +621,4 @@ CREATE TABLE `tblVersion` ( INSERT INTO tblUsers VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'Administrator', 'address@server.com', '', '', '', 1, 0, '', 0, 0, 0, 0); INSERT INTO tblUsers VALUES (2, 'guest', NULL, 'Guest User', NULL, '', '', '', 2, 0, '', 0, 0, 0, 0); INSERT INTO tblFolders VALUES (1, 'DMS', 0, '', 'DMS root', strftime('%s','now'), 1, 0, 2, 0); -INSERT INTO tblVersion VALUES (DATETIME(), 5, 0, 0); +INSERT INTO tblVersion VALUES (DATETIME(), 5, 1, 0); From c0bc5cde15dcc7b9ad9e8b967ddcde3e25e786ed Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Feb 2017 21:34:40 +0100 Subject: [PATCH 042/194] export version and public of document files --- utils/xmldump.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/xmldump.php b/utils/xmldump.php index c631cac8c..d3240be2a 100644 --- a/utils/xmldump.php +++ b/utils/xmldump.php @@ -408,6 +408,8 @@ function tree($folder, $parent=null, $indent='', $skipcurrent=false) { /* {{{ */ echo $indent." ".$file->getMimeType()."\n"; echo $indent." ".date('Y-m-d H:i:s', $file->getDate())."\n"; echo $indent." ".wrapWithCData($file->getFileType())."\n"; + echo $indent." ".$file->getVersion()."\n"; + echo $indent." ".($file->isPublic() ? 1 : 0)."\n"; echo $indent." ".$owner->getId()."\n"; echo $indent." ".wrapWithCData($file->getComment())."\n"; echo $indent." ".wrapWithCData($file->getOriginalFileName())."\n"; From 4a86288c66647ade4256a92846630e304185253c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 21 Feb 2017 07:30:14 +0100 Subject: [PATCH 043/194] add support for postgresql --- install/install.php | 7 +++++++ install/update.php | 12 +++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/install/install.php b/install/install.php index f8bb1ddb5..77efd3b42 100644 --- a/install/install.php +++ b/install/install.php @@ -37,6 +37,10 @@ if (!file_exists("create_tables-sqlite3.sql")) { echo "Can't install SeedDMS, 'create_tables-sqlite3.sql' missing"; exit; } +if (!file_exists("create_tables-postgres.sql")) { + echo "Can't install SeedDMS, 'create_tables-postgres.sql' missing"; + exit; +} if (!file_exists("settings.xml.template_install")) { echo "Can't install SeedDMS, 'settings.xml.template_install' missing"; exit; @@ -50,6 +54,7 @@ function openDBConnection($settings) { /* {{{ */ case 'mysql': case 'mysqli': case 'mysqlnd': + case 'pgsql': $tmp = explode(":", $settings->_dbHostname); $dsn = $settings->_dbDriver.":dbname=".$settings->_dbDatabase.";host=".$tmp[0]; if(isset($tmp[1])) @@ -297,6 +302,8 @@ if ($action=="setSettings") { $queries = file_get_contents("create_tables-innodb.sql"); elseif($settings->_dbDriver=="sqlite") $queries = file_get_contents("create_tables-sqlite3.sql"); + elseif($settings->_dbDriver=="pgsql") + $queries = file_get_contents("create_tables-postgres.sql"); else die(); diff --git a/install/update.php b/install/update.php index 23e1714ce..0682492d4 100644 --- a/install/update.php +++ b/install/update.php @@ -49,13 +49,23 @@ switch($settings->_dbDriver) { case 'mysql': case 'mysqli': case 'mysqlnd': - $dsn = $settings->_dbDriver.":dbname=".$settings->_dbDatabase.";host=".$settings->_dbHostname; + $tmp = explode(":", $settings->_dbHostname); + $dsn = $settings->_dbDriver.":dbname=".$settings->_dbDatabase.";host=".$tmp[0]; + if(isset($tmp[1])) + $dsn .= ";port=".$tmp[1]; break; case 'sqlite': $dsn = $settings->_dbDriver.":".$settings->_dbDatabase; if(file_exists('update-'.$_GET['version'].'/update-sqlite3.sql')) $sqlfile = "update-sqlite3.sql"; break; + case 'pgsql': + $tmp = explode(":", $settings->_dbHostname); + $dsn = $settings->_dbDriver.":dbname=".$settings->_dbDatabase.";host=".$tmp[0]; + if(isset($tmp[1])) + $dsn .= ";port=".$tmp[1]; + if(file_exists('update-'.$_GET['version'].'/update-postgres.sql')) + $sqlfile = "update-postgres.sql"; } $db = new PDO($dsn, $settings->_dbUser, $settings->_dbPass); if (!$db) { From 521e923e99bf81cdf29f754239ddd6d8a13a1a0b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Feb 2017 12:39:04 +0100 Subject: [PATCH 044/194] add entry for 5.1.0 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index fa3e05179..53bfd7ae4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Changes in version 5.1.0 -------------------------------------------------------------------------------- - added support for postgresql +- document attachments can linked to a version and be public or hidden -------------------------------------------------------------------------------- Changes in version 5.0.10 From 2acee8d335358b6318130a06f40e1e602f80fcee Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Feb 2017 18:12:43 +0100 Subject: [PATCH 045/194] change sequence of field in tblDocumentFiles --- 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 a3ae6bdf1..e9c7fcc79 100644 --- a/install/create_tables-innodb.sql +++ b/install/create_tables-innodb.sql @@ -316,8 +316,8 @@ CREATE TABLE `tblDocumentFiles` ( `id` int(11) NOT NULL AUTO_INCREMENT, `document` int(11) NOT NULL DEFAULT '0', `version` smallint(5) unsigned NOT NULL DEFAULT '0', - `userID` int(11) NOT NULL DEFAULT '0', `public` tinyint(1) NOT NULL DEFAULT '0', + `userID` int(11) NOT NULL DEFAULT '0', `comment` text, `name` varchar(150) DEFAULT NULL, `date` int(12) DEFAULT NULL, From fbf800d0ee1f4d39013c7fc6bc140bfd2ca96493 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Feb 2017 18:13:17 +0100 Subject: [PATCH 046/194] use tinyint and smallint for public and version tblDocumentFiles --- install/update-5.1.0/update.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/update-5.1.0/update.sql b/install/update-5.1.0/update.sql index d30473dce..6b661e7a7 100644 --- a/install/update-5.1.0/update.sql +++ b/install/update-5.1.0/update.sql @@ -6,9 +6,9 @@ ALTER TABLE `tblDocumentFiles` CHANGE `mimeType` `mimeType` varchar(100) NOT NUL ALTER TABLE `tblUserImages` CHANGE `mimeType` `mimeType` varchar(100) NOT NULL default ''; -ALTER TABLE `tblDocumentFiles` ADD COLUMN `public` INTEGER NOT NULL default '0' AFTER `document`; +ALTER TABLE `tblDocumentFiles` ADD COLUMN `public` tinyint(1) NOT NULL default '0' AFTER `document`; -ALTER TABLE `tblDocumentFiles` ADD COLUMN `version` INTEGER NOT NULL default '0' AFTER `document`; +ALTER TABLE `tblDocumentFiles` ADD COLUMN `version` smallint(5) NOT NULL default '0' AFTER `document`; ALTER TABLE `tblUsers` CHANGE `pwdExpiration` `pwdExpiration` datetime default NULL; From f67483a9a7ac2ea85d181ddfb94c31c49b9a0129 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Feb 2017 18:16:27 +0100 Subject: [PATCH 047/194] use unsigned for version --- install/update-5.1.0/update.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/update-5.1.0/update.sql b/install/update-5.1.0/update.sql index 6b661e7a7..a8e566270 100644 --- a/install/update-5.1.0/update.sql +++ b/install/update-5.1.0/update.sql @@ -8,7 +8,7 @@ ALTER TABLE `tblUserImages` CHANGE `mimeType` `mimeType` varchar(100) NOT NULL d ALTER TABLE `tblDocumentFiles` ADD COLUMN `public` tinyint(1) NOT NULL default '0' AFTER `document`; -ALTER TABLE `tblDocumentFiles` ADD COLUMN `version` smallint(5) NOT NULL default '0' AFTER `document`; +ALTER TABLE `tblDocumentFiles` ADD COLUMN `version` smallint(5) unsigned NOT NULL default '0' AFTER `document`; ALTER TABLE `tblUsers` CHANGE `pwdExpiration` `pwdExpiration` datetime default NULL; From eab655278897093ca3fbce3c4ab7085809d39ef3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Feb 2017 06:35:36 +0100 Subject: [PATCH 048/194] start new version 5.1.1 --- CHANGELOG | 4 ++++ Makefile | 2 +- SeedDMS_Core/Core/inc.ClassDMS.php | 2 +- SeedDMS_Core/package.xml | 25 ++++++++++++++++++++----- inc/inc.Version.php | 2 +- install/install.php | 2 +- 6 files changed, 28 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 5d298fd1f..cb713431d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +-------------------------------------------------------------------------------- + Changes in version 5.1.1 +-------------------------------------------------------------------------------- + -------------------------------------------------------------------------------- Changes in version 5.1.0 -------------------------------------------------------------------------------- diff --git a/Makefile b/Makefile index 65459bda6..ec91e40dc 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION=5.1.0 +VERSION=5.1.1 SRC=CHANGELOG inc conf utils index.php languages views op out controllers doc styles TODO LICENSE webdav install restapi pdfviewer # webapp diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 2409f9daf..5ddf1e52d 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -363,7 +363,7 @@ class SeedDMS_Core_DMS { $this->callbacks = array(); $this->version = '@package_version@'; if($this->version[0] == '@') - $this->version = '5.1.0'; + $this->version = '5.1.1'; } /* }}} */ /** diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 568b37199..98ae08b04 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -12,11 +12,11 @@ uwe@steinmann.cx yes - 2017-02-20 - + 2017-02-28 + - 5.1.0 - 5.1.0 + 5.1.1 + 5.1.1 stable @@ -24,7 +24,6 @@ GPL License -- added postgres support @@ -1328,5 +1327,21 @@ SeedDMS_Core_DMS::getNotificationsByUser() are deprecated - all changes from 4.3.33 merged + + 2017-02-20 + + + 5.1.0 + 5.1.0 + + + stable + stable + + GPL License + +- added postgres support + + diff --git a/inc/inc.Version.php b/inc/inc.Version.php index 0cef2e0ce..44acc594c 100644 --- a/inc/inc.Version.php +++ b/inc/inc.Version.php @@ -20,7 +20,7 @@ class SeedDMS_Version { - public $_number = "5.1.0"; + public $_number = "5.1.1"; private $_string = "SeedDMS"; function __construct() { diff --git a/install/install.php b/install/install.php index 77efd3b42..71739eeee 100644 --- a/install/install.php +++ b/install/install.php @@ -123,7 +123,7 @@ function fileExistsInIncludePath($file) { /* {{{ */ * Load default settings + set */ define("SEEDDMS_INSTALL", "on"); -define("SEEDDMS_VERSION", "5.1.0"); +define("SEEDDMS_VERSION", "5.1.1"); require_once('../inc/inc.ClassSettings.php'); From 35071d40bc8ce10d376e51e64e239c8b3008107d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Feb 2017 07:04:29 +0100 Subject: [PATCH 049/194] fix check for existing tables for pgsql --- install/install.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/install/install.php b/install/install.php index 71739eeee..451ed5515 100644 --- a/install/install.php +++ b/install/install.php @@ -345,7 +345,18 @@ if ($action=="setSettings") { $needsupdate = false; $connTmp =openDBConnection($settings); if ($connTmp) { - $res = $connTmp->query('select * from tblVersion'); + switch($settings->_dbDriver) { + case 'mysql': + case 'mysqli': + case 'mysqlnd': + case 'sqlite': + $sql = 'select * from `tblVersion`'; + break; + case 'pgsql': + $sql = 'select * from "tblVersion"'; + break; + } + $res = $connTmp->query($sql); if($res) { if($rec = $res->fetch(PDO::FETCH_ASSOC)) { $updatedirs = array(); From 742d91cc68fb49e45841206cd9ef0d33a61b9192 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Feb 2017 07:39:39 +0100 Subject: [PATCH 050/194] add postgresql support --- inc/inc.ClassSettings.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 9c6293d53..810ab19b1 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -1223,6 +1223,7 @@ class Settings { /* {{{ */ case 'mysql': case 'mysqli': case 'mysqlnd': + case 'pgsql': $tmp = explode(":", $this->_dbHostname); $dsn = $this->_dbDriver.":dbname=".$this->_dbDatabase.";host=".$tmp[0]; if(!empty($tmp[1])) @@ -1236,7 +1237,7 @@ class Settings { /* {{{ */ "status" => "notfound", "type" => "error", "currentvalue" => $this->_dbDriver, - "suggestionvalue" => "mysql|sqlite" + "suggestionvalue" => "mysql|sqlite|pgsql" ); } if($dsn) { From 3635b92edbbdfc12ff9f999187f5df377095ede5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Feb 2017 08:00:45 +0100 Subject: [PATCH 051/194] fix sql for add user when pwdexpiration has a date --- SeedDMS_Core/Core/inc.ClassDMS.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 5ddf1e52d..d6ca9b833 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -1300,10 +1300,12 @@ class SeedDMS_Core_DMS { $role = '0'; if(trim($pwdexpiration) == '' || trim($pwdexpiration) == 'never') { $pwdexpiration = 'NULL'; - } elseif(trim($pwdexpiration) == 'now') + } elseif(trim($pwdexpiration) == 'now') { $pwdexpiration = $db->qstr(date('Y-m-d H:i:s')); + } else { + $pwdexpiration = $db->qstr($pwdexpiration); + } $queryStr = "INSERT INTO `tblUsers` (`login`, `pwd`, `fullName`, `email`, `language`, `theme`, `comment`, `role`, `hidden`, `disabled`, `pwdExpiration`, `quota`, `homefolder`) VALUES (".$db->qstr($login).", ".$db->qstr($pwd).", ".$db->qstr($fullName).", ".$db->qstr($email).", '".$language."', '".$theme."', ".$db->qstr($comment).", '".intval($role)."', '".intval($isHidden)."', '".intval($isDisabled)."', ".$pwdexpiration.", '".intval($quota)."', ".($homefolder ? intval($homefolder) : "NULL").")"; - echo $queryStr; $res = $this->db->getResult($queryStr); if (!$res) return false; From 65529c68b86a87f86b47a36690bd23e7f57d81d3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 1 Mar 2017 17:18:29 +0100 Subject: [PATCH 052/194] add entry to 5.1.1 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 973243993..8a6964395 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ -------------------------------------------------------------------------------- Changes in version 5.1.1 -------------------------------------------------------------------------------- +- fix initial creation of postgres database -------------------------------------------------------------------------------- Changes in version 5.1.0 From 99f0503a6592ac6c62241629862570abb90818a2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 9 Mar 2017 07:14:54 +0100 Subject: [PATCH 053/194] use upper case for sql reservered words --- install/update-5.1.0/update.sql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install/update-5.1.0/update.sql b/install/update-5.1.0/update.sql index a8e566270..cb69d9f52 100644 --- a/install/update-5.1.0/update.sql +++ b/install/update-5.1.0/update.sql @@ -1,16 +1,16 @@ START TRANSACTION; -ALTER TABLE `tblDocumentContent` CHANGE `mimeType` `mimeType` varchar(100) NOT NULL default ''; +ALTER TABLE `tblDocumentContent` CHANGE `mimeType` `mimeType` varchar(100) NOT NULL DEFAULT ''; -ALTER TABLE `tblDocumentFiles` CHANGE `mimeType` `mimeType` varchar(100) NOT NULL default ''; +ALTER TABLE `tblDocumentFiles` CHANGE `mimeType` `mimeType` varchar(100) NOT NULL DEFAULT ''; -ALTER TABLE `tblUserImages` CHANGE `mimeType` `mimeType` varchar(100) NOT NULL default ''; +ALTER TABLE `tblUserImages` CHANGE `mimeType` `mimeType` varchar(100) NOT NULL DEFAULT ''; -ALTER TABLE `tblDocumentFiles` ADD COLUMN `public` tinyint(1) NOT NULL default '0' AFTER `document`; +ALTER TABLE `tblDocumentFiles` ADD COLUMN `public` tinyint(1) NOT NULL DEFAULT '0' AFTER `document`; -ALTER TABLE `tblDocumentFiles` ADD COLUMN `version` smallint(5) unsigned NOT NULL default '0' AFTER `document`; +ALTER TABLE `tblDocumentFiles` ADD COLUMN `version` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `document`; -ALTER TABLE `tblUsers` CHANGE `pwdExpiration` `pwdExpiration` datetime default NULL; +ALTER TABLE `tblUsers` CHANGE `pwdExpiration` `pwdExpiration` datetime DEFAULT NULL; ALTER TABLE `tblUserPasswordRequest` CHANGE `date` `date` datetime NOT NULL; From 3b00db6058f28427b45fc1110c5116eb91ca4634 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 9 Mar 2017 07:15:27 +0100 Subject: [PATCH 054/194] add missing files to tblDocumentFiles --- install/update-5.1.0/update-sqlite3.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install/update-5.1.0/update-sqlite3.sql b/install/update-5.1.0/update-sqlite3.sql index c1b915a18..0cdfe14fe 100644 --- a/install/update-5.1.0/update-sqlite3.sql +++ b/install/update-5.1.0/update-sqlite3.sql @@ -59,6 +59,10 @@ CREATE TABLE `tblDocumentFiles` ( INSERT INTO `tblDocumentFiles` SELECT * FROM `__tblDocumentFiles`; +ALTER TABLE `tblDocumentFiles` ADD COLUMN `version` INTEGER unsigned NOT NULL DEFAULT '0'; + +ALTER TABLE `tblDocumentFiles` ADD COLUMN `public` INTEGER unsigned NOT NULL DEFAULT '0'; + ALTER TABLE `tblUsers` RENAME TO `__tblUsers`; CREATE TABLE `tblUsers` ( From 62e1a02ae7ee032e02456d03b7d919d7ca2173fa Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 9 Mar 2017 07:57:39 +0100 Subject: [PATCH 055/194] use version and public field from document files --- utils/xmlimport.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/xmlimport.php b/utils/xmlimport.php index f6513b29f..13c025dba 100644 --- a/utils/xmlimport.php +++ b/utils/xmlimport.php @@ -772,6 +772,8 @@ function insert_document($document) { /* {{{ */ $file['attributes']['orgfilename'], $file['attributes']['filetype'], $file['attributes']['mimetype'] + $file['attributes']['version'] + $file['attributes']['public'] ); unlink($filename); } From cae24d3d222419359c6e37fa573a1365b5b6aebf Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 9 Mar 2017 09:34:16 +0100 Subject: [PATCH 056/194] fix syntax error --- utils/xmlimport.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/xmlimport.php b/utils/xmlimport.php index 13c025dba..703782300 100644 --- a/utils/xmlimport.php +++ b/utils/xmlimport.php @@ -771,8 +771,8 @@ function insert_document($document) { /* {{{ */ $filename, $file['attributes']['orgfilename'], $file['attributes']['filetype'], - $file['attributes']['mimetype'] - $file['attributes']['version'] + $file['attributes']['mimetype'], + $file['attributes']['version'], $file['attributes']['public'] ); unlink($filename); From 51942e2b548fda387aec53e94ba6b62140585a85 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 9 Mar 2017 10:22:38 +0100 Subject: [PATCH 057/194] fix typo in attribute name --- utils/xmldump.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/xmldump.php b/utils/xmldump.php index 77119b276..192c85cae 100644 --- a/utils/xmldump.php +++ b/utils/xmldump.php @@ -413,7 +413,7 @@ function tree($folder, $parent=null, $indent='', $skipcurrent=false) { /* {{{ */ echo $indent." ".date('Y-m-d H:i:s', $file->getDate())."\n"; echo $indent." ".wrapWithCData($file->getFileType())."\n"; echo $indent." ".$file->getVersion()."\n"; - echo $indent." ".($file->isPublic() ? 1 : 0)."\n"; + echo $indent." ".($file->isPublic() ? 1 : 0)."\n"; echo $indent." ".$owner->getId()."\n"; echo $indent." ".wrapWithCData($file->getComment())."\n"; echo $indent." ".wrapWithCData($file->getOriginalFileName())."\n"; From d61e77cd35ddab0baa22622284115aa9fb923f94 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 10 Mar 2017 09:27:50 +0100 Subject: [PATCH 058/194] recipient in toIndividual() can be a string --- inc/inc.ClassEmailNotify.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/inc/inc.ClassEmailNotify.php b/inc/inc.ClassEmailNotify.php index fff88fa7d..2102be469 100644 --- a/inc/inc.ClassEmailNotify.php +++ b/inc/inc.ClassEmailNotify.php @@ -69,10 +69,14 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { * @return false or -1 in case of error, otherwise true */ function toIndividual($sender, $recipient, $subject, $message, $params=array()) { /* {{{ */ - if ($recipient->isDisabled() || $recipient->getEmail()=="") return 0; - - if(!is_object($recipient) || strcasecmp(get_class($recipient), $this->_dms->getClassname('user'))) { - return -1; + if(is_object($recipient) && !strcasecmp(get_class($recipient), $this->_dms->getClassname('user')) && !$recipient->isDisabled() && $recipient->getEmail()!="") { + $to = $recipient->getEmail(); + $lang = $recipient->getLanguage(); + } elseif(is_string($recipient) && trim($recipient) != "") { + $to = $recipient; + $lang = 'en_GB'; + } else { + return false; } if(is_object($sender) && !strcasecmp(get_class($sender), $this->_dms->getClassname('user'))) { @@ -83,14 +87,13 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { $from = $this->from_address; } - $lang = $recipient->getLanguage(); $message = getMLText("email_header", array(), "", $lang)."\r\n\r\n".getMLText($message, $params, "", $lang); $message .= "\r\n\r\n".getMLText("email_footer", array(), "", $lang); $headers = array (); $headers['From'] = $from; - $headers['To'] = $recipient->getEmail(); + $headers['To'] = $to; $preferences = array("input-charset" => "UTF-8", "output-charset" => "UTF-8"); $encoded_subject = iconv_mime_encode("Subject", getMLText($subject, $params, "", $lang), $preferences); $headers['Subject'] = substr($encoded_subject, strlen('Subject: ')); @@ -113,7 +116,7 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { $mail = Mail::factory('mail', $mail_params); } - $result = $mail->send($recipient->getEmail(), $headers, $message); + $result = $mail->send($to, $headers, $message); if (PEAR::isError($result)) { return false; } else { From 023738812b2e6b4b6431770eea75bef9addec2cc Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 10 Mar 2017 09:28:16 +0100 Subject: [PATCH 059/194] call hook 'startPage' --- views/bootstrap/class.Bootstrap.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 3b1b33f75..1fc771a46 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -64,6 +64,12 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common { header($csp . ": " . $csp_rules); } } + $hookObjs = $this->getHookObjects('SeedDMS_View_Bootstrap'); + foreach($hookObjs as $hookObj) { + if (method_exists($hookObj, 'startPage')) { + $hookObj->startPage($this); + } + } echo "\n"; echo "\n\n"; echo "\n"; From 15e0e56bb18a1296ef5cd8b5ee785f5e664b3069 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 10 Mar 2017 11:33:13 +0100 Subject: [PATCH 060/194] add method documentListItem() --- views/bootstrap/class.Bootstrap.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 1fc771a46..702253bc6 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -129,7 +129,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; if(!$nofooter) { $this->footNote(); if($this->params['showmissingtranslations']) { - $this->missingḺanguageKeys(); + $this->missingLanguageKeys(); } } echo ''."\n"; @@ -172,7 +172,22 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } } /* }}} */ - function missingḺanguageKeys() { /* {{{ */ + function documentListItem() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $previewwidth = $this->params['previewWidthList']; + $cachedir = $this->params['cachedir']; + $document = $dms->getDocument($_GET['id']); + if($document) { + if ($document->getAccessMode($user) >= M_READ) { + $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth); + $content = $this->documentListRow($document, $previewer, true); + echo $content; + } + } + } /* }}} */ + + function missingLanguageKeys() { /* {{{ */ global $MISSING_LANG, $LANG; if($MISSING_LANG) { echo '
    '."\n"; From 141a55621b171ad393093bee416d49323352ad21 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 10 Mar 2017 20:05:15 +0100 Subject: [PATCH 061/194] put function for printing clipboard into own class --- out/out.Clipboard.php | 42 +++++++ views/bootstrap/class.Clipboard.php | 166 ++++++++++++++++++++++++++++ 2 files changed, 208 insertions(+) create mode 100644 out/out.Clipboard.php create mode 100644 views/bootstrap/class.Clipboard.php diff --git a/out/out.Clipboard.php b/out/out.Clipboard.php new file mode 100644 index 000000000..45c2e21fa --- /dev/null +++ b/out/out.Clipboard.php @@ -0,0 +1,42 @@ +$dms, 'user'=>$user)); + +if($view) { + $view->setParam('previewWidthList', $settings->_previewWidthList); + $view->setParam('timeout', $settings->_cmdTimeout); + $view($_GET); + exit; +} + +?> diff --git a/views/bootstrap/class.Clipboard.php b/views/bootstrap/class.Clipboard.php new file mode 100644 index 000000000..76933b8e2 --- /dev/null +++ b/views/bootstrap/class.Clipboard.php @@ -0,0 +1,166 @@ + + * @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"); + +/** + * Include class to preview documents + */ +require_once("SeedDMS/Preview.php"); + +/** + * Class which outputs the html page for clipboard 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_Clipboard extends SeedDMS_Bootstrap_Style { + /** + * Returns the html needed for the clipboard list in the menu + * + * This function renders the clipboard in a way suitable to be + * used as a menu + * + * @param array $clipboard clipboard containing two arrays for both + * documents and folders. + * @return string html code + */ + public function menuClipboard() { /* {{{ */ + $clipboard = $this->params['session']->getClipboard(); + if ($this->params['user']->isGuest() || (count($clipboard['docs']) + count($clipboard['folders'])) == 0) { + return ''; + } + $content = ''; + $content .= " \n"; + echo $content; + } /* }}} */ + + /** + * Return clipboard content rendered as html + * + * @param array clipboard + * @return string rendered html content + */ + public function mainClipboard() { /* {{{ */ + $dms = $this->params['dms']; + $clipboard = $this->params['session']->getClipboard(); + $cachedir = $this->params['cachedir']; + $previewwidth = $this->params['previewWidthList']; + $timeout = $this->params['timeout']; + + $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); + $content = ''; + $foldercount = $doccount = 0; + if($clipboard['folders']) { + foreach($clipboard['folders'] as $folderid) { + /* FIXME: check for access rights, which could have changed after adding the folder to the clipboard */ + if($folder = $dms->getFolder($folderid)) { + $comment = $folder->getComment(); + if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "..."; + $content .= "getID()."\" class=\"folder table-row-folder\" formtoken=\"".createFormKey('movefolder')."\">"; + $content .= "getID()."&showtree=".showtree()."\">imgpath."folder.png\" width=\"24\" height=\"24\" border=0>\n"; + $content .= "getID()."&showtree=".showtree()."\">" . htmlspecialchars($folder->getName()) . ""; + if($comment) { + $content .= "
    ".htmlspecialchars($comment).""; + } + $content .= "\n"; + $content .= "\n"; + $content .= ""; + $content .= "\n"; + $content .= "\n"; + $foldercount++; + } + } + } + if($clipboard['docs']) { + foreach($clipboard['docs'] as $docid) { + /* FIXME: check for access rights, which could have changed after adding the document to the clipboard */ + if($document = $dms->getDocument($docid)) { + $comment = $document->getComment(); + if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "..."; + if($latestContent = $document->getLatestContent()) { + $previewer->createPreview($latestContent); + $version = $latestContent->getVersion(); + $status = $latestContent->getStatus(); + + $content .= ""; + + if (file_exists($dms->contentDir . $latestContent->getPath())) { + $content .= ""; + if($previewer->hasPreview($latestContent)) { + $content .= "getID()."&version=".$latestContent->getVersion()."&width=40\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } else { + $content .= "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } + $content .= ""; + } else + $content .= "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + + $content .= "" . htmlspecialchars($document->getName()) . ""; + if($comment) { + $content .= "
    ".htmlspecialchars($comment).""; + } + $content .= "\n"; + $content .= "\n"; + $content .= ""; + $content .= "\n"; + $content .= ""; + $doccount++; + } + } + } + } + + /* $foldercount or $doccount will only count objects which are + * actually available + */ + if($foldercount || $doccount) { + $content = "".$content; + $content .= "
    "; + } else { + } + $content .= "
    ".getMLText("drag_icon_here")."
    "; + echo $content; + } /* }}} */ + +} From ae33edbcdceb5412af7897a6f332ce8f1d766c2b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 10 Mar 2017 20:08:01 +0100 Subject: [PATCH 062/194] put documentListItem from Bootstrap base class in ViewDocument --- views/bootstrap/class.ViewDocument.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 281180ab3..365303b54 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -121,6 +121,25 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { params['dms']; + $user = $this->params['user']; + $previewwidth = $this->params['previewWidthList']; + $cachedir = $this->params['cachedir']; + $document = $this->params['document']; + if($document) { + if ($document->getAccessMode($user) >= M_READ) { + $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth); + $txt = $this->callHook('documentListItem', $document, $previewer, false, ''); + if(is_string($txt)) + $content = $txt; + else + $content = $this->documentListRow($document, $previewer, true); + echo $content; + } + } + } /* }}} */ + function timelinedata() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; From 479ee94fd826059fed98fab8e6bde41ca7aaa810 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 10 Mar 2017 20:08:32 +0100 Subject: [PATCH 063/194] take out command 'view', is now covered by view classes --- op/op.Ajax.php | 35 --------------------------------- styles/bootstrap/application.js | 27 ++++++++++++++++--------- 2 files changed, 18 insertions(+), 44 deletions(-) diff --git a/op/op.Ajax.php b/op/op.Ajax.php index d25efbb3f..9518c7f7f 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -489,41 +489,6 @@ switch($command) { } break; /* }}} */ - case 'view': /* {{{ */ - require_once("SeedDMS/Preview.php"); - $view = UI::factory($theme, '', array('dms'=>$dms, 'user'=>$user)); - if($view) { - $view->setParam('refferer', ''); - $view->setParam('cachedir', $settings->_cacheDir); - } - $content = ''; - $viewname = $_REQUEST["view"]; - switch($viewname) { - case 'menuclipboard': - $content = $view->menuClipboard($session->getClipboard()); - break; - case 'mainclipboard': - $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir, $settings->_previewWidthList); - $content = $view->mainClipboard($session->getClipboard(), $previewer); - break; - case 'documentlistrow': - $document = $dms->getDocument($_REQUEST['id']); - if($document) { - if ($document->getAccessMode($user) >= M_READ) { - $previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir, $settings->_previewWidthList); - $view->setParam('previewWidthList', $settings->_previewWidthList); - $view->setParam('showtree', showtree()); - $content = $view->documentListRow($document, $previewer, true); - } - } - break; - default: - $content = ''; - } - echo $content; - - break; /* }}} */ - case 'uploaddocument': /* {{{ */ if($user) { if(checkFormKey('adddocument')) { diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index 731782192..269b72217 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -165,8 +165,10 @@ $(document).ready( function() { { command: 'addtoclipboard', type: type, id: id }, function(data) { if(data.success) { - $("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard') - $("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard') +// $("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard') + $("#main-clipboard").html('Loading').load('../out/out.Clipboard.php?action=mainclipboard') + //$("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard') + $("#menu-clipboard").html('Loading').load('../out/out.Clipboard.php?action=menuclipboard') noty({ text: attr_msg, type: 'success', @@ -200,8 +202,10 @@ $(document).ready( function() { { command: 'removefromclipboard', type: type, id: id }, function(data) { if(data.success) { - $("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard') - $("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard') +// $("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard') + $("#main-clipboard").html('Loading').load('../out/out.Clipboard.php?action=mainclipboard') + //$("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard') + $("#menu-clipboard").html('Loading').load('../out/out.Clipboard.php?action=menuclipboard') noty({ text: attr_msg, type: 'success', @@ -234,7 +238,8 @@ $(document).ready( function() { { command: 'tooglelockdocument', id: id }, function(data) { if(data.success) { - $("#table-row-document-"+id).html('Loading').load('../op/op.Ajax.php?command=view&view=documentlistrow&id='+id) + //$("#table-row-document-"+id).html('Loading').load('../op/op.Ajax.php?command=view&view=documentlistrow&id='+id) + $("#table-row-document-"+id).html('Loading').load('../out/out.ViewDocument.php?action=documentlistitem&documentid='+id) noty({ text: attr_msg, type: 'success', @@ -450,8 +455,10 @@ $(document).ready( function() { success: function(data){ if(data.success) { if(element.data('param1') == 'command=clearclipboard') { - $("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard') - $("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard') +// $("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard') + $("#main-clipboard").html('Loading').load('../out/out.Clipboard.php?action=mainclipboard') + //$("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard') + $("#menu-clipboard").html('Loading').load('../out/out.Clipboard.php?action=menuclipboard') } noty({ text: data.message, @@ -493,8 +500,10 @@ function onAddClipboard(ev) { /* {{{ */ { command: 'addtoclipboard', type: source_type, id: source_id }, function(data) { if(data.success) { - $("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard') - $("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard') +// $("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard') + $("#main-clipboard").html('Loading').load('../out/out.Clipboard.php?action=mainclipboard') + //$("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard') + $("#menu-clipboard").html('Loading').load('../out/out.Clipboard.php?action=menuclipboard') noty({ text: data.message, type: 'success', From 5af8ab01c05a90f85f67c05d5bbca40c7d555727 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 10 Mar 2017 20:09:08 +0100 Subject: [PATCH 064/194] put documentListItem, menuClipboard and mainClipboard into own view --- views/bootstrap/class.Bootstrap.php | 142 +--------------------------- 1 file changed, 4 insertions(+), 138 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 702253bc6..e55045362 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -172,21 +172,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } } /* }}} */ - function documentListItem() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $previewwidth = $this->params['previewWidthList']; - $cachedir = $this->params['cachedir']; - $document = $dms->getDocument($_GET['id']); - if($document) { - if ($document->getAccessMode($user) >= M_READ) { - $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth); - $content = $this->documentListRow($document, $previewer, true); - echo $content; - } - } - } /* }}} */ - function missingLanguageKeys() { /* {{{ */ global $MISSING_LANG, $LANG; if($MISSING_LANG) { @@ -247,45 +232,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo "
    \n"; } /* }}} */ - /** - * Returns the html needed for the clipboard list in the menu - * - * This function renders the clipboard in a way suitable to be - * used as a menu - * - * @param array $clipboard clipboard containing two arrays for both - * documents and folders. - * @return string html code - */ - function menuClipboard($clipboard) { /* {{{ */ - if ($this->params['user']->isGuest() || (count($clipboard['docs']) + count($clipboard['folders'])) == 0) { - return ''; - } - $content = ''; - $content .= " \n"; - return $content; - } /* }}} */ - function globalNavigation($folder=null) { /* {{{ */ $dms = $this->params['dms']; echo "
    \n"; @@ -355,7 +301,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; if($this->params['enableclipboard']) { echo "
    "; - echo $this->menuClipboard($this->params['session']->getClipboard()); + echo "
    "; echo "
    "; } @@ -1513,88 +1459,6 @@ $(function() { } } /* }}} */ - /** - * Return clipboard content rendered as html - * - * @param array clipboard - * @return string rendered html content - */ - function mainClipboard($clipboard, $previewer){ /* {{{ */ - $dms = $this->params['dms']; - $content = ''; - $foldercount = $doccount = 0; - if($clipboard['folders']) { - foreach($clipboard['folders'] as $folderid) { - /* FIXME: check for access rights, which could have changed after adding the folder to the clipboard */ - if($folder = $dms->getFolder($folderid)) { - $comment = $folder->getComment(); - if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "..."; - $content .= "getID()."\" class=\"folder table-row-folder\" formtoken=\"".createFormKey('movefolder')."\">"; - $content .= "getID()."&showtree=".showtree()."\">imgpath."folder.png\" width=\"24\" height=\"24\" border=0>\n"; - $content .= "getID()."&showtree=".showtree()."\">" . htmlspecialchars($folder->getName()) . ""; - if($comment) { - $content .= "
    ".htmlspecialchars($comment).""; - } - $content .= "\n"; - $content .= "\n"; - $content .= ""; - $content .= "\n"; - $content .= "\n"; - $foldercount++; - } - } - } - if($clipboard['docs']) { - foreach($clipboard['docs'] as $docid) { - /* FIXME: check for access rights, which could have changed after adding the document to the clipboard */ - if($document = $dms->getDocument($docid)) { - $comment = $document->getComment(); - if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "..."; - if($latestContent = $document->getLatestContent()) { - $previewer->createPreview($latestContent); - $version = $latestContent->getVersion(); - $status = $latestContent->getStatus(); - - $content .= ""; - - if (file_exists($dms->contentDir . $latestContent->getPath())) { - $content .= ""; - if($previewer->hasPreview($latestContent)) { - $content .= "getID()."&version=".$latestContent->getVersion()."&width=40\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } else { - $content .= "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - } - $content .= ""; - } else - $content .= "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; - - $content .= "" . htmlspecialchars($document->getName()) . ""; - if($comment) { - $content .= "
    ".htmlspecialchars($comment).""; - } - $content .= "\n"; - $content .= "\n"; - $content .= ""; - $content .= "\n"; - $content .= ""; - $doccount++; - } - } - } - } - - /* $foldercount or $doccount will only count objects which are - * actually available - */ - if($foldercount || $doccount) { - $content = "".$content; - $content .= "
    "; - } else { - } - $content .= "
    ".getMLText("drag_icon_here")."
    "; - return $content; - } /* }}} */ - /** * Print clipboard in div container * @@ -1603,7 +1467,9 @@ $(function() { function printClipboard($clipboard, $previewer){ /* {{{ */ $this->contentHeading(getMLText("clipboard"), true); echo "
    \n"; - echo $this->mainClipboard($clipboard, $previewer); +?> +
    +\n"; } /* }}} */ From ef2043b9bb826bdd2dcf1c1fe68aa3acf58d46f3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 15 Mar 2017 21:54:42 +0100 Subject: [PATCH 065/194] skip container in documentListItem --- 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 67afb5634..eb5d72b14 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -130,7 +130,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if($document) { if ($document->getAccessMode($user) >= M_READ) { $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth); - $txt = $this->callHook('documentListItem', $document, $previewer, false, ''); + $txt = $this->callHook('documentListItem', $document, $previewer, true, ''); if(is_string($txt)) $content = $txt; else From e6ac6eba55f347407a0d03a6dfa0cf66be9faaa1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 18 Mar 2017 19:01:41 +0100 Subject: [PATCH 066/194] add startBody() hook --- views/bootstrap/class.Bootstrap.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 43bd5dfc8..d1cec82e0 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -119,6 +119,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $this->params['session']->clearSplashMsg(); echo "
    ".$flashmsg['msg']."
    \n"; } + foreach($hookObjs as $hookObj) { + if (method_exists($hookObj, 'startBody')) { + $hookObj->startBody($this); + } + } } /* }}} */ function htmlAddHeader($head, $type='js') { /* {{{ */ From e67065040377b917a7ababd353a683e0e04bc7da Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 20 Mar 2017 15:10:40 +0100 Subject: [PATCH 067/194] add entry for 5.1.1 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 857386946..a596bd093 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Changes in version 5.1.1 -------------------------------------------------------------------------------- - fix initial creation of postgres database +- merged changes from 5.0.11 -------------------------------------------------------------------------------- Changes in version 5.1.0 From ca9b3cb2458ed697183806eb26a2b6709460edc2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 21 Mar 2017 11:35:39 +0100 Subject: [PATCH 068/194] no need to check for password, but check for ip, guest login and disabled accounts (Closes #250) --- webdav/webdav.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/webdav/webdav.php b/webdav/webdav.php index dd58d7868..e2ebd9790 100644 --- a/webdav/webdav.php +++ b/webdav/webdav.php @@ -138,7 +138,14 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server if(!$userobj) return false; - if(md5($pass) != $userobj->getPwd()) + + if(($userobj->getID() == $settings->_guestID) && (!$settings->_enableGuestLogin)) + return false; + + if($userobj->isDisabled()) + return false; + + if($userobj->isAdmin() && ($_SERVER['REMOTE_ADDR'] != $settings->_adminIP ) && ( $settings->_adminIP != "")) return false; $this->user = $userobj; From fd6055d57723b9815b74bca4e0634cdd2929bb06 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 21 Mar 2017 11:36:36 +0100 Subject: [PATCH 069/194] start new version 4.3.35 --- CHANGELOG | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index a0a22f313..ca2f1cad3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +-------------------------------------------------------------------------------- + Changes in version 4.3.35 +-------------------------------------------------------------------------------- +- fix authentication in webdav.php (Closes #250) + -------------------------------------------------------------------------------- Changes in version 4.3.34 -------------------------------------------------------------------------------- From 509921d6d87ea1d978257a76a81e7f05312e7e64 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 22 Mar 2017 20:53:25 +0100 Subject: [PATCH 070/194] remove duplicate adding of new fields --- install/update-5.1.0/update-sqlite3.sql | 4 ---- 1 file changed, 4 deletions(-) diff --git a/install/update-5.1.0/update-sqlite3.sql b/install/update-5.1.0/update-sqlite3.sql index 0cdfe14fe..81c46c033 100644 --- a/install/update-5.1.0/update-sqlite3.sql +++ b/install/update-5.1.0/update-sqlite3.sql @@ -175,10 +175,6 @@ CREATE TABLE `tblWorkflowDocumentContent` ( INSERT INTO `tblWorkflowDocumentContent` SELECT * FROM `__tblWorkflowDocumentContent`; -ALTER TABLE `tblDocumentFiles` ADD COLUMN `public` INTEGER NOT NULL default '0'; - -ALTER TABLE `tblDocumentFiles` ADD COLUMN `version` INTEGER NOT NULL default '0'; - UPDATE tblVersion set major=5, minor=1, subminor=0; COMMIT; From a799e091fb84315c762a9ae43aec57db51abe67c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Mar 2017 08:29:43 +0100 Subject: [PATCH 071/194] drop tables which has been created temporarily if they are not droped, there foreign key constraints are still effective --- install/update-5.1.0/update-sqlite3.sql | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/install/update-5.1.0/update-sqlite3.sql b/install/update-5.1.0/update-sqlite3.sql index 81c46c033..ac2c192a7 100644 --- a/install/update-5.1.0/update-sqlite3.sql +++ b/install/update-5.1.0/update-sqlite3.sql @@ -11,6 +11,8 @@ CREATE TABLE `tblVersion` ( INSERT INTO `tblVersion` SELECT * FROM `__tblVersion`; +DROP TABLE `__tblVersion`; + ALTER TABLE `tblUserImages` RENAME TO `__tblUserImages`; CREATE TABLE `tblUserImages` ( @@ -22,6 +24,8 @@ CREATE TABLE `tblUserImages` ( INSERT INTO `tblUserImages` SELECT * FROM `__tblUserImages`; +DROP TABLE `__tblUserImages`; + ALTER TABLE `tblDocumentContent` RENAME TO `__tblDocumentContent`; CREATE TABLE `tblDocumentContent` ( @@ -42,6 +46,8 @@ CREATE TABLE `tblDocumentContent` ( INSERT INTO `tblDocumentContent` SELECT * FROM `__tblDocumentContent`; +DROP TABLE `__tblDocumentContent`; + ALTER TABLE `tblDocumentFiles` RENAME TO `__tblDocumentFiles`; CREATE TABLE `tblDocumentFiles` ( @@ -59,6 +65,8 @@ CREATE TABLE `tblDocumentFiles` ( INSERT INTO `tblDocumentFiles` SELECT * FROM `__tblDocumentFiles`; +DROP TABLE `__tblDocumentFiles`; + ALTER TABLE `tblDocumentFiles` ADD COLUMN `version` INTEGER unsigned NOT NULL DEFAULT '0'; ALTER TABLE `tblDocumentFiles` ADD COLUMN `public` INTEGER unsigned NOT NULL DEFAULT '0'; @@ -86,6 +94,8 @@ CREATE TABLE `tblUsers` ( INSERT INTO `tblUsers` SELECT * FROM `__tblUsers`; +DROP TABLE `__tblUsers`; + ALTER TABLE `tblUserPasswordRequest` RENAME TO `__tblUserPasswordRequest`; CREATE TABLE `tblUserPasswordRequest` ( @@ -97,6 +107,8 @@ CREATE TABLE `tblUserPasswordRequest` ( INSERT INTO `tblUserPasswordRequest` SELECT * FROM `__tblUserPasswordRequest`; +DROP TABLE `__tblUserPasswordRequest`; + ALTER TABLE `tblUserPasswordHistory` RENAME TO `__tblUserPasswordHistory`; CREATE TABLE `tblUserPasswordHistory` ( @@ -108,6 +120,8 @@ CREATE TABLE `tblUserPasswordHistory` ( INSERT INTO `tblUserPasswordHistory` SELECT * FROM `__tblUserPasswordHistory`; +DROP TABLE `__tblUserPasswordHistory`; + ALTER TABLE `tblDocumentReviewLog` RENAME TO `__tblDocumentReviewLog`; CREATE TABLE `tblDocumentReviewLog` ( @@ -121,6 +135,8 @@ CREATE TABLE `tblDocumentReviewLog` ( INSERT INTO `tblDocumentReviewLog` SELECT * FROM `__tblDocumentReviewLog`; +DROP TABLE `__tblDocumentReviewLog`; + ALTER TABLE `tblDocumentStatusLog` RENAME TO `__tblDocumentStatusLog`; CREATE TABLE `tblDocumentStatusLog` ( @@ -134,6 +150,8 @@ CREATE TABLE `tblDocumentStatusLog` ( INSERT INTO `tblDocumentStatusLog` SELECT * FROM `__tblDocumentStatusLog`; +DROP TABLE `__tblDocumentStatusLog`; + ALTER TABLE `tblDocumentApproveLog` RENAME TO `__tblDocumentApproveLog`; CREATE TABLE `tblDocumentApproveLog` ( @@ -147,6 +165,8 @@ CREATE TABLE `tblDocumentApproveLog` ( INSERT INTO `tblDocumentApproveLog` SELECT * FROM `__tblDocumentApproveLog`; +DROP TABLE `__tblDocumentApproveLog`; + ALTER TABLE `tblWorkflowLog` RENAME TO `__tblWorkflowLog`; CREATE TABLE `tblWorkflowLog` ( @@ -162,6 +182,8 @@ CREATE TABLE `tblWorkflowLog` ( INSERT INTO `tblWorkflowLog` SELECT * FROM `__tblWorkflowLog`; +DROP TABLE `__tblWorkflowLog`; + ALTER TABLE `tblWorkflowDocumentContent` RENAME TO `__tblWorkflowDocumentContent`; CREATE TABLE `tblWorkflowDocumentContent` ( @@ -175,6 +197,8 @@ CREATE TABLE `tblWorkflowDocumentContent` ( INSERT INTO `tblWorkflowDocumentContent` SELECT * FROM `__tblWorkflowDocumentContent`; +DROP TABLE `__tblWorkflowDocumentContent`; + UPDATE tblVersion set major=5, minor=1, subminor=0; COMMIT; From 6bb6662de414650344b8b827be56b3458963c32f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Mar 2017 15:39:18 +0100 Subject: [PATCH 072/194] start new version 4.3.35 --- Makefile | 2 +- SeedDMS_Core/Core/inc.ClassDMS.php | 2 +- SeedDMS_Core/Core/inc.DBAccessPDO.php | 8 ++++---- SeedDMS_Core/package.xml | 23 +++++++++++++++++++---- inc/inc.Version.php | 2 +- install/install.php | 2 +- 6 files changed, 27 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 1870d74a9..66711f42a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION=4.3.34 +VERSION=4.3.35 SRC=CHANGELOG inc conf utils index.php languages views op out doc styles LICENSE webdav install restapi pdfviewer # webapp diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 957d5c868..37215e77b 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -307,7 +307,7 @@ class SeedDMS_Core_DMS { $this->callbacks = array(); $this->version = '@package_version@'; if($this->version[0] == '@') - $this->version = '4.3.34'; + $this->version = '4.3.35'; } /* }}} */ /** diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index 1b71bcd9b..ae271e46c 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -38,7 +38,7 @@ class SeedDMS_Core_DatabaseAccess { protected $_hostname; /** - * @var int port number of database + * @var int port number of database */ protected $_port; @@ -91,7 +91,7 @@ class SeedDMS_Core_DatabaseAccess { * @var boolean set to true if in a database transaction */ private $_intransaction; - + /** * Return list of all database tables * @@ -233,7 +233,7 @@ class SeedDMS_Core_DatabaseAccess { */ function getResultArray($queryStr) { /* {{{ */ $resArr = array(); - + $res = $this->_conn->query($queryStr); if ($res === false) { if($this->_debug) @@ -263,7 +263,7 @@ class SeedDMS_Core_DatabaseAccess { return false; } else return true; - + return $res; } /* }}} */ diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 5d8181ce2..de00b956c 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -12,11 +12,11 @@ uwe@steinmann.cx yes - 2017-02-28 + 2017-03-22 - 4.3.34 - 4.3.34 + 4.3.35 + 4.3.35 stable @@ -24,7 +24,6 @@ GPL License -SeedDMS_Core_DMS::getDuplicateDocumentContent() returns complete document @@ -1125,5 +1124,21 @@ SeedDMS_Core_DMS::getNotificationsByUser() are deprecated - SeedDMЅ_Core_User::setFullname() minor fix in sql statement + + 2017-02-28 + + + 4.3.34 + 4.3.34 + + + stable + stable + + GPL License + +SeedDMS_Core_DMS::getDuplicateDocumentContent() returns complete document + + diff --git a/inc/inc.Version.php b/inc/inc.Version.php index 472cb634c..61bf92141 100644 --- a/inc/inc.Version.php +++ b/inc/inc.Version.php @@ -20,7 +20,7 @@ class SeedDMS_Version { - public $_number = "4.3.34"; + public $_number = "4.3.35"; private $_string = "SeedDMS"; function __construct() { diff --git a/install/install.php b/install/install.php index 313dcb475..6a04997dc 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", "4.3.34"); +define("SEEDDMS_VERSION", "4.3.35"); require_once('../inc/inc.ClassSettings.php'); From 46582a2be409a5cd79eec39a22063a9f33b2be5e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Mar 2017 17:25:54 +0100 Subject: [PATCH 073/194] update last access time only once a minute --- inc/inc.Authentication.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/inc.Authentication.php b/inc/inc.Authentication.php index 64ef29d89..9226f62b2 100644 --- a/inc/inc.Authentication.php +++ b/inc/inc.Authentication.php @@ -48,7 +48,8 @@ if (!isset($_COOKIE["mydms_session"])) { } /* Update last access time */ -$session->updateAccess($dms_session); +if((int)$resArr['lastAccess']+60 < time()) + $session->updateAccess($dms_session); /* Load user data */ $user = $dms->getUser($resArr["userID"]); From 4265c965de3d4e3f7877a1e872a3b8af298c9f07 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Mar 2017 17:27:31 +0100 Subject: [PATCH 074/194] log all sql statements into file if log file is given --- SeedDMS_Core/Core/inc.DBAccessPDO.php | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index ae271e46c..76a5366a1 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -92,6 +92,16 @@ class SeedDMS_Core_DatabaseAccess { */ private $_intransaction; + /** + * @var string set a valid file name for logging all sql queries + */ + private $_logfile; + + /** + * @var resource file pointer of log file + */ + private $_logfp; + /** * Return list of all database tables * @@ -139,6 +149,13 @@ class SeedDMS_Core_DatabaseAccess { $this->_user = $user; $this->_passw = $passw; $this->_connected = false; + $this->_logfile = ''; + if($this->_logfile) { + $this->_logfp = fopen($this->_logfile, 'a+'); + if($this->_logfp) + fwrite($this->_logfp, microtime()." BEGIN ------------------------------------------\n"); + } else + $this->_logfp = null; // $tt*****id is a hack to ensure that we do not try to create the // temporary table twice during a single connection. Can be fixed by // using Views (MySQL 5.0 onward) instead of temporary tables. @@ -154,6 +171,24 @@ class SeedDMS_Core_DatabaseAccess { $this->_debug = false; } /* }}} */ + /** + * Constructor of SeedDMS_Core_DatabaseAccess + * + * Sets all database parameters but does not connect. + * + * @param string $driver the database type e.g. mysql, sqlite + * @param string $hostname host of database server + * @param string $user name of user having access to database + * @param string $passw password of user + * @param string $database name of database + */ + function __destruct() { /* {{{ */ + if($this->_logfp) { + fwrite($this->_logfp, microtime()." END --------------------------------------------\n"); + fclose($this->_logfp); + } + } /* }}} */ + /** * Connect to database * @@ -234,6 +269,9 @@ class SeedDMS_Core_DatabaseAccess { function getResultArray($queryStr) { /* {{{ */ $resArr = array(); + if($this->_logfp) { + fwrite($this->_logfp, microtime()." ".$queryStr."\n"); + } $res = $this->_conn->query($queryStr); if ($res === false) { if($this->_debug) @@ -256,6 +294,9 @@ class SeedDMS_Core_DatabaseAccess { * @return boolean true if query could be executed otherwise false */ function getResult($queryStr, $silent=false) { /* {{{ */ + if($this->_logfp) { + fwrite($this->_logfp, microtime()." ".$queryStr."\n"); + } $res = $this->_conn->exec($queryStr); if($res === false) { if($this->_debug) From 77aa03c318dc08bb1606a047af88c17bb5c2fa3f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 23 Mar 2017 17:29:22 +0100 Subject: [PATCH 075/194] add entry for 4.3.35 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index ca2f1cad3..e4ef825b3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Changes in version 4.3.35 -------------------------------------------------------------------------------- - fix authentication in webdav.php (Closes #250) +- update last access time only once a minute -------------------------------------------------------------------------------- Changes in version 4.3.34 From fc90e71584b1fe86bdd3673ec35b2a158a68b49a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Mar 2017 08:22:52 +0100 Subject: [PATCH 076/194] do not show spinner if data-no-spinner is set in '
    '); $.get(url, function(data) { element.html(data); // $(".chzn-select").chosen(); From ae3946b6a9feca299ba692ca3d1795ec29c1ab2c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Mar 2017 08:26:39 +0100 Subject: [PATCH 077/194] turn of spinner for ajax call to show clipboard in menu --- 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 d1cec82e0..8a7423209 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -306,7 +306,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; if($this->params['enableclipboard']) { echo "
    "; - echo "
    "; + echo "
    "; echo "
    "; } From 78d482e14eb934c064681870f5b93e443b3dac28 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Mar 2017 08:28:01 +0100 Subject: [PATCH 078/194] add entries for 5.1.2 --- CHANGELOG | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 000bf1df1..6210b3659 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +-------------------------------------------------------------------------------- + Changes in version 5.1.2 +-------------------------------------------------------------------------------- +- do not show spinner when clipboard is loaded in menu (prevents flickering of + page) +- merged changes from 5.0.12 + -------------------------------------------------------------------------------- Changes in version 5.1.1 -------------------------------------------------------------------------------- From 156354ac76b4e38401a8779f077854b038b7995f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Mar 2017 09:17:24 +0100 Subject: [PATCH 079/194] pass '' as orderby to hook searchListHeader() --- 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 22d44a59e..ded223974 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -454,7 +454,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { $this->pageList($pageNumber, $totalpages, "../out/out.Search.php", $urlparams); // $this->contentContainerStart(); - $txt = $this->callHook('searchListHeader', $folder, $orderby); + $txt = $this->callHook('searchListHeader', $folder, ''); if(is_string($txt)) echo $txt; else { From 3cd370cb2e0c50575d77fc2047ace4d2f09b3f8e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Mar 2017 15:54:52 +0100 Subject: [PATCH 080/194] add methods getLastAccessedSessions() and getUser() --- inc/inc.ClassSession.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/inc/inc.ClassSession.php b/inc/inc.ClassSession.php index e6c7dd206..67e5983f8 100644 --- a/inc/inc.ClassSession.php +++ b/inc/inc.ClassSession.php @@ -186,6 +186,15 @@ class SeedDMS_Session { return true; } /* }}} */ + /** + * Get language of session + * + * @return string language + */ + function getUser() { /* {{{ */ + return $this->data['userid']; + } /* }}} */ + /** * Set language of session * @@ -478,5 +487,28 @@ class SeedDMS_SessionMgr { return $sessions; } /* }}} */ + + /** + * Get list of active sessions with a given time + * + * @return array list of sessions + */ + function getLastAccessedSessions($datetime) { /* {{{ */ + if(!$ts = makeTsFromLongDate($datetime)) + return false; + $queryStr = "SELECT * FROM `tblSessions` WHERE `lastAccess`>=".$ts; + $queryStr .= " ORDER BY `lastAccess` DESC"; + $resArr = $this->db->getResultArray($queryStr); + if (is_bool($resArr) && $resArr == false) + return false; + $sessions = array(); + foreach($resArr as $rec) { + $session = new SeedDMS_Session($this->db); + $session->load($rec['id']); + $sessions[] = $session; + } + return $sessions; + + } /* }}} */ } ?> From f61a5f232757adf8f519914fef6059484d3e2a44 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Mar 2017 15:55:43 +0100 Subject: [PATCH 081/194] add list of active session in menu --- out/out.Session.php | 40 +++++++++++++++++ views/bootstrap/class.Bootstrap.php | 4 ++ views/bootstrap/class.Session.php | 68 +++++++++++++++++++++++++++++ 3 files changed, 112 insertions(+) create mode 100644 out/out.Session.php create mode 100644 views/bootstrap/class.Session.php diff --git a/out/out.Session.php b/out/out.Session.php new file mode 100644 index 000000000..4c07bc48c --- /dev/null +++ b/out/out.Session.php @@ -0,0 +1,40 @@ +$dms, 'user'=>$user)); + +if($view) { + $view($_GET); + exit; +} + +?> diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 8a7423209..10c1ceaf8 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -304,6 +304,10 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo " \n"; echo " \n"; + echo "
    "; + echo "
    "; + echo "
    "; + if($this->params['enableclipboard']) { echo "
    "; echo "
    "; diff --git a/views/bootstrap/class.Session.php b/views/bootstrap/class.Session.php new file mode 100644 index 000000000..4dcedd708 --- /dev/null +++ b/views/bootstrap/class.Session.php @@ -0,0 +1,68 @@ + + * @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 clipboard 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_Session extends SeedDMS_Bootstrap_Style { + /** + * Returns the html needed for the clipboard list in the menu + * + * This function renders the clipboard in a way suitable to be + * used as a menu + * + * @param array $clipboard clipboard containing two arrays for both + * documents and folders. + * @return string html code + */ + public function menuSessions() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + + $sessionmgr = new SeedDMS_SessionMgr($dms->getDB()); + $sessions = $sessionmgr->getLastAccessedSessions(date('Y-m-d H:i:s', time()-3600)); + + if ($user->isGuest() || count($sessions) == 0) { + return ''; + } + $content = ''; + $content .= " \n"; + echo $content; + } /* }}} */ + +} From dc0737c1dbcf9f98a37993e667374ae429ba1657 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Mar 2017 15:56:33 +0100 Subject: [PATCH 082/194] show session list only to admins --- views/bootstrap/class.Bootstrap.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 10c1ceaf8..669f0022e 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -304,10 +304,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo " \n"; echo " \n"; + if($this->params['user']->isAdmin()) { echo "
    "; echo "
    "; echo "
    "; - + } if($this->params['enableclipboard']) { echo "
    "; echo "
    "; From 621317def270a8623cebf84d7647c707f7a41a91 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 Apr 2017 10:20:55 +0200 Subject: [PATCH 083/194] print folder of document in extra row below title of document --- views/bootstrap/class.Search.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index ded223974..db577ba04 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -500,14 +500,16 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { print "getMimeIcon($lc->getFileType())."\" title=\"".htmlspecialchars($lc->getMimeType())."\">"; } print ""; - print "getID()."\">/"; + print "getID()."\">"; + print $docName; + print ""; + print "
    ".getMLText('in_folder').": /"; $folder = $document->getFolder(); $path = $folder->getPath(); for ($i = 1; $i < count($path); $i++) { print htmlspecialchars($path[$i]->getName())."/"; } - print $docName; - print ""; + print ""; print "
    ".getMLText('owner').": ".htmlspecialchars($owner->getFullName()).", ".getMLText('creation_date').": ".date('Y-m-d', $document->getDate()).", ".getMLText('version')." ".$version." - ".date('Y-m-d', $lc->getDate()).""; if($comment) { print "
    ".htmlspecialchars($comment).""; From ebc4a29505b10688596ea98d25fbdaf1319d60e1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 Apr 2017 18:28:37 +0200 Subject: [PATCH 084/194] show origfilename of attachments only if not equal to name of attachment --- views/bootstrap/class.ViewDocument.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index eb5d72b14..ba947ee45 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -1238,7 +1238,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "
      \n"; print "
    • ".htmlspecialchars($file->getName())."
    • \n"; - print "
    • ".htmlspecialchars($file->getOriginalFileName())."
    • \n"; + if($file->getName() != $file->getOriginalFileName()) + print "
    • ".htmlspecialchars($file->getOriginalFileName())."
    • \n"; if ($file_exists) print "
    • ".SeedDMS_Core_File::format_filesize(filesize($dms->contentDir . $file->getPath())) ." bytes, ".htmlspecialchars($file->getMimeType())."
    • "; else print "
    • ".htmlspecialchars($file->getMimeType())." - ".getMLText("document_deleted")."
    • "; From cb6dbd0c8d83b6689612ca19fa7d80c3bbd007c4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 5 Apr 2017 21:59:45 +0200 Subject: [PATCH 085/194] call hook 'approveDocument' after document has been approved or rejected --- op/op.ApproveDocument.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/op/op.ApproveDocument.php b/op/op.ApproveDocument.php index d99e52ba3..366140526 100644 --- a/op/op.ApproveDocument.php +++ b/op/op.ApproveDocument.php @@ -194,8 +194,13 @@ if ($_POST["approvalStatus"]==-1){ } } - // TODO: if user os not owner send notification to owner - + if(isset($GLOBALS['SEEDDMS_HOOKS']['approveDocument'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['approveDocument'] as $hookObj) { + if (method_exists($hookObj, 'postApproveDocument')) { + $hookObj->postApproveDocument(null, $content, S_REJECTED); + } + } + } } }else{ @@ -241,7 +246,13 @@ if ($_POST["approvalStatus"]==-1){ } } - // TODO: if user os not owner send notification to owner + if(isset($GLOBALS['SEEDDMS_HOOKS']['approveDocument'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['approveDocument'] as $hookObj) { + if (method_exists($hookObj, 'postApproveDocument')) { + $hookObj->postApproveDocument(null, $content, S_RELEASED); + } + } + } } } } From 727f93eafac686455d4d32b264c62ce62033c996 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 5 Apr 2017 22:00:54 +0200 Subject: [PATCH 086/194] expiration date can be selected from list and entered by calendar --- op/op.AddDocument.php | 33 ++++++++++--- op/op.SetExpires.php | 37 +++++++++++--- op/op.UpdateDocument.php | 33 ++++++++++--- views/bootstrap/class.AddDocument.php | 63 +++++++++++++++++------- views/bootstrap/class.SetExpires.php | 34 +++++++++++-- views/bootstrap/class.UpdateDocument.php | 32 +++++++++--- 6 files changed, 177 insertions(+), 55 deletions(-) diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php index 2f9d4bb65..1780b979f 100644 --- a/op/op.AddDocument.php +++ b/op/op.AddDocument.php @@ -116,14 +116,31 @@ if (!is_numeric($sequence)) { UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("invalid_sequence")); } -$expires = false; -if (!isset($_POST['expires']) || $_POST["expires"] != "false") { - if($_POST["expdate"]) { - $tmp = explode('-', $_POST["expdate"]); - $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]); - } else { - $expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]); - } +switch($_POST["presetexpdate"]) { +case "date": + $tmp = explode('-', $_POST["expdate"]); + $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]); + break; +case "1w": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1], $tmp[2]+7, $tmp[0]); + break; +case "1m": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1]+1, $tmp[2], $tmp[0]); + break; +case "1y": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]+1); + break; +case "2y": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]+2); + break; +case "never": +default: + $expires = null; + break; } // Get the list of reviewers and approvers for this document. diff --git a/op/op.SetExpires.php b/op/op.SetExpires.php index dbb80b021..456f48ced 100644 --- a/op/op.SetExpires.php +++ b/op/op.SetExpires.php @@ -43,14 +43,35 @@ if ($document->getAccessMode($user) < M_READWRITE) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied")); } -$expires = false; -if (!isset($_POST["expires"]) || $_POST["expires"] != "false") { - if(isset($_POST["expdate"]) && $_POST["expdate"]) { - $tmp = explode('-', $_POST["expdate"]); - $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]); - } else { - $expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]); - } +if (!isset($_POST["presetexpdate"]) || $_POST["presetexpdate"] == "") { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_expiration_date")); +} + +switch($_POST["presetexpdate"]) { +case "date": + $tmp = explode('-', $_POST["expdate"]); + $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]); + break; +case "1w": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1], $tmp[2]+7, $tmp[0]); + break; +case "1m": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1]+1, $tmp[2], $tmp[0]); + break; +case "1y": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]+1); + break; +case "2y": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]+2); + break; +case "never": +default: + $expires = null; + break; } if(isset($GLOBALS['SEEDDMS_HOOKS']['setExpires'])) { diff --git a/op/op.UpdateDocument.php b/op/op.UpdateDocument.php index 25547ef9c..f8ec0e4fa 100644 --- a/op/op.UpdateDocument.php +++ b/op/op.UpdateDocument.php @@ -373,14 +373,31 @@ if ($_FILES['userfile']['error'] == 0) { } } - $expires = false; - if (!isset($_POST['expires']) || $_POST["expires"] != "false") { - if($_POST["expdate"]) { - $tmp = explode('-', $_POST["expdate"]); - $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]); - } else { - $expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]); - } + switch($_POST["presetexpdate"]) { + case "date": + $tmp = explode('-', $_POST["expdate"]); + $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]); + break; + case "1w": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1], $tmp[2]+7, $tmp[0]); + break; + case "1m": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1]+1, $tmp[2], $tmp[0]); + break; + case "1y": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]+1); + break; + case "2y": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]+2); + break; + case "never": + default: + $expires = null; + break; } if ($expires) { diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 4348e4823..13ab0cd25 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -122,6 +122,12 @@ $(document).ready(function() { } } }); + $('#presetexpdate').on('change', function(ev){ + if($(this).val() == 'date') + $('#control_expdate').show(); + else + $('#control_expdate').hide(); + }); }); printKeywordChooserJs("form1"); @@ -209,6 +215,37 @@ $(document).ready(function() { : printSequenceChooser($folder->getDocuments('s')); if($orderby != 's') echo "
      ".getMLText('order_by_sequence_off'); ?> + + + : + + + + + > + : + + + + + + + + isAdmin()) { ?> : @@ -247,26 +284,16 @@ $(document).ready(function() { } } } - if($presetexpiration) { - if(!($expts = strtotime($presetexpiration))) - $expts = time(); - } else { - $expts = time(); + $arrs = $this->callHook('addDocumentAttributes', $folder); + if(is_array($arrs)) { + foreach($arrs as $arr) { + echo ""; + echo "".$arr[0].":"; + echo "".$arr[1].""; + echo ""; + } } ?> - - : - - - - -   - - - - contentSubHeading(getMLText("version_info")); ?> diff --git a/views/bootstrap/class.SetExpires.php b/views/bootstrap/class.SetExpires.php index bc7c4ac49..2908aedc2 100644 --- a/views/bootstrap/class.SetExpires.php +++ b/views/bootstrap/class.SetExpires.php @@ -31,6 +31,20 @@ require_once("class.Bootstrap.php"); */ class SeedDMS_View_SetExpires extends SeedDMS_Bootstrap_Style { + function js() { /* {{{ */ + header('Content-Type: application/javascript'); +?> +$(document).ready( function() { + $('#presetexpdate').on('change', function(ev){ + if($(this).val() == 'date') + $('#control_expdate').show(); + else + $('#control_expdate').hide(); + }); +}); +params['dms']; $user = $this->params['user']; @@ -53,15 +67,25 @@ class SeedDMS_View_SetExpires extends SeedDMS_Bootstrap_Style {
      + +
      + +
      +
      +
      - + -
      - +
      diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index 689c74d8e..d7e440ef2 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -119,6 +119,12 @@ console.log(element); } } }); + $('#presetexpdate').on('change', function(ev){ + if($(this).val() == 'date') + $('#control_expdate').show(); + else + $('#control_expdate').hide(); + }); }); + : + + + + + > : - - + + -
      - +
      Date: Wed, 5 Apr 2017 22:08:25 +0200 Subject: [PATCH 087/194] pass null as first argument to all hooks (will later be the controller) --- op/op.AddDocument.php | 4 ++-- op/op.Ajax.php | 2 +- op/op.SetExpires.php | 4 ++-- op/op.TriggerWorkflow.php | 4 ++-- op/op.UpdateDocument.php | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php index 1780b979f..9cbd91e14 100644 --- a/op/op.AddDocument.php +++ b/op/op.AddDocument.php @@ -317,7 +317,7 @@ for ($file_num=0;$file_numpreAddDocument(array('name'=>&$name, 'comment'=>&$comment)); + $hookObj->preAddDocument(null, array('name'=>&$name, 'comment'=>&$comment)); } } } @@ -345,7 +345,7 @@ for ($file_num=0;$file_numpostAddDocument($document); + $hookObj->postAddDocument(null, $document); } } } diff --git a/op/op.Ajax.php b/op/op.Ajax.php index 9518c7f7f..6df2390cd 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -639,7 +639,7 @@ switch($command) { if(isset($GLOBALS['SEEDDMS_HOOKS']['addDocument'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['addDocument'] as $hookObj) { if (method_exists($hookObj, 'postAddDocument')) { - $hookObj->postAddDocument($document); + $hookObj->postAddDocument(null, $document); } } } diff --git a/op/op.SetExpires.php b/op/op.SetExpires.php index 456f48ced..a1dad52b1 100644 --- a/op/op.SetExpires.php +++ b/op/op.SetExpires.php @@ -77,7 +77,7 @@ default: if(isset($GLOBALS['SEEDDMS_HOOKS']['setExpires'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['setExpires'] as $hookObj) { if (method_exists($hookObj, 'preSetExpires')) { - $hookObj->preSetExpires(array('document'=>$document, 'expires'=>&$expires)); + $hookObj->preSetExpires(null, array('document'=>$document, 'expires'=>&$expires)); } } } @@ -91,7 +91,7 @@ $document->verifyLastestContentExpriry(); if(isset($GLOBALS['SEEDDMS_HOOKS']['setExpires'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['setExpires'] as $hookObj) { if (method_exists($hookObj, 'postSetExpires')) { - $hookObj->postSetExpires(array('document'=>$document, 'expires'=>$expires)); + $hookObj->postSetExpires(null, array('document'=>$document, 'expires'=>$expires)); } } } diff --git a/op/op.TriggerWorkflow.php b/op/op.TriggerWorkflow.php index 1b183ada5..6d59f8ff6 100644 --- a/op/op.TriggerWorkflow.php +++ b/op/op.TriggerWorkflow.php @@ -71,7 +71,7 @@ $workflow = $transition->getWorkflow(); if(isset($GLOBALS['SEEDDMS_HOOKS']['triggerWorkflowTransition'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['triggerWorkflowTransition'] as $hookObj) { if (method_exists($hookObj, 'preTriggerWorkflowTransition')) { - $hookObj->preTriggerWorkflowTransition(array('version'=>$version, 'transition'=>$transition, 'comment'=>$_POST["comment"])); + $hookObj->preTriggerWorkflowTransition(null, array('version'=>$version, 'transition'=>$transition, 'comment'=>$_POST["comment"])); } } } @@ -130,7 +130,7 @@ if($version->triggerWorkflowTransition($user, $transition, $_POST["comment"])) { if(isset($GLOBALS['SEEDDMS_HOOKS']['triggerWorkflowTransition'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['triggerWorkflowTransition'] as $hookObj) { if (method_exists($hookObj, 'postTriggerWorkflowTransition')) { - $hookObj->postTriggerWorkflowTransition(array('version'=>$version, 'transition'=>$transition, 'comment'=>$_POST["comment"])); + $hookObj->postTriggerWorkflowTransition(null, array('version'=>$version, 'transition'=>$transition, 'comment'=>$_POST["comment"])); } } } diff --git a/op/op.UpdateDocument.php b/op/op.UpdateDocument.php index f8ec0e4fa..078a23f40 100644 --- a/op/op.UpdateDocument.php +++ b/op/op.UpdateDocument.php @@ -240,7 +240,7 @@ if ($_FILES['userfile']['error'] == 0) { if(isset($GLOBALS['SEEDDMS_HOOKS']['updateDocument'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['updateDocument'] as $hookObj) { if (method_exists($hookObj, 'preUpdateDocument')) { - $hookObj->preUpdateDocument(array('name'=>&$name, 'comment'=>&$comment)); + $hookObj->preUpdateDocument(null, array('name'=>&$name, 'comment'=>&$comment)); } } } @@ -254,7 +254,7 @@ if ($_FILES['userfile']['error'] == 0) { if(isset($GLOBALS['SEEDDMS_HOOKS']['updateDocument'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['updateDocument'] as $hookObj) { if (method_exists($hookObj, 'postUpdateDocument')) { - $hookObj->postUpdateDocument($document); + $hookObj->postUpdateDocument(null, $document); } } } From 2395fd9d15a76f3c130c606ec41c58bf431d6bff Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 5 Apr 2017 22:09:47 +0200 Subject: [PATCH 088/194] add changes for 5.1.2 --- CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 6210b3659..893ebb418 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,8 @@ -------------------------------------------------------------------------------- - do not show spinner when clipboard is loaded in menu (prevents flickering of page) +- add select menu for predifined expiration dates +- add some more hooks - merged changes from 5.0.12 -------------------------------------------------------------------------------- From f0871eaeba42fb1ab04e97897f0f56624e110866 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 10 Apr 2017 07:37:41 +0200 Subject: [PATCH 089/194] remove parameter from hook searchListHeader --- 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 db577ba04..f160958a4 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -454,7 +454,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { $this->pageList($pageNumber, $totalpages, "../out/out.Search.php", $urlparams); // $this->contentContainerStart(); - $txt = $this->callHook('searchListHeader', $folder, ''); + $txt = $this->callHook('searchListHeader'); if(is_string($txt)) echo $txt; else { From 392564129a2a9e31d98d6269c99ee5856eeff1c8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 11 Apr 2017 06:51:17 +0200 Subject: [PATCH 090/194] show foldername and parent folder path on separate lines --- views/bootstrap/class.Search.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index f160958a4..9513f62ba 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -577,13 +577,14 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { print "getID()."\" draggable=\"true\" rel=\"folder_".$folder->getID()."\" class=\"folder table-row-folder\" formtoken=\"".createFormKey('movefolder')."\">"; print "getID()."\">imgpath."folder.png\" width=\"24\" height=\"24\" border=0>"; print "getID()."\">"; + print $folderName; + print ""; + print "
      ".getMLText('in_folder').": /"; $path = $folder->getPath(); - print "/"; for ($i = 1; $i < count($path)-1; $i++) { print htmlspecialchars($path[$i]->getName())."/"; } - print $folderName; - print ""; + print ""; print "
      ".getMLText('owner').": ".htmlspecialchars($owner->getFullName()).", ".getMLText('creation_date').": ".date('Y-m-d', $folder->getDate()).""; if (in_array(3, $searchin)) $comment = $this->markQuery(htmlspecialchars($folder->getComment())); else $comment = htmlspecialchars($folder->getComment()); @@ -603,7 +604,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style { } print ""; print ""; - print ""; + print ""; print "
      "; if($folder->getAccessMode($user) >= M_ALL) { $this->printDeleteFolderButton($folder, 'splash_rm_folder'); From 86508e7910d337dd01b997164005181e02447e0a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 11 Apr 2017 06:54:19 +0200 Subject: [PATCH 091/194] add entries for 5.0.12 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 1324fabdc..2bb83863c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ -------------------------------------------------------------------------------- Changes in version 5.0.12 -------------------------------------------------------------------------------- +- show name and parent folder of document/folder in search list on different + lines +- check for guest login, admin ip and disabled accounts in webdav server - merged changes from 4.3.35 -------------------------------------------------------------------------------- From add623805a2d57ce8c69048a90e31bbfce9bc71d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 11 Apr 2017 08:32:56 +0200 Subject: [PATCH 092/194] add entry for 5.1.2 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index c7af1d6d3..ac7d9d1a1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ page) - add select menu for predifined expiration dates - add some more hooks +- add list of currently logged in users in menu - merged changes from 5.0.12 -------------------------------------------------------------------------------- From 06db1ec6036de249c441ff83f3f3076e0697365a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 11 Apr 2017 08:33:33 +0200 Subject: [PATCH 093/194] session list can be turned on/off by settings --- inc/inc.ClassSettings.php | 4 ++++ op/op.Settings.php | 1 + views/bootstrap/class.Session.php | 5 +++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 1ca017025..64b3f5242 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -178,6 +178,8 @@ class Settings { /* {{{ */ var $_firstDayOfWeek = 0; // enable/disable display of the clipboard var $_enableClipboard = true; + // enable/disable display of the session list + var $_enableSessionList = true; // enable/disable display of the drop zone for file upload var $_enableDropUpload = true; // enable/disable display of the folder tree @@ -410,6 +412,7 @@ class Settings { /* {{{ */ $this->_enableConverting = Settings::boolVal($tab["enableConverting"]); $this->_enableEmail = Settings::boolVal($tab["enableEmail"]); $this->_enableUsersView = Settings::boolVal($tab["enableUsersView"]); + $this->_enableSessionList = Settings::boolVal($tab["enableSessionList"]); $this->_enableClipboard = Settings::boolVal($tab["enableClipboard"]); $this->_enableDropUpload = Settings::boolVal($tab["enableDropUpload"]); $this->_enableFolderTree = Settings::boolVal($tab["enableFolderTree"]); @@ -717,6 +720,7 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "enableConverting", $this->_enableConverting); $this->setXMLAttributValue($node, "enableEmail", $this->_enableEmail); $this->setXMLAttributValue($node, "enableUsersView", $this->_enableUsersView); + $this->setXMLAttributValue($node, "enableClipboard", $this->_enableSessionList); $this->setXMLAttributValue($node, "enableClipboard", $this->_enableClipboard); $this->setXMLAttributValue($node, "enableDropUpload", $this->_enableDropUpload); $this->setXMLAttributValue($node, "enableFolderTree", $this->_enableFolderTree); diff --git a/op/op.Settings.php b/op/op.Settings.php index e45084733..627c8b0d2 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -81,6 +81,7 @@ if ($action == "saveSettings") $settings->_fullSearchEngine = $_POST["fullSearchEngine"]; $settings->_defaultSearchMethod = $_POST["defaultSearchMethod"]; $settings->_showSingleSearchHit = getBoolValue("showSingleSearchHit"); + $settings->_enableSessionList = getBoolValue("enableSessionList"); $settings->_enableClipboard = getBoolValue("enableClipboard"); $settings->_enableDropUpload = getBoolValue("enableDropUpload"); $settings->_enableFolderTree = getBoolValue("enableFolderTree"); diff --git a/views/bootstrap/class.Session.php b/views/bootstrap/class.Session.php index 4dcedd708..9146fc901 100644 --- a/views/bootstrap/class.Session.php +++ b/views/bootstrap/class.Session.php @@ -53,11 +53,12 @@ class SeedDMS_View_Session extends SeedDMS_Bootstrap_Style { $content = ''; $content .= "
        \n"; $content .= "
      • \n"; - $content .= " ".getMLText('Sessions')." (".count($sessions).") \n"; + $content .= " ".getMLText('sessions')." (".count($sessions).") \n"; $content .= " \n"; $content .= "
      • \n"; From defc8330c82b0a8655391e33e4696858b4911951 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 11 Apr 2017 08:34:03 +0200 Subject: [PATCH 094/194] set parameter enableSessionList --- inc/inc.ClassUI.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/inc.ClassUI.php b/inc/inc.ClassUI.php index bdf419f03..13c852329 100644 --- a/inc/inc.ClassUI.php +++ b/inc/inc.ClassUI.php @@ -104,6 +104,7 @@ class UI extends UI_Default { $view->setParam('enablefoldertree', $settings->_enableFolderTree); $view->setParam('enablelanguageselector', $settings->_enableLanguageSelector); $view->setParam('enableclipboard', $settings->_enableClipboard); + $view->setParam('enablesessionlist', $settings->_enableSessionList); $view->setParam('workflowmode', $settings->_workflowMode); $view->setParam('partitionsize', (int) $settings->_partitionSize); $view->setParam('maxuploadsize', (int) $settings->_maxUploadSize); From beac49458785ca312f3fcce51134d941c77d6316 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 11 Apr 2017 08:34:32 +0200 Subject: [PATCH 095/194] set enablesessionlist --- views/bootstrap/class.Settings.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 614e48f50..ee6afd36a 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -265,6 +265,10 @@ if(!is_writeable($settings->_configFilePath)) { "> : _enableClipboard) echo "checked" ?> /> + + "> + : + _enableClipboard) echo "checked" ?> /> "> : From d02de9a767cf0d8520de665793a5ee79d81ea56a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 11 Apr 2017 08:34:52 +0200 Subject: [PATCH 096/194] check if session list shall be shown --- 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 669f0022e..1a5bea6a7 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -304,7 +304,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo " \n"; echo "
      \n"; - if($this->params['user']->isAdmin()) { + if($this->params['enablesessionlist']) { echo "
      "; echo "
      "; echo "
      "; From 63a1202549aa16db848d1983c952a51c8d3bef44 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 11 Apr 2017 10:09:26 +0200 Subject: [PATCH 097/194] various updates and new phrases --- 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 | 10 ++++++- languages/el_GR/lang.inc | 8 ++++++ languages/en_GB/lang.inc | 10 ++++++- languages/es_ES/lang.inc | 12 ++++++-- languages/fr_FR/lang.inc | 61 +++++++++++++++++++++++++--------------- languages/hr_HR/lang.inc | 8 ++++++ languages/hu_HU/lang.inc | 8 ++++++ languages/it_IT/lang.inc | 8 ++++++ languages/ko_KR/lang.inc | 8 ++++++ languages/nl_NL/lang.inc | 8 ++++++ languages/pl_PL/lang.inc | 34 +++++++++++++--------- languages/pt_BR/lang.inc | 14 +++++++-- languages/ro_RO/lang.inc | 8 ++++++ languages/ru_RU/lang.inc | 12 ++++++-- languages/sk_SK/lang.inc | 8 ++++++ languages/sv_SE/lang.inc | 14 +++++++-- languages/tr_TR/lang.inc | 8 ++++++ languages/uk_UA/lang.inc | 8 ++++++ languages/zh_CN/lang.inc | 14 +++++++-- languages/zh_TW/lang.inc | 12 ++++++-- 24 files changed, 252 insertions(+), 53 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index 869209281..efb41f7cf 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -454,7 +454,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'تم تغيير تاريخ الصلاحية', @@ -593,6 +595,7 @@ URL: [url]', 'invalid_target_folder' => 'معرف خاطىء لمجلد الهدف', 'invalid_user_id' => 'معرف مستخدم خاطىء', 'invalid_version' => 'اصدار مستند خاطىء', +'in_folder' => '', 'in_revision' => '', 'in_workflow' => 'رهن مسار عمل', 'is_disabled' => 'تعطيل الحساب', @@ -1020,6 +1023,7 @@ URL: [url]', 'seq_end' => 'في الاخر', 'seq_keep' => 'حافظ على المرتبة', 'seq_start' => 'اول مرتبة', +'sessions' => '', 'settings' => 'الإعدادات', 'settings_activate_module' => 'Activate module', 'settings_activate_php_extension' => 'Activate PHP extension', @@ -1143,6 +1147,8 @@ URL: [url]', 'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => '', 'settings_enableSelfRevApp_desc' => '', +'settings_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => '', 'settings_enableThemeSelector_desc' => '', 'settings_enableUpdateReceipt' => '', @@ -1365,6 +1371,7 @@ URL: [url]', 'splash_moved_clipboard' => '', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => '', 'splash_rm_attribute' => '', 'splash_rm_document' => 'تم حذف المستند', @@ -1554,6 +1561,7 @@ URL: [url]', 'workflow_action_name' => 'اسم', 'workflow_editor' => 'محرر مسارات العمل', 'workflow_group_summary' => 'ملخص المجموعة', +'workflow_has_cycle' => '', 'workflow_initstate' => 'الحالة الابتدائية', 'workflow_in_use' => 'مسار العمل هذا مستخدم حاليا لمستندات', 'workflow_layoutdata_saved' => '', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index e8d0cb6b5..5e0945eba 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/lang.inc @@ -409,7 +409,9 @@ $text = array( 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Датата на изтичане променена', @@ -524,6 +526,7 @@ $text = array( 'invalid_target_folder' => 'Неправилен идентификатор на целевата папка', 'invalid_user_id' => 'Неправилен идентификатор на потребителя', 'invalid_version' => 'Неправилна версия на документа', +'in_folder' => '', 'in_revision' => '', 'in_workflow' => 'в процес', 'is_disabled' => 'забранена сметка', @@ -885,6 +888,7 @@ $text = array( 'seq_end' => 'В края', 'seq_keep' => 'Съхрани позицията', 'seq_start' => 'Първа позиция', +'sessions' => '', 'settings' => 'Настройки', 'settings_activate_module' => 'Активирай модул', 'settings_activate_php_extension' => 'Активирай разширение на PHP', @@ -1008,6 +1012,8 @@ $text = array( 'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => '', 'settings_enableSelfRevApp_desc' => '', +'settings_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => '', 'settings_enableThemeSelector_desc' => '', 'settings_enableUpdateReceipt' => '', @@ -1230,6 +1236,7 @@ $text = array( 'splash_moved_clipboard' => '', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => '', 'splash_rm_attribute' => '', 'splash_rm_document' => '', @@ -1405,6 +1412,7 @@ $text = array( 'workflow_action_name' => 'Име', 'workflow_editor' => 'Редактор на процес', 'workflow_group_summary' => 'Резюме за група', +'workflow_has_cycle' => '', 'workflow_initstate' => 'Начално състояние', 'workflow_in_use' => 'Този процес се използва от документ.', 'workflow_layoutdata_saved' => '', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index f370b7788..b62732dde 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -414,7 +414,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Data de caducitat modificada', @@ -529,6 +531,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_folder' => '', 'in_revision' => '', 'in_workflow' => '', 'is_disabled' => '', @@ -890,6 +893,7 @@ URL: [url]', 'seq_end' => 'Al final', 'seq_keep' => 'Mantenir posició', 'seq_start' => 'Primera posició', +'sessions' => '', 'settings' => 'Settings', 'settings_activate_module' => 'Activate module', 'settings_activate_php_extension' => 'Activate PHP extension', @@ -1013,6 +1017,8 @@ URL: [url]', 'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => '', 'settings_enableSelfRevApp_desc' => '', +'settings_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => '', 'settings_enableThemeSelector_desc' => '', 'settings_enableUpdateReceipt' => '', @@ -1235,6 +1241,7 @@ URL: [url]', 'splash_moved_clipboard' => '', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => '', 'splash_rm_attribute' => '', 'splash_rm_document' => 'Document esborrat', @@ -1410,6 +1417,7 @@ URL: [url]', 'workflow_action_name' => '', 'workflow_editor' => '', 'workflow_group_summary' => '', +'workflow_has_cycle' => '', 'workflow_initstate' => '', 'workflow_in_use' => '', 'workflow_layoutdata_saved' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index b72744743..ecd879767 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -461,7 +461,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Datum expirace změněno', @@ -600,6 +602,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_folder' => '', 'in_revision' => '', 'in_workflow' => 'Zpracováváno', 'is_disabled' => 'Zakázaný účet', @@ -1029,6 +1032,7 @@ URL: [url]', 'seq_end' => 'Na konec', 'seq_keep' => 'Ponechat pozici', 'seq_start' => 'První pozice', +'sessions' => '', 'settings' => 'Settings', 'settings_activate_module' => 'Activate module', 'settings_activate_php_extension' => 'Activate PHP extension', @@ -1152,6 +1156,8 @@ URL: [url]', '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_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => 'Volba tématu', 'settings_enableThemeSelector_desc' => 'Volba témat na přihlašovací stránce.', 'settings_enableUpdateReceipt' => '', @@ -1374,6 +1380,7 @@ URL: [url]', 'splash_moved_clipboard' => 'Schránka přenesena do aktuální složky', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => 'Odstraněno ze schránky', 'splash_rm_attribute' => 'Atribut odstraněn', 'splash_rm_document' => 'Dokument odstraněn', @@ -1563,6 +1570,7 @@ URL: [url]', 'workflow_action_name' => 'Název', 'workflow_editor' => 'Editor pracovního postupu', 'workflow_group_summary' => 'Přehled skupiny', +'workflow_has_cycle' => '', 'workflow_initstate' => 'Počáteční stav', 'workflow_in_use' => 'Tento pracovní postup je momentálně používán dokumentem.', 'workflow_layoutdata_saved' => '', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index 491be8b4a..cd384cb7a 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 (2403), dgrutsch (22) +// Translators: Admin (2411), dgrutsch (22) $text = array( '2_factor_auth' => '2-Faktor Authentifizierung', @@ -472,7 +472,9 @@ Der Link ist bis zum [valid] gültig. 'expire_in_1h' => 'Ablauf in 1 Std.', 'expire_in_1m' => 'Ablauf in 1 Monat', 'expire_in_1w' => 'Ablauf in 1 Woche', +'expire_in_1y' => 'Ablauf in 1 Jahr', 'expire_in_2h' => 'Ablauf in 2 Std.', +'expire_in_2y' => 'Ablauf in 2 Jahren', 'expire_today' => 'Ablauf heute', 'expire_tomorrow' => 'Ablauf morgen', 'expiry_changed_email' => 'Ablaufdatum geändert', @@ -611,6 +613,7 @@ URL: [url]', 'invalid_target_folder' => 'Unzulässige Ziel-Ordner Identifikation', 'invalid_user_id' => 'Unzulässige Benutzernummer', 'invalid_version' => 'Unzulässige Dokumenten-Version', +'in_folder' => 'In', 'in_revision' => 'Erneute Prüfung', 'in_workflow' => 'im Workflow', 'is_disabled' => 'Anmeldung sperren', @@ -1085,6 +1088,7 @@ URL: [url]', 'seq_end' => 'Ans Ende', 'seq_keep' => 'Beibehalten', 'seq_start' => 'An den Anfang', +'sessions' => 'Benutzer Online', 'settings' => 'Einstellungen', 'settings_activate_module' => 'Modul aktivieren', 'settings_activate_php_extension' => 'PHP-Erweiterung aktivieren', @@ -1208,6 +1212,8 @@ URL: [url]', '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_enableSessionList' => 'Liste angemeldeter Benutzer einschalten', +'settings_enableSessionList_desc' => 'Schaltet die Liste der zur Zeit angemeldeten Benutzer im Menu ein/aus.', 'settings_enableThemeSelector' => 'Auswahl des Themas', 'settings_enableThemeSelector_desc' => 'Schaltet das Auswahlmenü für die Themenauswahl in der Anmeldemaske ein oder aus.', 'settings_enableUpdateReceipt' => 'Erlaube die Änderung einer Empfangsbestätigung', @@ -1430,6 +1436,7 @@ URL: [url]', 'splash_moved_clipboard' => 'Inhalt der Zwischenablage in aktuellen Ordner verschoben', 'splash_move_document' => 'Dokument verschoben', 'splash_move_folder' => 'Ordner verschoben', +'splash_receipt_update_success' => 'Empfangsbestätigung hinzugefügt', 'splash_removed_from_clipboard' => 'Aus der Zwischenablage entfernt', 'splash_rm_attribute' => 'Attribut gelöscht', 'splash_rm_document' => 'Dokument gelöscht', @@ -1619,6 +1626,7 @@ URL: [url]', 'workflow_action_name' => 'Name', 'workflow_editor' => 'Workflow Editor', 'workflow_group_summary' => 'Gruppenübersicht', +'workflow_has_cycle' => 'Workflow hat Zyklus', 'workflow_initstate' => 'Initialer Status', 'workflow_in_use' => 'Dieser Workflow wird zur Zeit noch von einem Dokument verwendet.', 'workflow_layoutdata_saved' => 'Layout-Daten gespeichert', diff --git a/languages/el_GR/lang.inc b/languages/el_GR/lang.inc index 45d441f83..8f0e166b7 100644 --- a/languages/el_GR/lang.inc +++ b/languages/el_GR/lang.inc @@ -409,7 +409,9 @@ $text = array( 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Η ημερομηνία λήξης έχει αλλάξει', @@ -524,6 +526,7 @@ $text = array( 'invalid_target_folder' => '', 'invalid_user_id' => '', 'invalid_version' => '', +'in_folder' => '', 'in_revision' => '', 'in_workflow' => '', 'is_disabled' => '', @@ -896,6 +899,7 @@ URL: [url]', 'seq_end' => 'Στο τέλος', 'seq_keep' => 'Διατήρηση θέσης', 'seq_start' => 'Τοποθέτηση στην αρχή', +'sessions' => '', 'settings' => 'Ρυθμίσεις', 'settings_activate_module' => '', 'settings_activate_php_extension' => '', @@ -1019,6 +1023,8 @@ URL: [url]', 'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => '', 'settings_enableSelfRevApp_desc' => '', +'settings_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => '', 'settings_enableThemeSelector_desc' => '', 'settings_enableUpdateReceipt' => '', @@ -1241,6 +1247,7 @@ URL: [url]', 'splash_moved_clipboard' => '', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => '', 'splash_rm_attribute' => '', 'splash_rm_document' => '', @@ -1416,6 +1423,7 @@ URL: [url]', 'workflow_action_name' => 'Όνομα', 'workflow_editor' => '', 'workflow_group_summary' => '', +'workflow_has_cycle' => '', 'workflow_initstate' => '', 'workflow_in_use' => 'This workflow is currently used by documents.', 'workflow_layoutdata_saved' => '', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index 8222cb3c4..a5e091c15 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 (1531), dgrutsch (9), netixw (14) +// Translators: Admin (1538), dgrutsch (9), netixw (14) $text = array( '2_factor_auth' => '2-factor authentication', @@ -473,7 +473,9 @@ The link is valid until [valid]. 'expire_in_1h' => 'Expires in 1h', 'expire_in_1m' => 'Expires in 1 month', 'expire_in_1w' => 'Expires in 1 week', +'expire_in_1y' => 'Expires in 1 year', 'expire_in_2h' => 'Expires in 2h', +'expire_in_2y' => 'Expires in 2 years', 'expire_today' => 'Expires today', 'expire_tomorrow' => 'Expires tomorrow', 'expiry_changed_email' => 'Expiry date changed', @@ -612,6 +614,7 @@ URL: [url]', 'invalid_target_folder' => 'Invalid Target Folder ID', 'invalid_user_id' => 'Invalid User ID', 'invalid_version' => 'Invalid Document Version', +'in_folder' => 'In', 'in_revision' => 'In revision', 'in_workflow' => 'In workflow', 'is_disabled' => 'Disable account', @@ -1080,6 +1083,7 @@ URL: [url]', 'seq_end' => 'At the end', 'seq_keep' => 'Keep Position', 'seq_start' => 'First position', +'sessions' => 'Users online', 'settings' => 'Settings', 'settings_activate_module' => 'Activate module', 'settings_activate_php_extension' => 'Activate PHP extension', @@ -1203,6 +1207,8 @@ URL: [url]', '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_enableSessionList' => 'Enable list of users online', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => 'Theme selection', 'settings_enableThemeSelector_desc' => 'Turns on/off the theme selector on the login page.', 'settings_enableUpdateReceipt' => 'Allow editing of existing reception', @@ -1425,6 +1431,7 @@ URL: [url]', 'splash_moved_clipboard' => 'Clipboard moved into current folder', 'splash_move_document' => 'Document moved', 'splash_move_folder' => 'Folder moved', +'splash_receipt_update_success' => 'Reception added successfully', 'splash_removed_from_clipboard' => 'Removed from clipboard', 'splash_rm_attribute' => 'Attribute removed', 'splash_rm_document' => 'Document removed', @@ -1614,6 +1621,7 @@ URL: [url]', 'workflow_action_name' => 'Name', 'workflow_editor' => 'Workflow Editor', 'workflow_group_summary' => 'Group summary', +'workflow_has_cycle' => 'Workflow has cycle', 'workflow_initstate' => 'Initial state', 'workflow_in_use' => 'This workflow is currently used by documents.', 'workflow_layoutdata_saved' => 'Layout data saved', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index 57c1bcd7f..df7a8c1d8 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 (1016), angel (123), francisco (2), jaimem (14) +// Translators: acabello (20), Admin (1017), angel (123), francisco (2), jaimem (14) $text = array( '2_factor_auth' => '', @@ -173,7 +173,7 @@ URL: [url]', 'attr_malformed_int' => '', 'attr_malformed_url' => '', 'attr_max_values' => '', -'attr_min_values' => '', +'attr_min_values' => 'No se alcanza el número mínimo de valores requeridos para el campo [attrname]', 'attr_not_in_valueset' => '', 'attr_no_regex_match' => 'El valor del atributo no concuerda con la expresión regular', 'attr_validation_error' => '', @@ -461,7 +461,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Fecha de caducidad modificada', @@ -600,6 +602,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_folder' => '', 'in_revision' => '', 'in_workflow' => 'En flujo de trabajo', 'is_disabled' => 'Deshabilitar cuenta', @@ -1035,6 +1038,7 @@ URL: [url]', 'seq_end' => 'Al final', 'seq_keep' => 'Mantener posición', 'seq_start' => 'Primera posición', +'sessions' => '', 'settings' => 'Configuración', 'settings_activate_module' => 'Activar módulo', 'settings_activate_php_extension' => 'Activar extensión PHP', @@ -1158,6 +1162,8 @@ URL: [url]', '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_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => 'Selección de temas (skins)', 'settings_enableThemeSelector_desc' => 'Habilitar/deshabilitar la selección de temas en la página de login', 'settings_enableUpdateReceipt' => '', @@ -1380,6 +1386,7 @@ URL: [url]', 'splash_moved_clipboard' => 'Portapapeles movido a la carpeta actual', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => 'Eliminado del portapapeles', 'splash_rm_attribute' => 'Atributo eliminado', 'splash_rm_document' => 'Documento eliminado', @@ -1569,6 +1576,7 @@ URL: [url]', 'workflow_action_name' => 'Nombre', 'workflow_editor' => 'Editor de Flujo de Trabajo', 'workflow_group_summary' => 'Resumen de Grupo', +'workflow_has_cycle' => '', 'workflow_initstate' => 'Estado Inicial', 'workflow_in_use' => 'Este flujo de trabajo esta siendo usado por documentos.', 'workflow_layoutdata_saved' => '', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 35537937e..30dd65dd4 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 (1060), jeromerobert (50), lonnnew (9), Oudiceval (218) +// Translators: Admin (1061), jeromerobert (50), lonnnew (9), Oudiceval (239) $text = array( '2_factor_auth' => 'Authentification forte', @@ -389,8 +389,15 @@ URL: [url]', 'does_not_expire' => 'N\'expire jamais', 'does_not_inherit_access_msg' => 'Accès hérité', 'download' => 'Téléchargement', -'download_links' => '', -'download_link_email_body' => '', +'download_links' => 'Liens de téléchargement', +'download_link_email_body' => 'Cliquez sur le lien suivant pour télécharger la version [version] du document +« [docname] ». + +[url] + +Le lien est valide jusqu’au [valid]. + +[comment]', 'download_link_email_subject' => '', 'do_object_repair' => 'Réparer tous les dossiers et documents.', 'do_object_setchecksum' => 'Définir checksum', @@ -409,7 +416,7 @@ URL: [url]', 'dump_creation_warning' => 'Avec cette opération, vous pouvez créer une sauvegarde du contenu de votre base de données. Après la création, le fichier de sauvegarde sera sauvegardé dans le dossier de données de votre serveur.', 'dump_list' => 'Fichiers de sauvegarde existants', 'dump_remove' => 'Supprimer fichier de sauvegarde', -'duplicates' => '', +'duplicates' => 'Doublons', 'duplicate_content' => 'Contenu en double', 'edit' => 'Modifier', 'edit_attributes' => 'Modifier les attributs', @@ -459,16 +466,18 @@ URL: [url]', 'event_details' => 'Détails de l\'événement', 'exclude_items' => 'Exclure des élements', 'expired' => 'Expiré', -'expired_at_date' => '', +'expired_at_date' => 'Expiré le [datetime]', 'expires' => 'Expiration', 'expire_by_date' => '', -'expire_in_1d' => '', -'expire_in_1h' => '', -'expire_in_1m' => '', -'expire_in_1w' => '', -'expire_in_2h' => '', -'expire_today' => '', -'expire_tomorrow' => '', +'expire_in_1d' => 'Expire dans 1 jour', +'expire_in_1h' => 'Expire dans 1 heure', +'expire_in_1m' => 'Expire dans 1 mois', +'expire_in_1w' => 'Expire dans 1 semaine', +'expire_in_1y' => '', +'expire_in_2h' => 'Expire dans 2 heures', +'expire_in_2y' => '', +'expire_today' => 'Expire aujourd’hui', +'expire_tomorrow' => 'Expire demain', 'expiry_changed_email' => 'Date d\'expiration modifiée', 'expiry_changed_email_body' => 'Date d\'expiration modifiée Document : [name] @@ -551,7 +560,7 @@ URL: [url]', 'group_review_summary' => 'Résumé groupe correcteur', 'guest_login' => 'Se connecter comme invité', 'guest_login_disabled' => 'Connexion d\'invité désactivée.', -'hash' => '', +'hash' => 'Hash', 'help' => 'Aide', 'home_folder' => 'Dossier personnel', 'hook_name' => '', @@ -605,6 +614,7 @@ URL: [url]', 'invalid_target_folder' => 'Identifiant de dossier cible invalide', 'invalid_user_id' => 'Identifiant utilisateur invalide', 'invalid_version' => 'Version de document invalide', +'in_folder' => '', 'in_revision' => '', 'in_workflow' => 'Dans le workflow', 'is_disabled' => 'Compte désactivé', @@ -835,7 +845,7 @@ En cas de problème persistant, veuillez contacter votre administrateur.', 'personal_default_keywords' => 'Mots-clés personnels', 'pl_PL' => 'Polonais', 'possible_substitutes' => '', -'preset_expires' => '', +'preset_expires' => 'Expiration prédéfinie', 'preview' => 'Aperçu', 'preview_converters' => '', 'preview_images' => 'Miniatures', @@ -888,7 +898,7 @@ Répertoire: [folder_path] Utilisateur: [username] URL: [url]', 'removed_workflow_email_subject' => '', -'removeFolderFromDropFolder' => '', +'removeFolderFromDropFolder' => 'Suppression du dossier après importation', 'remove_marked_files' => 'Supprimer les fichiers sélectionnés', 'repaired' => 'réparé', 'repairing_objects' => 'Réparation des documents et des dossiers.', @@ -1023,6 +1033,7 @@ URL: [url]', 'seq_end' => 'A la fin', 'seq_keep' => 'Conserver la position', 'seq_start' => 'Première position', +'sessions' => '', 'settings' => 'Configuration', 'settings_activate_module' => 'Activez le module', 'settings_activate_php_extension' => 'Activez l\'extension PHP', @@ -1146,6 +1157,8 @@ URL: [url]', '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_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => 'Sélection du thème', 'settings_enableThemeSelector_desc' => 'Activer/désactiver le sélecteur de thème sur la page de connexion.', 'settings_enableUpdateReceipt' => '', @@ -1217,8 +1230,8 @@ URL: [url]', 'settings_maxRecursiveCount_desc' => 'Nombre maximum de documents et répertoires dont l\'accès sera vérifié, lors d\'un décompte récursif. Si ce nombre est dépassé, le nombre de documents et répertoires affichés sera approximé.', 'settings_maxSizeForFullText' => 'Taille maximum pour l\'indexation instantanée', 'settings_maxSizeForFullText_desc' => 'Toute nouvelle version d\'un document plus petite que la taille configurée sera intégralement indexée juste après l\'upload. Dans tous les autres cas, seulement les métadonnées seront indexées.', -'settings_maxUploadSize' => '', -'settings_maxUploadSize_desc' => '', +'settings_maxUploadSize' => 'Taille max. des fichiers', +'settings_maxUploadSize_desc' => 'Taille maximale (en octets) pour les fichiers téléversés. Concerne les versions d’un document et les fichiers attachés.', 'settings_more_settings' => 'Configurer d\'autres paramètres. Connexion par défaut: admin/admin', 'settings_notfound' => 'Introuvable', 'settings_Notification' => 'Notifications', @@ -1359,8 +1372,8 @@ URL: [url]', 'splash_edit_role' => '', 'splash_edit_user' => 'Utilisateur modifié', 'splash_error_add_to_transmittal' => '', -'splash_error_rm_download_link' => '', -'splash_error_send_download_link' => '', +'splash_error_rm_download_link' => 'Erreur lors de la suppression du lien de téléchargement', +'splash_error_send_download_link' => 'Erreur lors de l’envoi du lien de téléchargement', 'splash_folder_edited' => 'Dossier modifié', 'splash_importfs' => '[docs] documents et [folders] dossiers importés', 'splash_invalid_folder_id' => 'Identifiant de répertoire invalide', @@ -1368,10 +1381,11 @@ URL: [url]', 'splash_moved_clipboard' => 'Presse-papier déplacé dans le répertoire courant', 'splash_move_document' => 'Document déplacé', 'splash_move_folder' => 'Dossier déplacé', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => 'Enlevé du presse-papiers', 'splash_rm_attribute' => 'Attribut supprimé', 'splash_rm_document' => 'Document supprimé', -'splash_rm_download_link' => '', +'splash_rm_download_link' => 'Lien de téléchargement supprimé', 'splash_rm_folder' => 'Dossier supprimé', 'splash_rm_group' => 'Groupe supprimé', 'splash_rm_group_member' => 'Membre retiré du groupe', @@ -1379,7 +1393,7 @@ URL: [url]', 'splash_rm_transmittal' => '', 'splash_rm_user' => 'Utilisateur supprimé', 'splash_saved_file' => '', -'splash_send_download_link' => '', +'splash_send_download_link' => 'Lien de téléchargement envoyé par e-mail', 'splash_settings_saved' => 'Configuration sauvegardée', 'splash_substituted_user' => 'Utilisateur de substitution', 'splash_switched_back_user' => 'Revenu à l\'utilisateur initial', @@ -1525,11 +1539,11 @@ URL : [url]', 'user_list' => 'Liste des utilisateurs', 'user_login' => 'Identifiant', 'user_management' => 'Utilisateurs', -'user_name' => 'Nom utilisateur', +'user_name' => 'Nom d’affichage', 'use_comment_of_document' => 'Utiliser le commentaire du document', 'use_default_categories' => 'Use predefined categories', 'use_default_keywords' => 'Utiliser les mots-clés prédéfinis', -'valid_till' => '', +'valid_till' => 'Valide jusqu’au', 'version' => 'Version', 'versioning_file_creation' => 'Créer les fichiers de versionnage', 'versioning_file_creation_warning' => 'Cette opération permet de créer, pour chaque document, un fichier texte contenant les informations générales et l’historique des versions du document. Chaque fichier sera enregistré dans le répertoire du document. Ces fichiers ne sont pas nécessaires au bon fonctionnement de SeedDMS, mais ils peuvent être utiles en cas de transfert des fichiers vers un autre système.', @@ -1557,6 +1571,7 @@ URL: [url]', 'workflow_action_name' => 'Nom', 'workflow_editor' => 'Editeur de Workflow', 'workflow_group_summary' => 'Résumé de groupe', +'workflow_has_cycle' => '', 'workflow_initstate' => 'Etat initial', 'workflow_in_use' => 'Ce workflow est actuellement utilisé par des documents.', 'workflow_layoutdata_saved' => '', diff --git a/languages/hr_HR/lang.inc b/languages/hr_HR/lang.inc index 09f30f954..f78bb63cc 100644 --- a/languages/hr_HR/lang.inc +++ b/languages/hr_HR/lang.inc @@ -466,7 +466,9 @@ Internet poveznica: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Promijenjen datum isteka', @@ -605,6 +607,7 @@ Internet poveznica: [url]', 'invalid_target_folder' => 'Pogrešan ID ciljane mape', 'invalid_user_id' => 'Pogrešan ID korisnika', 'invalid_version' => 'Pogrešna verzija dokumenta', +'in_folder' => '', 'in_revision' => 'U reviziji', 'in_workflow' => 'U toku rada', 'is_disabled' => 'Onemogući klijenta', @@ -1056,6 +1059,7 @@ Internet poveznica: [url]', 'seq_end' => 'Na kraju', 'seq_keep' => 'Zadrži poziciju', 'seq_start' => 'Na početak', +'sessions' => '', 'settings' => 'Postavke', 'settings_activate_module' => 'Aktiviraj modul', 'settings_activate_php_extension' => 'Aktiviraj PHP ekstenziju', @@ -1179,6 +1183,8 @@ Internet poveznica: [url]', 'settings_enableRevisionWorkflow_desc' => 'Omogućite kako bi se mogao pokrenuti tok rada za revidiranje dokumenta nakon zadanog vremenskog perioda.', 'settings_enableSelfRevApp' => 'Omogući pregled/ovjeru za prijavljenog korisnika', 'settings_enableSelfRevApp_desc' => 'Omogući ovo ako želite da trenutno prijavljeni korisnik bude naveden kao recezent/validator i za promjenu toka rada.', +'settings_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => 'Odabir teme', 'settings_enableThemeSelector_desc' => 'Uključuje/isključuje izbornik tema na stranici prijave.', 'settings_enableUpdateReceipt' => '', @@ -1401,6 +1407,7 @@ Internet poveznica: [url]', 'splash_moved_clipboard' => 'Međuspremnik je premješten u trenutnu mapu', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => 'Uklonjeno iz međuspremnika', 'splash_rm_attribute' => 'Atribut uklonjen', 'splash_rm_document' => 'Dokument uklonjen', @@ -1590,6 +1597,7 @@ Internet poveznica: [url]', 'workflow_action_name' => 'Naziv', 'workflow_editor' => 'Urednik toka rada', 'workflow_group_summary' => 'Pregled grupe', +'workflow_has_cycle' => '', 'workflow_initstate' => 'Početni status', 'workflow_in_use' => 'Dokumenti trenutno koriste ovaj tok rada.', 'workflow_layoutdata_saved' => '', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index e51701e1a..4e7b96b19 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -461,7 +461,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Lejárati dátum módosítva', @@ -600,6 +602,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_folder' => '', 'in_revision' => '', 'in_workflow' => 'Munkafolyamatban', 'is_disabled' => 'Hozzáférés tiltás', @@ -1034,6 +1037,7 @@ URL: [url]', 'seq_end' => 'V‰g‰re', 'seq_keep' => 'Pozci megtartßsa', 'seq_start' => 'Elej‰re', +'sessions' => '', 'settings' => 'Beállítások', 'settings_activate_module' => 'Modul aktiválása', 'settings_activate_php_extension' => 'PHP kiterjesztés aktiválása', @@ -1157,6 +1161,8 @@ URL: [url]', '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_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => 'Téma választása', 'settings_enableThemeSelector_desc' => 'Kapcsolja be/ki a témaválasztót a bejelentkező oldalon', 'settings_enableUpdateReceipt' => '', @@ -1379,6 +1385,7 @@ URL: [url]', 'splash_moved_clipboard' => 'Vágólap tartalom áthelyezve az aktuális mappába', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => 'Eltávolítva a vágólapról', 'splash_rm_attribute' => 'Jellemző eltávolítva', 'splash_rm_document' => 'Dokumentum eltávolítva', @@ -1568,6 +1575,7 @@ URL: [url]', 'workflow_action_name' => 'Név', 'workflow_editor' => 'Munkafolyamat szerkesztő', 'workflow_group_summary' => 'Csoport áttekintés', +'workflow_has_cycle' => '', 'workflow_initstate' => 'Kezdeti állapot', 'workflow_in_use' => 'Ezt a munkafolyamatot dokumentumok használják.', 'workflow_layoutdata_saved' => '', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index 632d8ba53..d30be02f5 100644 --- a/languages/it_IT/lang.inc +++ b/languages/it_IT/lang.inc @@ -467,7 +467,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Scadenza cambiata', @@ -606,6 +608,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_folder' => '', 'in_revision' => 'In fase di revisione', 'in_workflow' => 'In fase di lavorazione', 'is_disabled' => 'Account Disabilitato', @@ -1068,6 +1071,7 @@ URL: [url]', 'seq_end' => 'Alla fine', 'seq_keep' => 'Mantieni la posizione', 'seq_start' => 'Prima posizione', +'sessions' => '', 'settings' => 'Impostazioni', 'settings_activate_module' => 'Attivazione modulo', 'settings_activate_php_extension' => 'Attivazione estensione PHP', @@ -1191,6 +1195,8 @@ URL: [url]', 'settings_enableRevisionWorkflow_desc' => 'Abilita per attivare workflow su revisione documenti dopo scadenza.', '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_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => 'Selezione tema grafico', 'settings_enableThemeSelector_desc' => 'Abilita/disabilita il selettore di tema grafico nella finestra di login', 'settings_enableUpdateReceipt' => '', @@ -1413,6 +1419,7 @@ URL: [url]', 'splash_moved_clipboard' => 'Appunti trasferiti nella cartella corrente', 'splash_move_document' => 'Documento spostato', 'splash_move_folder' => 'Cartella spostato', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => 'Rimosso dagli appunti', 'splash_rm_attribute' => 'Attributo rimosso', 'splash_rm_document' => 'Documento rimosso', @@ -1602,6 +1609,7 @@ URL: [url]', 'workflow_action_name' => 'Nome', 'workflow_editor' => 'Modifica flussi di lavoro', 'workflow_group_summary' => 'Sommario di gruppo', +'workflow_has_cycle' => '', 'workflow_initstate' => 'Stato iniziale', 'workflow_in_use' => 'Questo flusso di lavoro è attualmente usato da alcuni documenti', 'workflow_layoutdata_saved' => '', diff --git a/languages/ko_KR/lang.inc b/languages/ko_KR/lang.inc index b3dbc3c27..ab0e0c86b 100644 --- a/languages/ko_KR/lang.inc +++ b/languages/ko_KR/lang.inc @@ -466,7 +466,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => '유효 기간 변경', @@ -605,6 +607,7 @@ URL: [url]', 'invalid_target_folder' => '잘못된 대상 폴더 ID', 'invalid_user_id' => '잘못된 사용자 ID', 'invalid_version' => '잘못된 문서 버전', +'in_folder' => '', 'in_revision' => '개정에서', 'in_workflow' => '워크플로우내', 'is_disabled' => '계정 사용 안 함', @@ -1049,6 +1052,7 @@ URL : [url]', 'seq_end' => '마지막 위치', 'seq_keep' => '위치 유지', 'seq_start' => '첫 번째 위치', +'sessions' => '', 'settings' => '설정', 'settings_activate_module' => '모듈 활성화', 'settings_activate_php_extension' => 'PHP 확장 활성화', @@ -1172,6 +1176,8 @@ URL : [url]', 'settings_enableRevisionWorkflow_desc' => '일정 기간후에 문서를 개정 하기위해 워크플로우를 수행 할 수 있도록 설정 합니다.', 'settings_enableSelfRevApp' => '로그인 한 사용자에 대한 검토 / 승인을 허용', 'settings_enableSelfRevApp_desc' => '검토 / 승인자로 워크 플로우 전환을 위해 나열되어있는 것이 현재 로그인 한 사용자가 필요한 경우이를 활성화합니다.', +'settings_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => '테마 선택', 'settings_enableThemeSelector_desc' => '로그인 페이지의 테마 선택기를 켜기/끄기로 전환합니다.', 'settings_enableUpdateReceipt' => '', @@ -1394,6 +1400,7 @@ URL : [url]', 'splash_moved_clipboard' => '클립 보드가 현재 폴더로 이동', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => '클립 보드에서 제거', 'splash_rm_attribute' => '속성 제거', 'splash_rm_document' => '문서 삭제', @@ -1583,6 +1590,7 @@ URL : [url]', 'workflow_action_name' => '이름', 'workflow_editor' => '워크플로우 편집기', 'workflow_group_summary' => '그룹 요약', +'workflow_has_cycle' => '', 'workflow_initstate' => '초기 상태', 'workflow_in_use' => '이 워크플로는 현재 문서에서 사용 됩니다.', 'workflow_layoutdata_saved' => '', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 43362707d..16cf8c0d6 100644 --- a/languages/nl_NL/lang.inc +++ b/languages/nl_NL/lang.inc @@ -459,7 +459,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Verloopdatum gewijzigd', @@ -598,6 +600,7 @@ URL: [url]', 'invalid_target_folder' => 'Foutief Doel Map ID', 'invalid_user_id' => 'Foutief Gebruiker ID', 'invalid_version' => 'Foutief Document Versie', +'in_folder' => '', 'in_revision' => 'In herziening', 'in_workflow' => 'In workflow', 'is_disabled' => 'Deactiveer account', @@ -1058,6 +1061,7 @@ URL: [url]', 'seq_end' => 'Op het einde', 'seq_keep' => 'Behoud Positie', 'seq_start' => 'Eerste positie', +'sessions' => '', 'settings' => 'Instellingen', 'settings_activate_module' => 'Activeer module', 'settings_activate_php_extension' => 'Activeer PHP uitbreiding', @@ -1185,6 +1189,8 @@ URL: [url]', 'settings_enableRevisionWorkflow_desc' => 'Herzieningsworkflow aanzetten', '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_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => 'Selecteer thema', 'settings_enableThemeSelector_desc' => 'Schakel thema selectie op de aanmeldpagina uit', 'settings_enableUpdateReceipt' => '', @@ -1407,6 +1413,7 @@ URL: [url]', 'splash_moved_clipboard' => 'Klembord verplaatst naar de huidige map', 'splash_move_document' => 'Document verplaatst', 'splash_move_folder' => 'Map verplaatst', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => 'Verwijderd van het klembord', 'splash_rm_attribute' => 'Attribuut verwijderd', 'splash_rm_document' => 'Document verwijderd', @@ -1596,6 +1603,7 @@ URL: [url]', 'workflow_action_name' => 'Naam', 'workflow_editor' => 'Workflow editor', 'workflow_group_summary' => 'Groepssamenvatting', +'workflow_has_cycle' => '', 'workflow_initstate' => 'Begin status', 'workflow_in_use' => 'Deze workflow wordt momenteel gebruikt door documenten.', 'workflow_layoutdata_saved' => '', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index 2881ac811..e36614120 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 (755), netixw (84), romi (93), uGn (112) +// Translators: Admin (767), netixw (84), romi (93), uGn (112) $text = array( '2_factor_auth' => '', @@ -142,9 +142,9 @@ URL: [url]', 'attrdef_type_boolean' => '', 'attrdef_type_date' => '', 'attrdef_type_email' => '', -'attrdef_type_float' => '', -'attrdef_type_int' => '', -'attrdef_type_string' => '', +'attrdef_type_float' => 'Liczna zmiennoprzecinkowa', +'attrdef_type_int' => 'Liczba całkowita', +'attrdef_type_string' => 'Ciąg znaków', 'attrdef_type_url' => '', 'attrdef_valueset' => 'Set of values', 'attributes' => 'Atrybuty', @@ -298,7 +298,7 @@ URL: [url]', 'docs_in_reception_no_access' => '', 'docs_in_revision_no_access' => '', 'document' => 'Dokument', -'documentcontent' => '', +'documentcontent' => 'Zawartość dokumentu', 'documents' => 'Dokumenty', 'documents_checked_out_by_you' => '', 'documents_in_process' => 'Dokumenty procesowane', @@ -454,7 +454,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Zmieniona data wygaśnięcia', @@ -593,6 +595,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_folder' => '', 'in_revision' => '', 'in_workflow' => 'W procesie', 'is_disabled' => 'Konto nieaktywne', @@ -639,7 +642,7 @@ URL: [url]', 'linked_to_this_version' => '', 'link_alt_updatedocument' => 'Jeśli chcesz wczytać pliki większe niż bieżące maksimum, użyj alternatywnej strony wczytywania.', 'link_to_version' => '', -'list_access_rights' => '', +'list_access_rights' => 'Pokaż uprawnienia dostępu', 'list_contains_no_access_docs' => '', 'list_hooks' => '', 'local_file' => 'Lokalny plik', @@ -1014,6 +1017,7 @@ URL: [url]', 'seq_end' => 'Na końcu', 'seq_keep' => 'Na tej samej pozycji', 'seq_start' => 'Na początku', +'sessions' => '', 'settings' => 'Ustawienia', 'settings_activate_module' => 'Aktywuj moduł', 'settings_activate_php_extension' => 'Aktywuj rozszerzenie PHP', @@ -1027,7 +1031,7 @@ URL: [url]', 'settings_autoLoginUser' => '', 'settings_autoLoginUser_desc' => '', 'settings_available_languages' => 'Dostępne języki', -'settings_available_languages_desc' => '', +'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' => '', 'settings_backupDir_desc' => '', 'settings_cacheDir' => 'Folder bufora', @@ -1044,8 +1048,8 @@ URL: [url]', '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', 'settings_contentOffsetDir_desc' => 'Aby obejść ograniczenia w bazowym systemie plików, zostanie w nim utworzona nowa struktura katalogów. To wymaga określenia katalogu początkowego. Zazwyczaj można zostawić domyślną wartość, 1048576, ale może też być dowolnym numerem lub słowem, które aktualnie nie istnieje w katalogu treści (Katalog treści)', -'settings_convertToPdf' => '', -'settings_convertToPdf_desc' => '', +'settings_convertToPdf' => 'Skonwertuj dokument do pdf', +'settings_convertToPdf_desc' => 'Jeżeli dokument nie będzie możliwy do pokazania w natywnej formie, wyświetlona zostanie wersja skonwertowana do pdf.', 'settings_cookieLifetime' => 'Czas życia ciasteczka', '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', @@ -1081,8 +1085,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_editOnlineFileTypes' => '', -'settings_editOnlineFileTypes_desc' => '', +'settings_editOnlineFileTypes' => 'Edytuj typy plików online', +'settings_editOnlineFileTypes_desc' => 'Pliki z następującymi rozszerzeniami mogą być edytowane online (używaj tylko małych liter)', 'settings_enable2FactorAuthentication' => '', 'settings_enable2FactorAuthentication_desc' => '', 'settings_enableAcknowledgeWorkflow' => '', @@ -1137,6 +1141,8 @@ URL: [url]', '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_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => '', 'settings_enableThemeSelector_desc' => '', 'settings_enableUpdateReceipt' => '', @@ -1159,7 +1165,7 @@ URL: [url]', 'settings_expandFolderTree_val0' => 'Rozpocznij z ukrytym drzewem', 'settings_expandFolderTree_val1' => 'Rozpocznij z pokazanym drzewem i rozwiniętym pierwszym poziomem', 'settings_expandFolderTree_val2' => 'Rozpocznij z pokazanym, w pełni rozwiniętym drzewem', -'settings_Extensions' => '', +'settings_Extensions' => 'Rozszerzenia', 'settings_extraPath' => 'Dodatkowa ścieżka include dla PHP', 'settings_extraPath_desc' => 'Ścieżka do dodatkowego oprogramowania. Jest to katalog zawierający np. adodb, pear lub dodatkowe pakiety', 'settings_firstDayOfWeek' => 'Pierwszy dzień tygodnia', @@ -1256,7 +1262,7 @@ URL: [url]', 'settings_rootFolderID_desc' => 'ID katalogu głównego (zazwyczaj nie trzeba tego zmieniać)', 'settings_SaveError' => 'Błąd zapisu pliku konfiguracyjnego', 'settings_Server' => 'Ustawienia serwera', -'settings_showFullPreview' => '', +'settings_showFullPreview' => 'Pokaż cały dokument', 'settings_showFullPreview_desc' => '', 'settings_showMissingTranslations' => 'Pokaż brakujące tłumaczenia', 'settings_showMissingTranslations_desc' => '', @@ -1359,6 +1365,7 @@ URL: [url]', 'splash_moved_clipboard' => 'Schowek został przeniesiony do bieżącego folderu', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => 'Usunięto ze schowka', 'splash_rm_attribute' => 'Usunięto atrybut', 'splash_rm_document' => 'Dokument usunięto', @@ -1548,6 +1555,7 @@ URL: [url]', 'workflow_action_name' => 'Nazwa', 'workflow_editor' => 'Edytor procesu', 'workflow_group_summary' => 'Podsumowanie grupy', +'workflow_has_cycle' => '', 'workflow_initstate' => 'Początkowy status', 'workflow_in_use' => 'Proces ten jest obecnie zastosowany w dokumentach.', 'workflow_layoutdata_saved' => '', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 497e6c7c1..f00e9cab8 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 (937), flaviove (627), lfcristofoli (352) +// Translators: Admin (939), flaviove (627), lfcristofoli (352) $text = array( '2_factor_auth' => '', @@ -180,7 +180,7 @@ URL: [url]', 'at_least_n_users_of_group' => 'Pelo menos [nuber_of_users] usuários de [group]', 'august' => 'August', 'authentication' => 'Autenticação', -'author' => '', +'author' => 'Autor', 'automatic_status_update' => 'Mudança de status automático', 'back' => 'Voltar', 'backup_list' => 'Existings backup list', @@ -460,7 +460,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Data de validade mudou', @@ -599,6 +601,7 @@ URL: [url]', 'invalid_target_folder' => 'Invalid Target Folder ID', 'invalid_user_id' => 'Invalid User ID', 'invalid_version' => 'Invalid Document Version', +'in_folder' => '', 'in_revision' => '', 'in_workflow' => 'No fluxo de trabalho', 'is_disabled' => 'Desativar conta', @@ -645,7 +648,7 @@ URL: [url]', 'linked_to_this_version' => '', '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.', 'link_to_version' => '', -'list_access_rights' => '', +'list_access_rights' => 'Listar todos os direitos de acesso...', 'list_contains_no_access_docs' => '', 'list_hooks' => '', 'local_file' => 'Arquivo local', @@ -1032,6 +1035,7 @@ URL: [url]', 'seq_end' => 'No final', 'seq_keep' => 'Manter posição', 'seq_start' => 'Primeira posição', +'sessions' => '', 'settings' => 'Configurações', 'settings_activate_module' => 'Ativar módulo', 'settings_activate_php_extension' => 'Ativar extensão PHP', @@ -1155,6 +1159,8 @@ URL: [url]', '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_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => 'Seleção de tema', 'settings_enableThemeSelector_desc' => 'Liga/desliga o seletor de tema na página de login.', 'settings_enableUpdateReceipt' => '', @@ -1377,6 +1383,7 @@ URL: [url]', 'splash_moved_clipboard' => 'Área de transferência movida para a pasta corrente', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => 'Remover da área de transferência', 'splash_rm_attribute' => 'Atributo removido', 'splash_rm_document' => 'Documento removido', @@ -1566,6 +1573,7 @@ URL: [url]', 'workflow_action_name' => 'Nome', 'workflow_editor' => 'Editor de Fluxo de trabalho', 'workflow_group_summary' => 'Sumário do grupo', +'workflow_has_cycle' => '', 'workflow_initstate' => 'Estado inicial', 'workflow_in_use' => 'Esse fluxo de trabalho é usado atualmente por documentos.', 'workflow_layoutdata_saved' => '', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index 04a0d9811..2c21b28ea 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -466,7 +466,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Data de expirare schimbată', @@ -605,6 +607,7 @@ URL: [url]', 'invalid_target_folder' => 'ID Folder țintă invalid', 'invalid_user_id' => 'ID Utilizator invalid', 'invalid_version' => 'Versiune Document invalidă', +'in_folder' => '', 'in_revision' => 'In revizuire', 'in_workflow' => 'În workflow', 'is_disabled' => 'Dezactivează cont', @@ -1057,6 +1060,7 @@ URL: [url]', 'seq_end' => 'La sfârșit', 'seq_keep' => 'Păstrați poziția', 'seq_start' => 'Prima poziție', +'sessions' => '', 'settings' => 'Setări', 'settings_activate_module' => 'Activați modulul', 'settings_activate_php_extension' => 'Activați extensia PHP', @@ -1180,6 +1184,8 @@ URL: [url]', '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_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => 'Selecție Temă', 'settings_enableThemeSelector_desc' => 'Activare/dezactivare selector temă pe pagina de login.', 'settings_enableUpdateReceipt' => '', @@ -1402,6 +1408,7 @@ URL: [url]', 'splash_moved_clipboard' => 'Clipboard mutat în folderul curent', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => 'Eliminat din clipboard', 'splash_rm_attribute' => 'Atribut eliminat', 'splash_rm_document' => 'Document eliminat', @@ -1591,6 +1598,7 @@ URL: [url]', 'workflow_action_name' => 'Nume', 'workflow_editor' => 'Editor Workflow', 'workflow_group_summary' => 'Sumar Grup', +'workflow_has_cycle' => '', 'workflow_initstate' => 'Stare inițială', 'workflow_in_use' => 'Acest Workflow este utilizat în prezent de documente.', 'workflow_layoutdata_saved' => '', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index 4a0373247..09722f60d 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 (1642) +// Translators: Admin (1643) $text = array( '2_factor_auth' => 'Двухфакторная аутентификация', @@ -466,7 +466,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Срок действия изменен', @@ -605,6 +607,7 @@ URL: [url]', 'invalid_target_folder' => 'Неверный идентификатор целевого каталога', 'invalid_user_id' => 'Неверный идентификатор пользователя', 'invalid_version' => 'Неверная версия документа', +'in_folder' => '', 'in_revision' => 'В рассмотрении', 'in_workflow' => 'В процессе', 'is_disabled' => 'Отключить учётную запись', @@ -651,7 +654,7 @@ URL: [url]', 'linked_to_this_version' => '', 'link_alt_updatedocument' => 'Для загрузки файлов, превышающих ограничение размера, используйте другой способ.', 'link_to_version' => '', -'list_access_rights' => '', +'list_access_rights' => 'Показать все права доступа', 'list_contains_no_access_docs' => '', 'list_hooks' => 'Список хуков', 'local_file' => 'Локальный файл', @@ -1064,6 +1067,7 @@ URL: [url]', 'seq_end' => 'В конце', 'seq_keep' => 'Не изменять', 'seq_start' => 'В начале', +'sessions' => '', 'settings' => 'Настройки', 'settings_activate_module' => 'Активировать модуль', 'settings_activate_php_extension' => 'Активировать расширение PHP', @@ -1187,6 +1191,8 @@ URL: [url]', 'settings_enableRevisionWorkflow_desc' => 'Включить для активации функции ревизии документа по истечении определенного периода времени.', 'settings_enableSelfRevApp' => 'Разрешить рецензию/утверждение
      пользователями вошедшими в систему', 'settings_enableSelfRevApp_desc' => 'Включите для того, чтобы пользователи, в настоящее время выполнившие вход в систему, были в списке рецензентов/утверждающих и в изменении процесса.', +'settings_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => 'Выбор темы', 'settings_enableThemeSelector_desc' => 'Включить или отключить возможность выбора темы на странице входа.', 'settings_enableUpdateReceipt' => '', @@ -1409,6 +1415,7 @@ URL: [url]', 'splash_moved_clipboard' => 'Буфер обмена перенесён в текущий каталог', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => 'Удалён из буфера обмена', 'splash_rm_attribute' => 'Атрибут удалён', 'splash_rm_document' => 'Документ удалён', @@ -1598,6 +1605,7 @@ URL: [url]', 'workflow_action_name' => 'Название', 'workflow_editor' => 'Редактор процесса', 'workflow_group_summary' => 'Сводка по группе', +'workflow_has_cycle' => '', 'workflow_initstate' => 'Начальный статус', 'workflow_in_use' => 'Этот процесс используется документами.', 'workflow_layoutdata_saved' => '', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 33e4005a0..ded4bd48b 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -413,7 +413,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Datum platnosti zmeneny', @@ -528,6 +530,7 @@ URL: [url]', 'invalid_target_folder' => 'Neplatné cieľové ID zložky', 'invalid_user_id' => 'Neplatné ID používateľa', 'invalid_version' => 'Neplatná verzia dokumentu', +'in_folder' => '', 'in_revision' => '', 'in_workflow' => '', 'is_disabled' => '', @@ -889,6 +892,7 @@ URL: [url]', 'seq_end' => 'Na koniec', 'seq_keep' => 'Ponechať pozíciu', 'seq_start' => 'Prvá pozícia', +'sessions' => '', 'settings' => 'Nastavenia', 'settings_activate_module' => '', 'settings_activate_php_extension' => '', @@ -1012,6 +1016,8 @@ URL: [url]', 'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => '', 'settings_enableSelfRevApp_desc' => '', +'settings_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => 'Výber šablóny', 'settings_enableThemeSelector_desc' => '', 'settings_enableUpdateReceipt' => '', @@ -1234,6 +1240,7 @@ URL: [url]', 'splash_moved_clipboard' => '', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => '', 'splash_rm_attribute' => '', 'splash_rm_document' => 'Dokument odstránený', @@ -1409,6 +1416,7 @@ URL: [url]', 'workflow_action_name' => '', 'workflow_editor' => '', 'workflow_group_summary' => '', +'workflow_has_cycle' => '', 'workflow_initstate' => '', 'workflow_in_use' => '', 'workflow_layoutdata_saved' => '', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index d27a69344..09576a6d7 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 (1138), tmichelfelder (106) +// Translators: Admin (1140), tmichelfelder (106) $text = array( '2_factor_auth' => '', @@ -173,7 +173,7 @@ URL: [url]', 'at_least_n_users_of_group' => 'Åtminstone [number_of_users] användare av [group]', 'august' => 'augusti', 'authentication' => '', -'author' => '', +'author' => 'Författare', 'automatic_status_update' => 'Automatisk ändring av status', 'back' => 'Tillbaka', 'backup_list' => 'Befintliga backup-filer', @@ -454,7 +454,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Utgångsdatum ändrat', @@ -593,6 +595,7 @@ URL: [url]', 'invalid_target_folder' => 'Ogiltigt ID för målkatalogen', 'invalid_user_id' => 'Ogiltigt användar-ID', 'invalid_version' => 'Ogiltig dokumentversion', +'in_folder' => '', 'in_revision' => '', 'in_workflow' => 'Utkast: under bearbetning', 'is_disabled' => 'Inaktivera kontot', @@ -1020,6 +1023,7 @@ URL: [url]', 'seq_end' => 'på slutet', 'seq_keep' => 'behåll positionen', 'seq_start' => 'första positionen', +'sessions' => '', 'settings' => 'Inställningar', 'settings_activate_module' => 'Aktivera modul', 'settings_activate_php_extension' => 'Aktivera PHP-extension', @@ -1033,7 +1037,7 @@ URL: [url]', 'settings_autoLoginUser' => '', 'settings_autoLoginUser_desc' => '', 'settings_available_languages' => 'Tillgängliga språk', -'settings_available_languages_desc' => '', +'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' => '', 'settings_backupDir_desc' => '', 'settings_cacheDir' => 'Cache-mapp', @@ -1143,6 +1147,8 @@ URL: [url]', '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_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => 'Tema urval', 'settings_enableThemeSelector_desc' => 'Stäng på/av tema urval vid inloggningssidan.', 'settings_enableUpdateReceipt' => '', @@ -1365,6 +1371,7 @@ URL: [url]', 'splash_moved_clipboard' => 'Urklipp flyttades till aktuella katalogen', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => 'Borttagen från urklipp', 'splash_rm_attribute' => 'Attribut har tagits bort', 'splash_rm_document' => 'Dokument borttaget', @@ -1554,6 +1561,7 @@ URL: [url]', 'workflow_action_name' => 'Namn', 'workflow_editor' => 'Arbetsflöde Editor', 'workflow_group_summary' => 'Sammanfattning grupp', +'workflow_has_cycle' => '', 'workflow_initstate' => 'Ursprungsstatus', 'workflow_in_use' => 'Detta arbetsflöde används i ett dokument.', 'workflow_layoutdata_saved' => '', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index a8f6af9ae..fe0adae57 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -460,7 +460,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Süresinin dolacağı tarihi değişti', @@ -599,6 +601,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_folder' => '', 'in_revision' => '', 'in_workflow' => 'İş Akışında', 'is_disabled' => 'Hesap devredışı', @@ -1036,6 +1039,7 @@ URL: [url]', 'seq_end' => 'En sona', 'seq_keep' => 'Sırayı Koru', 'seq_start' => 'İlk sıra', +'sessions' => '', 'settings' => 'Ayarlar', 'settings_activate_module' => 'Modülü etkinleştir', 'settings_activate_php_extension' => 'PHP uzantısını etkinleştir', @@ -1159,6 +1163,8 @@ URL: [url]', '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_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => 'Tema seçimini aç/kapat', 'settings_enableThemeSelector_desc' => 'Giriş sayfasında tema seçimini aç/kapat', 'settings_enableUpdateReceipt' => '', @@ -1381,6 +1387,7 @@ URL: [url]', 'splash_moved_clipboard' => 'Pano mevcut klasöre taşındı', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => 'Panodan silindi', 'splash_rm_attribute' => 'Nitelik silindi', 'splash_rm_document' => 'Doküman silindi', @@ -1570,6 +1577,7 @@ URL: [url]', 'workflow_action_name' => 'İsim', 'workflow_editor' => 'İş Akış Editörü', 'workflow_group_summary' => 'Grup özeti', +'workflow_has_cycle' => '', 'workflow_initstate' => 'İlk durum', 'workflow_in_use' => 'Bu iş akışı doküman(lar) tarafından kullanımda.', 'workflow_layoutdata_saved' => '', diff --git a/languages/uk_UA/lang.inc b/languages/uk_UA/lang.inc index 1c8a6cd1d..d3d477f0f 100644 --- a/languages/uk_UA/lang.inc +++ b/languages/uk_UA/lang.inc @@ -466,7 +466,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => 'Дату терміну виконання змінено', @@ -605,6 +607,7 @@ URL: [url]', 'invalid_target_folder' => 'Невірний ідентифікатор цільового призначення', 'invalid_user_id' => 'Невірний ідентифікатор користувача', 'invalid_version' => 'Невірна версія документа', +'in_folder' => '', 'in_revision' => 'В процесі ревізії', 'in_workflow' => 'В процесі', 'is_disabled' => 'Відключити обліковий запис', @@ -1057,6 +1060,7 @@ URL: [url]', 'seq_end' => 'В кінці', 'seq_keep' => 'Не змінювати', 'seq_start' => 'На початку', +'sessions' => '', 'settings' => 'Налаштування', 'settings_activate_module' => 'Активувати модуль', 'settings_activate_php_extension' => 'Активувати розширення PHP', @@ -1180,6 +1184,8 @@ URL: [url]', 'settings_enableRevisionWorkflow_desc' => 'Увімкніть для актвації функції ревізії документа через певний час', 'settings_enableSelfRevApp' => 'Дозволити рецензію/затвердження
      користувачами, авторизованими у системі', 'settings_enableSelfRevApp_desc' => 'Увімкніть для того, щоб користувачі, в даний момент авторизовані у системі, були в списку рецензентів/затверджувачів і в зміні процесу.', +'settings_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => 'Вибір теми', 'settings_enableThemeSelector_desc' => 'Увімкнути/вимкнути можливість вибору теми на сторінці авторизації.', 'settings_enableUpdateReceipt' => '', @@ -1402,6 +1408,7 @@ URL: [url]', 'splash_moved_clipboard' => 'Буфер обміну перенесено в поточний каталог', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => 'Видалити з буферу обміну', 'splash_rm_attribute' => 'Атрибут видалено', 'splash_rm_document' => 'Документ видалено', @@ -1591,6 +1598,7 @@ URL: [url]', 'workflow_action_name' => 'Назва', 'workflow_editor' => 'Редактор процесу', 'workflow_group_summary' => 'Підсумки по процесу групи', +'workflow_has_cycle' => '', 'workflow_initstate' => 'Початковий статус', 'workflow_in_use' => 'Цей процес використовується в документах.', 'workflow_layoutdata_saved' => '', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index 4fdd449f6..27f51ddc7 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 (679), fengjohn (5) +// Translators: Admin (681), fengjohn (5) $text = array( '2_factor_auth' => '', @@ -289,7 +289,7 @@ URL: [url]', 'docs_in_reception_no_access' => '', 'docs_in_revision_no_access' => '', 'document' => '文档', -'documentcontent' => '', +'documentcontent' => '文档内容', 'documents' => '文档', 'documents_checked_out_by_you' => '', 'documents_in_process' => '待处理文档', @@ -415,7 +415,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => '到期日子已改变', @@ -530,6 +532,7 @@ URL: [url]', 'invalid_target_folder' => '无效目标文件夹ID号', 'invalid_user_id' => '无效用户ID号', 'invalid_version' => '无效文档版本', +'in_folder' => '', 'in_revision' => '', 'in_workflow' => '', 'is_disabled' => '禁用帐户', @@ -576,7 +579,7 @@ URL: [url]', 'linked_to_this_version' => '', 'link_alt_updatedocument' => '超过20M大文件,请选择上传大文件.', 'link_to_version' => '', -'list_access_rights' => '', +'list_access_rights' => '列出所有的访问权限', 'list_contains_no_access_docs' => '', 'list_hooks' => '', 'local_file' => '本地文件', @@ -891,6 +894,7 @@ URL: [url]', 'seq_end' => '末尾', 'seq_keep' => '当前', 'seq_start' => '首位', +'sessions' => '', 'settings' => '设置', 'settings_activate_module' => '', 'settings_activate_php_extension' => '', @@ -1014,6 +1018,8 @@ URL: [url]', 'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => '', 'settings_enableSelfRevApp_desc' => '', +'settings_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => '', 'settings_enableThemeSelector_desc' => '', 'settings_enableUpdateReceipt' => '', @@ -1236,6 +1242,7 @@ URL: [url]', 'splash_moved_clipboard' => '', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => '已从剪切板删除', 'splash_rm_attribute' => '', 'splash_rm_document' => '文档已被移除', @@ -1411,6 +1418,7 @@ URL: [url]', 'workflow_action_name' => '', 'workflow_editor' => '', 'workflow_group_summary' => '', +'workflow_has_cycle' => '', 'workflow_initstate' => '', 'workflow_in_use' => '', 'workflow_layoutdata_saved' => '', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 8d719f72f..baef0f80b 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 (2377) +// Translators: Admin (2378) $text = array( '2_factor_auth' => '', @@ -413,7 +413,9 @@ URL: [url]', 'expire_in_1h' => '', 'expire_in_1m' => '', 'expire_in_1w' => '', +'expire_in_1y' => '', 'expire_in_2h' => '', +'expire_in_2y' => '', 'expire_today' => '', 'expire_tomorrow' => '', 'expiry_changed_email' => '到期日子已改變', @@ -485,7 +487,7 @@ URL: [url]', 'hu_HU' => '匈牙利語', 'id' => '序號', 'identical_version' => '新版本的內容與舊版本完全相同', -'import' => '', +'import' => '匯入', 'importfs' => '', 'import_fs' => '由檔案系統匯入', 'import_fs_warning' => '', @@ -528,6 +530,7 @@ URL: [url]', 'invalid_target_folder' => '無效目的檔案夾ID號', 'invalid_user_id' => '無效用戶ID號', 'invalid_version' => '無效文檔版本', +'in_folder' => '', 'in_revision' => '', 'in_workflow' => '', 'is_disabled' => '禁用帳戶', @@ -889,6 +892,7 @@ URL: [url]', 'seq_end' => '末尾', 'seq_keep' => '當前', 'seq_start' => '首位', +'sessions' => '', 'settings' => '設置', 'settings_activate_module' => '', 'settings_activate_php_extension' => '', @@ -1012,6 +1016,8 @@ URL: [url]', 'settings_enableRevisionWorkflow_desc' => '', 'settings_enableSelfRevApp' => '', 'settings_enableSelfRevApp_desc' => '', +'settings_enableSessionList' => '', +'settings_enableSessionList_desc' => '', 'settings_enableThemeSelector' => '', 'settings_enableThemeSelector_desc' => '', 'settings_enableUpdateReceipt' => '', @@ -1234,6 +1240,7 @@ URL: [url]', 'splash_moved_clipboard' => '', 'splash_move_document' => '', 'splash_move_folder' => '', +'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => '', 'splash_rm_attribute' => '', 'splash_rm_document' => '文檔已被移除', @@ -1409,6 +1416,7 @@ URL: [url]', 'workflow_action_name' => '流程動作名稱', 'workflow_editor' => '', 'workflow_group_summary' => '流程群組簡述', +'workflow_has_cycle' => '', 'workflow_initstate' => '', 'workflow_in_use' => '正在使用之流程', 'workflow_layoutdata_saved' => '', From 0fd0af585478902c2c2c639206800fb5154d2a89 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 11 Apr 2017 10:10:04 +0200 Subject: [PATCH 098/194] check if method 'css' exists, run action if it does after all css filest --- views/bootstrap/class.Bootstrap.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index ba378764e..addb25486 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -72,7 +72,8 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common { echo ''."\n"; if($this->extraheader['css']) echo $this->extraheader['css']; -// echo ''."\n"; + if(method_exists($this, 'css')) + echo ''."\n"; echo ''."\n"; if($this->extraheader['js']) From 71cc4da3a2864119c508158c9800240728cdcf2e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 11 Apr 2017 10:10:54 +0200 Subject: [PATCH 099/194] move css code into new css method of class.Timeline.php --- styles/bootstrap/application.css | 28 ------------------------- views/bootstrap/class.Timeline.php | 33 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 28 deletions(-) diff --git a/styles/bootstrap/application.css b/styles/bootstrap/application.css index ec977766c..27f1be15a 100644 --- a/styles/bootstrap/application.css +++ b/styles/bootstrap/application.css @@ -140,34 +140,6 @@ div.help h3 { margin-right: auto; } -#timeline { - font-size: 12px; - line-height: 14px; -} -div.timeline-event-content { - margin: 3px 5px; -} -div.timeline-frame { - border-radius: 4px; - border-color: #e3e3e3; -} - -div.status_change_2 { - background-color: #DAF6D5; - border-color: #AAF897; -} - -div.status_change_-1 { - background-color: #F6D5D5; - border-color: #F89797; -} - -div.timeline-event-selected { - background-color: #fff785; - border-color: #ffc200; - z-index: 999; -} - div.splash { display: none; } diff --git a/views/bootstrap/class.Timeline.php b/views/bootstrap/class.Timeline.php index e2ce69dca..0acc3e9cc 100644 --- a/views/bootstrap/class.Timeline.php +++ b/views/bootstrap/class.Timeline.php @@ -163,6 +163,39 @@ $(document).ready(function () { $this->printTimelineJs($timelineurl, 550, ''/*date('Y-m-d', $from)*/, ''/*date('Y-m-d', $to+1)*/, $skip); } /* }}} */ + function css() { /* {{{ */ +?> +#timeline { + font-size: 12px; + line-height: 14px; +} +div.timeline-event-content { + margin: 3px 5px; +} +div.timeline-frame { + border-radius: 4px; + border-color: #e3e3e3; +} + +div.status_change_2 { + background-color: #DAF6D5; + border-color: #AAF897; +} + +div.status_change_-1 { + background-color: #F6D5D5; + border-color: #F89797; +} + +div.timeline-event-selected { + background-color: #fff785; + border-color: #ffc200; + z-index: 999; +} +params['dms']; $user = $this->params['user']; From d4a1d1ff9be18f1a73f18508a6443a772ff529c3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 11 Apr 2017 10:12:46 +0200 Subject: [PATCH 100/194] add changes for 4.3.35 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index e4ef825b3..2ef70254e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ -------------------------------------------------------------------------------- - fix authentication in webdav.php (Closes #250) - update last access time only once a minute +- run action 'css' in view if it exists, move css code for timeline -------------------------------------------------------------------------------- Changes in version 4.3.34 From a65101feb77d9f6111376630028d29c8094e2547 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 11 Apr 2017 10:19:36 +0200 Subject: [PATCH 101/194] fix syntax error --- 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 3c3fa4f33..3ad4401f7 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -1373,6 +1373,6 @@ SeedDMS_Core_DMS::getDuplicateDocumentContent() returns complete document - all changes from 4.3.34 merged - + From 0b2d663c56c988f06eb90ab176a457413b557883 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 11 Apr 2017 10:21:23 +0200 Subject: [PATCH 102/194] add empty notes in latest version --- SeedDMS_Core/package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index de00b956c..c6f354b28 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -24,6 +24,7 @@ GPL License +??? From 468ec80db3b73c0665d53be815c686ab2f4d3b22 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 11 Apr 2017 17:36:40 +0200 Subject: [PATCH 103/194] fix saving of enableSessionList --- inc/inc.ClassSettings.php | 4 ++-- views/bootstrap/class.Settings.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 64b3f5242..3b78b11e1 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -179,7 +179,7 @@ class Settings { /* {{{ */ // enable/disable display of the clipboard var $_enableClipboard = true; // enable/disable display of the session list - var $_enableSessionList = true; + var $_enableSessionList = false; // enable/disable display of the drop zone for file upload var $_enableDropUpload = true; // enable/disable display of the folder tree @@ -720,7 +720,7 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "enableConverting", $this->_enableConverting); $this->setXMLAttributValue($node, "enableEmail", $this->_enableEmail); $this->setXMLAttributValue($node, "enableUsersView", $this->_enableUsersView); - $this->setXMLAttributValue($node, "enableClipboard", $this->_enableSessionList); + $this->setXMLAttributValue($node, "enableSessionList", $this->_enableSessionList); $this->setXMLAttributValue($node, "enableClipboard", $this->_enableClipboard); $this->setXMLAttributValue($node, "enableDropUpload", $this->_enableDropUpload); $this->setXMLAttributValue($node, "enableFolderTree", $this->_enableFolderTree); diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index ee6afd36a..350bcd194 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -268,7 +268,7 @@ if(!is_writeable($settings->_configFilePath)) { "> : - _enableClipboard) echo "checked" ?> /> + _enableSessionList) echo "checked" ?> /> "> : From a04dac811e36c497447f8910bc2dee4c60cbdc81 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 18 Apr 2017 13:29:26 +0200 Subject: [PATCH 104/194] use new select menu for expiration date --- op/op.EditDocument.php | 81 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 73 insertions(+), 8 deletions(-) diff --git a/op/op.EditDocument.php b/op/op.EditDocument.php index 9912b85bc..e95df7b7c 100644 --- a/op/op.EditDocument.php +++ b/op/op.EditDocument.php @@ -141,17 +141,42 @@ if (($oldcomment = $document->getComment()) != $comment) { } } -$expires = false; -if (!isset($_POST["expires"]) || $_POST["expires"] != "false") { - if(isset($_POST["expdate"]) && $_POST["expdate"]) { - $tmp = explode('-', $_POST["expdate"]); - $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]); - } else { - $expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]); - } +switch($_POST["presetexpdate"]) { +case "date": + $tmp = explode('-', $_POST["expdate"]); + $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]); + break; +case "1w": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1], $tmp[2]+7, $tmp[0]); + break; +case "1m": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1]+1, $tmp[2], $tmp[0]); + break; +case "1y": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]+1); + break; +case "2y": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]+2); + break; +case "never": +default: + $expires = null; + break; } if ($expires != $document->getExpires()) { + if(isset($GLOBALS['SEEDDMS_HOOKS']['setExpires'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['setExpires'] as $hookObj) { + if (method_exists($hookObj, 'preSetExpires')) { + $hookObj->preSetExpires(null, array('document'=>$document, 'expires'=>&$expires)); + } + } + } + if($document->setExpires($expires)) { if($notifier) { $notifyList = $document->getNotifyList(); @@ -180,14 +205,40 @@ if ($expires != $document->getExpires()) { } else { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); } + + $document->verifyLastestContentExpriry(); + + if(isset($GLOBALS['SEEDDMS_HOOKS']['setExpires'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['setExpires'] as $hookObj) { + if (method_exists($hookObj, 'postSetExpires')) { + $hookObj->postSetExpires(null, array('document'=>$document, 'expires'=>$expires)); + } + } + } } if (($oldkeywords = $document->getKeywords()) != $keywords) { + if(isset($GLOBALS['SEEDDMS_HOOKS']['setKeywords'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['setKeywords'] as $hookObj) { + if (method_exists($hookObj, 'preSetKeywords')) { + $hookObj->preSetExpires(null, array('document'=>$document, 'keywords'=>&$keywords)); + } + } + } + if($document->setKeywords($keywords)) { } else { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); } + + if(isset($GLOBALS['SEEDDMS_HOOKS']['setKeywords'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['setKeywords'] as $hookObj) { + if (method_exists($hookObj, 'postSetKeywords')) { + $hookObj->preSetExpires(null, array('document'=>$document, 'keywords'=>&$keywords)); + } + } + } } if($categories) { @@ -205,10 +256,24 @@ if($categories) { if (count($categoriesarr) != count($oldcategories) || array_diff($categories, $oldcatsids)) { + if(isset($GLOBALS['SEEDDMS_HOOKS']['setCategories'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['setCategories'] as $hookObj) { + if (method_exists($hookObj, 'preSetCategories')) { + $hookObj->preSetExpires(null, array('document'=>$document, 'categories'=>&$categoriesarr)); + } + } + } if($document->setCategories($categoriesarr)) { } else { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); } + if(isset($GLOBALS['SEEDDMS_HOOKS']['setCategories'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['setCategories'] as $hookObj) { + if (method_exists($hookObj, 'postSetCategories')) { + $hookObj->preSetExpires(null, array('document'=>$document, 'categories'=>&$categoriesarr)); + } + } + } } } else { if($document->setCategories(array())) { From 5fdf291cd2bb17e2328fb4264c6f0a75098f65d9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 18 Apr 2017 13:30:13 +0200 Subject: [PATCH 105/194] use new select menu for expiration date --- views/bootstrap/class.EditDocument.php | 28 ++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.EditDocument.php b/views/bootstrap/class.EditDocument.php index e6d62c0ec..f4f099790 100644 --- a/views/bootstrap/class.EditDocument.php +++ b/views/bootstrap/class.EditDocument.php @@ -88,6 +88,12 @@ $(document).ready( function() { keywords: "" } }); + $('#presetexpdate').on('change', function(ev){ + if($(this).val() == 'date') + $('#control_expdate').show(); + else + $('#control_expdate').hide(); + }); }); : - - + + + + > + : + + + -
      - +
      Date: Thu, 20 Apr 2017 09:52:50 +0200 Subject: [PATCH 106/194] parameter __lang__ is used to set language if set --- inc/inc.ClassEmailNotify.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassEmailNotify.php b/inc/inc.ClassEmailNotify.php index 2102be469..1dfa74d42 100644 --- a/inc/inc.ClassEmailNotify.php +++ b/inc/inc.ClassEmailNotify.php @@ -74,7 +74,10 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { $lang = $recipient->getLanguage(); } elseif(is_string($recipient) && trim($recipient) != "") { $to = $recipient; - $lang = 'en_GB'; + if(isset($params['__lang__'])) + $lang = $params['__lang__']; + else + $lang = 'en_GB'; } else { return false; } From 44f6b2edc312cd0200591f1aa8fab9eab866745d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 20 Apr 2017 09:54:12 +0200 Subject: [PATCH 107/194] save configuration value of extension as comma separated values if array --- inc/inc.ClassSettings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 3b78b11e1..bef76e394 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -940,13 +940,13 @@ class Settings { /* {{{ */ $extnodes = $xml->addChild("extensions"); } foreach($this->_extensions as $name => $extension) - { + { // search XML node $extnode = $extnodes->addChild('extension'); $this->setXMLAttributValue($extnode, 'name', $name); foreach($GLOBALS['EXT_CONF'][$name]['config'] as $fieldname=>$conf) { $parameter = $extnode->addChild('parameter'); - $parameter[0] = isset($extension[$fieldname]) ? $extension[$fieldname] : ''; + $parameter[0] = isset($extension[$fieldname]) ? (is_array($extension[$fieldname]) ? implode(',', $extension[$fieldname]) : $extension[$fieldname]) : ''; $this->setXMLAttributValue($parameter, 'name', $fieldname); } From d70713d29e6942d542024da6309c3666638e92f2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 20 Apr 2017 09:55:46 +0200 Subject: [PATCH 108/194] fix calling hooks --- op/op.EditDocument.php | 50 +++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/op/op.EditDocument.php b/op/op.EditDocument.php index e95df7b7c..d46602413 100644 --- a/op/op.EditDocument.php +++ b/op/op.EditDocument.php @@ -169,8 +169,8 @@ default: } if ($expires != $document->getExpires()) { - if(isset($GLOBALS['SEEDDMS_HOOKS']['setExpires'])) { - foreach($GLOBALS['SEEDDMS_HOOKS']['setExpires'] as $hookObj) { + if(isset($GLOBALS['SEEDDMS_HOOKS']['editDocument'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['editDocument'] as $hookObj) { if (method_exists($hookObj, 'preSetExpires')) { $hookObj->preSetExpires(null, array('document'=>$document, 'expires'=>&$expires)); } @@ -208,8 +208,8 @@ if ($expires != $document->getExpires()) { $document->verifyLastestContentExpriry(); - if(isset($GLOBALS['SEEDDMS_HOOKS']['setExpires'])) { - foreach($GLOBALS['SEEDDMS_HOOKS']['setExpires'] as $hookObj) { + if(isset($GLOBALS['SEEDDMS_HOOKS']['editDocument'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['editDocument'] as $hookObj) { if (method_exists($hookObj, 'postSetExpires')) { $hookObj->postSetExpires(null, array('document'=>$document, 'expires'=>$expires)); } @@ -218,10 +218,10 @@ if ($expires != $document->getExpires()) { } if (($oldkeywords = $document->getKeywords()) != $keywords) { - if(isset($GLOBALS['SEEDDMS_HOOKS']['setKeywords'])) { - foreach($GLOBALS['SEEDDMS_HOOKS']['setKeywords'] as $hookObj) { + if(isset($GLOBALS['SEEDDMS_HOOKS']['editDocument'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['editDocument'] as $hookObj) { if (method_exists($hookObj, 'preSetKeywords')) { - $hookObj->preSetExpires(null, array('document'=>$document, 'keywords'=>&$keywords)); + $hookObj->preSetKeywords(null, array('document'=>$document, 'keywords'=>&$keywords, 'oldkeywords'=>&$oldkeywords)); } } } @@ -232,15 +232,16 @@ if (($oldkeywords = $document->getKeywords()) != $keywords) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); } - if(isset($GLOBALS['SEEDDMS_HOOKS']['setKeywords'])) { - foreach($GLOBALS['SEEDDMS_HOOKS']['setKeywords'] as $hookObj) { + if(isset($GLOBALS['SEEDDMS_HOOKS']['editDocument'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['editDocument'] as $hookObj) { if (method_exists($hookObj, 'postSetKeywords')) { - $hookObj->preSetExpires(null, array('document'=>$document, 'keywords'=>&$keywords)); + $hookObj->postSetKeywords(null, array('document'=>$document, 'keywords'=>&$keywords, 'oldkeywords'=>&$oldkeywords)); } } } } +$oldcategories = $document->getCategories(); if($categories) { $categoriesarr = array(); foreach($categories as $catid) { @@ -249,17 +250,16 @@ if($categories) { } } - $oldcategories = $document->getCategories(); $oldcatsids = array(); foreach($oldcategories as $oldcategory) $oldcatsids[] = $oldcategory->getID(); if (count($categoriesarr) != count($oldcategories) || array_diff($categories, $oldcatsids)) { - if(isset($GLOBALS['SEEDDMS_HOOKS']['setCategories'])) { - foreach($GLOBALS['SEEDDMS_HOOKS']['setCategories'] as $hookObj) { + if(isset($GLOBALS['SEEDDMS_HOOKS']['editDocument'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['editDocument'] as $hookObj) { if (method_exists($hookObj, 'preSetCategories')) { - $hookObj->preSetExpires(null, array('document'=>$document, 'categories'=>&$categoriesarr)); + $hookObj->preSetCategories(null, array('document'=>$document, 'categories'=>&$categoriesarr, 'oldcategories'=>&$oldcategories)); } } } @@ -267,19 +267,33 @@ if($categories) { } else { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); } - if(isset($GLOBALS['SEEDDMS_HOOKS']['setCategories'])) { - foreach($GLOBALS['SEEDDMS_HOOKS']['setCategories'] as $hookObj) { + if(isset($GLOBALS['SEEDDMS_HOOKS']['editDocument'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['editDocument'] as $hookObj) { if (method_exists($hookObj, 'postSetCategories')) { - $hookObj->preSetExpires(null, array('document'=>$document, 'categories'=>&$categoriesarr)); + $hookObj->postSetCategories(null, array('document'=>$document, 'categories'=>&$categoriesarr, 'oldcategories'=>&$oldcategories)); } } } } -} else { +} elseif($oldcategories) { + if(isset($GLOBALS['SEEDDMS_HOOKS']['editDocument'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['editDocument'] as $hookObj) { + if (method_exists($hookObj, 'preSetCategories')) { + $hookObj->preSetCategories(null, array('document'=>$document, 'categories'=>array(), 'oldcategories'=>&$oldcategories)); + } + } + } if($document->setCategories(array())) { } else { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); } + if(isset($GLOBALS['SEEDDMS_HOOKS']['editDocument'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['editDocument'] as $hookObj) { + if (method_exists($hookObj, 'postSetCategories')) { + $hookObj->postSetCategories(null, array('document'=>$document, 'categories'=>array(), 'oldcategories'=>&$oldcategories)); + } + } + } } $oldattributes = $document->getAttributes(); From b67339a9c70a0c9e7719a4f3bd42d245c7e96f39 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 20 Apr 2017 09:56:37 +0200 Subject: [PATCH 109/194] pass document to hooks --- op/op.UpdateDocument.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/op/op.UpdateDocument.php b/op/op.UpdateDocument.php index 078a23f40..07d684924 100644 --- a/op/op.UpdateDocument.php +++ b/op/op.UpdateDocument.php @@ -240,7 +240,7 @@ if ($_FILES['userfile']['error'] == 0) { if(isset($GLOBALS['SEEDDMS_HOOKS']['updateDocument'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['updateDocument'] as $hookObj) { if (method_exists($hookObj, 'preUpdateDocument')) { - $hookObj->preUpdateDocument(null, array('name'=>&$name, 'comment'=>&$comment)); + $hookObj->preUpdateDocument(null, $document, array('name'=>&$name, 'comment'=>&$comment)); } } } @@ -254,7 +254,7 @@ if ($_FILES['userfile']['error'] == 0) { if(isset($GLOBALS['SEEDDMS_HOOKS']['updateDocument'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['updateDocument'] as $hookObj) { if (method_exists($hookObj, 'postUpdateDocument')) { - $hookObj->postUpdateDocument(null, $document); + $hookObj->postUpdateDocument(null, $document, $contentResult->getContent()); } } } From 87ead99f34f452be1e7f6d687537551c2048ff4b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 20 Apr 2017 09:57:16 +0200 Subject: [PATCH 110/194] add 'select' as new type of configuration --- views/bootstrap/class.Settings.php | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 350bcd194..412760ef2 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -751,6 +751,49 @@ if(!is_writeable($settings->_configFilePath)) { " value="1" _extensions[$extname][$confkey]) && $settings->_extensions[$extname][$confkey]) echo 'checked'; ?> /> _extensions[$extname][$confkey]); + echo ""; + } elseif(!empty($conf['internal'])) { + $selections = empty($settings->_extensions[$extname][$confkey]) ? array() : explode(",", $settings->_extensions[$extname][$confkey]); + switch($conf['internal']) { + case "categories": + $categories = $dms->getDocumentCategories(); + if($categories) { + echo ""; + } + break; + case "users": + $users = $dms->getAllUsers(); + if($users) { + echo ""; + } + break; + } + } + break; default: ?> " title="" value="_extensions[$extname][$confkey])) echo $settings->_extensions[$extname][$confkey]; ?>" size="" /> From d08940f1acc91f6195ac44b7e783fdd76ba4a2a1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 20 Apr 2017 09:58:09 +0200 Subject: [PATCH 111/194] add examples for more configuration values --- ext/example/conf.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ext/example/conf.php b/ext/example/conf.php index 6f9f09827..0257c73a3 100644 --- a/ext/example/conf.php +++ b/ext/example/conf.php @@ -16,6 +16,25 @@ $EXT_CONF['example'] = array( 'title'=>'Example check box', 'type'=>'checkbox', ), + 'list' => array( + 'title'=>'Example select menu from options', + 'type'=>'select', + 'options' => array('Option 1', 'Option 2', 'Option 3'), + 'multiple' => true, + 'size' => 2, + ), + 'categories' => array( + 'title'=>'Example select menu from categories', + 'type'=>'select', + 'internal'=>'categories', + 'multiple' => true, + ), + 'users' => array( + 'title'=>'Example select menu from users', + 'type'=>'select', + 'internal'=>'users', + 'multiple' => true, + ), ), 'constraints' => array( 'depends' => array('php' => '5.4.4-', 'seeddms' => '4.3.0-'), From f33b70c0db24f19a11627a21b4aad66b103d3cbe Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 20 Apr 2017 09:58:46 +0200 Subject: [PATCH 112/194] fix regex for mimetypes --- op/op.Settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op/op.Settings.php b/op/op.Settings.php index 627c8b0d2..6c7948f8e 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -190,7 +190,7 @@ if ($action == "saveSettings") // SETTINGS - ADVANCED - INDEX CMD $settings->_converters['fulltext'] = $_POST["converters"]; - $newmimetype = preg_replace('#[^A-Za-z0-9_/+.-*]+#', '', $_POST["converters_newmimetype"]); + $newmimetype = preg_replace('#[^A-Za-z0-9_/+.*-]+#', '', $_POST["converters_newmimetype"]); if($newmimetype && trim($_POST["converters_newcmd"])) { $settings->_converters['fulltext'][$newmimetype] = trim($_POST["converters_newcmd"]); } From 1a901f47f32af21c22e79504de5b019462f7d2d5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 20 Apr 2017 09:59:23 +0200 Subject: [PATCH 113/194] fix reges for mimetype --- op/op.Settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op/op.Settings.php b/op/op.Settings.php index e45084733..4db10939d 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -189,7 +189,7 @@ if ($action == "saveSettings") // SETTINGS - ADVANCED - INDEX CMD $settings->_converters['fulltext'] = $_POST["converters"]; - $newmimetype = preg_replace('#[^A-Za-z0-9_/+.-*]+#', '', $_POST["converters_newmimetype"]); + $newmimetype = preg_replace('#[^A-Za-z0-9_/+.*-]+#', '', $_POST["converters_newmimetype"]); if($newmimetype && trim($_POST["converters_newcmd"])) { $settings->_converters['fulltext'][$newmimetype] = trim($_POST["converters_newcmd"]); } From 5484c47ebde22cd6e2a5a3890ed50817e8e57518 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 20 Apr 2017 10:01:15 +0200 Subject: [PATCH 114/194] pass null as first parameter of hooks, will later be the controller --- op/op.UpdateDocument.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/op/op.UpdateDocument.php b/op/op.UpdateDocument.php index 25547ef9c..152272ac3 100644 --- a/op/op.UpdateDocument.php +++ b/op/op.UpdateDocument.php @@ -240,7 +240,7 @@ if ($_FILES['userfile']['error'] == 0) { if(isset($GLOBALS['SEEDDMS_HOOKS']['updateDocument'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['updateDocument'] as $hookObj) { if (method_exists($hookObj, 'preUpdateDocument')) { - $hookObj->preUpdateDocument(array('name'=>&$name, 'comment'=>&$comment)); + $hookObj->preUpdateDocument(null, array('name'=>&$name, 'comment'=>&$comment)); } } } @@ -254,7 +254,7 @@ if ($_FILES['userfile']['error'] == 0) { if(isset($GLOBALS['SEEDDMS_HOOKS']['updateDocument'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['updateDocument'] as $hookObj) { if (method_exists($hookObj, 'postUpdateDocument')) { - $hookObj->postUpdateDocument($document); + $hookObj->postUpdateDocument(null, $document); } } } From dae6b2afde1c1f7e23fd986c86146c01036200b2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 20 Apr 2017 10:03:53 +0200 Subject: [PATCH 115/194] fix parameter of hooks --- op/op.UpdateDocument.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/op/op.UpdateDocument.php b/op/op.UpdateDocument.php index 152272ac3..f73119927 100644 --- a/op/op.UpdateDocument.php +++ b/op/op.UpdateDocument.php @@ -240,7 +240,7 @@ if ($_FILES['userfile']['error'] == 0) { if(isset($GLOBALS['SEEDDMS_HOOKS']['updateDocument'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['updateDocument'] as $hookObj) { if (method_exists($hookObj, 'preUpdateDocument')) { - $hookObj->preUpdateDocument(null, array('name'=>&$name, 'comment'=>&$comment)); + $hookObj->preUpdateDocument(null, $document, array('name'=>&$name, 'comment'=>&$comment)); } } } @@ -254,7 +254,7 @@ if ($_FILES['userfile']['error'] == 0) { if(isset($GLOBALS['SEEDDMS_HOOKS']['updateDocument'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['updateDocument'] as $hookObj) { if (method_exists($hookObj, 'postUpdateDocument')) { - $hookObj->postUpdateDocument(null, $document); + $hookObj->postUpdateDocument(null, $document, $contentResult->getContent()); } } } From f361fe4fdc22c516a8abcbccf094e641fa6f3cb4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 21 Apr 2017 17:19:31 +0200 Subject: [PATCH 116/194] add 'groups' and 'attributedefinition' as internal field types --- views/bootstrap/class.Settings.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 412760ef2..5a16bc987 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -791,6 +791,32 @@ if(!is_writeable($settings->_configFilePath)) { echo ""; } break; + case "groups": + $recs = $dms->getAllGroups(); + if($recs) { + echo ""; + } + break; + case "attributedefinitions": + $recs = $dms->getAllAttributeDefinitions(); + if($recs) { + echo ""; + } + break; } } break; From ee88a9691c477fecb92b1d1f24300ad5f6809f74 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 21 Apr 2017 17:20:16 +0200 Subject: [PATCH 117/194] add examples for group and attributedefinition selection --- ext/example/conf.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ext/example/conf.php b/ext/example/conf.php index 0257c73a3..e84670dc5 100644 --- a/ext/example/conf.php +++ b/ext/example/conf.php @@ -35,6 +35,18 @@ $EXT_CONF['example'] = array( 'internal'=>'users', 'multiple' => true, ), + 'groups' => array( + 'title'=>'Example select menu from groups', + 'type'=>'select', + 'internal'=>'groups', + 'multiple' => true, + ), + 'attributedefinitions' => array( + 'title'=>'Example select menu from attribute definitions', + 'type'=>'select', + 'internal'=>'attributedefinitions', + 'multiple' => true, + ), ), 'constraints' => array( 'depends' => array('php' => '5.4.4-', 'seeddms' => '4.3.0-'), From d55236f49d24c271fc0898acd864c526d4d7df2d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 24 Apr 2017 16:47:57 +0200 Subject: [PATCH 118/194] SeedDMS_Core_DMS::filterDocumentFiles() returns file if author of doc --- 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 7ef060b8a..db8fd8b70 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -329,7 +329,7 @@ class SeedDMS_Core_DMS { static function filterDocumentFiles($user, $files) { /* {{{ */ $tmp = array(); foreach ($files as $file) - if ($file->isPublic() || ($file->getUser()->getID() == $user->getID()) || $user->isAdmin()) + if ($file->isPublic() || ($file->getUser()->getID() == $user->getID()) || $user->isAdmin() || ($file->getDocument()->getOwner()->getID() == $user->getID())) array_push($tmp, $file); return $tmp; } /* }}} */ From e9c0b679bcef7ae0e4af50e0244f6f151a72d7c9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 24 Apr 2017 16:48:38 +0200 Subject: [PATCH 119/194] add changelog for 5.1.2 --- 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 e8d48639d..44a99ad46 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -24,7 +24,8 @@ GPL License -??? +SeedDMS_Core_DMS::filterDocumentFiles() returns also documents which are not public +if the owner tries to access them From 0994dfb667231bf529e724471f8d485eaed092f4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 24 Apr 2017 16:49:01 +0200 Subject: [PATCH 120/194] add entry for 5.1.2 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 14fc2a74d..ef3c6b510 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ - add select menu for predifined expiration dates - add some more hooks - add list of currently logged in users in menu +- the owner of a document can see even none public attachments - merged changes from 5.0.12 -------------------------------------------------------------------------------- From d2fc9b534f39cb5c75e6fe6ee98e67fbb733520d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 27 Apr 2017 06:50:12 +0200 Subject: [PATCH 121/194] add enableMultiUpload and enableAttachmentUpload --- inc/inc.ClassSettings.php | 10 +++++++++- op/op.Settings.php | 2 ++ views/bootstrap/class.Settings.php | 8 ++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index bef76e394..137326eca 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -162,7 +162,7 @@ class Settings { /* {{{ */ var $_logFileEnable = true; // the log file rotation var $_logFileRotation = "d"; - // Enable file upload by jumploader + // Enable file upload by fine-uploader (was 'jumploader') var $_enableLargeFileUpload = false; // size of partitions for file uploaded by fine-loader var $_partitionSize = 2000000; @@ -182,6 +182,10 @@ class Settings { /* {{{ */ var $_enableSessionList = false; // enable/disable display of the drop zone for file upload var $_enableDropUpload = true; + // Enable multiple file upload + var $_enableMultiUpload = false; + // Enable upload of attachments with document upload + var $_enableAttachmentUpload = false; // enable/disable display of the folder tree var $_enableFolderTree = true; // count documents and folders for folderview recursively @@ -415,6 +419,8 @@ class Settings { /* {{{ */ $this->_enableSessionList = Settings::boolVal($tab["enableSessionList"]); $this->_enableClipboard = Settings::boolVal($tab["enableClipboard"]); $this->_enableDropUpload = Settings::boolVal($tab["enableDropUpload"]); + $this->_enableAttachmentUpload = Settings::boolVal($tab["enableAttachmentUpload"]); + $this->_enableMultiUpload = Settings::boolVal($tab["enableMultiUpload"]); $this->_enableFolderTree = Settings::boolVal($tab["enableFolderTree"]); $this->_enableRecursiveCount = Settings::boolVal($tab["enableRecursiveCount"]); $this->_maxRecursiveCount = intval($tab["maxRecursiveCount"]); @@ -723,6 +729,8 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "enableSessionList", $this->_enableSessionList); $this->setXMLAttributValue($node, "enableClipboard", $this->_enableClipboard); $this->setXMLAttributValue($node, "enableDropUpload", $this->_enableDropUpload); + $this->setXMLAttributValue($node, "enableMultiUpload", $this->_enableMultiUpload); + $this->setXMLAttributValue($node, "enableAttachmentUpload", $this->_enableAttachmentUpload); $this->setXMLAttributValue($node, "enableFolderTree", $this->_enableFolderTree); $this->setXMLAttributValue($node, "enableRecursiveCount", $this->_enableRecursiveCount); $this->setXMLAttributValue($node, "maxRecursiveCount", $this->_maxRecursiveCount); diff --git a/op/op.Settings.php b/op/op.Settings.php index 6c7948f8e..9b62701bd 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -84,6 +84,8 @@ if ($action == "saveSettings") $settings->_enableSessionList = getBoolValue("enableSessionList"); $settings->_enableClipboard = getBoolValue("enableClipboard"); $settings->_enableDropUpload = getBoolValue("enableDropUpload"); + $settings->_enableMultiUpload = getBoolValue("enableMultiUpload"); + $settings->_enableAttachmentUpload = getBoolValue("enableAttachmentUpload"); $settings->_enableFolderTree = getBoolValue("enableFolderTree"); $settings->_enableRecursiveCount = getBoolValue("enableRecursiveCount"); $settings->_maxRecursiveCount = intval($_POST["maxRecursiveCount"]); diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 5a16bc987..be20e5f5a 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -273,6 +273,14 @@ if(!is_writeable($settings->_configFilePath)) { "> : _enableDropUpload) echo "checked" ?> /> + + "> + : + _enableMultiUpload) echo "checked" ?> /> + + "> + : + _enableAttachmentUpload) echo "checked" ?> /> "> : From a83b9ba3954ca7a6c36105031d284b4eeb4cfa8d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 27 Apr 2017 06:51:16 +0200 Subject: [PATCH 122/194] check for enableMultiUpload and enableAttachmentUpload --- out/out.AddDocument.php | 2 + views/bootstrap/class.AddDocument.php | 67 ++++++++++++++++++++------- 2 files changed, 53 insertions(+), 16 deletions(-) diff --git a/out/out.AddDocument.php b/out/out.AddDocument.php index d65cd360f..6a6ba9a9b 100644 --- a/out/out.AddDocument.php +++ b/out/out.AddDocument.php @@ -54,6 +54,8 @@ if($view) { $view->setParam('folder', $folder); $view->setParam('strictformcheck', $settings->_strictFormCheck); $view->setParam('enablelargefileupload', $settings->_enableLargeFileUpload); + $view->setParam('enableattachmentupload', $settings->_enableAttachmentUpload); + $view->setParam('enablemultiupload', $settings->_enableMultiUpload); $view->setParam('enableadminrevapp', $settings->_enableAdminRevApp); $view->setParam('enableownerrevapp', $settings->_enableOwnerRevApp); $view->setParam('enableselfrevapp', $settings->_enableSelfRevApp); diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 13ab0cd25..498e23b2d 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -36,16 +36,27 @@ class SeedDMS_View_AddDocument extends SeedDMS_Bootstrap_Style { $partitionsize = $this->params['partitionsize']; $maxuploadsize = $this->params['maxuploadsize']; $enablelargefileupload = $this->params['enablelargefileupload']; + $enablemultiupload = $this->params['enablemultiupload']; + $enableattachmentupload = $this->params['enableattachmentupload']; header('Content-Type: application/javascript; charset=UTF-8'); - if($enablelargefileupload) - $this->printFineUploaderJs('../op/op.UploadChunks.php', $partitionsize, $maxuploadsize); + if($enablelargefileupload) { + $this->printFineUploaderJs('../op/op.UploadChunks.php', $partitionsize, $maxuploadsize, $enablemultiupload); + if($enableattachmentupload) { + //$this->printFineUploaderJs('../op/op.UploadChunks.php', $partitionsize, $maxuploadsize, , $enablemultiupload, 'attachment'); + } + } ?> $(document).ready(function() { $('#new-file').click(function(event) { - $("#upload-file").clone().appendTo("#upload-files").removeAttr("id").children('div').children('input').val(''); + $("#userfile-upload-file").clone().appendTo("#userfile-upload-files").removeAttr("id").children('div').children('input').val(''); }); - + + $('#new-attachment').click(function(event) { +console.log('Hallo'); + $("#attachment-upload-file").clone().appendTo("#attachment-upload-files").removeAttr("id").children('div').children('input').val(''); + }); + jQuery.validator.addMethod("alternatives", function(value, element, params) { if(value == '' && params.val() == '') return false; @@ -84,7 +95,10 @@ $(document).ready(function() { if($enablelargefileupload) { ?> submitHandler: function(form) { - manualuploader.uploadStoredFiles(); + userfileuploader.uploadStoredFiles(); + +// attachmentuploader.uploadStoredFiles(); + }, - fineuploaderuuids: { - fineuploader: [ manualuploader, $('#dropfolderfileform1') ] + 'userfile-fine-uploader-uuids': { + fineuploader: [ userfileuploader, $('#dropfolderfileform1') ] } params['user']; $folder = $this->params['folder']; $enablelargefileupload = $this->params['enablelargefileupload']; + $enablemultiupload = $this->params['enablemultiupload']; + $enableattachmentupload = $this->params['enableattachmentupload']; $enableadminrevapp = $this->params['enableadminrevapp']; $enableownerrevapp = $this->params['enableownerrevapp']; $enableselfrevapp = $this->params['enableselfrevapp']; @@ -164,9 +180,6 @@ $(document).ready(function() { $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder); $msg = getMLText("max_upload_size").": ".ini_get( "upload_max_filesize"); - if(0 && $enablelargefileupload) { - $msg .= "

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

      "; - } $this->warningMsg($msg); $this->contentHeading(getMLText("add_document")); $this->contentContainerStart(); @@ -306,20 +319,16 @@ $(document).ready(function() { : - printFineUploaderHtml(); else { $this->printFileChooser('userfile[]', false); + if($enablemultiupload) { ?> @@ -355,6 +364,32 @@ $(document).ready(function() { } } } + /* Do not allow upload of attachments if multiple documents can be uploaded, + * because attachments cannot be assigned uniquely to a document */ + if($enableattachmentupload && !$enablemultiupload) { +?> + + + contentSubHeading(getMLText("linked_files")); ?> + + + + : + +printFineUploaderHtml('attachment'); + else { + $this->printFileChooser('attachment[]', false); +?> + + + + + From b1d5548853a85ca1f4a0ca17098717e403e47b9d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 27 Apr 2017 06:51:43 +0200 Subject: [PATCH 123/194] also upload attachment if passed --- op/op.AddDocument.php | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php index 9cbd91e14..86a6ec25f 100644 --- a/op/op.AddDocument.php +++ b/op/op.AddDocument.php @@ -257,9 +257,10 @@ if($settings->_dropFolderDir) { } } -if(isset($_POST['fineuploaderuuids']) && $_POST['fineuploaderuuids']) { - $uuids = explode(';', $_POST['fineuploaderuuids']); - $names = explode(';', $_POST['fineuploadernames']); +$prefix = 'userfile'; +if(isset($_POST[$prefix.'-fine-uploader-uuids']) && $_POST[$prefix.'-fine-uploader-uuids']) { + $uuids = explode(';', $_POST[$prefix.'-fine-uploader-uuids']); + $names = explode(';', $_POST[$prefix.'-fine-uploader-names']); foreach($uuids as $i=>$uuid) { $fullfile = $settings->_stagingDir.'/'.utf8_basename($uuid); if(file_exists($fullfile)) { @@ -489,6 +490,29 @@ for ($file_num=0;$file_num $folder->getName())),getMLText("uploading_zerosize")); + } + if ($_FILES['attachment']['error'][$attach_num]!=0){ + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("uploading_failed")); + } + + $attachfiletmp = $_FILES["attachment"]["tmp_name"][$file_num]; + $attachfiletype = $_FILES["attachment"]["type"][$file_num]; + $attachfilename = $_FILES["attachment"]["name"][$file_num]; + + $fileType = ".".pathinfo($attachfilename, PATHINFO_EXTENSION); + + if($settings->_overrideMimeType) { + $finfo = finfo_open(FILEINFO_MIME_TYPE); + $attachfiletype = finfo_file($finfo, $attachfiletmp); + } + + $res = $document->addDocumentFile(utf8_basename($attachfilename), '', $user, $attachfiletmp, utf8_basename($attachfilename),$fileType, $attachfiletype); + } } add_log_line("?name=".$name."&folderid=".$folderid); From 19d13f5b3076eef9fbb437bc18ae516788757183 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 27 Apr 2017 06:52:50 +0200 Subject: [PATCH 124/194] make fine uploader and btn-file usable twice on a page --- styles/bootstrap/application.js | 2 +- views/bootstrap/class.Bootstrap.php | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index 61b90b146..1986908ef 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -347,7 +347,7 @@ $(document).ready( function() { input.trigger('fileselect', [numFiles, label]); }); - $(document).on('fileselect', '#upload-file .btn-file :file', function(event, numFiles, label) { + $(document).on('fileselect', '.upload-file .btn-file :file', function(event, numFiles, label) { var input = $(this).parents('.input-append').find(':text'), log = numFiles > 1 ? numFiles + ' files selected' : label; diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index b65f163f3..da9ff293c 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -865,13 +865,14 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } /* }}} */ function printFileChooser($varname='userfile', $multiple=false, $accept='') { /* {{{ */ + $id = preg_replace('/[^A-Za-z]/', '', $varname); ?> -
      -
      +
      +
      - > + >
      @@ -2354,11 +2355,11 @@ mayscript> * @param integer $maxfiles maximum number of files allowed to upload * @param array $fields list of post fields */ - function printFineUploaderHtml() { /* {{{ */ + function printFineUploaderHtml($prefix='userfile') { /* {{{ */ ?> -
      - - +
      + id="-fine-uploader-uuids" name="-fine-uploader-uuids" value="" /> + * @param integer $maxfiles maximum number of files allowed to upload * @param array $fields list of post fields */ - function printFineUploaderJs($uploadurl, $partsize=0, $maxuploadsize=0, $multiple=true) { /* {{{ */ + function printFineUploaderJs($uploadurl, $partsize=0, $maxuploadsize=0, $multiple=true, $prefix='userfile') { /* {{{ */ ?> $(document).ready(function() { - manualuploader = new qq.FineUploader({ + uploader = new qq.FineUploader({ debug: false, autoUpload: false, multiple: , - element: $('#manual-fine-uploader')[0], + element: $('#-fine-uploader')[0], template: 'qq-template', request: { endpoint: '' @@ -2405,8 +2406,8 @@ $(document).ready(function() { uuids.push(this.getUuid(succeeded[i])) names.push(this.getName(succeeded[i])) } - $('#fineuploaderuuids').val(uuids.join(';')); - $('#fineuploadernames').val(names.join(';')); + $('#-fine-uploader-uuids').val(uuids.join(';')); + $('#-fine-uploader-names').val(names.join(';')); /* Run upload only if all files could be uploaded */ if(succeeded.length > 0 && failed.length == 0) document.getElementById('form1').submit(); From 6ee6e3fde295440bdff298937fceaed8d2be72ca Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 27 Apr 2017 17:19:49 +0200 Subject: [PATCH 125/194] take out enableAttachmentUpload --- inc/inc.ClassSettings.php | 4 ---- op/op.Settings.php | 1 - views/bootstrap/class.Settings.php | 4 ---- 3 files changed, 9 deletions(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 137326eca..87aafcd63 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -184,8 +184,6 @@ class Settings { /* {{{ */ var $_enableDropUpload = true; // Enable multiple file upload var $_enableMultiUpload = false; - // Enable upload of attachments with document upload - var $_enableAttachmentUpload = false; // enable/disable display of the folder tree var $_enableFolderTree = true; // count documents and folders for folderview recursively @@ -419,7 +417,6 @@ class Settings { /* {{{ */ $this->_enableSessionList = Settings::boolVal($tab["enableSessionList"]); $this->_enableClipboard = Settings::boolVal($tab["enableClipboard"]); $this->_enableDropUpload = Settings::boolVal($tab["enableDropUpload"]); - $this->_enableAttachmentUpload = Settings::boolVal($tab["enableAttachmentUpload"]); $this->_enableMultiUpload = Settings::boolVal($tab["enableMultiUpload"]); $this->_enableFolderTree = Settings::boolVal($tab["enableFolderTree"]); $this->_enableRecursiveCount = Settings::boolVal($tab["enableRecursiveCount"]); @@ -730,7 +727,6 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "enableClipboard", $this->_enableClipboard); $this->setXMLAttributValue($node, "enableDropUpload", $this->_enableDropUpload); $this->setXMLAttributValue($node, "enableMultiUpload", $this->_enableMultiUpload); - $this->setXMLAttributValue($node, "enableAttachmentUpload", $this->_enableAttachmentUpload); $this->setXMLAttributValue($node, "enableFolderTree", $this->_enableFolderTree); $this->setXMLAttributValue($node, "enableRecursiveCount", $this->_enableRecursiveCount); $this->setXMLAttributValue($node, "maxRecursiveCount", $this->_maxRecursiveCount); diff --git a/op/op.Settings.php b/op/op.Settings.php index 9b62701bd..c7e5ec779 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -85,7 +85,6 @@ if ($action == "saveSettings") $settings->_enableClipboard = getBoolValue("enableClipboard"); $settings->_enableDropUpload = getBoolValue("enableDropUpload"); $settings->_enableMultiUpload = getBoolValue("enableMultiUpload"); - $settings->_enableAttachmentUpload = getBoolValue("enableAttachmentUpload"); $settings->_enableFolderTree = getBoolValue("enableFolderTree"); $settings->_enableRecursiveCount = getBoolValue("enableRecursiveCount"); $settings->_maxRecursiveCount = intval($_POST["maxRecursiveCount"]); diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index be20e5f5a..3100a3830 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -277,10 +277,6 @@ if(!is_writeable($settings->_configFilePath)) { "> : _enableMultiUpload) echo "checked" ?> /> - - "> - : - _enableAttachmentUpload) echo "checked" ?> /> "> : From 73ecd559745d9bb848ac2a688d95fd550ffefb14 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 27 Apr 2017 17:20:33 +0200 Subject: [PATCH 126/194] move code into controller --- controllers/class.AddDocument.php | 145 ++++++++++++++++++++++++++++++ out/out.AddDocument.php | 1 - 2 files changed, 145 insertions(+), 1 deletion(-) create mode 100644 controllers/class.AddDocument.php diff --git a/controllers/class.AddDocument.php b/controllers/class.AddDocument.php new file mode 100644 index 000000000..ab4271104 --- /dev/null +++ b/controllers/class.AddDocument.php @@ -0,0 +1,145 @@ + + * @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_AddDocument extends SeedDMS_Controller_Common { + + protected function addAttachments($document) { /* {{{ */ + $user = $this->params['user']; + $settings = $this->params['settings']; + /* Check for attachments */ + for ($attach_num=0;$attach_num $folder->getName())),getMLText("uploading_zerosize")); + } + if ($_FILES['attachment']['error'][$attach_num]!=0){ +// UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("uploading_failed")); + } + + $attachfiletmp = $_FILES["attachment"]["tmp_name"][$attach_num]; + $attachfiletype = $_FILES["attachment"]["type"][$attach_num]; + $attachfilename = $_FILES["attachment"]["name"][$attach_num]; + + $fileType = ".".pathinfo($attachfilename, PATHINFO_EXTENSION); + + if($settings->_overrideMimeType) { + $finfo = finfo_open(FILEINFO_MIME_TYPE); + $attachfiletype = finfo_file($finfo, $attachfiletmp); + } + + $res = $document->addDocumentFile(utf8_basename($attachfilename), '', $user, $attachfiletmp, utf8_basename($attachfilename),$fileType, $attachfiletype); + } + } /* }}} */ + + public function run() { /* {{{ */ + $name = $this->getParam('name'); + $comment = $this->getParam('comment'); + + /* Call preAddDocument early, because it might need to modify some + * of the parameters. + */ + if(false === $this->callHook('preAddDocument', array('name'=>&$name, 'comment'=>&$comment))) { + $this->errormsg = 'hook_preAddDocument_failed'; + return null; + } + + $dms = $this->params['dms']; + $user = $this->params['user']; + $settings = $this->params['settings']; + $documentsource = $this->params['documentsource']; + $index = $this->params['index']; + $indexconf = $this->params['indexconf']; + $folder = $this->params['folder']; + $expires = $this->getParam('expires'); + $keywords = $this->getParam('keywords'); + $cats = $this->getParam('categories'); + $owner = $this->getParam('owner'); + $userfiletmp = $this->getParam('userfiletmp'); + $userfilename = $this->getParam('userfilename'); + $filetype = $this->getParam('filetype'); + $userfiletype = $this->getParam('userfiletype'); + $sequence = $this->getParam('sequence'); + $reviewers = $this->getParam('reviewers'); + $approvers = $this->getParam('approvers'); + $reqversion = $this->getParam('reqversion'); + $version_comment = $this->getParam('versioncomment'); + $attributes = $this->getParam('attributes'); + $attributes_version = $this->getParam('attributesversion'); + $workflow = $this->getParam('workflow'); + $notificationgroups = $this->getParam('notificationgroups'); + $notificationusers = $this->getParam('notificationusers'); + $maxsizeforfulltext = $this->getParam('maxsizeforfulltext'); + $defaultaccessdocs = $this->getParam('defaultaccessdocs'); + + $result = $this->callHook('addDocument'); + if($result === null) { + $filesize = SeedDMS_Core_File::fileSize($userfiletmp); + $res = $folder->addDocument($name, $comment, $expires, $owner, $keywords, + $cats, $userfiletmp, utf8_basename($userfilename), + $filetype, $userfiletype, $sequence, + $reviewers, $approvers, $reqversion, + $version_comment, $attributes, $attributes_version, $workflow); + + if (is_bool($res) && !$res) { + $this->errormsg = "error_occured"; + return false; + } + + $document = $res[0]; + + /* Set access as specified in settings. */ + if($defaultaccessdocs) { + if($defaultaccessdocs > 0 && $defaultaccessdocs < 4) { + $document->setInheritAccess(0, true); + $document->setDefaultAccess($defaultaccessdocs, true); + } + } + + if($index) { + $idoc = new $indexconf['IndexedDocument']($dms, $document, isset($settings->_converters['fulltext']) ? $settings->_converters['fulltext'] : null, !($filesize < $settings->_maxSizeForFullText)); + if(!$this->callHook('preIndexDocument', $document, $idoc)) { + } + $index->addDocument($idoc); + } + + /* Add a default notification for the owner of the document */ + if($settings->_enableOwnerNotification) { + $res = $document->addNotify($user->getID(), true); + } + /* 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) { + if($document->getGroupAccessMode($notgroup) >= M_READ) + $res = $document->addNotify($notgroup->getID(), false); + } + + if(!$this->callHook('postAddDocument', $document)) { + } + $result = $document; + } + + return $result; + } /* }}} */ +} + diff --git a/out/out.AddDocument.php b/out/out.AddDocument.php index 6a6ba9a9b..4b545da02 100644 --- a/out/out.AddDocument.php +++ b/out/out.AddDocument.php @@ -54,7 +54,6 @@ if($view) { $view->setParam('folder', $folder); $view->setParam('strictformcheck', $settings->_strictFormCheck); $view->setParam('enablelargefileupload', $settings->_enableLargeFileUpload); - $view->setParam('enableattachmentupload', $settings->_enableAttachmentUpload); $view->setParam('enablemultiupload', $settings->_enableMultiUpload); $view->setParam('enableadminrevapp', $settings->_enableAdminRevApp); $view->setParam('enableownerrevapp', $settings->_enableOwnerRevApp); From fe13c6cee1a2d06df1a9514fb946919cef42b740 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 27 Apr 2017 17:21:05 +0200 Subject: [PATCH 127/194] move code into controller --- op/op.AddDocument.php | 172 +++++++++++++++++------------------------- 1 file changed, 69 insertions(+), 103 deletions(-) diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php index 86a6ec25f..3d3db7173 100644 --- a/op/op.AddDocument.php +++ b/op/op.AddDocument.php @@ -28,6 +28,10 @@ include("../inc/inc.Extension.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 from a trusted request */ if(!checkFormKey('adddocument')) { @@ -77,6 +81,13 @@ if($version_comment == "" && isset($_POST["use_comment"])) $keywords = trim($_POST["keywords"]); $categories = isset($_POST["categories"]) ? $_POST["categories"] : null; +$cats = array(); +if($categories) { + foreach($categories as $catid) { + $cats[] = $dms->getDocumentCategory($catid); + } +} + if(isset($_POST["attributes"])) $attributes = $_POST["attributes"]; else @@ -237,10 +248,13 @@ if($settings->_workflowMode == 'traditional' || $settings->_workflowMode == 'tra } } +$docsource = 'upload'; + if($settings->_dropFolderDir) { if(isset($_POST["dropfolderfileform1"]) && $_POST["dropfolderfileform1"]) { $fullfile = $settings->_dropFolderDir.'/'.$user->getLogin().'/'.$_POST["dropfolderfileform1"]; if(file_exists($fullfile)) { + $docsource = 'dropfolder'; /* Check if a local file is uploaded as well */ if(isset($_FILES["userfile"]['error'][0])) { if($_FILES["userfile"]['error'][0] != 0) @@ -275,6 +289,33 @@ if(isset($_POST[$prefix.'-fine-uploader-uuids']) && $_POST[$prefix.'-fine-upload } } +if($settings->_enableFullSearch) { + $index = $indexconf['Indexer']::open($settings->_luceneDir); + $indexconf['Indexer']::init($settings->_stopWordsFile); +} else { + $index = null; +} + +/* Check if additional notification shall be added */ +$notusers = array(); +if(!empty($_POST['notification_users'])) { + foreach($_POST['notification_users'] as $notuserid) { + $notuser = $dms->getUser($notuserid); + if($notuser) { + $notusers[] = $notuser; + } + } +} +$notgroups = array(); +if(!empty($_POST['notification_groups'])) { + foreach($_POST['notification_groups'] as $notgroupid) { + $notgroup = $dms->getGroup($notgroupid); + if($notgroup) { + $notgroups[] = $notgroup; + } + } +} + /* Check files for Errors first */ for ($file_num=0;$file_numgetDocumentCategory($catid); - } - } + $controller->setParam('documentsource', $docsource); + $controller->setParam('folder', $folder); + $controller->setParam('index', $index); + $controller->setParam('indexconf', $indexconf); + $controller->setParam('name', $name); + $controller->setParam('comment', $comment); + $controller->setParam('expires', $expires); + $controller->setParam('keywords', $keywords); + $controller->setParam('categories', $cats); + $controller->setParam('owner', $owner); + $controller->setParam('userfiletmp', $userfiletmp); + $controller->setParam('userfilename', $userfilename); + $controller->setParam('filetype', $fileType); + $controller->setParam('userfiletype', $userfiletype); + $controller->setParam('sequence', $sequence); + $controller->setParam('reviewers', $reviewers); + $controller->setParam('approvers', $approvers); + $controller->setParam('reqversion', $reqversion); + $controller->setParam('versioncomment', $version_comment); + $controller->setParam('attributes', $attributes); + $controller->setParam('attributesversion', $attributes_version); + $controller->setParam('workflow', $workflow); + $controller->setParam('notificationgroups', $notgroups); + $controller->setParam('notificationusers', $notusers); + $controller->setParam('maxsizeforfulltext', $settings->_maxSizeForFullText); + $controller->setParam('defaultaccessdocs', $settings->_defaultAccessDocs); - if(isset($GLOBALS['SEEDDMS_HOOKS']['addDocument'])) { - foreach($GLOBALS['SEEDDMS_HOOKS']['addDocument'] as $hookObj) { - if (method_exists($hookObj, 'preAddDocument')) { - $hookObj->preAddDocument(null, array('name'=>&$name, 'comment'=>&$comment)); - } - } - } - - $filesize = SeedDMS_Core_File::fileSize($userfiletmp); - $res = $folder->addDocument($name, $comment, $expires, $owner, $keywords, - $cats, $userfiletmp, utf8_basename($userfilename), - $fileType, $userfiletype, $sequence, - $reviewers, $approvers, $reqversion, - $version_comment, $attributes, $attributes_version, $workflow); - - if (is_bool($res) && !$res) { - UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_occured")); + if(!$document = $controller->run()) { + UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText($controller->getErrorMsg())); } else { - $document = $res[0]; - - /* Set access as specified in settings. */ - if($settings->_defaultAccessDocs) { - if($settings->_defaultAccessDocs > 0 && $settings->_defaultAccessDocs < 4) { - $document->setInheritAccess(0, true); - $document->setDefaultAccess($settings->_defaultAccessDocs, true); - } - } - - if(isset($GLOBALS['SEEDDMS_HOOKS']['addDocument'])) { - foreach($GLOBALS['SEEDDMS_HOOKS']['addDocument'] as $hookObj) { - if (method_exists($hookObj, 'postAddDocument')) { - $hookObj->postAddDocument(null, $document); - } - } - } - if($settings->_enableFullSearch) { - $index = $indexconf['Indexer']::open($settings->_luceneDir); - if($index) { - $indexconf['Indexer']::init($settings->_stopWordsFile); - $idoc = new $indexconf['IndexedDocument']($dms, $document, isset($settings->_converters['fulltext']) ? $settings->_converters['fulltext'] : null, !($filesize < $settings->_maxSizeForFullText)); - if(isset($GLOBALS['SEEDDMS_HOOKS']['addDocument'])) { - foreach($GLOBALS['SEEDDMS_HOOKS']['addDocument'] as $hookObj) { - if (method_exists($hookObj, 'preIndexDocument')) { - $hookObj->preIndexDocument(null, $document, $idoc); - } - } - } - $index->addDocument($idoc); - } - } - - /* Add a default notification for the owner of the document */ - if($settings->_enableOwnerNotification) { - $res = $document->addNotify($user->getID(), true); - } - /* Check if additional notification shall be added */ - if(!empty($_POST['notification_users'])) { - foreach($_POST['notification_users'] as $notuserid) { - $notuser = $dms->getUser($notuserid); - if($notuser) { - if($document->getAccessMode($user) >= M_READ) - $res = $document->addNotify($notuserid, true); - } - } - } - if(!empty($_POST['notification_groups'])) { - foreach($_POST['notification_groups'] as $notgroupid) { - $notgroup = $dms->getGroup($notgroupid); - if($notgroup) { - if($document->getGroupAccessMode($notgroup) >= M_READ) - $res = $document->addNotify($notgroupid, false); - } - } - } - // Send notification to subscribers of folder. if($notifier) { $fnl = $folder->getNotifyList(); @@ -490,29 +479,6 @@ for ($file_num=0;$file_num $folder->getName())),getMLText("uploading_zerosize")); - } - if ($_FILES['attachment']['error'][$attach_num]!=0){ - UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("uploading_failed")); - } - - $attachfiletmp = $_FILES["attachment"]["tmp_name"][$file_num]; - $attachfiletype = $_FILES["attachment"]["type"][$file_num]; - $attachfilename = $_FILES["attachment"]["name"][$file_num]; - - $fileType = ".".pathinfo($attachfilename, PATHINFO_EXTENSION); - - if($settings->_overrideMimeType) { - $finfo = finfo_open(FILEINFO_MIME_TYPE); - $attachfiletype = finfo_file($finfo, $attachfiletmp); - } - - $res = $document->addDocumentFile(utf8_basename($attachfilename), '', $user, $attachfiletmp, utf8_basename($attachfilename),$fileType, $attachfiletype); - } } add_log_line("?name=".$name."&folderid=".$folderid); From bd0064e5ab7dfbee18cecdc757f441dd8d317d24 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 27 Apr 2017 17:21:24 +0200 Subject: [PATCH 128/194] remove attachment upload --- views/bootstrap/class.AddDocument.php | 51 ++++++--------------------- 1 file changed, 11 insertions(+), 40 deletions(-) diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 498e23b2d..7c048f3f9 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -37,26 +37,16 @@ class SeedDMS_View_AddDocument extends SeedDMS_Bootstrap_Style { $maxuploadsize = $this->params['maxuploadsize']; $enablelargefileupload = $this->params['enablelargefileupload']; $enablemultiupload = $this->params['enablemultiupload']; - $enableattachmentupload = $this->params['enableattachmentupload']; header('Content-Type: application/javascript; charset=UTF-8'); if($enablelargefileupload) { $this->printFineUploaderJs('../op/op.UploadChunks.php', $partitionsize, $maxuploadsize, $enablemultiupload); - if($enableattachmentupload) { - //$this->printFineUploaderJs('../op/op.UploadChunks.php', $partitionsize, $maxuploadsize, , $enablemultiupload, 'attachment'); - } } ?> $(document).ready(function() { $('#new-file').click(function(event) { $("#userfile-upload-file").clone().appendTo("#userfile-upload-files").removeAttr("id").children('div').children('input').val(''); }); - - $('#new-attachment').click(function(event) { -console.log('Hallo'); - $("#attachment-upload-file").clone().appendTo("#attachment-upload-files").removeAttr("id").children('div').children('input').val(''); - }); - jQuery.validator.addMethod("alternatives", function(value, element, params) { if(value == '' && params.val() == '') return false; @@ -96,9 +86,6 @@ console.log('Hallo'); ?> submitHandler: function(form) { userfileuploader.uploadStoredFiles(); - -// attachmentuploader.uploadStoredFiles(); - }, params['folder']; $enablelargefileupload = $this->params['enablelargefileupload']; $enablemultiupload = $this->params['enablemultiupload']; - $enableattachmentupload = $this->params['enableattachmentupload']; $enableadminrevapp = $this->params['enableadminrevapp']; $enableownerrevapp = $this->params['enableownerrevapp']; $enableselfrevapp = $this->params['enableselfrevapp']; @@ -348,7 +334,7 @@ console.log('Hallo'); $attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_all)); if($attrdefs) { foreach($attrdefs as $attrdef) { - $arr = $this->callHook('editDocumentAttribute', null, $attrdef); + $arr = $this->callHook('editDocumentContentAttribute', null, $attrdef); if(is_array($arr)) { echo ""; echo "".$arr[0].":"; @@ -364,32 +350,17 @@ console.log('Hallo'); } } } - /* Do not allow upload of attachments if multiple documents can be uploaded, - * because attachments cannot be assigned uniquely to a document */ - if($enableattachmentupload && !$enablemultiupload) { -?> - - - contentSubHeading(getMLText("linked_files")); ?> - - - - : - -printFineUploaderHtml('attachment'); - else { - $this->printFileChooser('attachment[]', false); -?> - -callHook('addDocumentContentAttributes', $folder); + if(is_array($arrs)) { + foreach($arrs as $arr) { + echo ""; + echo "".$arr[0].":"; + echo "".$arr[1].""; + echo ""; } -?> - - - From 2533ef845b71a65f5c44b768080d7200101d7ab7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 27 Apr 2017 17:21:52 +0200 Subject: [PATCH 129/194] add new method getFileChooser() which is called by printFileChooser() --- views/bootstrap/class.Bootstrap.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index da9ff293c..f4fb84a18 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -864,7 +864,26 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } } /* }}} */ + function getFileChooser($varname='userfile', $multiple=false, $accept='') { /* {{{ */ + $id = preg_replace('/[^A-Za-z]/', '', $varname); + $html = ' +
      +
      +
      + + + '.getMLText("browse").'… + +
      +
      +
      +'; + return $html; + } /* }}} */ + function printFileChooser($varname='userfile', $multiple=false, $accept='') { /* {{{ */ + echo $this->getFileChooser($varname, $multiple, $accept); + return; $id = preg_replace('/[^A-Za-z]/', '', $varname); ?>
      From 5376a6ad75abe2d10bffa55362052e22544531e6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 27 Apr 2017 17:58:46 +0200 Subject: [PATCH 130/194] add entry for 5.1.2 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index ef3c6b510..770f7590a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,7 @@ - add some more hooks - add list of currently logged in users in menu - the owner of a document can see even none public attachments +- uploading multiple files can be turned off - merged changes from 5.0.12 -------------------------------------------------------------------------------- From cdbb70f3b92a4bed1b9ff38aa0add47768057564 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 28 Apr 2017 13:09:56 +0200 Subject: [PATCH 131/194] take out method addAttachments() --- controllers/class.AddDocument.php | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/controllers/class.AddDocument.php b/controllers/class.AddDocument.php index ab4271104..e87d22c99 100644 --- a/controllers/class.AddDocument.php +++ b/controllers/class.AddDocument.php @@ -22,33 +22,6 @@ */ class SeedDMS_Controller_AddDocument extends SeedDMS_Controller_Common { - protected function addAttachments($document) { /* {{{ */ - $user = $this->params['user']; - $settings = $this->params['settings']; - /* Check for attachments */ - for ($attach_num=0;$attach_num $folder->getName())),getMLText("uploading_zerosize")); - } - if ($_FILES['attachment']['error'][$attach_num]!=0){ -// UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("uploading_failed")); - } - - $attachfiletmp = $_FILES["attachment"]["tmp_name"][$attach_num]; - $attachfiletype = $_FILES["attachment"]["type"][$attach_num]; - $attachfilename = $_FILES["attachment"]["name"][$attach_num]; - - $fileType = ".".pathinfo($attachfilename, PATHINFO_EXTENSION); - - if($settings->_overrideMimeType) { - $finfo = finfo_open(FILEINFO_MIME_TYPE); - $attachfiletype = finfo_file($finfo, $attachfiletmp); - } - - $res = $document->addDocumentFile(utf8_basename($attachfilename), '', $user, $attachfiletmp, utf8_basename($attachfilename),$fileType, $attachfiletype); - } - } /* }}} */ - public function run() { /* {{{ */ $name = $this->getParam('name'); $comment = $this->getParam('comment'); From b57e91e675c70d97f873cd4ef2506aec514a3cfe Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 28 Apr 2017 13:10:25 +0200 Subject: [PATCH 132/194] add warning for sqlite which cannot put table mods into transaction --- install/update-5.1.0/update.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/install/update-5.1.0/update.txt b/install/update-5.1.0/update.txt index 38e9af41b..4d2fba328 100644 --- a/install/update-5.1.0/update.txt +++ b/install/update-5.1.0/update.txt @@ -4,7 +4,12 @@ Caution when you update an sqlite database The database changes for this version will require to change the definition of various columns. This is not easily possible when using sqlite. Therefore, the affected tables are first renamed, than -new tables with the modified columns are created in the old table -content will be copied into the new table. The old tables will not -be removed and are prefixed with '__'. You may manunally remove them -once you have successfully checked the update. +new tables with the modified columns are created and the old table +contents will be copied into the new tables. The old tables will +be removed afterwards. + +Because sqlite does not support transactions on alter, create and drop +table these changes cannot not be undone in case of an error. Backup +your database before and consider to do the update manually by running + +cat install/update-5.1.0/update-sqlite.sql | sqlite data/content.db From 2ddb45fa087713905b8ea7b6cea5dcf3f78757f7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 28 Apr 2017 13:11:49 +0200 Subject: [PATCH 133/194] fix js for duplicating file upload field --- views/bootstrap/class.AddDocument.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 7c048f3f9..f03df1ae7 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -45,7 +45,9 @@ class SeedDMS_View_AddDocument extends SeedDMS_Bootstrap_Style { ?> $(document).ready(function() { $('#new-file').click(function(event) { - $("#userfile-upload-file").clone().appendTo("#userfile-upload-files").removeAttr("id").children('div').children('input').val(''); + tttttt = $("#userfile-upload-file").clone().appendTo("#userfile-upload-files").removeAttr("id"); + tttttt.children('div').children('input').val(''); + tttttt.children('div').children('span').children('input').val(''); }); jQuery.validator.addMethod("alternatives", function(value, element, params) { if(value == '' && params.val() == '') From adb7368accd114c14e8ed6882dababb0c9def4e8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 28 Apr 2017 13:12:20 +0200 Subject: [PATCH 134/194] do not set id in input field for file upload field field can be duplicated and that makes the id no unique --- 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 f4fb84a18..fec5209fe 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -872,7 +872,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
      - '.getMLText("browse").'… + '.getMLText("browse").'…
      From 2c19bb0e6f52afdc7ad4d11058988e4b3f1cf0a3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 May 2017 17:17:52 +0200 Subject: [PATCH 135/194] show role of users in user list --- CHANGELOG | 1 + views/bootstrap/class.SubstituteUser.php | 15 ++++++++++++++- views/bootstrap/class.UserList.php | 15 ++++++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 2ef70254e..44c35548d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ - fix authentication in webdav.php (Closes #250) - update last access time only once a minute - run action 'css' in view if it exists, move css code for timeline +- show role of users in user list and substitute user list -------------------------------------------------------------------------------- Changes in version 4.3.34 diff --git a/views/bootstrap/class.SubstituteUser.php b/views/bootstrap/class.SubstituteUser.php index 72cc53412..eeb0c5cd8 100644 --- a/views/bootstrap/class.SubstituteUser.php +++ b/views/bootstrap/class.SubstituteUser.php @@ -49,7 +49,7 @@ class SeedDMS_View_SubstituteUser extends SeedDMS_Bootstrap_Style { ?> - + "; echo ""; + echo ""; echo ""; @@ -340,7 +340,7 @@ $(document).ready(function() { $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); + $arr = $this->callHook('addDocumentContentAttribute', null, $attrdef); if(is_array($arr)) { echo ""; echo ""; From 14d861dfda5117c7e917fbbb8da2be29303b56cf Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 17 May 2017 09:21:26 +0200 Subject: [PATCH 160/194] call various new hooks, add method to output button and wrap buttons in row --- views/bootstrap/class.AdminTools.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/views/bootstrap/class.AdminTools.php b/views/bootstrap/class.AdminTools.php index cbf2f2033..3117a204c 100644 --- a/views/bootstrap/class.AdminTools.php +++ b/views/bootstrap/class.AdminTools.php @@ -31,6 +31,14 @@ require_once("class.Bootstrap.php"); */ class SeedDMS_View_AdminTools extends SeedDMS_Bootstrap_Style { + static function wrapRow($content) { /* {{{ */ + return '
      '.$content.'
      '; + } /* }}} */ + + static function rowButton($link, $icon, $label) { /* {{{ */ + return '
      '.getMLText($label).'
      '; + } /* }}} */ + function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; @@ -45,9 +53,11 @@ class SeedDMS_View_AdminTools extends SeedDMS_Bootstrap_Style { $this->contentContainerStart(); ?>
      + callHook('beforeRows'); ?>


      + callHook('endOfRow', 1); ?>

      @@ -55,11 +65,13 @@ class SeedDMS_View_AdminTools extends SeedDMS_Bootstrap_Style { if ($logfileenable) echo "
      ".getMLText("log_management")."
      "; ?> + callHook('endOfRow', 2); ?>



      + callHook('endOfRow', 3); ?>
      params['workflowmode'] == 'advanced') { @@ -68,6 +80,7 @@ class SeedDMS_View_AdminTools extends SeedDMS_Bootstrap_Style {


      + callHook('endOfRow', 4); ?>



      + callHook('endOfRow', 5); ?>


      + callHook('endOfRow', 6); ?>



      + callHook('endOfRow', 7); ?>
      + callHook('afterRows'); ?> contentContainerEnd(); From 4eb3b5ed4d4a36daa94bb8f7139e7938f4b1eb23 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 17 May 2017 09:22:05 +0200 Subject: [PATCH 161/194] add new js file webrootjs which contains the http root --- views/bootstrap/class.Bootstrap.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 9c9d6573c..9de62e81f 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -144,6 +144,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo ''."\n"; echo ''."\n"; echo ''."\n"; + echo ''."\n"; echo ''."\n"; if(isset($this->params['user']) && $this->params['user']) { $this->addFooterJS('checkTasks();'); @@ -174,6 +175,12 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo "\n\n"; } /* }}} */ + function webrootjs() { /* {{{ */ + header('Content-Type: application/javascript'); + echo "var seeddms_absbaseprefix=\"".$this->params['absbaseprefix']."\";\n"; + echo "var seeddms_webroot=\"".$this->params['settings']->_httpRoot."\";\n"; + } /* }}} */ + function footerjs() { /* {{{ */ header('Content-Type: application/javascript'); if(file_exists($this->params['cachedir'].'/js/'.$_GET['hash'].'.js')) { From 58589bde70e27d7588b7a548f1df88d81a24ba39 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 17 May 2017 09:22:37 +0200 Subject: [PATCH 162/194] use new seeddms_webroot --- 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 97fe008fe..4b3389c60 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -366,7 +366,7 @@ $(document).ready( function() { var action = element.data('action'); var query = element.data('query'); if(view && action) { - url = "out."+view+".php?action="+action; + url = seeddms_webroot+"out/out."+view+".php?action="+action; if(query) { url += "&"+query; } From 883131d61e23501fae2ced60a89d3e834319f4e7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 9 Jun 2017 12:27:26 +0200 Subject: [PATCH 163/194] add method setErrorMsg() --- inc/inc.ClassControllerCommon.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/inc/inc.ClassControllerCommon.php b/inc/inc.ClassControllerCommon.php index 3ceb60524..ea22d7147 100644 --- a/inc/inc.ClassControllerCommon.php +++ b/inc/inc.ClassControllerCommon.php @@ -122,6 +122,15 @@ class SeedDMS_Controller_Common { return $this->errormsg; } /* }}} */ + /** + * Set error message + * + * @param string $msg error message + */ + public function setErrorMsg($msg) { /* {{{ */ + $this->errormsg = $msg; + } /* }}} */ + /** * Call a controller hook * From d64a662aed93499f561e6a9ac4c422f7155536dd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 9 Jun 2017 12:28:17 +0200 Subject: [PATCH 164/194] get name and comment after preAddDocument hook, set generic err msg only if hook hasn't set one --- controllers/class.AddDocument.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/controllers/class.AddDocument.php b/controllers/class.AddDocument.php index e87d22c99..7fc97b1a4 100644 --- a/controllers/class.AddDocument.php +++ b/controllers/class.AddDocument.php @@ -30,10 +30,13 @@ class SeedDMS_Controller_AddDocument extends SeedDMS_Controller_Common { * of the parameters. */ if(false === $this->callHook('preAddDocument', array('name'=>&$name, 'comment'=>&$comment))) { - $this->errormsg = 'hook_preAddDocument_failed'; + if(empty($this->errormsg)) + $this->errormsg = 'hook_preAddDocument_failed'; return null; } + $name = $this->getParam('name'); + $comment = $this->getParam('comment'); $dms = $this->params['dms']; $user = $this->params['user']; $settings = $this->params['settings']; From 778f94f0d14724f0f166224b24c00460d0efb797 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 9 Jun 2017 12:29:20 +0200 Subject: [PATCH 165/194] use AddDocument controller when uploading a document this will make sure all hooks are being called --- op/op.Ajax.php | 177 +++++++++++++++++++++++++++++++------------------ 1 file changed, 114 insertions(+), 63 deletions(-) diff --git a/op/op.Ajax.php b/op/op.Ajax.php index 6df2390cd..1526bfd50 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -27,6 +27,7 @@ include("../inc/inc.DBInit.php"); include("../inc/inc.ClassNotificationService.php"); include("../inc/inc.ClassEmailNotify.php"); include("../inc/inc.ClassUI.php"); +include("../inc/inc.ClassController.php"); require_once("../inc/inc.ClassSession.php"); include("../inc/inc.ClassPasswordStrength.php"); @@ -614,73 +615,54 @@ switch($command) { $cats = array(); - $filesize = SeedDMS_Core_File::fileSize($userfiletmp); - $res = $folder->addDocument($name, '', $expires, $user, '', - array(), $userfiletmp, utf8_basename($userfilename), - $fileType, $userfiletype, 0, - $reviewers, $approvers, 1, - '', array(), array(), $workflow); + if($settings->_enableFullSearch) { + $index = $indexconf['Indexer']::open($settings->_luceneDir); + $indexconf['Indexer']::init($settings->_stopWordsFile); + } else { + $index = null; + } - if (is_bool($res) && !$res) { + $controller = Controller::factory('AddDocument'); + $controller->setParam('documentsource', 'upload'); + $controller->setParam('folder', $folder); + $controller->setParam('index', $index); + $controller->setParam('indexconf', $indexconf); + $controller->setParam('name', $name); + $controller->setParam('comment', ''); + $controller->setParam('expires', $expires); + $controller->setParam('keywords', ''); + $controller->setParam('categories', $cats); + $controller->setParam('owner', $user); + $controller->setParam('userfiletmp', $userfiletmp); + $controller->setParam('userfilename', $userfilename); + $controller->setParam('filetype', $fileType); + $controller->setParam('userfiletype', $userfiletype); + $controller->setParam('sequence', 0); + $controller->setParam('reviewers', $reviewers); + $controller->setParam('approvers', $approvers); + $controller->setParam('reqversion', 1); + $controller->setParam('versioncomment', ''); + $controller->setParam('attributes', array()); + $controller->setParam('attributesversion', array()); + $controller->setParam('workflow', $workflow); + $controller->setParam('notificationgroups', array()); + $controller->setParam('notificationusers', array()); + $controller->setParam('maxsizeforfulltext', $settings->_maxSizeForFullText); + $controller->setParam('defaultaccessdocs', $settings->_defaultAccessDocs); + + if(!$document = $controller->run()) { header('Content-Type: application/json'); - echo json_encode(array('success'=>false, 'message'=>getMLText("error_occured"))); + echo json_encode(array('success'=>false, 'message'=>getMLText($controller->getErrorMsg()))); exit; } else { - $document = $res[0]; - - /* Set access as specified in settings. */ - if($settings->_defaultAccessDocs) { - if($settings->_defaultAccessDocs > 0 && $settings->_defaultAccessDocs < 4) { - $document->setInheritAccess(0, true); - $document->setDefaultAccess($settings->_defaultAccessDocs, true); - } - } - - if(isset($GLOBALS['SEEDDMS_HOOKS']['addDocument'])) { - foreach($GLOBALS['SEEDDMS_HOOKS']['addDocument'] as $hookObj) { - if (method_exists($hookObj, 'postAddDocument')) { - $hookObj->postAddDocument(null, $document); - } - } - } - if($settings->_enableFullSearch) { - $index = $indexconf['Indexer']::open($settings->_luceneDir); - if($index) { - $indexconf['Indexer']::init($settings->_stopWordsFile); - $idoc = new $indexconf['IndexedDocument']($dms, $document, isset($settings->_converters['fulltext']) ? $settings->_converters['fulltext'] : null, !($filesize < $settings->_maxSizeForFullText)); - if(isset($GLOBALS['SEEDDMS_HOOKS']['addDocument'])) { - foreach($GLOBALS['SEEDDMS_HOOKS']['addDocument'] as $hookObj) { - if (method_exists($hookObj, 'preIndexDocument')) { - $hookObj->preIndexDocument(null, $document, $idoc); - } - } - } - $index->addDocument($idoc); - } - } - - /* Add a default notification for the owner of the document */ - if($settings->_enableOwnerNotification) { - $res = $document->addNotify($user->getID(), true); - } // Send notification to subscribers of folder. if($notifier) { - $notifyList = $folder->getNotifyList(); - if($settings->_enableNotificationAppRev) { - /* Reviewers and approvers will be informed about the new document */ - foreach($reviewers['i'] as $reviewerid) { - $notifyList['users'][] = $dms->getUser($reviewerid); - } - foreach($approvers['i'] as $approverid) { - $notifyList['users'][] = $dms->getUser($approverid); - } - foreach($reviewers['g'] as $reviewergrpid) { - $notifyList['groups'][] = $dms->getGroup($reviewergrpid); - } - foreach($approvers['g'] as $approvergrpid) { - $notifyList['groups'][] = $dms->getGroup($approvergrpid); - } - } + $fnl = $folder->getNotifyList(); + $dnl = $document->getNotifyList(); + $nl = array( + 'users'=>array_merge($dnl['users'], $fnl['users']), + 'groups'=>array_merge($dnl['groups'], $fnl['groups']) + ); $subject = "new_document_email_subject"; $message = "new_document_email_body"; @@ -694,11 +676,80 @@ switch($command) { $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->toList($user, $nl["users"], $subject, $message, $params); + foreach ($nl["groups"] as $grp) { $notifier->toGroup($user, $grp, $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'] = 1; + $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); + } + } + } + + if($settings->_enableNotificationAppRev) { + /* Reviewers and approvers will be informed about the new document */ + if($reviewers['i'] || $reviewers['g']) { + $subject = "review_request_email_subject"; + $message = "review_request_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['version'] = 1; + $params['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; + + foreach($reviewers['i'] as $reviewerid) { + $notifier->toIndividual($user, $dms->getUser($reviewerid), $subject, $message, $params); + } + foreach($reviewers['g'] as $reviewergrpid) { + $notifier->toGroup($user, $dms->getGroup($reviewergrpid), $subject, $message, $params); + } + } + + elseif($approvers['i'] || $approvers['g']) { + $subject = "approval_request_email_subject"; + $message = "approval_request_email_body"; + $params = array(); + $params['name'] = $document->getName(); + $params['folder_path'] = $folder->getFolderPathPlain(); + $params['version'] = 1; + $params['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; + + foreach($approvers['i'] as $approverid) { + $notifier->toIndividual($user, $dms->getUser($approverid), $subject, $message, $params); + } + foreach($approvers['g'] as $approvergrpid) { + $notifier->toGroup($user, $dms->getGroup($approvergrpid), $subject, $message, $params); + } + } + } + } } header('Content-Type: application/json'); From 9958e793151936b5de4b6c93a783e06234c8b654 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 9 Jun 2017 12:30:23 +0200 Subject: [PATCH 166/194] add new action 'webrootjs' which returns some javascript with webroot path --- views/bootstrap/class.Bootstrap.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 9de62e81f..acf1738b9 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -144,7 +144,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo ''."\n"; echo ''."\n"; echo ''."\n"; - echo ''."\n"; + parse_str($_SERVER['QUERY_STRING'], $tmp); + $tmp['action'] = 'webrootjs'; + echo ''."\n"; echo ''."\n"; if(isset($this->params['user']) && $this->params['user']) { $this->addFooterJS('checkTasks();'); @@ -162,7 +164,6 @@ background-image: linear-gradient(to bottom, #882222, #111111);; if(is_dir($this->params['cachedir'].'/js')) { file_put_contents($this->params['cachedir'].'/js/'.$hashjs.'.js', $jscode); } - parse_str($_SERVER['QUERY_STRING'], $tmp); $tmp['action'] = 'footerjs'; $tmp['hash'] = $hashjs; echo ''."\n"; From 4b89d920cb09872ceea379d4f5f471f49062a2d8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 9 Jun 2017 15:13:15 +0200 Subject: [PATCH 167/194] check if returned array is not empty --- inc/inc.ClassViewCommon.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index 122cfee1e..1fa7cb69e 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -112,7 +112,7 @@ class SeedDMS_View_Common { if($tmpret) { if(is_string($tmpret)) $ret .= $tmpret; - elseif(is_array($tmpret) || is_object($tmpret)) + elseif((is_array($tmpret) && $tmpret) || is_object($tmpret)) $ret = ($ret === null) ? $tmpret : array_merge($ret, $tmpret); else $ret = $tmpret; From dc58e02d25ad45e4e64e28b32c3143c42f9e4843 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 9 Jun 2017 15:13:49 +0200 Subject: [PATCH 168/194] add hook for editing attribute, return value of hook can be an empty array --- views/bootstrap/class.AddDocument.php | 10 ++++++---- views/bootstrap/class.AddSubFolder.php | 10 ++++++++++ views/bootstrap/class.EditAttributes.php | 10 ++++++++++ views/bootstrap/class.EditDocument.php | 10 ++++++---- views/bootstrap/class.EditFolder.php | 13 +++++++------ views/bootstrap/class.UpdateDocument.php | 13 +++++++------ 6 files changed, 46 insertions(+), 20 deletions(-) diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 206cd7aa7..3c67814e7 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -275,10 +275,12 @@ $(document).ready(function() { foreach($attrdefs as $attrdef) { $arr = $this->callHook('addDocumentAttribute', null, $attrdef); if(is_array($arr)) { - echo "
      "; - echo ""; - echo ""; - echo ""; + if($arr) { + echo ""; + echo ""; + echo ""; + echo ""; + } } else { ?> diff --git a/views/bootstrap/class.AddSubFolder.php b/views/bootstrap/class.AddSubFolder.php index 105a1145c..05c7fb959 100644 --- a/views/bootstrap/class.AddSubFolder.php +++ b/views/bootstrap/class.AddSubFolder.php @@ -126,12 +126,22 @@ $(document).ready( function() { $attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_folder, SeedDMS_Core_AttributeDefinition::objtype_all)); if($attrdefs) { foreach($attrdefs as $attrdef) { + $arr = $this->callHook('addFolderAttribute', null, $attrdef); + if(is_array($arr)) { + if($arr) { + echo "
      "; + echo " "; + echo "
      ".$arr[1]."
      "; + echo "
      "; + } + } else { ?>
      printAttributeEditField($attrdef, '') ?>
      diff --git a/views/bootstrap/class.EditAttributes.php b/views/bootstrap/class.EditAttributes.php index cc2645f75..8f45b67e7 100644 --- a/views/bootstrap/class.EditAttributes.php +++ b/views/bootstrap/class.EditAttributes.php @@ -55,6 +55,15 @@ class SeedDMS_View_EditAttributes extends SeedDMS_Bootstrap_Style { callHook('editDocumentContentAttribute', $version, $attrdef); + if(is_array($arr)) { + if($arr) { + echo "
      "; + echo ""; + echo "
      ".$arr[1]."
      "; + echo "
      "; + } + } else { ?>
      @@ -63,6 +72,7 @@ class SeedDMS_View_EditAttributes extends SeedDMS_Bootstrap_Style {
      diff --git a/views/bootstrap/class.EditDocument.php b/views/bootstrap/class.EditDocument.php index f4f099790..2e43087f8 100644 --- a/views/bootstrap/class.EditDocument.php +++ b/views/bootstrap/class.EditDocument.php @@ -192,10 +192,12 @@ $(document).ready( function() { foreach($attrdefs as $attrdef) { $arr = $this->callHook('editDocumentAttribute', $document, $attrdef); if(is_array($arr)) { - echo ""; - echo ""; - echo ""; - echo ""; + if($arr) { + echo ""; + echo ""; + echo ""; + echo ""; + } } else { ?> diff --git a/views/bootstrap/class.EditFolder.php b/views/bootstrap/class.EditFolder.php index 8c156c19d..2da21e14b 100644 --- a/views/bootstrap/class.EditFolder.php +++ b/views/bootstrap/class.EditFolder.php @@ -132,13 +132,14 @@ $(document).ready(function() { if($attrdefs) { foreach($attrdefs as $attrdef) { - $arr = $this->callHook('folderEditAttribute', $folder, $attrdef); + $arr = $this->callHook('editFolderAttribute', $folder, $attrdef); if(is_array($arr)) { - echo $txt; - echo "
      "; - echo ""; - echo "
      ".$arr[1]."
      "; - echo "
      "; + if($arr) { + echo "
      "; + echo ""; + echo "
      ".$arr[1]."
      "; + echo "
      "; + } } else { ?>
      diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index 0267ac7a1..9bf21f8c0 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -277,13 +277,14 @@ console.log(element); $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); + $arr = $this->callHook('editDocumentContentAttribute', $document, $attrdef); if(is_array($arr)) { - echo $txt; - echo "
      "; - echo ""; - echo ""; - echo ""; + if($arr) { + echo ""; + echo ""; + echo ""; + echo ""; + } } else { ?> From 7a1c4b495cc8e4af9264b7f62a5cca14a0079e4d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 13 Jun 2017 14:40:17 +0200 Subject: [PATCH 169/194] set error msg only if not already set --- controllers/class.UpdateDocument.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controllers/class.UpdateDocument.php b/controllers/class.UpdateDocument.php index da2b120c2..8cd9ea818 100644 --- a/controllers/class.UpdateDocument.php +++ b/controllers/class.UpdateDocument.php @@ -29,8 +29,9 @@ class SeedDMS_Controller_UpdateDocument extends SeedDMS_Controller_Common { /* Call preUpdateDocument early, because it might need to modify some * of the parameters. */ - if(false === $this->callHook('preUpdateDocument')) { - $this->errormsg = 'hook_preUpdateDocument_failed'; + if(false === $this->callHook('preUpdateDocument', $this->params['document'])) { + if(empty($this->errormsg)) + $this->errormsg = 'hook_preUpdateDocument_failed'; return null; } From 7d6fd23c6d421b7e7911ab739b0b544f223f5e83 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 13 Jun 2017 14:41:57 +0200 Subject: [PATCH 170/194] check if return value of hook is != null --- inc/inc.ClassViewCommon.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index 1fa7cb69e..6eaa560f6 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -109,12 +109,12 @@ class SeedDMS_View_Common { $tmpret = $hookObj->$hook($this, func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4)); break; } - if($tmpret) { + if($tmpret !== null) { if(is_string($tmpret)) $ret .= $tmpret; - elseif((is_array($tmpret) && $tmpret) || is_object($tmpret)) + elseif(is_array($tmpret) || is_object($tmpret)) { $ret = ($ret === null) ? $tmpret : array_merge($ret, $tmpret); - else + } else $ret = $tmpret; } } From ed531dc35dceb030030388670e5015a01c26c6e3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 19 Jun 2017 11:08:06 +0200 Subject: [PATCH 171/194] fix inclusion of file --- inc/inc.ClassViewCommon.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index 6eaa560f6..8421102f6 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -13,7 +13,7 @@ * @version Release: @package_version@ */ -require_once "inc/inc.ClassHook.php"; +require_once "inc.ClassHook.php"; /** * Parent class for all view classes From 01cd47401cdeaa9f5e1409fc2845fa1fc707e9f4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 20 Jun 2017 09:13:24 +0200 Subject: [PATCH 172/194] more documentation on return value of callHook --- 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 8421102f6..b51645d2a 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -83,7 +83,8 @@ class SeedDMS_View_Common { * a list of hook objects with getHookObjects() and call the hooks yourself. * * @params string $hook name of hook - * @return string concatenated string of whatever the hook function returns + * @return string concatenated string, merged arrays or whatever the hook + * function returns */ function callHook($hook) { /* {{{ */ $tmp = explode('_', get_class($this)); From d2da3004bba3f279ae66aa36efd7313b0b10ebb4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 20 Jun 2017 09:13:56 +0200 Subject: [PATCH 173/194] check for data-base in div-ajax --- styles/bootstrap/application.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index 4b3389c60..7d9ddfe0d 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -362,11 +362,14 @@ $(document).ready( function() { var element = $(this); var url = ''; var href = element.data('href'); + var base = element.data('base'); + if(typeof base == 'undefined') + base = ''; var view = element.data('view'); var action = element.data('action'); var query = element.data('query'); if(view && action) { - url = seeddms_webroot+"out/out."+view+".php?action="+action; + url = seeddms_webroot+base+"out/out."+view+".php?action="+action; if(query) { url += "&"+query; } From 23c53d112dfcbac2e68ba9899013dbadbd8c329d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 20 Jun 2017 09:14:45 +0200 Subject: [PATCH 174/194] use ViewOnline instead of Download for preview --- 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 ba947ee45..130f42972 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -351,20 +351,20 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { $this->contentHeading(getMLText("preview")); ?> contentHeading(getMLText("preview")); ?> - + contentHeading(getMLText("preview")); ?> - + Date: Thu, 22 Jun 2017 17:18:25 +0200 Subject: [PATCH 175/194] data-base attribute can be added to
      --- styles/bootstrap/application.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index 7d9ddfe0d..c4968940f 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -399,10 +399,13 @@ $(document).ready( function() { var element = $(this); var url = ''; var href = element.data('href'); + var base = element.data('base'); + if(typeof base == 'undefined') + base = ''; var view = element.data('view'); var action = element.data('action'); if(view && action) - url = "out."+view+".php?action="+action; + url = seeddms_webroot+base+"out/out."+view+".php?action="+action; else url = href; if(typeof param1 === 'object') { From 500bade66a9bd899dbd1ca393f170c5cf7e02400 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 23 Jun 2017 12:58:36 +0200 Subject: [PATCH 176/194] get name and comment from parameters after preUpdateDocument has been called --- controllers/class.UpdateDocument.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/class.UpdateDocument.php b/controllers/class.UpdateDocument.php index 8cd9ea818..c87084ddd 100644 --- a/controllers/class.UpdateDocument.php +++ b/controllers/class.UpdateDocument.php @@ -35,6 +35,8 @@ class SeedDMS_Controller_UpdateDocument extends SeedDMS_Controller_Common { return null; } + $name = $this->getParam('name'); + $comment = $this->getParam('comment'); $dms = $this->params['dms']; $user = $this->params['user']; $document = $this->params['document']; From 93380ab261c042c6ed128ff47f338bb890f16f1d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 24 Jun 2017 07:15:37 +0200 Subject: [PATCH 177/194] add hook on(Pre|Post)RemoveContent --- SeedDMS_Core/Core/inc.ClassDocument.php | 44 ++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index d89a3fe9c..423313670 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -1271,7 +1271,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ /* $attribute can be a string or an array */ if($attribute) if(!$content->setAttributeValue($this->_dms->getAttributeDefinition($attrdefid), $attribute)) { - $this->removeContent($content); + $this->_removeContent($content); $db->rollbackTransaction(); return false; } @@ -1285,7 +1285,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $queryStr = "INSERT INTO `tblDocumentStatus` (`documentID`, `version`) ". "VALUES (". $this->_id .", ". (int) $version .")"; if (!$db->getResult($queryStr)) { - $this->removeContent($content); + $this->_removeContent($content); $db->rollbackTransaction(); return false; } @@ -1512,7 +1512,13 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return $this->_latestContent; } /* }}} */ - function removeContent($version) { /* {{{ */ + /** + * Remove version of document + * + * @param interger $version version number of content + * @return boolean true if successful, otherwise false + */ + private function _removeContent($version) { /* {{{ */ $db = $this->_dms->getDB(); if (file_exists( $this->_dms->contentDir.$version->getPath() )) @@ -1623,6 +1629,36 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return true; } /* }}} */ + /** + * Call callback onPreRemoveDocument before deleting content + * + * @param integer $version version number of content + */ + function removeContent($version) { /* {{{ */ + /* Check if 'onPreRemoveDocument' callback is set */ + if(isset($this->_dms->callbacks['onPreRemoveContent'])) { + foreach($this->_dms->callbacks['onPreRemoveContent'] as $callback) { + $ret = call_user_func($callback[0], $callback[1], $this, $version); + if(is_bool($ret)) + return $ret; + } + } + + if(false === ($ret = self::_removeContent($version))) { + return false; + } + + /* Check if 'onPostRemoveDocument' callback is set */ + if(isset($this->_dms->callbacks['onPostRemoveContent'])) { + foreach($this->_dms->callbacks['onPostRemoveContent'] as $callback) { + if(!call_user_func($callback[0], $callback[1], $version)) { + } + } + } + + return $ret; + } /* }}} */ + /** * Return a certain document link * @@ -1874,7 +1910,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ // remove content of document foreach ($this->_content as $version) { - if (!$this->removeContent($version)) { + if (!$this->_removeContent($version)) { $db->rollbackTransaction(); return false; } From 31ed9a729f51fcced5aea027cf67bd1cdcb1587d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 24 Jun 2017 07:16:13 +0200 Subject: [PATCH 178/194] remove old code --- op/op.RemoveVersion.php | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/op/op.RemoveVersion.php b/op/op.RemoveVersion.php index b528ec273..f2d25bc75 100644 --- a/op/op.RemoveVersion.php +++ b/op/op.RemoveVersion.php @@ -158,23 +158,6 @@ else { $eU = $version->_document->_dms->getGroup($eID); $grouprecipients[] = $eU; } -/* - $subject = "###SITENAME###: ".$document->getName().", v.".$version->_version." - ".getMLText("version_deleted_email"); - $message = getMLText("version_deleted_email")."\r\n"; - $message .= - getMLText("document").": "User.$document->getName()."\r\n". - getMLText("version").": ".$version->_version."\r\n". - getMLText("comment").": ".$version->getComment()."\r\n". - getMLText("user").": ".$user->getFullName()." <". $user->getEmail() ."> "; - - $notifier->toList($user, $recipients, $subject, $message); - - // Send notification to subscribers. - $notifier->toList($user, $nl["users"], $subject, $message); - foreach ($nl["groups"] as $grp) { - $notifier->toGroup($user, $grp, $subject, $message); - } -*/ $subject = "version_deleted_email_subject"; $message = "version_deleted_email_body"; From ae06028d20b72b066fdfb6929e47d1ae4158916a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 24 Jun 2017 07:16:54 +0200 Subject: [PATCH 179/194] add note --- SeedDMS_Core/package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index d22ecd6a9..883dda435 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -29,6 +29,7 @@ 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 From 74a5517c4f428de9720c068f5a7dbde7b8ce14ac Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 26 Jun 2017 10:25:55 +0200 Subject: [PATCH 180/194] skip some files from distribution --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 85362b0dd..49d8105bd 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ VERSION=5.1.2 SRC=CHANGELOG inc conf utils index.php languages views op out controllers doc styles TODO LICENSE webdav install restapi pdfviewer # webapp -NODISTFILES=utils/importmail.php utils/seedddms-importmail utils/remote-email-upload utils/remote-upload .svn .gitignore styles/blue styles/hc styles/clean views/blue views/hc views/clean +NODISTFILES=utils/importmail.php utils/seedddms-importmail utils/remote-email-upload utils/remote-upload utils/da-bv-reminder.php utils/seeddms-da-bv-reminder .svn .gitignore styles/blue styles/hc styles/clean views/blue views/hc views/clean EXTENSIONS := \ dynamic_content.tar.gz\ From 2471aab8ccee52254b89b99ad022c1e70f78800a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 27 Jun 2017 17:06:32 +0200 Subject: [PATCH 181/194] check for callback onAttributeValidate --- SeedDMS_Core/Core/inc.ClassAttribute.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/SeedDMS_Core/Core/inc.ClassAttribute.php b/SeedDMS_Core/Core/inc.ClassAttribute.php index d8842c1f8..58bb5b027 100644 --- a/SeedDMS_Core/Core/inc.ClassAttribute.php +++ b/SeedDMS_Core/Core/inc.ClassAttribute.php @@ -258,6 +258,13 @@ class SeedDMS_Core_Attribute { /* {{{ */ */ function getValidationError() { return $this->_validation_error; } + /** + * Set validation error + * + * @param integer error code + */ + function setValidationError($error) { $this->_validation_error = $error; } + /** * Get definition of attribute * @@ -916,6 +923,15 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */ * @return boolean true if validation succeds, otherwise false */ function validate($attrvalue) { /* {{{ */ + /* Check if 'onAttributeValidate' callback is set */ + if(isset($this->_dms->callbacks['onAttributeValidate'])) { + foreach($this->_dms->callbacks['onAttributeValidate'] as $callback) { + $ret = call_user_func($callback[0], $callback[1], $this); + if(is_bool($ret)) + return $ret; + } + } + if($this->getMultipleValues()) { if(is_string($attrvalue)) { $sep = $attrvalue[0]; From 8c0e832414be1ffbfa8f80c3ed6b3b0fddfb34b2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 27 Jun 2017 17:08:23 +0200 Subject: [PATCH 182/194] add note --- SeedDMS_Core/package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 883dda435..426468942 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -30,6 +30,7 @@ Check return value of onPreRemove[Document|Folder], return from calling method i Add SeedDMS_Core_DMS::getDocumentList() Limit number of duplicate files to 1000 Add hook on(Pre|Post)RemoveContent +Add hook onAttributeValidate From a2fc405eae7952833bb3f44946ba3f1562e502c6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 28 Jun 2017 14:59:29 +0200 Subject: [PATCH 183/194] do not sort some temp. tables anymore it causes an error if sql_mode=only_full_group_by is set in mysql --- SeedDMS_Core/Core/inc.DBAccessPDO.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index 76a5366a1..568b549cd 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -358,16 +358,16 @@ class SeedDMS_Core_DatabaseAccess { "SELECT `tblDocumentReviewLog`.`reviewID`, ". "MAX(`tblDocumentReviewLog`.`reviewLogID`) AS `maxLogID` ". "FROM `tblDocumentReviewLog` ". - "GROUP BY `tblDocumentReviewLog`.`reviewID` ". - "ORDER BY `maxLogID`"; + "GROUP BY `tblDocumentReviewLog`.`reviewID` "; //. +// "ORDER BY `maxLogID`"; break; default: $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttreviewid` (PRIMARY KEY (`reviewID`), INDEX (`maxLogID`)) ". "SELECT `tblDocumentReviewLog`.`reviewID`, ". "MAX(`tblDocumentReviewLog`.`reviewLogID`) AS `maxLogID` ". "FROM `tblDocumentReviewLog` ". - "GROUP BY `tblDocumentReviewLog`.`reviewID` ". - "ORDER BY `maxLogID`"; + "GROUP BY `tblDocumentReviewLog`.`reviewID` "; //. +// "ORDER BY `maxLogID`"; } if (!$this->_ttreviewid) { if (!$this->getResult($queryStr)) @@ -391,16 +391,16 @@ class SeedDMS_Core_DatabaseAccess { "SELECT `tblDocumentApproveLog`.`approveID`, ". "MAX(`tblDocumentApproveLog`.`approveLogID`) AS `maxLogID` ". "FROM `tblDocumentApproveLog` ". - "GROUP BY `tblDocumentApproveLog`.`approveID` ". - "ORDER BY `maxLogID`"; + "GROUP BY `tblDocumentApproveLog`.`approveID` "; //. +// "ORDER BY `maxLogID`"; break; default: $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttapproveid` (PRIMARY KEY (`approveID`), INDEX (`maxLogID`)) ". "SELECT `tblDocumentApproveLog`.`approveID`, ". "MAX(`tblDocumentApproveLog`.`approveLogID`) AS `maxLogID` ". "FROM `tblDocumentApproveLog` ". - "GROUP BY `tblDocumentApproveLog`.`approveID` ". - "ORDER BY `maxLogID`"; + "GROUP BY `tblDocumentApproveLog`.`approveID` "; //. +// "ORDER BY `maxLogID`"; } if (!$this->_ttapproveid) { if (!$this->getResult($queryStr)) @@ -424,16 +424,16 @@ class SeedDMS_Core_DatabaseAccess { "SELECT `tblDocumentStatusLog`.`statusID` AS `statusID`, ". "MAX(`tblDocumentStatusLog`.`statusLogID`) AS `maxLogID` ". "FROM `tblDocumentStatusLog` ". - "GROUP BY `tblDocumentStatusLog`.`statusID` ". - "ORDER BY `maxLogID`"; + "GROUP BY `tblDocumentStatusLog`.`statusID` "; //. +// "ORDER BY `maxLogID`"; break; default: $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttstatid` (PRIMARY KEY (`statusID`), INDEX (`maxLogID`)) ". "SELECT `tblDocumentStatusLog`.`statusID`, ". "MAX(`tblDocumentStatusLog`.`statusLogID`) AS `maxLogID` ". "FROM `tblDocumentStatusLog` ". - "GROUP BY `tblDocumentStatusLog`.`statusID` ". - "ORDER BY `maxLogID`"; + "GROUP BY `tblDocumentStatusLog`.`statusID` "; //. +// "ORDER BY `maxLogID`"; } if (!$this->_ttstatid) { if (!$this->getResult($queryStr)) From 17c8163972ce38157762f5f4e5f96f40e698d61c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 28 Jun 2017 15:00:07 +0200 Subject: [PATCH 184/194] add note for 4.3.35 --- CHANGELOG | 2 ++ SeedDMS_Core/package.xml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 44c35548d..d99fc60e8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,8 @@ - update last access time only once a minute - run action 'css' in view if it exists, move css code for timeline - show role of users in user list and substitute user list +- mysql sql_mode=only_full_group_by can be set without causing errors when + creating a temporary table -------------------------------------------------------------------------------- Changes in version 4.3.34 diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index c6f354b28..9700a6a6b 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -24,7 +24,7 @@ GPL License -??? +do not sort some temporary tables anymore, because it causes an error in mysql if sql_mode=only_full_group_by is set From 8531371f675c19bb19b30b82171d1a7ca12af521 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 28 Jun 2017 15:29:17 +0200 Subject: [PATCH 185/194] also take out ORDER BY in temp. tables for pgsql driver --- SeedDMS_Core/Core/inc.DBAccessPDO.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index e17734f9d..8dc8a2e63 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -381,8 +381,8 @@ class SeedDMS_Core_DatabaseAccess { "INSERT INTO `ttreviewid` SELECT `tblDocumentReviewLog`.`reviewID`, ". "MAX(`tblDocumentReviewLog`.`reviewLogID`) AS `maxLogID` ". "FROM `tblDocumentReviewLog` ". - "GROUP BY `tblDocumentReviewLog`.`reviewID` ". - "ORDER BY `maxLogID`"; + "GROUP BY `tblDocumentReviewLog`.`reviewID` ";//. +// "ORDER BY `maxLogID`"; break; default: $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttreviewid` (PRIMARY KEY (`reviewID`), INDEX (`maxLogID`)) ". @@ -422,8 +422,8 @@ class SeedDMS_Core_DatabaseAccess { "INSERT INTO `ttapproveid` SELECT `tblDocumentApproveLog`.`approveID`, ". "MAX(`tblDocumentApproveLog`.`approveLogID`) AS `maxLogID` ". "FROM `tblDocumentApproveLog` ". - "GROUP BY `tblDocumentApproveLog`.`approveID` ". - "ORDER BY `maxLogID`"; + "GROUP BY `tblDocumentApproveLog`.`approveID` "; //. +// "ORDER BY `maxLogID`"; break; default: $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttapproveid` (PRIMARY KEY (`approveID`), INDEX (`maxLogID`)) ". @@ -463,8 +463,8 @@ class SeedDMS_Core_DatabaseAccess { "INSERT INTO `ttstatid` SELECT `tblDocumentStatusLog`.`statusID`, ". "MAX(`tblDocumentStatusLog`.`statusLogID`) AS `maxLogID` ". "FROM `tblDocumentStatusLog` ". - "GROUP BY `tblDocumentStatusLog`.`statusID` ". - "ORDER BY `maxLogID`"; + "GROUP BY `tblDocumentStatusLog`.`statusID` "; //. +// "ORDER BY `maxLogID`"; break; default: $queryStr = "CREATE TEMPORARY TABLE IF NOT EXISTS `ttstatid` (PRIMARY KEY (`statusID`), INDEX (`maxLogID`)) ". From 258c3fae0bfdd27c48792ca63069a6424dc56bb7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 29 Jun 2017 16:32:42 +0200 Subject: [PATCH 186/194] change field name of attributes to 'attributes_version' makes much more sense because the attributes are version attributes. --- op/op.UpdateDocument.php | 4 ++-- views/bootstrap/class.UpdateDocument.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/op/op.UpdateDocument.php b/op/op.UpdateDocument.php index dfa08811a..8c6fb4c39 100644 --- a/op/op.UpdateDocument.php +++ b/op/op.UpdateDocument.php @@ -265,8 +265,8 @@ default: } } - if(isset($_POST["attributes"]) && $_POST["attributes"]) { - $attributes = $_POST["attributes"]; + if(isset($_POST["attributes_version"]) && $_POST["attributes_version"]) { + $attributes = $_POST["attributes_version"]; foreach($attributes as $attrdefid=>$attribute) { $attrdef = $dms->getAttributeDefinition($attrdefid); if($attribute) { diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index 9bf21f8c0..a94dcdc12 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -289,7 +289,7 @@ console.log(element); ?>
      - getID()."\" class=\"folder table-row-folder\" formtoken=\"".createFormKey('movefolder')."\">"; - $content .= "\n"; - $content .= "\n"; + $content .= ""; - $content .= ""; $content .= "getID()."\" draggable=\"true\" rel=\"folder_".$subFolder->getID()."\" class=\"folder table-row-folder\" formtoken=\"".createFormKey('movefolder')."\">"; // $content .= ""; - $content .= "\n"; - $content .= "\n"; + $content .= "
      "; + switch($currUser->getRole()) { + case SeedDMS_Core_User::role_user: + printMLText("role_user"); + break; + case SeedDMS_Core_User::role_admin: + printMLText("role_admin"); + break; + case SeedDMS_Core_User::role_guest: + printMLText("role_guest"); + break; + } + echo ""; if($currUser->getID() != $user->getID()) { echo "getID())."\"> ".getMLText('substitute_user')." "; } diff --git a/views/bootstrap/class.UserList.php b/views/bootstrap/class.UserList.php index 8873c0f09..a94159dc6 100644 --- a/views/bootstrap/class.UserList.php +++ b/views/bootstrap/class.UserList.php @@ -50,7 +50,7 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style { ?> - + "; @@ -74,6 +74,19 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style { } echo ""; echo ""; + echo " + + "; + echo ""; + echo ""; + echo ""; + } + } + if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') { // Retrieve a list of all users and groups that have review / approve // privileges. From 8e69893e89b16ec40669095d65d7243cfa99c6b3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 4 May 2017 13:48:07 +0200 Subject: [PATCH 146/194] move updating document into controller --- controllers/class.UpdateDocument.php | 87 ++++++++++++ op/op.UpdateDocument.php | 203 +++++++++++++-------------- 2 files changed, 182 insertions(+), 108 deletions(-) create mode 100644 controllers/class.UpdateDocument.php diff --git a/controllers/class.UpdateDocument.php b/controllers/class.UpdateDocument.php new file mode 100644 index 000000000..da2b120c2 --- /dev/null +++ b/controllers/class.UpdateDocument.php @@ -0,0 +1,87 @@ + + * @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_UpdateDocument extends SeedDMS_Controller_Common { + + public function run() { /* {{{ */ + $name = $this->getParam('name'); + $comment = $this->getParam('comment'); + + /* Call preUpdateDocument early, because it might need to modify some + * of the parameters. + */ + if(false === $this->callHook('preUpdateDocument')) { + $this->errormsg = 'hook_preUpdateDocument_failed'; + return null; + } + + $dms = $this->params['dms']; + $user = $this->params['user']; + $document = $this->params['document']; + $settings = $this->params['settings']; + $index = $this->params['index']; + $indexconf = $this->params['indexconf']; + $folder = $this->params['folder']; + $userfiletmp = $this->getParam('userfiletmp'); + $userfilename = $this->getParam('userfilename'); + $filetype = $this->getParam('filetype'); + $userfiletype = $this->getParam('userfiletype'); + $reviewers = $this->getParam('reviewers'); + $approvers = $this->getParam('approvers'); + $reqversion = $this->getParam('reqversion'); + $comment = $this->getParam('comment'); + $attributes = $this->getParam('attributes'); + $workflow = $this->getParam('workflow'); + $maxsizeforfulltext = $this->getParam('maxsizeforfulltext'); + + $result = $this->callHook('updateDocument'); + if($result === null) { + $filesize = SeedDMS_Core_File::fileSize($userfiletmp); + $contentResult=$document->addContent($comment, $user, $userfiletmp, basename($userfilename), $filetype, $userfiletype, $reviewers, $approvers, $version=0, $attributes, $workflow); + + if ($this->hasParam('expires')) { + if($document->setExpires($this->getParam('expires'))) { + } else { + } + } + + if($index) { + $lucenesearch = new $indexconf['Search']($index); + if($hit = $lucenesearch->getDocument((int) $document->getId())) { + $index->delete($hit->id); + } + $idoc = new $indexconf['IndexedDocument']($dms, $document, isset($settings->_converters['fulltext']) ? $settings->_converters['fulltext'] : null, !($filesize < $settings->_maxSizeForFullText)); + if(!$this->callHook('preIndexDocument', $document, $idoc)) { + } + $index->addDocument($idoc); + $index->commit(); + } + + if(!$this->callHook('postUpdateDocument', $document, $contentResult->getContent())) { + } + $result = $contentResult->getContent(); + } + + return $result; + } /* }}} */ +} + diff --git a/op/op.UpdateDocument.php b/op/op.UpdateDocument.php index 07d684924..dfa08811a 100644 --- a/op/op.UpdateDocument.php +++ b/op/op.UpdateDocument.php @@ -24,8 +24,17 @@ 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"); +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 from a trusted request */ +if(!checkFormKey('updatedocument')) { + UI::exitError(getMLText("document_title", array("documentname" => 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")); @@ -58,11 +67,12 @@ if ($document->isLocked()) { else $document->setLocked(false); } -if(isset($_POST['fineuploaderuuids']) && $_POST['fineuploaderuuids']) { - $uuids = explode(';', $_POST['fineuploaderuuids']); - $names = explode(';', $_POST['fineuploadernames']); +$prefix = 'userfile'; +if(isset($_POST[$prefix.'-fine-uploader-uuids']) && $_POST[$prefix.'-fine-uploader-uuids']) { + $uuids = explode(';', $_POST[$prefix.'-fine-uploader-uuids']); + $names = explode(';', $_POST[$prefix.'-fine-uploader-names']); $uuid = $uuids[0]; - $fullfile = $settings->_stagingDir.'/'.basename($uuid); + $fullfile = $settings->_stagingDir.'/'.utf8_basename($uuid); if(file_exists($fullfile)) { $finfo = finfo_open(FILEINFO_MIME_TYPE); $mimetype = finfo_file($finfo, $fullfile); @@ -74,12 +84,7 @@ if(isset($_POST['fineuploaderuuids']) && $_POST['fineuploaderuuids']) { } } -if(isset($_POST["comment"])) - $comment = $_POST["comment"]; -else - $comment = ""; - -if ($_FILES['userfile']['error'] == 0) { +if (isset($_FILES['userfile']) && $_FILES['userfile']['error'] == 0) { // if(!is_uploaded_file($_FILES["userfile"]["tmp_name"])) // UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")."lsajdflk"); @@ -121,6 +126,46 @@ if ($_FILES['userfile']['error'] == 0) { $fileType = ".".pathinfo($userfilename, PATHINFO_EXTENSION); +if($settings->_enableFullSearch) { + $index = $indexconf['Indexer']::open($settings->_luceneDir); + $indexconf['Indexer']::init($settings->_stopWordsFile); +} else { + $index = null; +} + +if(isset($_POST["comment"])) + $comment = $_POST["comment"]; +else + $comment = ""; + +$oldexpires = $document->getExpires(); +switch($_POST["presetexpdate"]) { +case "date": + $tmp = explode('-', $_POST["expdate"]); + $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]); + break; +case "1w": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1], $tmp[2]+7, $tmp[0]); + break; +case "1m": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1]+1, $tmp[2], $tmp[0]); + break; +case "1y": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]+1); + break; +case "2y": + $tmp = explode('-', date('Y-m-d')); + $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]+2); + break; +case "never": +default: + $expires = null; + break; +} + // Get the list of reviewers and approvers for this document. $reviewers = array(); $approvers = array(); @@ -237,48 +282,25 @@ if ($_FILES['userfile']['error'] == 0) { $attributes = array(); } - if(isset($GLOBALS['SEEDDMS_HOOKS']['updateDocument'])) { - foreach($GLOBALS['SEEDDMS_HOOKS']['updateDocument'] as $hookObj) { - if (method_exists($hookObj, 'preUpdateDocument')) { - $hookObj->preUpdateDocument(null, $document, array('name'=>&$name, 'comment'=>&$comment)); - } - } - } - - $filesize = SeedDMS_Core_File::fileSize($userfiletmp); - $contentResult=$document->addContent($comment, $user, $userfiletmp, basename($userfilename), $fileType, $userfiletype, $reviewers, $approvers, $version=0, $attributes, $workflow); - if (is_bool($contentResult) && !$contentResult) { - UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); - } - else { - if(isset($GLOBALS['SEEDDMS_HOOKS']['updateDocument'])) { - foreach($GLOBALS['SEEDDMS_HOOKS']['updateDocument'] as $hookObj) { - if (method_exists($hookObj, 'postUpdateDocument')) { - $hookObj->postUpdateDocument(null, $document, $contentResult->getContent()); - } - } - } - if($settings->_enableFullSearch) { - $index = $indexconf['Indexer']::open($settings->_luceneDir); - if($index) { - $lucenesearch = new $indexconf['Search']($index); - if($hit = $lucenesearch->getDocument((int) $document->getId())) { - $index->delete($hit->id); - } - $indexconf['Indexer']::init($settings->_stopWordsFile); - $idoc = new $indexconf['IndexedDocument']($dms, $document, isset($settings->_converters['fulltext']) ? $settings->_converters['fulltext'] : null, !($filesize < $settings->_maxSizeForFullText)); - if(isset($GLOBALS['SEEDDMS_HOOKS']['updateDocument'])) { - foreach($GLOBALS['SEEDDMS_HOOKS']['updateDocument'] as $hookObj) { - if (method_exists($hookObj, 'preIndexDocument')) { - $hookObj->preIndexDocument(null, $document, $idoc); - } - } - } - $index->addDocument($idoc); - $index->commit(); - } - } + $controller->setParam('folder', $folder); + $controller->setParam('document', $document); + $controller->setParam('index', $index); + $controller->setParam('indexconf', $indexconf); + $controller->setParam('comment', $comment); + if($oldexpires != $expires) + $controller->setParam('expires', $expires); + $controller->setParam('userfiletmp', $userfiletmp); + $controller->setParam('userfilename', $userfilename); + $controller->setParam('filetype', $fileType); + $controller->setParam('userfiletype', $userfiletype); + $controller->setParam('reviewers', $reviewers); + $controller->setParam('approvers', $approvers); + $controller->setParam('attributes', $attributes); + $controller->setParam('workflow', $workflow); + if(!$content = $controller->run()) { + UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText($controller->getErrorMsg())); + } else { // Send notification to subscribers. if ($notifier){ $notifyList = $document->getNotifyList(); @@ -291,7 +313,7 @@ if ($_FILES['userfile']['error'] == 0) { $params['folder_path'] = $folder->getFolderPathPlain(); $params['username'] = $user->getFullName(); $params['comment'] = $document->getComment(); - $params['version_comment'] = $contentResult->getContent()->getComment(); + $params['version_comment'] = $content->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; @@ -308,7 +330,7 @@ if ($_FILES['userfile']['error'] == 0) { $message = "request_workflow_action_email_body"; $params = array(); $params['name'] = $document->getName(); - $params['version'] = $contentResult->getContent()->getVersion(); + $params['version'] = $content->getVersion(); $params['workflow'] = $workflow->getName(); $params['folder_path'] = $folder->getFolderPathPlain(); $params['current_state'] = $workflow->getInitState()->getName(); @@ -335,8 +357,8 @@ if ($_FILES['userfile']['error'] == 0) { $params = array(); $params['name'] = $document->getName(); $params['folder_path'] = $folder->getFolderPathPlain(); - $params['version'] = $contentResult->getContent()->getVersion(); - $params['comment'] = $contentResult->getContent()->getComment(); + $params['version'] = $content->getVersion(); + $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; @@ -356,8 +378,8 @@ if ($_FILES['userfile']['error'] == 0) { $params = array(); $params['name'] = $document->getName(); $params['folder_path'] = $folder->getFolderPathPlain(); - $params['version'] = $contentResult->getContent()->getVersion(); - $params['comment'] = $contentResult->getContent()->getComment(); + $params['version'] = $content->getVersion(); + $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; @@ -371,60 +393,25 @@ if ($_FILES['userfile']['error'] == 0) { } } } - } - switch($_POST["presetexpdate"]) { - case "date": - $tmp = explode('-', $_POST["expdate"]); - $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]); - break; - case "1w": - $tmp = explode('-', date('Y-m-d')); - $expires = mktime(0,0,0, $tmp[1], $tmp[2]+7, $tmp[0]); - break; - case "1m": - $tmp = explode('-', date('Y-m-d')); - $expires = mktime(0,0,0, $tmp[1]+1, $tmp[2], $tmp[0]); - break; - case "1y": - $tmp = explode('-', date('Y-m-d')); - $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]+1); - break; - case "2y": - $tmp = explode('-', date('Y-m-d')); - $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]+2); - break; - case "never": - default: - $expires = null; - break; - } - - 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); - } + if($oldexpires != $document->getExpires()) { + // 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")); } } + if($settings->_removeFromDropFolder) { if(file_exists($userfiletmp)) { unlink($userfiletmp); From b64c73730219a3851b248b9ca12eb217ea149ede Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 4 May 2017 13:49:01 +0200 Subject: [PATCH 147/194] fix uploading from drop folder, when enable large file support is on --- views/bootstrap/class.AddDocument.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index f03df1ae7..c9a4a161c 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -87,7 +87,11 @@ $(document).ready(function() { if($enablelargefileupload) { ?> submitHandler: function(form) { - userfileuploader.uploadStoredFiles(); + /* fileuploader may not have any files if drop folder is used */ + if(userfileuploader.getUploads().length) + userfileuploader.uploadStoredFiles(); + else + form.submit(); }, Date: Thu, 4 May 2017 13:49:45 +0200 Subject: [PATCH 148/194] add form key, fix uploading with fine-uploader --- views/bootstrap/class.UpdateDocument.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index 2e48347a9..0267ac7a1 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -68,6 +68,8 @@ $(document).ready( function() { return false; }, ""); $("#form1").validate({ + debug: false, + ignore: ":hidden:not(.do_validate)", invalidHandler: function(e, validator) { noty({ text: (validator.numberOfInvalids() == 1) ? "".replace('#', validator.numberOfInvalids()) : "".replace('#', validator.numberOfInvalids()), @@ -82,7 +84,11 @@ $(document).ready( function() { if($enablelargefileupload) { ?> submitHandler: function(form) { - manualuploader.uploadStoredFiles(); + /* fileuploader may not have any files if drop folder is used */ + if(userfileuploader.getUploads().length) + userfileuploader.uploadStoredFiles(); + else + form.submit(); }, - fineuploaderuuids: { - fineuploader: [ manualuploader, $('#dropfolderfileform1') ] + 'userfile-fine-uploader-uuids': { + fineuploader: [ userfileuploader, $('#dropfolderfileform1') ] } +
      "; + switch($currUser->getRole()) { + case SeedDMS_Core_User::role_user: + printMLText("role_user"); + break; + case SeedDMS_Core_User::role_admin: + printMLText("role_admin"); + break; + case SeedDMS_Core_User::role_guest: + printMLText("role_guest"); + break; + } + echo ""; echo SeedDMS_Core_File::format_filesize($currUser->getUsedDiskSpace()); if($quota) { echo " / "; From 7c7dfc14112545a3fbd412e8598a6f4b9e291e2c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 May 2017 18:28:56 +0200 Subject: [PATCH 136/194] handle hooks with two arguments --- inc/inc.ClassControllerCommon.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/inc.ClassControllerCommon.php b/inc/inc.ClassControllerCommon.php index 154060804..a04ce3764 100644 --- a/inc/inc.ClassControllerCommon.php +++ b/inc/inc.ClassControllerCommon.php @@ -124,6 +124,9 @@ class SeedDMS_Controller_Common { foreach($GLOBALS['SEEDDMS_HOOKS']['controller'][lcfirst($tmp[2])] as $hookObj) { if (method_exists($hookObj, $hook)) { switch(func_num_args()) { + case 3: + $result = $hookObj->$hook($this, func_get_arg(1), func_get_arg(2)); + break; case 2: $result = $hookObj->$hook($this, func_get_arg(1)); break; From 9ab19afe031f3fccc5816bd0c6a62a10b2597bf1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 May 2017 18:29:47 +0200 Subject: [PATCH 137/194] check return value of hook no return value will be discarded, array and objects are put into an array, strings are concatened --- inc/inc.ClassHook.php | 41 +++++++++++++++++++++++++++++++++++++ inc/inc.ClassViewCommon.php | 31 ++++++++++------------------ 2 files changed, 52 insertions(+), 20 deletions(-) create mode 100644 inc/inc.ClassHook.php diff --git a/inc/inc.ClassHook.php b/inc/inc.ClassHook.php new file mode 100644 index 000000000..c0a532edd --- /dev/null +++ b/inc/inc.ClassHook.php @@ -0,0 +1,41 @@ + + * @copyright Copyright (C) 2017 Uwe Steinmann + * @version Release: @package_version@ + */ + +/** + * Parent class for all hook response classes + * + * @category DMS + * @package SeedDMS + * @author Uwe Steinmann + * @copyright Copyright (C) 2017 Uwe Steinmann + * @version Release: @package_version@ + */ +class SeedDMS_Hook_Response { + protected $data; + + protected $error; + + public function __construct($error = false, $data = null) { + $this->data = $data; + $this->error = $error; + } + + public function setData($data) { + $this->data = $data; + } + + public function getData() { + return $this->data; + } +} + diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index 3ab450356..122cfee1e 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -13,6 +13,8 @@ * @version Release: @package_version@ */ +require_once "inc/inc.ClassHook.php"; + /** * Parent class for all view classes * @@ -92,39 +94,28 @@ class SeedDMS_View_Common { switch(func_num_args()) { case 1: $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: $tmpret = $hookObj->$hook($this, func_get_arg(1), func_get_arg(2)); - if(is_string($tmpret)) - $ret .= $tmpret; - else - $ret = $tmpret; break; case 4: $tmpret = $hookObj->$hook($this, func_get_arg(1), func_get_arg(2), func_get_arg(3)); - if(is_string($tmpret)) - $ret .= $tmpret; - else - $ret = $tmpret; break; default: case 5: $tmpret = $hookObj->$hook($this, func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4)); - if(is_string($tmpret)) - $ret .= $tmpret; - else - $ret = $tmpret; + break; + } + if($tmpret) { + if(is_string($tmpret)) + $ret .= $tmpret; + elseif(is_array($tmpret) || is_object($tmpret)) + $ret = ($ret === null) ? $tmpret : array_merge($ret, $tmpret); + else + $ret = $tmpret; } } } From b60e5a9d9776c5de8a15b5d912e824aa943f7ad4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 May 2017 18:31:23 +0200 Subject: [PATCH 138/194] fix check whether value is in value set --- views/bootstrap/class.AttributeMgr.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.AttributeMgr.php b/views/bootstrap/class.AttributeMgr.php index 51b877993..5b2454730 100644 --- a/views/bootstrap/class.AttributeMgr.php +++ b/views/bootstrap/class.AttributeMgr.php @@ -90,8 +90,8 @@ $(document).ready( function() { $content .= ""; /* Check if value is in value set */ if($selattrdef->getValueSet()) { - foreach($values as $v) { - if(!in_array($value, $selattrdef->getValueSetAsArray())) + foreach($value as $v) { + if(!in_array($v, $selattrdef->getValueSetAsArray())) $content .= getMLText("attribute_value_not_in_valueset"); } } From 4e883444f248a65df4c86658ab78303ef77628fc Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 May 2017 18:33:07 +0200 Subject: [PATCH 139/194] fix check for value in value set --- views/bootstrap/class.AttributeMgr.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.AttributeMgr.php b/views/bootstrap/class.AttributeMgr.php index 51b877993..5b2454730 100644 --- a/views/bootstrap/class.AttributeMgr.php +++ b/views/bootstrap/class.AttributeMgr.php @@ -90,8 +90,8 @@ $(document).ready( function() { $content .= ""; /* Check if value is in value set */ if($selattrdef->getValueSet()) { - foreach($values as $v) { - if(!in_array($value, $selattrdef->getValueSetAsArray())) + foreach($value as $v) { + if(!in_array($v, $selattrdef->getValueSetAsArray())) $content .= getMLText("attribute_value_not_in_valueset"); } } From 53f646114aa159f53cee6f6f0b6143f55e4ba042 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 May 2017 20:52:40 +0200 Subject: [PATCH 140/194] set from_address as return path if set --- inc/inc.ClassEmailNotify.php | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/inc/inc.ClassEmailNotify.php b/inc/inc.ClassEmailNotify.php index fff88fa7d..729400aa8 100644 --- a/inc/inc.ClassEmailNotify.php +++ b/inc/inc.ClassEmailNotify.php @@ -75,10 +75,15 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { return -1; } + $returnpath = ''; if(is_object($sender) && !strcasecmp(get_class($sender), $this->_dms->getClassname('user'))) { $from = $sender->getFullName() ." <". $sender->getEmail() .">"; + if($this->from_address) + $returnpath = $this->from_address; } elseif(is_string($sender) && trim($sender) != "") { $from = $sender; + if($this->from_address) + $returnpath = $this->from_address; } else { $from = $this->from_address; } @@ -90,6 +95,8 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { $headers = array (); $headers['From'] = $from; + if($returnpath) + $headers['Return-Path'] = $returnpath; $headers['To'] = $recipient->getEmail(); $preferences = array("input-charset" => "UTF-8", "output-charset" => "UTF-8"); $encoded_subject = iconv_mime_encode("Subject", getMLText($subject, $params, "", $lang), $preferences); @@ -119,22 +126,6 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { } else { return true; } - -/* - $headers = array(); - $headers[] = "MIME-Version: 1.0"; - $headers[] = "Content-type: text/plain; charset=utf-8"; - $headers[] = "From: ". $from; - - $lang = $recipient->getLanguage(); - $message = getMLText("email_header", array(), "", $lang)."\r\n\r\n".getMLText($message, $params, "", $lang); - $message .= "\r\n\r\n".getMLText("email_footer", array(), "", $lang); - - $subject = "=?UTF-8?B?".base64_encode(getMLText($subject, $params, "", $lang))."?="; - mail($recipient->getEmail(), $subject, $message, implode("\r\n", $headers)); - - return true; -*/ } /* }}} */ function toGroup($sender, $groupRecipient, $subject, $message, $params=array()) { /* {{{ */ From 73389a7e576bacff224aaa6893b10ccddf9fb341 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 2 May 2017 20:55:30 +0200 Subject: [PATCH 141/194] set 'help' of extension configuration as title attr --- 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 3100a3830..638ddfe88 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -746,7 +746,7 @@ if(!is_writeable($settings->_configFilePath)) { $conf) { ?> -
      : Date: Tue, 2 May 2017 21:00:36 +0200 Subject: [PATCH 142/194] check if $conf['help'] and $conf['size'] is set before using it --- views/bootstrap/class.Settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 614e48f50..c99c1d252 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -738,7 +738,7 @@ if(!is_writeable($settings->_configFilePath)) { $conf) { ?> -
      : _configFilePath)) { break; default: ?> - " title="" value="_extensions[$extname][$confkey])) echo $settings->_extensions[$extname][$confkey]; ?>" size="" /> + " title="" value="_extensions[$extname][$confkey])) echo $settings->_extensions[$extname][$confkey]; ?>" " /> From 9eeeedf22dd7183a23f8701510c87e47e7d1da25 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 3 May 2017 14:09:34 +0200 Subject: [PATCH 143/194] new phrases and updates --- languages/ar_EG/lang.inc | 2 ++ languages/bg_BG/lang.inc | 66 +++++++++++++++++++++------------------- languages/ca_ES/lang.inc | 2 ++ languages/cs_CZ/lang.inc | 8 +++-- languages/de_DE/lang.inc | 4 ++- languages/el_GR/lang.inc | 12 +++++--- languages/en_GB/lang.inc | 4 ++- languages/es_ES/lang.inc | 2 ++ languages/fr_FR/lang.inc | 2 ++ languages/hr_HR/lang.inc | 6 ++-- languages/hu_HU/lang.inc | 2 ++ languages/it_IT/lang.inc | 24 ++++++++------- languages/ko_KR/lang.inc | 2 ++ languages/nl_NL/lang.inc | 6 ++-- languages/pl_PL/lang.inc | 6 ++-- languages/pt_BR/lang.inc | 2 ++ languages/ro_RO/lang.inc | 2 ++ languages/ru_RU/lang.inc | 6 ++-- languages/sk_SK/lang.inc | 2 ++ languages/sv_SE/lang.inc | 2 ++ languages/tr_TR/lang.inc | 2 ++ languages/uk_UA/lang.inc | 2 ++ languages/zh_CN/lang.inc | 2 ++ languages/zh_TW/lang.inc | 2 ++ 24 files changed, 109 insertions(+), 61 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index efb41f7cf..2a2e1ba10 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -1129,6 +1129,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => '', 'settings_enableMenuTasks' => '', 'settings_enableMenuTasks_desc' => '', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => '', 'settings_enableNotificationAppRev_desc' => '', 'settings_enableNotificationWorkflow' => '', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index 5e0945eba..ea265266a 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/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 (791) +// Translators: Admin (822) $text = array( '2_factor_auth' => '', @@ -53,7 +53,7 @@ $text = array( 'add_attrdefgroup' => '', 'add_document' => 'Добави документ', 'add_document_link' => 'Добави препратка', -'add_document_notify' => '', +'add_document_notify' => 'Добави нотификация', 'add_doc_reviewer_approver_warning' => 'Документът получава статус ДОСТЪПЕН автоматично ако няма нито рецензент нито утвърждаващ', 'add_doc_workflow_warning' => 'N.B. Документът автоматично семаркира като освободен ако не се работи по него.', 'add_event' => 'Добави събитие', @@ -105,7 +105,7 @@ $text = array( 'april' => 'Април', 'archive_creation' => 'Създаване архив', 'archive_creation_warning' => 'Тази операция ще създаде архив, съдържащ всички папки. След създаването архивът ще бъде съхранен в папката с данни на сървъра.
      ВНИМАНИЕ: Архивът създаден като понятен за човек, ще бъде непригоден за бекъп!', -'ar_EG' => '', +'ar_EG' => 'Арабски', 'assign_approvers' => 'Назначи утвърждаващи', 'assign_reviewers' => 'Назначи рецензенти', 'assign_user_property_to' => 'Назначи свойства на потребителя', @@ -166,7 +166,7 @@ $text = array( 'backup_remove' => 'Изтрий бекъп', 'backup_tools' => 'Иструменти за бекъп', 'between' => 'между', -'bg_BG' => '', +'bg_BG' => 'Български', 'browse' => 'Преглеждане', 'calendar' => 'Календар', 'calendar_week' => '', @@ -187,7 +187,7 @@ $text = array( 'category_info' => '', 'category_in_use' => 'Тази категория се използва от документите', 'category_noname' => 'Въведете име на категорията', -'ca_ES' => '', +'ca_ES' => 'Каталунски', 'change_assignments' => 'Промени предназначението', 'change_password' => 'Промени паролата', 'change_password_message' => 'Паролата променена', @@ -260,7 +260,7 @@ $text = array( 'create_fulltext_index' => 'Създай пълнотекстов индекс', 'create_fulltext_index_warning' => 'Вие искате да пресъздадете пълнотекстов индекс. Това ще отнеме време и ще понижи производителността. Да продолжа ли?', 'creation_date' => 'Създаден', -'cs_CZ' => '', +'cs_CZ' => 'Чешки', 'current_password' => 'Текуща парола', 'current_quota' => '', 'current_state' => '', @@ -277,7 +277,7 @@ $text = array( 'delete' => 'Изтрий', 'details' => 'Детайли', 'details_version' => 'Детайли за версия: [version]', -'de_DE' => '', +'de_DE' => 'Немски', 'disclaimer' => 'Работим аккуратно и задълбочено. От това зависи бъдeщето на нашата страна и благополучието на народа.nПетилетката за три години!nДа не оставим неодрусана слива в наше село!', 'discspace' => '', 'docs_in_reception_no_access' => '', @@ -375,7 +375,7 @@ $text = array( 'edit_user' => 'Редактирай потребител', 'edit_user_details' => 'Редактирай данните на потребителя', 'edit_version' => '', -'el_GR' => '', +'el_GR' => 'Гръцки', 'email' => 'Email', 'email_error_title' => 'Email не е указан', 'email_footer' => 'Винаги можете да измените e-mail исползвайки функцията \'Моя учетка\'', @@ -384,7 +384,7 @@ $text = array( 'empty_attribute_group_list' => '', 'empty_folder_list' => 'Няма документи или папки', 'empty_notify_list' => 'Няма записи', -'en_GB' => '', +'en_GB' => 'Английски (Великобритания)', 'equal_transition_states' => 'Началното и крайно състояние са еднакви', 'error' => 'Грешка', 'error_add_aro' => '', @@ -398,7 +398,7 @@ $text = array( 'error_remove_folder' => '', 'error_remove_permission' => '', 'error_toogle_permission' => '', -'es_ES' => '', +'es_ES' => 'Испански', 'event_details' => 'Детайли за събитието', 'exclude_items' => '', 'expired' => 'Изтекъл', @@ -449,7 +449,7 @@ $text = array( 'friday' => 'петък', 'friday_abbr' => '', 'from' => 'От', -'fr_FR' => '', +'fr_FR' => 'Френски', 'fullsearch' => 'Пълнотекстово търсене', 'fullsearch_hint' => 'Използвай пълнотекстов индекс', 'fulltextsearch_disabled' => '', @@ -478,9 +478,9 @@ $text = array( 'hook_name' => '', 'hourly' => 'Ежечасно', 'hours' => 'часа', -'hr_HR' => '', +'hr_HR' => 'Хърватски', 'human_readable' => 'Човекопонятен архив', -'hu_HU' => '', +'hu_HU' => 'Унгарски', 'id' => 'ID', 'identical_version' => 'Новата версия е идентична с текущата.', 'import' => '', @@ -494,7 +494,7 @@ $text = array( 'index_converters' => 'Index document conversion', 'index_done' => '', 'index_error' => '', -'index_folder' => '', +'index_folder' => 'Индекс на директорията', 'index_pending' => '', 'index_waiting' => '', 'individuals' => 'Личности', @@ -531,7 +531,7 @@ $text = array( 'in_workflow' => 'в процес', 'is_disabled' => 'забранена сметка', 'is_hidden' => 'Не показвай в списъка с потребители', -'it_IT' => '', +'it_IT' => 'Италиански', 'january' => 'януари', 'js_form_error' => '', 'js_form_errors' => '', @@ -558,9 +558,9 @@ $text = array( 'keep' => '', 'keep_doc_status' => 'Запази статуса на документа', 'keywords' => 'Ключови думи', -'keywords_loading' => '', +'keywords_loading' => 'Моля, изчакайте, докато ключовите думи се зареждат', 'keyword_exists' => 'Ключовата дума съществува', -'ko_KR' => '', +'ko_KR' => 'Корейски', 'language' => 'Език', 'lastaccess' => '', 'last_update' => 'Последно обновление', @@ -645,7 +645,7 @@ $text = array( 'new_subfolder_email_subject' => '', 'new_user_image' => 'Ново изображение', 'next_state' => 'Ново състояние', -'nl_NL' => '', +'nl_NL' => 'Холандски', 'no' => 'Не', 'notify_added_email' => 'Вие сте добавен в списъка с уведомявани', 'notify_added_email_body' => '', @@ -719,7 +719,7 @@ $text = array( 'pending_reviews' => '', 'pending_workflows' => '', 'personal_default_keywords' => 'Личен списък с ключови думи', -'pl_PL' => '', +'pl_PL' => 'Полски', 'possible_substitutes' => '', 'preset_expires' => '', 'preview' => '', @@ -729,7 +729,7 @@ $text = array( 'preview_plain' => '', 'previous_state' => 'Предишно състояние', 'previous_versions' => 'Предишни версии', -'pt_BR' => '', +'pt_BR' => 'Португалски (Бразилия)', 'quota' => 'Квота', 'quota_exceeded' => 'Вашата дискова квота е превишена с [bytes].', 'quota_is_disabled' => '', @@ -834,11 +834,11 @@ $text = array( 'role_name' => '', 'role_type' => '', 'role_user' => 'Потребител', -'ro_RO' => '', +'ro_RO' => 'Румънски', 'run_subworkflow' => 'Пусни под-процес', 'run_subworkflow_email_body' => '', 'run_subworkflow_email_subject' => '', -'ru_RU' => '', +'ru_RU' => 'Руски', 'saturday' => 'събота', 'saturday_abbr' => '', 'save' => 'Съхрани', @@ -868,12 +868,12 @@ $text = array( 'select_grp_ind_notification' => '', 'select_grp_ind_recipients' => '', 'select_grp_ind_reviewers' => '', -'select_grp_notification' => '', +'select_grp_notification' => 'Избор на групова нотификация', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'Кликни да избереш група рецензенти', 'select_grp_revisors' => '', 'select_ind_approvers' => 'Кликни да избереш утвърждаващ', -'select_ind_notification' => '', +'select_ind_notification' => 'Избор на индивидуална нотификация', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Кликни да избереш рецензент', 'select_ind_revisors' => '', @@ -994,6 +994,8 @@ $text = array( 'settings_enableLargeFileUpload_desc' => 'Ако е включено, качване на файлове е дустъпно и чрез джава-аплет, именован jumploader, без лимит за размер на файла. Това също ще позволи да се качват няколко файла наведнъж.', 'settings_enableMenuTasks' => '', 'settings_enableMenuTasks_desc' => '', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => 'Разреши уведомление до рецензиращи/утвърждаващи', 'settings_enableNotificationAppRev_desc' => 'Избери за изпращане на уведомление до рецензиращи/утвърждаващи когато се добавя нова версия на документа', 'settings_enableNotificationWorkflow' => '', @@ -1203,7 +1205,7 @@ $text = array( 'sign_in' => 'вход', 'sign_out' => 'изход', 'sign_out_user' => '', -'sk_SK' => '', +'sk_SK' => 'Словашки', 'space_used_on_data_folder' => 'Размер на каталога с данните', 'splash_added_to_clipboard' => '', 'splash_add_attribute' => '', @@ -1286,14 +1288,14 @@ $text = array( 'submit_userinfo' => 'Изпрати информация за потребител', 'subsribe_timelinefeed' => '', 'substitute_to_user' => '', -'substitute_user' => '', +'substitute_user' => 'Заместващ потребител', 'success_add_aro' => '', 'success_add_permission' => '', 'success_remove_permission' => '', 'success_toogle_permission' => '', 'sunday' => 'неделя', 'sunday_abbr' => '', -'sv_SE' => '', +'sv_SE' => 'Шведски', 'switched_to' => '', 'takeOverAttributeValue' => '', 'takeOverGrpApprover' => '', @@ -1337,12 +1339,12 @@ $text = array( 'transmittal_size' => '', 'tree_loading' => '', 'trigger_workflow' => 'Процес', -'tr_TR' => '', +'tr_TR' => 'Турски', 'tuesday' => 'вторник', 'tuesday_abbr' => '', 'type_of_hook' => '', 'type_to_search' => 'Тип за търсене', -'uk_UA' => '', +'uk_UA' => 'Украински', 'under_folder' => 'В папка', 'unknown_attrdef' => '', 'unknown_command' => 'Командата не е позната.', @@ -1386,7 +1388,7 @@ $text = array( 'user_login' => 'Идентификатор на потребителя', 'user_management' => 'Управление на потребителите', 'user_name' => 'Пълно име', -'use_comment_of_document' => '', +'use_comment_of_document' => 'Използвай коментара от документа', 'use_default_categories' => 'Исползвай предопределени категории', 'use_default_keywords' => 'Исползовай предопределенни ключови думи', 'valid_till' => '', @@ -1433,7 +1435,7 @@ $text = array( 'workflow_user_summary' => 'Резюме за потребител', 'year_view' => 'годишен изглед', 'yes' => 'Да', -'zh_CN' => '', -'zh_TW' => '', +'zh_CN' => 'Китайски (Китай)', +'zh_TW' => 'Китайски (Тайван)', ); ?> diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index b62732dde..5457e51d6 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -999,6 +999,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => '', 'settings_enableMenuTasks' => '', 'settings_enableMenuTasks_desc' => '', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => '', 'settings_enableNotificationAppRev_desc' => '', 'settings_enableNotificationWorkflow' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index ecd879767..84adaf7df 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 (720), kreml (455) +// Translators: Admin (722), kreml (455) $text = array( '2_factor_auth' => '', @@ -566,7 +566,7 @@ URL: [url]', 'include_content' => '', 'include_documents' => 'Včetně dokumentů', 'include_subdirectories' => 'Včetně podadresářů', -'indexing_tasks_in_queue' => '', +'indexing_tasks_in_queue' => 'Indexování úkolů ve frontě', 'index_converters' => 'Index konverze dokumentu', 'index_done' => '', 'index_error' => '', @@ -792,7 +792,7 @@ URL: [url]', 'only_jpg_user_images' => 'Pro obrázky uživatelů je možné použít pouze obrázky .jpg', 'order_by_sequence_off' => '', 'original_filename' => 'Originální název souboru', -'overall_indexing_progress' => '', +'overall_indexing_progress' => 'Celkový průběh indexování', 'owner' => 'Vlastník', 'ownership_changed_email' => 'Vlastník změněn', 'ownership_changed_email_body' => 'Vlastník změněn @@ -1138,6 +1138,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => 'If set, file upload is also available through a java applet called jumploader without a file size limit set by the browser. It also allows to upload several files in one step.', 'settings_enableMenuTasks' => '', 'settings_enableMenuTasks_desc' => '', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => 'Povolit oznámení posuzovateli/schvalovateli', 'settings_enableNotificationAppRev_desc' => 'Označit pro oznamování posuzovateli/schvalovateli, pokud je přidána nová verze dokumentu.', 'settings_enableNotificationWorkflow' => '', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index cd384cb7a..53bc24bb9 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 (2411), dgrutsch (22) +// Translators: Admin (2413), dgrutsch (22) $text = array( '2_factor_auth' => '2-Faktor Authentifizierung', @@ -1194,6 +1194,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => 'Wenn dies gesetzt ist, dann ist ebenfalls der Upload von Dokumenten durch ein java applet mit Namen \'jumploader\' ohne Begrenzung der maximalen Dateigröße möglich. Auch das Hochladen mehrerer Dokumente in einem Schritt wird dadurch ermöglicht. Das Einschalten bewirkt, dass keine http only Cookies mehr gesetzt werden.', 'settings_enableMenuTasks' => 'Aufgabenliste im Menü', 'settings_enableMenuTasks_desc' => 'Ein-/Ausschalten des Menüeintrags, der anstehenden Aufgaben des Benutzers enthält. Diese Liste beinhaltet Dokumente die geprüft, freigegeben, usw. werden müssen.', +'settings_enableMultiUpload' => 'Erlaube Hochladen mehrerer Dateien', +'settings_enableMultiUpload_desc' => 'Beim Erstellen eines neuen Dokuments können mehrere Dateien in einem Vorgang hochgeladen werden. Jede Datei erzeugt ein neues Dokument.', 'settings_enableNotificationAppRev' => 'Prűfer/Freigeber benachrichtigen', 'settings_enableNotificationAppRev_desc' => 'Setzen Sie diese Option, wenn die Prüfer und Freigeber eines Dokuments beim Hochladen einer neuen Version benachrichtigt werden sollen.', 'settings_enableNotificationWorkflow' => 'Sende Benachrichtigung an Benutzer im nächsten Workflow-Schritt', diff --git a/languages/el_GR/lang.inc b/languages/el_GR/lang.inc index 8f0e166b7..e11fae23b 100644 --- a/languages/el_GR/lang.inc +++ b/languages/el_GR/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 (220) +// Translators: Admin (224) $text = array( '2_factor_auth' => '', @@ -166,7 +166,7 @@ $text = array( 'backup_remove' => '', 'backup_tools' => 'Εργαλεία εφεδρικής καταγραφής', 'between' => 'μεταξύ', -'bg_BG' => '', +'bg_BG' => 'Βουλγάρικα', 'browse' => '', 'calendar' => 'Ημερολόγιο', 'calendar_week' => 'Εβδομάδα', @@ -187,7 +187,7 @@ $text = array( 'category_info' => '', 'category_in_use' => 'Η Κατηγορία αυτή είναι σε χρήση.', 'category_noname' => 'Δεν δόθηκε όνομα κατηγορίας.', -'ca_ES' => '', +'ca_ES' => 'Καταλανικά', 'change_assignments' => '', 'change_password' => 'Αλλαγή κωδικού', 'change_password_message' => 'Ο κωδικός σας έχει αλλάξει.', @@ -226,7 +226,7 @@ $text = array( 'clear_cache' => '', 'clear_clipboard' => '', 'clear_password' => '', -'clipboard' => '', +'clipboard' => 'Πρόχειρο', 'close' => 'Κλέισιμο', 'command' => '', 'comment' => 'Σχόλιο', @@ -342,7 +342,7 @@ $text = array( 'draft' => '', 'draft_pending_approval' => '', 'draft_pending_review' => '', -'drag_icon_here' => '', +'drag_icon_here' => 'Σείρτε την εικόνα του φακέλου ή το έγγραφο εδώ!', 'dropfolderdir_missing' => '', 'dropfolder_file' => '', 'dropfolder_folder' => '', @@ -1005,6 +1005,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => '', 'settings_enableMenuTasks' => '', 'settings_enableMenuTasks_desc' => '', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => '', 'settings_enableNotificationAppRev_desc' => '', 'settings_enableNotificationWorkflow' => '', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index a5e091c15..a25085711 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 (1538), dgrutsch (9), netixw (14) +// Translators: Admin (1540), dgrutsch (9), netixw (14) $text = array( '2_factor_auth' => '2-factor authentication', @@ -1189,6 +1189,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => 'If set, file upload is also available through a java applet called jumploader without a file size limit set by the browser. It also allows to upload several files in one step. Turning this on will turn off http only cookies.', 'settings_enableMenuTasks' => 'Enable task list in menu', 'settings_enableMenuTasks_desc' => 'Enable/Disable the menu item which contains all tasks for the user. This contains documents, that need to be reviewed, approved, etc.', +'settings_enableMultiUpload' => 'Allow upload of multiple files', +'settings_enableMultiUpload_desc' => 'When creating a new document, multiple files can be uploaded. Each will create a new document.', 'settings_enableNotificationAppRev' => 'Enable reviewer/approver notification', 'settings_enableNotificationAppRev_desc' => 'Check to send a notification to the reviewer/approver when a new document version is added', 'settings_enableNotificationWorkflow' => 'Send notification to users in next workflow transition', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index df7a8c1d8..dbf11e034 100644 --- a/languages/es_ES/lang.inc +++ b/languages/es_ES/lang.inc @@ -1144,6 +1144,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_enableMenuTasks' => '', 'settings_enableMenuTasks_desc' => '', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', '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' => 'Enviar notificación a los usuarios en la siguiente transacción del flujo.', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 30dd65dd4..21285d70c 100644 --- a/languages/fr_FR/lang.inc +++ b/languages/fr_FR/lang.inc @@ -1139,6 +1139,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => 'Si défini, le téléchargement de fichier est également disponible via un applet java appelé jumploader sans limite de taille définie par le navigateur. Il permet également de télécharger plusieurs fichiers en une seule fois.', 'settings_enableMenuTasks' => '', 'settings_enableMenuTasks_desc' => '', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => 'Notification correcteur/approbateur', 'settings_enableNotificationAppRev_desc' => 'Cochez pour envoyer une notification au correcteur/approbateur quand une nouvelle version du document est ajoutée', 'settings_enableNotificationWorkflow' => 'Envoyer les notifications aux utilisateurs dans le prochain workflow', diff --git a/languages/hr_HR/lang.inc b/languages/hr_HR/lang.inc index f78bb63cc..448458f75 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 (1195), marbanas (16) +// Translators: Admin (1196), marbanas (16) $text = array( '2_factor_auth' => '', @@ -654,7 +654,7 @@ Internet poveznica: [url]', 'linked_to_this_version' => '', 'link_alt_updatedocument' => 'Ako želite prenijeti datoteke veće od trenutne maksimalne veličine prijenosa, molimo koristite alternativu upload page.', 'link_to_version' => '', -'list_access_rights' => '', +'list_access_rights' => 'Izlistaj sve dozvole pristupa', 'list_contains_no_access_docs' => '', 'list_hooks' => '', 'local_file' => 'Lokalna datoteka', @@ -1165,6 +1165,8 @@ Internet poveznica: [url]', 'settings_enableLargeFileUpload_desc' => 'Ako je postavljeno, učitavanje datoteke je također dostupno kroz Java aplet naziva "jumploader" bez postavljenog ograničenja veličine datoteke od strane pretraživača. To također omogućuje učitavanje nekoliko datoteka u jednom koraku. Uključivanjem ovoga isključit će se samo http kolačići.', 'settings_enableMenuTasks' => 'Omogućavanje liste zadataka u izborniku', 'settings_enableMenuTasks_desc' => 'Omogućavanje/onemogućavanje stavke izbornika koja sadrži sve zadatke za korisnika. Ovo sadrži dokumente koji trebaju biti revidirani, odobreni itd.', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => 'Omogući bilježenje recezenta/validatora', 'settings_enableNotificationAppRev_desc' => 'Označi za slanje obavijesti recezentu/validatoru kada je dodana nova verzija dokumenta', 'settings_enableNotificationWorkflow' => 'Omogući obavijesti o zadanom toku rada', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index 4e7b96b19..69bcc7ff3 100644 --- a/languages/hu_HU/lang.inc +++ b/languages/hu_HU/lang.inc @@ -1143,6 +1143,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_enableMenuTasks' => '', 'settings_enableMenuTasks_desc' => '', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', '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' => 'A felhasználó értesítése a következő munkafolyamatnál', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index d30be02f5..c4589899a 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 (1539), rickr (144), s.pnt (26) +// Translators: Admin (1551), rickr (144), s.pnt (26) $text = array( '2_factor_auth' => 'Autorizzazione a due fattori', @@ -256,7 +256,7 @@ URL: [url]', 'clear_password' => 'Cancella la password', 'clipboard' => 'Appunti', 'close' => 'Chiudi', -'command' => '', +'command' => 'Comando', 'comment' => 'Commento', 'comment_changed_email' => '', 'comment_for_current_version' => 'Commento per la versione', @@ -311,7 +311,7 @@ URL: [url]', 'docs_in_reception_no_access' => '', 'docs_in_revision_no_access' => '', 'document' => 'Documento', -'documentcontent' => '', +'documentcontent' => 'Contenuto documento', 'documents' => 'Documenti', 'documents_checked_out_by_you' => 'Documenti approvati da te', 'documents_in_process' => 'Documenti in lavorazione', @@ -410,7 +410,7 @@ URL: [url]', 'dump_creation_warning' => 'Con questa operazione è possibile creare un file di dump del contenuto del database. Dopo la creazione il file viene salvato nella cartella dati del server.', 'dump_list' => 'List dei dump presenti', 'dump_remove' => 'Cancella il file di dump', -'duplicates' => '', +'duplicates' => 'Duplicati', 'duplicate_content' => 'Contenuto Duplicato', 'edit' => 'Modifica', 'edit_attributes' => 'Modifica gli attributi', @@ -572,7 +572,7 @@ URL: [url]', 'include_content' => 'Includi contenuto', 'include_documents' => 'Includi documenti', 'include_subdirectories' => 'Includi sottocartelle', -'indexing_tasks_in_queue' => '', +'indexing_tasks_in_queue' => 'Operazione di indicizzazione in corso', 'index_converters' => 'Indice di conversione documenti', 'index_done' => '', 'index_error' => '', @@ -1085,7 +1085,7 @@ URL: [url]', 'settings_autoLoginUser' => 'Login automatico', 'settings_autoLoginUser_desc' => 'Utilizzare questo ID utente per l\'accesso se l\'utente non è già connesso. Questo tipo di accesso non creerà una sessione.', 'settings_available_languages' => 'Lingue disponibili', -'settings_available_languages_desc' => '', +'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_cacheDir' => 'Cartella di cache', @@ -1102,7 +1102,7 @@ URL: [url]', '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', 'settings_contentOffsetDir_desc' => 'Per supplire a limitazioni all\'utilizzo del filesystem è stata concepita una nuova struttura di cartelle all\'interno della cartella contenitore (Content Directory). Questa necessita di una cartella di partenza: di solito è sufficiente lasciare il nome di default, 1048576, ma può essere usato un qualsiasi numero o stringa che non esistano già all\'interno della cartella contenitore (Content Directory)', -'settings_convertToPdf' => '', +'settings_convertToPdf' => 'Converti documento in PDF per anteprima', 'settings_convertToPdf_desc' => 'Se il documento non può essere nativamente mostrato nel browser, verrà mostrata una versione in PDF.', 'settings_cookieLifetime' => 'Tempo di vita del cookie', 'settings_cookieLifetime_desc' => 'Tempo di vita del cookie in secondi: se impostato su 0 il cookie verrà rimosso alla chiusura del browser', @@ -1125,8 +1125,8 @@ URL: [url]', 'settings_dbUser' => 'Utente', 'settings_dbUser_desc' => 'Utente per accedere al database da utilizzarsi durante il processo di installazione. Non modificare questo campo se non assolutamente necessario, per esempio nel caso di trasferimento del database su un nuovo Host.', 'settings_dbVersion' => 'Schema del database obsoleto', -'settings_defaultAccessDocs' => '', -'settings_defaultAccessDocs_desc' => '', +'settings_defaultAccessDocs' => 'Diritto di accesso per i nuovi documenti', +'settings_defaultAccessDocs_desc' => 'Quando si crea un nuovo documento, questo sarà il diritto di accesso predefinito', 'settings_defaultSearchMethod' => 'Metodo di ricerca predefinito', 'settings_defaultSearchMethod_desc' => 'Metodo di ricerca predefinito, quando la ricerca viene avviata dal modulo di ricerca nel menu principale.', 'settings_defaultSearchMethod_valdatabase' => 'database', @@ -1177,6 +1177,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => 'Se selezionato, il caricamento (upload) dei files può essere effettuato anche attraverso un\'applet Java chiamata Jumploader evitando il limite di dimensioni file imposto dal browser; Jumploader permette anche il caricamento di diversi files contemporaneamente.', 'settings_enableMenuTasks' => 'Abilita compito delle attività nel menù', 'settings_enableMenuTasks_desc' => 'Abilita / Disabilita la voce di menu che contiene tutte le attività degli utenti. Questo conterrà i documenti che devono essere rivisti, approvati, etc.', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => 'Abilita/disabilita notifica a revisore/approvatore', 'settings_enableNotificationAppRev_desc' => 'Spuntare per inviare una notifica al revisore/approvatore nel momento in cui viene aggiunta una nuova versione del documento.', 'settings_enableNotificationWorkflow' => 'Invia notifiche ai partecipanti al flusso di lavoro', @@ -1268,8 +1270,8 @@ URL: [url]', 'settings_maxRecursiveCount_desc' => 'Numero massimo di documenti e cartelle considerati dal conteggio ricursivo per il controllo dei diritti d\'accesso. Se tale valore dovesse essere superato, il risultato del conteggio sarà stimato.', 'settings_maxSizeForFullText' => 'La lungeza massima del file per l\'indicizzazione istantanea', 'settings_maxSizeForFullText_desc' => 'Tutte le nuove versioni dei documenti più in basso della dimensione configurata saranno completamente indicizzati dopo il caricamento. In tutti gli altri casi sarà indicizzato solo i metadati.', -'settings_maxUploadSize' => '', -'settings_maxUploadSize_desc' => '', +'settings_maxUploadSize' => 'Dimensiona massima dei file da caricare', +'settings_maxUploadSize_desc' => 'Questa è la dimensiona massima del file da caricare. Avrà impatto sulla versione del documento e sull\'allegato.', 'settings_more_settings' => 'Ulteriori configurazioni. Login di default: admin/admin', 'settings_notfound' => 'Non trovato', 'settings_Notification' => 'Impostazioni di notifica', diff --git a/languages/ko_KR/lang.inc b/languages/ko_KR/lang.inc index ab0e0c86b..b365cab4d 100644 --- a/languages/ko_KR/lang.inc +++ b/languages/ko_KR/lang.inc @@ -1158,6 +1158,8 @@ URL : [url]', 'settings_enableLargeFileUpload_desc' => '설정하면, 브라우저가 설정 한 파일 크기 제한없이 jumploader라는 파일 업로드 자바 애플릿을 통해 사용할 수 있습니다. 또한 한 번에 여러 파일을 업로드 할 수 있습니다.', 'settings_enableMenuTasks' => '메뉴의 작업 목록 허용', 'settings_enableMenuTasks_desc' => '사용자의 모든 작업이 포함되어있는 메뉴 항목을 활성/비활성 합니다. 이것은 검토, 승인등이 필요한 문서를 포함 합니다', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => '검토 / 승인 알림 사용', 'settings_enableNotificationAppRev_desc' => '새 문서 버전이 추가 된 경우 리뷰 / 승인자에게 알림을 보내 확인', 'settings_enableNotificationWorkflow' => '다음 작업 사용자에게 알림을 보냅니다.', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index 16cf8c0d6..c22c6fe9b 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 (723), gijsbertush (329), pepijn (45), reinoutdijkstra@hotmail.com (270) +// Translators: Admin (724), gijsbertush (329), pepijn (45), reinoutdijkstra@hotmail.com (270) $text = array( '2_factor_auth' => '', @@ -1171,6 +1171,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => 'Indien ingeschakeld, is bestandsupload ook beschikbaar via een java applet jumploader genaamd zonder een bestandsgrootte limiet door de browser. Het staat ook toe om meerdere bestanden in een keer te versturen.', 'settings_enableMenuTasks' => 'Menu-taken aanzetten', 'settings_enableMenuTasks_desc' => 'Menu-taken aanzetten', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => 'Inschakelen controleur/beoordeler notificatie', 'settings_enableNotificationAppRev_desc' => 'Vink aan om een notificatie te versturen naar de controleur/beoordeler als een nieuw document versie is toegevoegd.', 'settings_enableNotificationWorkflow' => 'Workflow-notificatie aanzetten', @@ -1310,7 +1312,7 @@ URL: [url]', 'settings_rootFolderID_desc' => 'ID van basismap (meestal geen verandering nodig)', 'settings_SaveError' => 'Opslagfout Configuratiebestand', 'settings_Server' => 'Server instellingen', -'settings_showFullPreview' => '', +'settings_showFullPreview' => 'Toon volledige document', 'settings_showFullPreview_desc' => '', 'settings_showMissingTranslations' => 'Ontbrekende vertalingen weergeven', 'settings_showMissingTranslations_desc' => 'Geef alle ontbrekende vertalingen onder aan de pagina weer. De gebruiker kan een verzoek tot vertaling indienen dat wordt opgeslagen als csv bestand. Let op! Zet deze functie niet aan in productieomgevingen!', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index e36614120..e4f597db0 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 (767), netixw (84), romi (93), uGn (112) +// Translators: Admin (768), netixw (84), romi (93), uGn (112) $text = array( '2_factor_auth' => '', @@ -559,7 +559,7 @@ URL: [url]', 'include_content' => '', 'include_documents' => 'Uwzględnij dokumenty', 'include_subdirectories' => 'Uwzględnij podkatalogi', -'indexing_tasks_in_queue' => '', +'indexing_tasks_in_queue' => 'Zadanie indeksowania w kolejce', 'index_converters' => 'Konwersja indeksu dokumentów', 'index_done' => '', 'index_error' => '', @@ -1123,6 +1123,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => 'Jeśli zaznaczone, wczytywanie plików będzie możliwe również przez aplet javy nazywany jumploader bez limitu rozmiaru plików. Aplet ten pozwala również na wczytywanie wielu plików jednocześnie.', 'settings_enableMenuTasks' => '', 'settings_enableMenuTasks_desc' => '', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => 'Włącz/Wyłącz powiadomienia dla zatwierdzających/recenzentów', 'settings_enableNotificationAppRev_desc' => 'Zaznacz aby wysyłać powiadomienia do zatwierdzających i recenzentów kiedy pojawi się nowa wersja dokumentu', 'settings_enableNotificationWorkflow' => '', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index f00e9cab8..51529713b 100644 --- a/languages/pt_BR/lang.inc +++ b/languages/pt_BR/lang.inc @@ -1141,6 +1141,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => 'Se selecionado, o upload de arquivo também estará disponível através de um applet java chamado jumploader sem limite de tamanho de arquivo definido pelo navegador. Ele também permite fazer o upload de vários arquivos de uma só vez.', 'settings_enableMenuTasks' => '', 'settings_enableMenuTasks_desc' => '', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => 'Habilitar notificações revisor/aprovador', 'settings_enableNotificationAppRev_desc' => 'Verificar o envio de uma notificação para o revisor/aprovador quando uma nova versão do documento for adicionada', 'settings_enableNotificationWorkflow' => '', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index 2c21b28ea..0a37fcdc7 100644 --- a/languages/ro_RO/lang.inc +++ b/languages/ro_RO/lang.inc @@ -1166,6 +1166,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_enableMenuTasks' => '', 'settings_enableMenuTasks_desc' => '', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', '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' => 'Trimite notificare utilizatorilor din urmatorul pas al workflow-ului', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index 09722f60d..a51da48e8 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 (1643) +// Translators: Admin (1644) $text = array( '2_factor_auth' => 'Двухфакторная аутентификация', @@ -310,7 +310,7 @@ URL: [url]', 'docs_in_reception_no_access' => '', 'docs_in_revision_no_access' => '', 'document' => 'Документ', -'documentcontent' => '', +'documentcontent' => 'Содержание документа', 'documents' => 'док.', 'documents_checked_out_by_you' => 'Документ проверен вами', 'documents_in_process' => 'Документы в работе', @@ -1173,6 +1173,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => 'Если включено, загрузка файлов доступна так же через Java-апплет, называемый jumploader, без ограничения размера файла. Это также позволит загружать несколько файлов за раз.', 'settings_enableMenuTasks' => 'Включить список задач в меню', 'settings_enableMenuTasks_desc' => 'Включить/отключить пункт меню, который содержит все задачи пользователя. Там содержатся документы, которые нуждаются в рецензии, утверждении и т.д.', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => 'Извещать рецензента или утверждающего', 'settings_enableNotificationAppRev_desc' => 'Включите для отправки извещения рецензенту или утверждающему при добавлении новой версии документа.', 'settings_enableNotificationWorkflow' => 'Отправить уведомление пользователям в следующей стадии процесса', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index ded4bd48b..7deecf7f9 100644 --- a/languages/sk_SK/lang.inc +++ b/languages/sk_SK/lang.inc @@ -998,6 +998,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => '', 'settings_enableMenuTasks' => '', 'settings_enableMenuTasks_desc' => '', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => '', 'settings_enableNotificationAppRev_desc' => '', 'settings_enableNotificationWorkflow' => '', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 09576a6d7..1edf20bc2 100644 --- a/languages/sv_SE/lang.inc +++ b/languages/sv_SE/lang.inc @@ -1129,6 +1129,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => 'Om aktiverad, kan filer laddas upp via javaapplet med namnet jumploader, utan begränsningar i filstorlek. Flera filer kan även laddas upp samtidigt i ett steg.', 'settings_enableMenuTasks' => '', 'settings_enableMenuTasks_desc' => '', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => 'Aktivera meddelande till personer som granskar/godkänner', 'settings_enableNotificationAppRev_desc' => 'Kryssa i, för att skicka ett meddelande till personer som granskar/godkänner när en ny version av dokumentet har lagts till', 'settings_enableNotificationWorkflow' => '', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index fe0adae57..f00a0913f 100644 --- a/languages/tr_TR/lang.inc +++ b/languages/tr_TR/lang.inc @@ -1145,6 +1145,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => 'Etkinleştirilirse, büyük dosyalar dosya limitine bakılmaksızın jumploader isimli java applet aracılığıyla yüklenebilir. Bu ayrıca bir seferde birden çok dosya yüklemeyi de sağlar. Bu açıldığında sadece http çerezleri kapanmış olur.', 'settings_enableMenuTasks' => '', 'settings_enableMenuTasks_desc' => '', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => 'Kontrol eden/onaylayan bildirimlerini etkinleştir', 'settings_enableNotificationAppRev_desc' => 'Dokümanın yeni versiyonu yüklendiğinde kontrol eden/onaylayana bildirim mesajı gitmesi için bunu etkinleştirin.', 'settings_enableNotificationWorkflow' => 'Bir sonraki iş akışında kullanıcıları bilgilendir', diff --git a/languages/uk_UA/lang.inc b/languages/uk_UA/lang.inc index d3d477f0f..8eca604ce 100644 --- a/languages/uk_UA/lang.inc +++ b/languages/uk_UA/lang.inc @@ -1166,6 +1166,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => 'Якщо увімкнено, завантаження файлів доступне також через Java-аплет jumploader без обмеження розміру файлів. Це також дозволить завантажувати кілька файлів за раз.', 'settings_enableMenuTasks' => 'Включити список завдань в меню', 'settings_enableMenuTasks_desc' => 'Включити/відключити пункт меню, який містить всі завдання користувача. Там містяться документи, які потребують рецензії, затвердження і т.ін.', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => 'Сповіщати рецензента і затверджувача', 'settings_enableNotificationAppRev_desc' => 'Увімкніть для відправки сповіщення рецензенту чи затверджувачеві при додаванні нової версії документа.', 'settings_enableNotificationWorkflow' => 'Відсилати сповіщення користувачам, задіяним в наступній стадії процесу', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index 27f51ddc7..a0e34f733 100644 --- a/languages/zh_CN/lang.inc +++ b/languages/zh_CN/lang.inc @@ -1000,6 +1000,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => '', 'settings_enableMenuTasks' => '', 'settings_enableMenuTasks_desc' => '', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => '', 'settings_enableNotificationAppRev_desc' => '', 'settings_enableNotificationWorkflow' => '', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index baef0f80b..59d678d9c 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -998,6 +998,8 @@ URL: [url]', 'settings_enableLargeFileUpload_desc' => '', 'settings_enableMenuTasks' => '', 'settings_enableMenuTasks_desc' => '', +'settings_enableMultiUpload' => '', +'settings_enableMultiUpload_desc' => '', 'settings_enableNotificationAppRev' => '', 'settings_enableNotificationAppRev_desc' => '', 'settings_enableNotificationWorkflow' => '', From 944186b9d7c6d9542e6ae11ebced03ad0d9fffd4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 4 May 2017 09:08:34 +0200 Subject: [PATCH 144/194] change label of version field to 'version' --- views/bootstrap/class.AddFile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.AddFile.php b/views/bootstrap/class.AddFile.php index c51714757..fc6298f14 100644 --- a/views/bootstrap/class.AddFile.php +++ b/views/bootstrap/class.AddFile.php @@ -158,7 +158,7 @@ $(document).ready( function() {
      - +
      ".$arr[0].":".$arr[1]."
      From 3de40aa6b17a85cd971ba9fbe6adb2c048279966 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 12 May 2017 08:14:24 +0200 Subject: [PATCH 149/194] fix doc of init(), some globals are not available --- ext/example/class.example.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/ext/example/class.example.php b/ext/example/class.example.php index 2b147d9e0..d7d5bd42c 100644 --- a/ext/example/class.example.php +++ b/ext/example/class.example.php @@ -37,9 +37,6 @@ class SeedDMS_ExtExample extends SeedDMS_ExtBase { * * Use this method to do some initialization like setting up the hooks * You have access to the following global variables: - * $GLOBALS['dms'] : object representing dms - * $GLOBALS['user'] : currently logged in user - * $GLOBALS['session'] : current session * $GLOBALS['settings'] : current global configuration * $GLOBALS['settings']['_extensions']['example'] : configuration of this extension * $GLOBALS['LANG'] : the language array with translations for all languages From 19aa2b5e4591555e9a3b63bd6c6d5505d6a42ace Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 12 May 2017 08:15:26 +0200 Subject: [PATCH 150/194] add __invoke() method --- inc/inc.ClassControllerCommon.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/inc/inc.ClassControllerCommon.php b/inc/inc.ClassControllerCommon.php index a04ce3764..3ceb60524 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 3c9c0b7e3a581e12ce5e8d50075a58223b40cb5e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 12 May 2017 08:16:05 +0200 Subject: [PATCH 151/194] check if onPreRemove[Document|Folder] returns bool or null --- SeedDMS_Core/Core/inc.ClassDocument.php | 6 +++--- SeedDMS_Core/Core/inc.ClassFolder.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 8a72a9961..d89a3fe9c 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -1861,9 +1861,9 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ /* Check if 'onPreRemoveDocument' callback is set */ if(isset($this->_dms->callbacks['onPreRemoveDocument'])) { foreach($this->_dms->callbacks['onPreRemoveDocument'] as $callback) { - if(!call_user_func($callback[0], $callback[1], $this)) { - return false; - } + $ret = call_user_func($callback[0], $callback[1], $this); + if(is_bool($ret)) + return $ret; } } diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index f92bb8ff2..983d5ca49 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -882,9 +882,9 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { /* Check if 'onPreRemoveFolder' callback is set */ if(isset($this->_dms->callbacks['onPreRemoveFolder'])) { foreach($this->_dms->callbacks['onPreRemoveFolder'] as $callback) { - if(!call_user_func($callback[0], $callback[1], $this)) { - return false; - } + $ret = call_user_func($callback[0], $callback[1], $this); + if(is_bool($ret)) + return $ret; } } From ba44ee14a73347bd0f843bc510da3af294407f22 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 12 May 2017 08:17:45 +0200 Subject: [PATCH 152/194] add note for 5.1.2 --- SeedDMS_Core/package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 44a99ad46..a3a693804 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -26,6 +26,7 @@ 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 From add8c5ae2e5bc0324df8dfb372dbe28ea474b56b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 12 May 2017 13:25:58 +0200 Subject: [PATCH 153/194] propperly set status in reject mail --- op/op.ApproveDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op/op.ApproveDocument.php b/op/op.ApproveDocument.php index 366140526..eaceec753 100644 --- a/op/op.ApproveDocument.php +++ b/op/op.ApproveDocument.php @@ -181,7 +181,7 @@ if ($_POST["approvalStatus"]==-1){ $params = array(); $params['name'] = $document->getName(); $params['folder_path'] = $folder->getFolderPathPlain(); - $params['status'] = getOverallStatusText($status); + $params['status'] = getOverallStatusText(S_REJECTED); $params['comment'] = $document->getComment(); $params['username'] = $user->getFullName(); $params['sitename'] = $settings->_siteName; From be80af1503ee79bee11b1141c7cb2d16829edb70 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 12 May 2017 13:26:20 +0200 Subject: [PATCH 154/194] use showTextField() for conf. of extension --- 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 f0efb4aef..386e955a9 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -825,9 +825,12 @@ if(!is_writeable($settings->_configFilePath)) { } break; default: + $this->showTextField("extensions[".$extname."][".$confkey."]", isset($settings->_extensions[$extname][$confkey]) ? $settings->_extensions[$extname][$confkey] : '', '', ''); + /* ?> " title="" value="_extensions[$extname][$confkey])) echo $settings->_extensions[$extname][$confkey]; ?>" " /> From 440c7032f080608ed6c000ed6ab2ec8452fe7160 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 12 May 2017 18:08:56 +0200 Subject: [PATCH 155/194] add method getDocumentList(), limit number of duplicate contents to 1000 --- SeedDMS_Core/Core/inc.ClassDMS.php | 353 ++++++++++++++++++++++++++++- 1 file changed, 346 insertions(+), 7 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index db8fd8b70..1fa18ba40 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -633,6 +633,345 @@ 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', 'ReceiptByMe', 'ReviseByMe', 'LockedByMe', 'MyDocs' + * @param object $param1 user + * @param string $param2 set to true + * if 'AppRevByMe', 'ReviseByMe', 'ReceiptByMe' shall return even documents + * І have already taken care of. + * @param string $param3 sort list by this field + * @param string $param4 order direction + * @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 + * information. It requires the two temporary tables ttcontentid and + * ttstatid. + */ + if (!$this->db->createTemporaryTable("ttstatid") || !$this->db->createTemporaryTable("ttcontentid")) { + return false; + } + /* The following statement retrieves the status of the last version of all + * documents. It must be restricted by further where clauses. + */ + $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. + // Take only those documents into account which hasn't be touched by the user + $dList = array(); + foreach ($reviewStatus["indstatus"] as $st) { + if (($st["status"]==0 || $param2) && !in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + foreach ($reviewStatus["grpstatus"] as $st) { + if (($st["status"]==0 || $param2) && !in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + foreach ($approvalStatus["indstatus"] as $st) { + if (($st["status"]==0 || $param2) && !in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + foreach ($approvalStatus["grpstatus"] as $st) { + if (($st["status"]==0 || $param2) && !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 '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(); + + // Create a comma separated list of all the documentIDs whose information is + // required. + // Take only those documents into account which hasn't be touched by the user + // ($st["status"]==0) + $dList = array(); + foreach ($reviewStatus["indstatus"] as $st) { + if (($st["status"]==0 || $param2) && !in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + foreach ($reviewStatus["grpstatus"] as $st) { + if (($st["status"]==0 || $param2) && !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_EXPIRED.") ". + "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(); + + // Create a comma separated list of all the documentIDs whose information is + // required. + // Take only those documents into account which hasn't be touched by the user + // ($st["status"]==0) + $dList = array(); + foreach ($approvalStatus["indstatus"] as $st) { + if (($st["status"]==0 || $param2) && !in_array($st["documentID"], $dList)) { + $dList[] = $st["documentID"]; + } + } + foreach ($approvalStatus["grpstatus"] as $st) { + if (($st["status"]==0 || $param2) && !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_APP.", ".S_EXPIRED.") ". + "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 'WorkflowByMe': // Documents I to trigger in Worklflow {{{ + $user = $param1; + // Get document list for the current user. + $workflowStatus = $user->getWorkflowStatus(); + + // Create a comma separated list of all the documentIDs whose information is + // required. + $dList = array(); + foreach ($workflowStatus["u"] as $st) { + if (!in_array($st["document"], $dList)) { + $dList[] = $st["document"]; + } + } + foreach ($workflowStatus["g"] as $st) { + if (!in_array($st["document"], $dList)) { + $dList[] = $st["document"]; + } + } + $docCSV = ""; + foreach ($dList as $d) { + $docCSV .= (strlen($docCSV)==0 ? "" : ", ")."'".$d."'"; + } + + if (strlen($docCSV)>0) { + $queryStr .= + //"AND `tblDocumentStatusLog`.`status` IN (".S_IN_WORKFLOW.", ".S_EXPIRED.") ". + "AND `tblDocuments`.`id` IN (" . $docCSV . ") ". + "ORDER BY `statusDate` DESC"; + } else { + $queryStr = ''; + } + break; // }}} + case 'AppRevOwner': // Documents waiting for review/approval/revision 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_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`"; + else $queryStr .= "ORDER BY `name`"; + $queryStr .= " ".$orderdir; +// $queryStr .= "AND `tblDocuments`.`owner` = '".$user->getID()."' ". +// "AND `tblDocumentStatusLog`.`status` IN (".S_DRAFT_REV.", ".S_DRAFT_APP.") ". +// "ORDER BY `statusDate` DESC"; + 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.") "; + //$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; + $orderby = $param3; + if($param4 == 'desc') + $orderdir = 'DESC'; + else + $orderdir = 'ASC'; + + $qs = 'SELECT `document` FROM `tblDocumentLocks` 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) . ") "; + 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 'WorkflowOwner': // Documents waiting for workflow trigger I'm owning {{{ + $user = $param1; + $queryStr .= "AND `tblDocuments`.`owner` = '".$user->getID()."' ". + "AND `tblDocumentStatusLog`.`status` IN (".S_IN_WORKFLOW.") ". + "ORDER BY `statusDate` DESC"; + break; // }}} + case 'MyDocs': // Documents owned by me {{{ + $user = $param1; + $orderby = $param3; + if($param4 == 'desc') + $orderdir = 'DESC'; + else + $orderdir = 'ASC'; + $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; + break; // }}} + } + + if($queryStr) { + $resArr = $this->db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) { + return false; + } + /* + $documents = array(); + foreach($resArr as $row) + $documents[] = $this->getDocument($row["id"]); + */ + } 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); @@ -2071,7 +2410,7 @@ class SeedDMS_Core_DMS { $versions[] = $version; } return $versions; - + } /* }}} */ /** @@ -2095,7 +2434,7 @@ class SeedDMS_Core_DMS { $versions[] = $version; } return $versions; - + } /* }}} */ /** @@ -2119,7 +2458,7 @@ class SeedDMS_Core_DMS { $versions[] = $version; } return $versions; - + } /* }}} */ /** @@ -2130,7 +2469,7 @@ class SeedDMS_Core_DMS { * 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`"; + $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` LIMIT 1000"; $resArr = $this->db->getResultArray($queryStr); if (!$resArr) return false; @@ -2146,7 +2485,7 @@ class SeedDMS_Core_DMS { $versions[$row['dupid']]['duplicates'][] = $version; } return $versions; - + } /* }}} */ /** @@ -2302,11 +2641,11 @@ class SeedDMS_Core_DMS { foreach ($record as $column) { if (is_numeric($column)) $values .= $column; else $values .= $this->db->qstr($column); - + if ($i<(count($record))) $values .= ","; $i++; } - + fwrite($h, "INSERT INTO `".$table."` VALUES (".$values.");\n"); } } From b406d31ea0065414e3ca6293382fb6a7f19e45b3 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 12 May 2017 18:09:53 +0200 Subject: [PATCH 156/194] add menu tasks including checkbox in settings for enabling it --- SeedDMS_Core/package.xml | 2 ++ inc/inc.ClassSettings.php | 6 +++++- inc/inc.ClassUI.php | 1 + op/op.Settings.php | 1 + styles/bootstrap/application.js | 22 ++++++++++++++++++++++ views/bootstrap/class.Bootstrap.php | 16 +++++++++++++++- views/bootstrap/class.Settings.php | 4 ++++ 7 files changed, 50 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index a3a693804..d22ecd6a9 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -27,6 +27,8 @@ 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 diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 87aafcd63..e0225eafd 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -178,6 +178,8 @@ class Settings { /* {{{ */ var $_firstDayOfWeek = 0; // enable/disable display of the clipboard var $_enableClipboard = true; + // enable/disable list of tasks in main menu + var $_enableMenuTasks = true; // enable/disable display of the session list var $_enableSessionList = false; // enable/disable display of the drop zone for file upload @@ -416,6 +418,7 @@ class Settings { /* {{{ */ $this->_enableUsersView = Settings::boolVal($tab["enableUsersView"]); $this->_enableSessionList = Settings::boolVal($tab["enableSessionList"]); $this->_enableClipboard = Settings::boolVal($tab["enableClipboard"]); + $this->_enableMenuTasks = Settings::boolVal($tab["enableMenuTasks"]); $this->_enableDropUpload = Settings::boolVal($tab["enableDropUpload"]); $this->_enableMultiUpload = Settings::boolVal($tab["enableMultiUpload"]); $this->_enableFolderTree = Settings::boolVal($tab["enableFolderTree"]); @@ -725,6 +728,7 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "enableUsersView", $this->_enableUsersView); $this->setXMLAttributValue($node, "enableSessionList", $this->_enableSessionList); $this->setXMLAttributValue($node, "enableClipboard", $this->_enableClipboard); + $this->setXMLAttributValue($node, "enableMenuTasks", $this->_enableMenuTasks); $this->setXMLAttributValue($node, "enableDropUpload", $this->_enableDropUpload); $this->setXMLAttributValue($node, "enableMultiUpload", $this->_enableMultiUpload); $this->setXMLAttributValue($node, "enableFolderTree", $this->_enableFolderTree); @@ -852,7 +856,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); diff --git a/inc/inc.ClassUI.php b/inc/inc.ClassUI.php index 13c852329..d044cbe77 100644 --- a/inc/inc.ClassUI.php +++ b/inc/inc.ClassUI.php @@ -104,6 +104,7 @@ class UI extends UI_Default { $view->setParam('enablefoldertree', $settings->_enableFolderTree); $view->setParam('enablelanguageselector', $settings->_enableLanguageSelector); $view->setParam('enableclipboard', $settings->_enableClipboard); + $view->setParam('enablemenutasks', $settings->_enableMenuTasks); $view->setParam('enablesessionlist', $settings->_enableSessionList); $view->setParam('workflowmode', $settings->_workflowMode); $view->setParam('partitionsize', (int) $settings->_partitionSize); diff --git a/op/op.Settings.php b/op/op.Settings.php index c7e5ec779..169845420 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -83,6 +83,7 @@ if ($action == "saveSettings") $settings->_showSingleSearchHit = getBoolValue("showSingleSearchHit"); $settings->_enableSessionList = getBoolValue("enableSessionList"); $settings->_enableClipboard = getBoolValue("enableClipboard"); + $settings->_enableMenuTasks = getBoolValue("enableMenuTasks"); $settings->_enableDropUpload = getBoolValue("enableDropUpload"); $settings->_enableMultiUpload = getBoolValue("enableMultiUpload"); $settings->_enableFolderTree = getBoolValue("enableFolderTree"); diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index 1986908ef..97fe008fe 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -1015,3 +1015,25 @@ $(document).ready(function() { /* {{{ */ $(this).parent().hide(); }); }); /* }}} */ + + var approval_count, review_count, receipt_count, revision_count; + var checkTasks = function() { + $.ajax({url: '../out/out.Tasks.php', + type: 'GET', + dataType: "json", + data: {action: 'mytasks'}, + success: function(data) { + if(data) { + if(approval_count != data.data.approval.length || + review_count != data.data.review.length) { + $("#menu-tasks > ul > li").html('Loading').hide().load('../out/out.Tasks.php?action=menutasks').fadeIn('500') + approval_count = data.data.approval.length; + review_count = data.data.review.length; + } + } + }, + timeout: 3000 + }); + timeOutId = setTimeout(checkTasks, 30000); + } + diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index fec5209fe..9c9d6573c 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -145,6 +145,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) { @@ -305,6 +308,17 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo " \n"; echo " \n"; + if($this->params['enablemenutasks']) { + echo "
      "; + echo "
        \n"; + echo "
      • \n"; +// echo $this->menuTasks(array('review'=>array(), 'approval'=>array(), 'receipt'=>array(), 'revision'=>array())); + echo "
      • \n"; + echo "
      \n"; + echo "
      "; + //$this->addFooterJS('checkTasks();'); + } + if($this->params['enablesessionlist']) { echo "
      "; echo "
      "; @@ -1525,7 +1539,7 @@ $(function() { function printDeleteDocumentButton($document, $msg, $return=false){ /* {{{ */ $docid = $document->getID(); $content = ''; - $content .= ' $document->getName())), ENT_QUOTES).'">'; + $content .= ' $document->getName())), ENT_QUOTES).'">'; if($return) return $content; else diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 386e955a9..06f68917e 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -265,6 +265,10 @@ if(!is_writeable($settings->_configFilePath)) {
      "> + + "> + + "> From 38902d11055e5f00cb38f91f188b081cb7b08637 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 12 May 2017 18:10:57 +0200 Subject: [PATCH 157/194] new item for 5.1.2 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 702ef8fe6..bd0934d91 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ - add list of currently logged in users in menu - the owner of a document can see even none public attachments - uploading multiple files can be turned off +- add list of tasks in menu - merged changes from 5.0.12 -------------------------------------------------------------------------------- From 9c678a90f351d50fd62a32b6ea2841eab64ce3a9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 12 May 2017 18:21:42 +0200 Subject: [PATCH 158/194] add view for listing tasks --- out/out.Tasks.php | 41 +++++ views/bootstrap/class.Tasks.php | 267 ++++++++++++++++++++++++++++++++ 2 files changed, 308 insertions(+) create mode 100644 out/out.Tasks.php create mode 100644 views/bootstrap/class.Tasks.php diff --git a/out/out.Tasks.php b/out/out.Tasks.php new file mode 100644 index 000000000..0df3d3763 --- /dev/null +++ b/out/out.Tasks.php @@ -0,0 +1,41 @@ +$dms, 'user'=>$user)); + +if($view) { + $view->setParam('previewWidthList', $settings->_previewWidthList); + $view->setParam('timeout', $settings->_cmdTimeout); + $view($_GET); + exit; +} + +?> diff --git a/views/bootstrap/class.Tasks.php b/views/bootstrap/class.Tasks.php new file mode 100644 index 000000000..11c121d03 --- /dev/null +++ b/views/bootstrap/class.Tasks.php @@ -0,0 +1,267 @@ + + * @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"); + +/** + * Include class to preview documents + */ +require_once("SeedDMS/Preview.php"); + +/** + * Class which outputs the html page for clipboard 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_Tasks extends SeedDMS_Bootstrap_Style { + + private function __myTasks() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $tasks['review'] = array(); + $tasks['approval'] = array(); + $tasks['receipt'] = array(); + $tasks['revision'] = array(); + $resArr = $dms->getDocumentList('ApproveByMe', $user); + if($resArr) { + foreach ($resArr as $res) { + $document = $dms->getDocument($res["id"]); + if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { + $tasks['approval'][] = array('id'=>$res['id'], 'name'=>$res['name']); + } + } + } + $resArr = $dms->getDocumentList('ReviewByMe', $user); + if($resArr) { + foreach ($resArr as $res) { + $document = $dms->getDocument($res["id"]); + if($document->getAccessMode($user) >= M_READ && $document->getLatestContent()) { + $tasks['review'][] = array('id'=>$res['id'], 'name'=>$res['name']); + } + } + } + return $tasks; + } /* }}} */ + + /** + * Returns the html needed for the task list in the menu + * + * This function renders the tasks in a way suitable to be + * used as a menu + * + * @param array $clipboard clipboard containing two arrays for both + * documents and folders. + * @return string html code + */ + function myTasks() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $startts = microtime(true); + + $tasks = $this->__myTasks(); + + header('Content-Type: application/json'); + echo json_encode(array('error'=>0, 'data'=>$tasks, 'processing_time'=>microtime(true)-$startts)); + } /* }}} */ + + /** + * Returns the html needed for the task list in the menu + * + * This function renders the tasks in a way suitable to be + * used as a menu + * + * @param array $clipboard clipboard containing two arrays for both + * documents and folders. + * @return string html code + */ + function menuTasks() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + + $tasks = $this->__myTasks(); + + $content = ''; +// $content .= " \n"; + echo $content; + } /* }}} */ + + /** + * Returns the html needed for the clipboard list in the menu + * + * This function renders the clipboard in a way suitable to be + * used as a menu + * + * @param array $clipboard clipboard containing two arrays for both + * documents and folders. + * @return string html code + */ + public function menuClipboard() { /* {{{ */ + $clipboard = $this->params['session']->getClipboard(); + if ($this->params['user']->isGuest() || (count($clipboard['docs']) + count($clipboard['folders'])) == 0) { + return ''; + } + $content = ''; + $content .= " \n"; + echo $content; + } /* }}} */ + + /** + * Return clipboard content rendered as html + * + * @param array clipboard + * @return string rendered html content + */ + public function mainClipboard() { /* {{{ */ + $dms = $this->params['dms']; + $clipboard = $this->params['session']->getClipboard(); + $cachedir = $this->params['cachedir']; + $previewwidth = $this->params['previewWidthList']; + $timeout = $this->params['timeout']; + + $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); + $content = ''; + $foldercount = $doccount = 0; + if($clipboard['folders']) { + foreach($clipboard['folders'] as $folderid) { + /* FIXME: check for access rights, which could have changed after adding the folder to the clipboard */ + if($folder = $dms->getFolder($folderid)) { + $comment = $folder->getComment(); + if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "..."; + $content .= "getID()."\" class=\"folder table-row-folder\" formtoken=\"".createFormKey('movefolder')."\">"; + $content .= "\n"; + $content .= "\n"; + $content .= "\n"; + $content .= "\n"; + $foldercount++; + } + } + } + if($clipboard['docs']) { + foreach($clipboard['docs'] as $docid) { + /* FIXME: check for access rights, which could have changed after adding the document to the clipboard */ + if($document = $dms->getDocument($docid)) { + $comment = $document->getComment(); + if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "..."; + if($latestContent = $document->getLatestContent()) { + $previewer->createPreview($latestContent); + $version = $latestContent->getVersion(); + $status = $latestContent->getStatus(); + + $content .= ""; + + if (file_exists($dms->contentDir . $latestContent->getPath())) { + $content .= ""; + } else + $content .= ""; + + $content .= "\n"; + $content .= "\n"; + $content .= ""; + $doccount++; + } + } + } + } + + /* $foldercount or $doccount will only count objects which are + * actually available + */ + if($foldercount || $doccount) { + $content = "
      : _enableClipboard) echo "checked" ?> />
      :_enableMenuTasks) echo "checked" ?> />
      :
      getID()."&showtree=".showtree()."\">imgpath."folder.png\" width=\"24\" height=\"24\" border=0>getID()."&showtree=".showtree()."\">" . htmlspecialchars($folder->getName()) . ""; + if($comment) { + $content .= "
      ".htmlspecialchars($comment).""; + } + $content .= "
      \n"; + $content .= ""; + $content .= "
      "; + if($previewer->hasPreview($latestContent)) { + $content .= "getID()."&version=".$latestContent->getVersion()."&width=40\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } else { + $content .= "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } + $content .= "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">" . htmlspecialchars($document->getName()) . ""; + if($comment) { + $content .= "
      ".htmlspecialchars($comment).""; + } + $content .= "
      \n"; + $content .= ""; + $content .= "
      ".$content; + $content .= "
      "; + } else { + } + $content .= "
      ".getMLText("drag_icon_here")."
      "; + echo $content; + } /* }}} */ + +} From 41f58c3ee44b975ea6d45c13dcbd2363d60b19cb Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 15 May 2017 18:23:16 +0200 Subject: [PATCH 159/194] rename editDocumentAttribute to addDocumentAttribute --- views/bootstrap/class.AddDocument.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index c9a4a161c..206cd7aa7 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -273,7 +273,7 @@ $(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); + $arr = $this->callHook('addDocumentAttribute', null, $attrdef); if(is_array($arr)) { echo "
      ".$arr[0].":
      ".$arr[0].":
      ".$arr[0].":".$arr[1]."
      ".$arr[0].":".$arr[1]."
      ".$arr[0].":".$arr[1]."
      ".$arr[0].":".$arr[1]."
      ".$arr[0].":".$arr[1]."
      ".$arr[0].":".$arr[1]."
      getName()); ?>:printAttributeEditField($attrdef, '') ?> + printAttributeEditField($attrdef, '', 'attributes_version') ?> getAttributeValue($attrdef)) { switch($attrdef->getType()) { @@ -297,10 +297,10 @@ console.log(element); case SeedDMS_Core_AttributeDefinition::type_date: case SeedDMS_Core_AttributeDefinition::type_int: case SeedDMS_Core_AttributeDefinition::type_float: - $this->printInputPresetButtonHtml('attributes_'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef), $attrdef->getValueSetSeparator()); + $this->printInputPresetButtonHtml('attributes_version'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef), $attrdef->getValueSetSeparator()); break; case SeedDMS_Core_AttributeDefinition::type_boolean: - $this->printCheckboxPresetButtonHtml('attributes_'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef)); + $this->printCheckboxPresetButtonHtml('attributes_version'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef)); break; } // print_r($latestContent->getAttributeValue($attrdef)); From fd55920c5225fe11fa4290f6f9285f228d15c558 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 29 Jun 2017 16:38:16 +0200 Subject: [PATCH 187/194] fix error in preset button --- views/bootstrap/class.UpdateDocument.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index a94dcdc12..ffdd032d0 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -297,10 +297,10 @@ console.log(element); case SeedDMS_Core_AttributeDefinition::type_date: case SeedDMS_Core_AttributeDefinition::type_int: case SeedDMS_Core_AttributeDefinition::type_float: - $this->printInputPresetButtonHtml('attributes_version'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef), $attrdef->getValueSetSeparator()); + $this->printInputPresetButtonHtml('attributes_versiont_'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef), $attrdef->getValueSetSeparator()); break; case SeedDMS_Core_AttributeDefinition::type_boolean: - $this->printCheckboxPresetButtonHtml('attributes_version'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef)); + $this->printCheckboxPresetButtonHtml('attributes_version_'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef)); break; } // print_r($latestContent->getAttributeValue($attrdef)); From 78cbe8ad5dbc56eb8aaed5f9507efd79a3f22c8b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 29 Jun 2017 16:42:06 +0200 Subject: [PATCH 188/194] fix typo --- views/bootstrap/class.UpdateDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index ffdd032d0..4133de761 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -297,7 +297,7 @@ console.log(element); case SeedDMS_Core_AttributeDefinition::type_date: case SeedDMS_Core_AttributeDefinition::type_int: case SeedDMS_Core_AttributeDefinition::type_float: - $this->printInputPresetButtonHtml('attributes_versiont_'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef), $attrdef->getValueSetSeparator()); + $this->printInputPresetButtonHtml('attributes_version_'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef), $attrdef->getValueSetSeparator()); break; case SeedDMS_Core_AttributeDefinition::type_boolean: $this->printCheckboxPresetButtonHtml('attributes_version_'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef)); From d4438dee36b3c05b99219f2b8037c8031bd0df19 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 10 Jul 2017 11:12:20 +0200 Subject: [PATCH 189/194] various language updates --- languages/ar_EG/lang.inc | 1 + languages/bg_BG/lang.inc | 21 +++++++++++---------- languages/ca_ES/lang.inc | 1 + languages/cs_CZ/lang.inc | 1 + languages/de_DE/lang.inc | 13 +++++++------ languages/el_GR/lang.inc | 7 ++++--- languages/en_GB/lang.inc | 11 ++++++----- languages/es_ES/lang.inc | 11 ++++++----- languages/fr_FR/lang.inc | 27 ++++++++++++++------------- languages/hr_HR/lang.inc | 1 + languages/hu_HU/lang.inc | 5 +++-- languages/it_IT/lang.inc | 9 +++++---- languages/ko_KR/lang.inc | 9 +++++---- languages/nl_NL/lang.inc | 7 ++++--- languages/pl_PL/lang.inc | 7 ++++--- languages/pt_BR/lang.inc | 15 ++++++++------- languages/ro_RO/lang.inc | 23 ++++++++++++----------- languages/ru_RU/lang.inc | 1 + languages/sk_SK/lang.inc | 9 +++++---- languages/sv_SE/lang.inc | 11 ++++++----- languages/tr_TR/lang.inc | 7 ++++--- languages/uk_UA/lang.inc | 1 + languages/zh_CN/lang.inc | 7 ++++--- languages/zh_TW/lang.inc | 1 + 24 files changed, 115 insertions(+), 91 deletions(-) diff --git a/languages/ar_EG/lang.inc b/languages/ar_EG/lang.inc index 2a2e1ba10..8dc9b55b1 100644 --- a/languages/ar_EG/lang.inc +++ b/languages/ar_EG/lang.inc @@ -222,6 +222,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => '', 'checkedout_file_is_unchanged' => '', 'checkin_document' => '', +'checkoutpath_does_not_exist' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', 'choose_attrdef' => 'من فضلك اختر تعريف السمة', diff --git a/languages/bg_BG/lang.inc b/languages/bg_BG/lang.inc index ea265266a..ab60f7778 100644 --- a/languages/bg_BG/lang.inc +++ b/languages/bg_BG/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 (822) +// Translators: Admin (831) $text = array( '2_factor_auth' => '', @@ -158,7 +158,7 @@ $text = array( 'at_least_n_users_of_group' => '', 'august' => 'Август', 'authentication' => '', -'author' => '', +'author' => 'Автор', 'automatic_status_update' => 'Автоматично изменение на статуса', 'back' => 'Назад', 'backup_list' => 'Списък на бекъпите', @@ -194,7 +194,7 @@ $text = array( 'change_recipients' => '', 'change_revisors' => '', 'change_status' => 'Промени статусът', -'charts' => '', +'charts' => 'Графики', 'chart_docsaccumulated_title' => '', 'chart_docspercategory_title' => '', 'chart_docspermimetype_title' => '', @@ -207,6 +207,7 @@ $text = array( 'checkedout_file_has_disappeared' => '', 'checkedout_file_is_unchanged' => '', 'checkin_document' => '', +'checkoutpath_does_not_exist' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', 'choose_attrdef' => 'Изберете attribute definition', @@ -347,7 +348,7 @@ $text = array( 'dropfolder_file' => 'Файл от drop папка', 'dropfolder_folder' => '', 'dropupload' => '', -'drop_files_here' => '', +'drop_files_here' => 'Пусни файла тук!', 'dump_creation' => 'Създаване дъмп на БД', 'dump_creation_warning' => 'Тази операция шъ създаде дамп на базата данни. След създаването, файлът ще бъде съхранен в папката с данни на сървъра.', 'dump_list' => 'Съществуващи дъмпове', @@ -418,7 +419,7 @@ $text = array( 'expiry_changed_email_body' => '', 'expiry_changed_email_subject' => '', 'export' => '', -'extension_manager' => '', +'extension_manager' => 'управление на добавките', 'february' => 'Февруари', 'file' => 'Файл', 'files' => 'Файлове', @@ -485,7 +486,7 @@ $text = array( 'identical_version' => 'Новата версия е идентична с текущата.', 'import' => '', 'importfs' => '', -'import_fs' => '', +'import_fs' => 'добави от файловата система', 'import_fs_warning' => '', 'include_content' => '', 'include_documents' => 'Включи документи', @@ -573,7 +574,7 @@ $text = array( 'linked_to_this_version' => '', 'link_alt_updatedocument' => 'Ако искате да качите файлове над текущия лимит, използвайте друг начин.', 'link_to_version' => '', -'list_access_rights' => '', +'list_access_rights' => 'Списък на права', 'list_contains_no_access_docs' => '', 'list_hooks' => '', 'local_file' => 'Локален файл', @@ -1221,7 +1222,7 @@ $text = array( 'splash_document_checkedout' => '', 'splash_document_edited' => '', 'splash_document_indexed' => '', -'splash_document_locked' => '', +'splash_document_locked' => 'Документът е заключен', 'splash_document_unlocked' => '', 'splash_edit_attribute' => '', 'splash_edit_event' => '', @@ -1241,7 +1242,7 @@ $text = array( 'splash_receipt_update_success' => '', 'splash_removed_from_clipboard' => '', 'splash_rm_attribute' => '', -'splash_rm_document' => '', +'splash_rm_document' => 'Документът е преместен', 'splash_rm_download_link' => '', 'splash_rm_folder' => '', 'splash_rm_group' => '', @@ -1309,7 +1310,7 @@ $text = array( 'theme' => 'Тема', 'thursday' => 'четвъртък', 'thursday_abbr' => '', -'timeline' => '', +'timeline' => 'времева линия', 'timeline_add_file' => '', 'timeline_add_version' => '', 'timeline_full_add_file' => '', diff --git a/languages/ca_ES/lang.inc b/languages/ca_ES/lang.inc index 5457e51d6..73404594d 100644 --- a/languages/ca_ES/lang.inc +++ b/languages/ca_ES/lang.inc @@ -212,6 +212,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => '', 'checkedout_file_is_unchanged' => '', 'checkin_document' => '', +'checkoutpath_does_not_exist' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', 'choose_attrdef' => '', diff --git a/languages/cs_CZ/lang.inc b/languages/cs_CZ/lang.inc index 84adaf7df..857e35b12 100644 --- a/languages/cs_CZ/lang.inc +++ b/languages/cs_CZ/lang.inc @@ -229,6 +229,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => '', 'checkedout_file_is_unchanged' => '', 'checkin_document' => '', +'checkoutpath_does_not_exist' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', 'choose_attrdef' => 'Zvolte definici atributů', diff --git a/languages/de_DE/lang.inc b/languages/de_DE/lang.inc index 53bc24bb9..e20ccd608 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 (2413), dgrutsch (22) +// Translators: Admin (2420), dgrutsch (22) $text = array( '2_factor_auth' => '2-Faktor Authentifizierung', @@ -56,7 +56,7 @@ URL: [url]', 'add_approval' => 'Freigabe hinzufügen', 'add_attrdefgroup' => 'Neue Attributgruppe anlegen', 'add_document' => 'Dokument anlegen', -'add_document_link' => 'Verweis hinzufügen', +'add_document_link' => 'Verknüpfung hinzufügen', 'add_document_notify' => 'Beobachter zuweisen', 'add_doc_reviewer_approver_warning' => 'Anmerkung: Dokumente werden automatisch geprüft und als freigegeben markiert, wenn kein Prüfer oder keine Freigabe zugewiesen wird.', 'add_doc_workflow_warning' => 'Anmerkung: Dokumente werden automatisch freigegeben, wenn kein Workflow gewählt wird.', @@ -234,6 +234,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => 'Die Datei des ausgecheckten Dokuments ist nicht mehr vorhanden. Ein Einchecken ist nicht möglich.', 'checkedout_file_is_unchanged' => 'Die Datei des ausgecheckten Dokuments ist noch unverändert. Das Einchecken ist daher nicht möglich. Wenn Sie keine weiteren Änderungen am Dokument vornehmen möchten, dann setzen Sie den CheckOut-Status zurück.', 'checkin_document' => 'Einchecken', +'checkoutpath_does_not_exist' => 'Verzeichnis für das Auschecken von Dokumenten exisitiert nicht', 'checkout_document' => 'Auschecken', 'checkout_is_disabled' => 'Auschecken von Dokumenten ist in der Konfiguration ausgeschaltet.', 'choose_attrdef' => 'Attributdefinition wählen', @@ -349,7 +350,7 @@ Benutzer: [username]', 'document_infos' => 'Informationen', 'document_is_checked_out' => 'Das Dokument ist zur Zeit ausgecheckt. Wenn Sie eine neue Version hochladen, werden Sie die ausgecheckte Version nicht mehr einchecken können.', 'document_is_not_locked' => 'Dieses Dokument ist nicht gesperrt', -'document_link_by' => 'Verweis erstellt von', +'document_link_by' => 'Verknüpfung erstellt von', 'document_link_public' => 'Für alle sichtbar', 'document_moved_email' => 'Dokument verschoben', 'document_moved_email_body' => 'Dokument verschoben @@ -659,7 +660,7 @@ URL: [url]', 'linked_to_document' => 'Mit dem Dokument verknüpft', 'linked_to_this_version' => 'Mit dieser Version verknüpft', '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.', -'link_to_version' => 'Version', +'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_hooks' => 'Liste interne Aufrufe', @@ -1125,8 +1126,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_createCheckOutDir' => 'Check out Verzeichnis erstellen', +'settings_createCheckOutDir_desc' => 'Check out Verzeichnis erstellen, wenn es nicht existiert.', 'settings_createdatabase' => 'Datenbank erzeugen', 'settings_createdirectory' => 'Verzeichnis erzeugen', 'settings_currentvalue' => 'Aktueller Wert', diff --git a/languages/el_GR/lang.inc b/languages/el_GR/lang.inc index e11fae23b..12382af23 100644 --- a/languages/el_GR/lang.inc +++ b/languages/el_GR/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 (224) +// Translators: Admin (226) $text = array( '2_factor_auth' => '', @@ -194,7 +194,7 @@ $text = array( 'change_recipients' => '', 'change_revisors' => '', 'change_status' => '', -'charts' => '', +'charts' => 'Διαγράμματα', 'chart_docsaccumulated_title' => 'Αριθμός Εγγράφων', 'chart_docspercategory_title' => 'Έγγραφα κατά κατηγορία', 'chart_docspermimetype_title' => '', @@ -207,12 +207,13 @@ $text = array( 'checkedout_file_has_disappeared' => '', 'checkedout_file_is_unchanged' => '', 'checkin_document' => '', +'checkoutpath_does_not_exist' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', 'choose_attrdef' => '', 'choose_attrdefgroup' => '', 'choose_category' => 'Επιλέξτε', -'choose_group' => '', +'choose_group' => 'Επιλέξτε Ομάδα', 'choose_role' => '', 'choose_target_category' => 'Επιλογή κατηγορίας', 'choose_target_document' => 'Επιλογή εγγράφου', diff --git a/languages/en_GB/lang.inc b/languages/en_GB/lang.inc index a25085711..659aca8f6 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 (1540), dgrutsch (9), netixw (14) +// Translators: Admin (1545), dgrutsch (9), netixw (14) $text = array( '2_factor_auth' => '2-factor authentication', @@ -234,6 +234,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => 'The file of the checked out document has disappeared. Check in will not be possible.', 'checkedout_file_is_unchanged' => 'The file of the checked out document is still unchanged. Check in will not be possible. If do not plan any modifications, you can reset the check out status.', 'checkin_document' => 'Check In', +'checkoutpath_does_not_exist' => 'Checkout path does not exists', 'checkout_document' => 'Check out', 'checkout_is_disabled' => 'Check out of documents is disabled in the configuration.', 'choose_attrdef' => 'Please choose attribute definition', @@ -660,7 +661,7 @@ URL: [url]', 'linked_to_document' => 'Linked to document', 'linked_to_this_version' => 'Linked to this version', 'link_alt_updatedocument' => 'If you would like to upload files bigger than the current maximum upload size, please use the alternative upload page.', -'link_to_version' => 'Version', +'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_hooks' => 'List hooks', @@ -1120,8 +1121,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_createCheckOutDir' => 'Create check out directory', +'settings_createCheckOutDir_desc' => 'Create checkout dir if it does not exists', 'settings_createdatabase' => 'Create database tables', 'settings_createdirectory' => 'Create directory', 'settings_currentvalue' => 'Current value', @@ -1210,7 +1211,7 @@ URL: [url]', '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_enableSessionList' => 'Enable list of users online', -'settings_enableSessionList_desc' => '', +'settings_enableSessionList_desc' => 'Enable list of currently logged in users in menu.', 'settings_enableThemeSelector' => 'Theme selection', 'settings_enableThemeSelector_desc' => 'Turns on/off the theme selector on the login page.', 'settings_enableUpdateReceipt' => 'Allow editing of existing reception', diff --git a/languages/es_ES/lang.inc b/languages/es_ES/lang.inc index dbf11e034..a10de4468 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 (1017), angel (123), francisco (2), jaimem (14) +// Translators: acabello (20), Admin (1021), angel (123), francisco (2), jaimem (14) $text = array( '2_factor_auth' => '', @@ -170,7 +170,7 @@ URL: [url]', 'attr_malformed_date' => '', 'attr_malformed_email' => '', 'attr_malformed_float' => '', -'attr_malformed_int' => '', +'attr_malformed_int' => 'El atributo valor \'[value]\' del atributo \'[attrname]\' no es un número entero válido', 'attr_malformed_url' => '', 'attr_max_values' => '', 'attr_min_values' => 'No se alcanza el número mínimo de valores requeridos para el campo [attrname]', @@ -229,6 +229,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => '', 'checkedout_file_is_unchanged' => '', 'checkin_document' => '', +'checkoutpath_does_not_exist' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', 'choose_attrdef' => 'Por favor, seleccione definición de atributo', @@ -305,7 +306,7 @@ URL: [url]', 'docs_in_reception_no_access' => '', 'docs_in_revision_no_access' => '', 'document' => 'Documento', -'documentcontent' => '', +'documentcontent' => 'Contenido del documento', 'documents' => 'Documentos', 'documents_checked_out_by_you' => '', 'documents_in_process' => 'Documentos en proceso', @@ -602,7 +603,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_folder' => '', +'in_folder' => 'En el directorio', 'in_revision' => '', 'in_workflow' => 'En flujo de trabajo', 'is_disabled' => 'Deshabilitar cuenta', @@ -1052,7 +1053,7 @@ URL: [url]', 'settings_autoLoginUser' => 'Acceso automatico', 'settings_autoLoginUser_desc' => '', 'settings_available_languages' => 'Idiomas disponibles', -'settings_available_languages_desc' => '', +'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' => '', 'settings_backupDir_desc' => '', 'settings_cacheDir' => 'Carpeta caché', diff --git a/languages/fr_FR/lang.inc b/languages/fr_FR/lang.inc index 21285d70c..7d27f988d 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 (1061), jeromerobert (50), lonnnew (9), Oudiceval (239) +// Translators: Admin (1062), jeromerobert (50), lonnnew (9), Oudiceval (250) $text = array( '2_factor_auth' => 'Authentification forte', @@ -234,6 +234,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => 'Le fichier du document bloqué n’existe plus. Le déblocage est impossible.', 'checkedout_file_is_unchanged' => 'Le fichier du document bloqué est inchangé. Le déblocage n’est pas possible. Si vous ne souhaitez pas apporter de modifications, désactivez le blocage.', 'checkin_document' => 'Débloquer (check-in)', +'checkoutpath_does_not_exist' => '', 'checkout_document' => 'Bloquer (check-out)', 'checkout_is_disabled' => 'Le blocage (check-out) de documents est désactivé dans la configuration.', 'choose_attrdef' => 'Choisissez une définition d\'attribut', @@ -468,14 +469,14 @@ Le lien est valide jusqu’au [valid]. 'expired' => 'Expiré', 'expired_at_date' => 'Expiré le [datetime]', 'expires' => 'Expiration', -'expire_by_date' => '', +'expire_by_date' => 'Expire à une date', 'expire_in_1d' => 'Expire dans 1 jour', 'expire_in_1h' => 'Expire dans 1 heure', 'expire_in_1m' => 'Expire dans 1 mois', 'expire_in_1w' => 'Expire dans 1 semaine', -'expire_in_1y' => '', +'expire_in_1y' => 'Expire dans 1 an', 'expire_in_2h' => 'Expire dans 2 heures', -'expire_in_2y' => '', +'expire_in_2y' => 'Expire dans 2 ans', 'expire_today' => 'Expire aujourd’hui', 'expire_tomorrow' => 'Expire demain', 'expiry_changed_email' => 'Date d\'expiration modifiée', @@ -614,7 +615,7 @@ URL: [url]', 'invalid_target_folder' => 'Identifiant de dossier cible invalide', 'invalid_user_id' => 'Identifiant utilisateur invalide', 'invalid_version' => 'Version de document invalide', -'in_folder' => '', +'in_folder' => 'Dans', 'in_revision' => '', 'in_workflow' => 'Dans le workflow', 'is_disabled' => 'Compte désactivé', @@ -856,7 +857,7 @@ En cas de problème persistant, veuillez contacter votre administrateur.', 'pt_BR' => 'Portuguais (BR)', 'quota' => 'Quota', '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_is_disabled' => 'Le support des quotas 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 quota d’espace disque est dépassé de [bytes]. Veuillez supprimer des documents ou d\'anciennes versions.', 'receipt_deletion_email_body' => 'L’utilisateur a été retiré de la liste des destinataires Document : [name] @@ -1033,7 +1034,7 @@ URL: [url]', 'seq_end' => 'A la fin', 'seq_keep' => 'Conserver la position', 'seq_start' => 'Première position', -'sessions' => '', +'sessions' => 'Utilisateurs en ligne', 'settings' => 'Configuration', 'settings_activate_module' => 'Activez le module', 'settings_activate_php_extension' => 'Activez l\'extension PHP', @@ -1137,10 +1138,10 @@ URL: [url]', 'settings_enableLanguageSelector_desc' => 'Montrer le sélecteur de langue d\'interface après connexion de l\'utilisateur.', 'settings_enableLargeFileUpload' => 'Activer téléchargement des gros fichiers', 'settings_enableLargeFileUpload_desc' => 'Si défini, le téléchargement de fichier est également disponible via un applet java appelé jumploader sans limite de taille définie par le navigateur. Il permet également de télécharger plusieurs fichiers en une seule fois.', -'settings_enableMenuTasks' => '', -'settings_enableMenuTasks_desc' => '', -'settings_enableMultiUpload' => '', -'settings_enableMultiUpload_desc' => '', +'settings_enableMenuTasks' => 'Activer le menu des tâches', +'settings_enableMenuTasks_desc' => 'Affiche un menu avec la liste des tâches. Cette liste contient les documents en attente d’une action par l’utilisateur.', +'settings_enableMultiUpload' => 'Autoriser le dépôt de plusieurs fichiers', +'settings_enableMultiUpload_desc' => 'Lors de la création d’un document, autoriser le dépôt de plusieurs fichiers à la fois. Un nouveau document sera créé pour chaque fichier.', 'settings_enableNotificationAppRev' => 'Notification correcteur/approbateur', 'settings_enableNotificationAppRev_desc' => 'Cochez pour envoyer une notification au correcteur/approbateur quand une nouvelle version du document est ajoutée', 'settings_enableNotificationWorkflow' => 'Envoyer les notifications aux utilisateurs dans le prochain workflow', @@ -1159,8 +1160,8 @@ URL: [url]', '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_enableSessionList' => '', -'settings_enableSessionList_desc' => '', +'settings_enableSessionList' => 'Activer la liste des utilisateurs en ligne', +'settings_enableSessionList_desc' => 'Affiche un menu avec la liste des utilisateurs connectés.', 'settings_enableThemeSelector' => 'Sélection du thème', 'settings_enableThemeSelector_desc' => 'Activer/désactiver le sélecteur de thème sur la page de connexion.', 'settings_enableUpdateReceipt' => '', diff --git a/languages/hr_HR/lang.inc b/languages/hr_HR/lang.inc index 448458f75..3838afa8d 100644 --- a/languages/hr_HR/lang.inc +++ b/languages/hr_HR/lang.inc @@ -234,6 +234,7 @@ Internet poveznica: [url]', 'checkedout_file_has_disappeared' => 'Datoteka odjavljenog dokumenta je nestala. Prijava neće biti moguća.', 'checkedout_file_is_unchanged' => 'Datoteka odjavljenog dokumenta je još uvijek nepromijenjena. Prijava neće biti moguća. Ukoliko ne planirate izmjene, možete resetirati status odjave.', 'checkin_document' => 'Prijava', +'checkoutpath_does_not_exist' => '', 'checkout_document' => 'Odjava', 'checkout_is_disabled' => 'Odjava dokumenata je onemogućena u konfiguraciji.', 'choose_attrdef' => 'Molim odaberite definiciju atributa', diff --git a/languages/hu_HU/lang.inc b/languages/hu_HU/lang.inc index 69bcc7ff3..15363c39c 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 (606), ribaz (1023) +// Translators: Admin (607), ribaz (1023) $text = array( '2_factor_auth' => '', @@ -229,6 +229,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => '', 'checkedout_file_is_unchanged' => '', 'checkin_document' => '', +'checkoutpath_does_not_exist' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', 'choose_attrdef' => 'Kérem válasszon jellemző meghatározást', @@ -649,7 +650,7 @@ URL: [url]', 'linked_to_this_version' => '', '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.', 'link_to_version' => '', -'list_access_rights' => '', +'list_access_rights' => 'Összes jogosultság felsorolása...', 'list_contains_no_access_docs' => '', 'list_hooks' => '', 'local_file' => 'Helyi állomány', diff --git a/languages/it_IT/lang.inc b/languages/it_IT/lang.inc index c4589899a..1cde84acd 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 (1551), rickr (144), s.pnt (26) +// Translators: Admin (1554), rickr (144), s.pnt (26) $text = array( '2_factor_auth' => 'Autorizzazione a due fattori', @@ -235,6 +235,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => 'File documento approvato non trovato. Impossibile caricare.', 'checkedout_file_is_unchanged' => 'La versione approvata è uguale alla versione corrente. Impossibile caricare.', 'checkin_document' => 'Da approvare', +'checkoutpath_does_not_exist' => '', 'checkout_document' => 'Approvato', 'checkout_is_disabled' => 'Approvazione dei documenti disabilitata', 'choose_attrdef' => 'Seleziona l\'Attributo', @@ -608,7 +609,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_folder' => '', +'in_folder' => 'nella cartella', 'in_revision' => 'In fase di revisione', 'in_workflow' => 'In fase di lavorazione', 'is_disabled' => 'Account Disabilitato', @@ -798,7 +799,7 @@ URL: [url]', 'only_jpg_user_images' => 'Possono essere utilizzate solo immagini di tipo jpeg', 'order_by_sequence_off' => 'Ordina in sequenza disabilitato', 'original_filename' => 'Nome file originale', -'overall_indexing_progress' => '', +'overall_indexing_progress' => 'Totale processo di indicizzazione', 'owner' => 'Proprietario', 'ownership_changed_email' => 'Proprietario cambiato', 'ownership_changed_email_body' => 'Cambio di proprietario @@ -894,7 +895,7 @@ Cartella: [folder_path] Utente: [username] URL: [url]', 'removed_workflow_email_subject' => '[sitename]: [name] - Flusso di lavoro rimosso dalla versione del documento', -'removeFolderFromDropFolder' => '', +'removeFolderFromDropFolder' => 'Rimuovi la cartella dopo l\'importazione', 'remove_marked_files' => 'Rimuovi i files contrassegnati', 'repaired' => 'riparato', 'repairing_objects' => 'Riparazione documenti e cartelle in corso...', diff --git a/languages/ko_KR/lang.inc b/languages/ko_KR/lang.inc index b365cab4d..9e4d59982 100644 --- a/languages/ko_KR/lang.inc +++ b/languages/ko_KR/lang.inc @@ -19,15 +19,15 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -// Translators: Admin (940), daivoc (418) +// Translators: Admin (940), daivoc (421) $text = array( -'2_factor_auth' => '', +'2_factor_auth' => '관리자 ({LOCALE}/lang.inc)', '2_factor_auth_info' => '', '2_fact_auth_secret' => '', 'accept' => '동의', -'access_control' => '', -'access_control_is_off' => '', +'access_control' => '접근 제어', +'access_control_is_off' => '접근 제어 불가', 'access_denied' => '접근가 거부되었습니다.', 'access_inheritance' => '접근 상속', 'access_mode' => '접근 모드', @@ -236,6 +236,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => '요청한 문서파일이 사라져 버렸습니다. 확인이 불가능 합니다.', 'checkedout_file_is_unchanged' => '요청한 문서가 아직 변경전 상태입니다. 변경을 원하지 않는 경우 재설정 할 수 있습니다.', 'checkin_document' => '체크인', +'checkoutpath_does_not_exist' => '', 'checkout_document' => '체크아웃', 'checkout_is_disabled' => '체크아웃된 문서는 설정에서 비활성화됩니다.', 'choose_attrdef' => '속성의 정의를 선택하세요', diff --git a/languages/nl_NL/lang.inc b/languages/nl_NL/lang.inc index c22c6fe9b..f4faeba02 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 (724), gijsbertush (329), pepijn (45), reinoutdijkstra@hotmail.com (270) +// Translators: Admin (726), gijsbertush (329), pepijn (45), reinoutdijkstra@hotmail.com (270) $text = array( '2_factor_auth' => '', @@ -227,6 +227,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => 'File is onvindbaar', 'checkedout_file_is_unchanged' => 'Checkout-document ongewijzigd', 'checkin_document' => 'Veranderd document', +'checkoutpath_does_not_exist' => '', 'checkout_document' => 'Checkout-document', 'checkout_is_disabled' => 'Checkout is niet mogelijk', 'choose_attrdef' => 'Selecteer een kenmerk definitie', @@ -600,7 +601,7 @@ URL: [url]', 'invalid_target_folder' => 'Foutief Doel Map ID', 'invalid_user_id' => 'Foutief Gebruiker ID', 'invalid_version' => 'Foutief Document Versie', -'in_folder' => '', +'in_folder' => 'In map', 'in_revision' => 'In herziening', 'in_workflow' => 'In workflow', 'is_disabled' => 'Deactiveer account', @@ -647,7 +648,7 @@ URL: [url]', 'linked_to_this_version' => '', 'link_alt_updatedocument' => 'Als u bestanden wilt uploaden groter dan het huidige maximum, gebruik aub de alternatieve upload pagina.', 'link_to_version' => '', -'list_access_rights' => '', +'list_access_rights' => 'Oplijsten toegangsrechten', 'list_contains_no_access_docs' => '', 'list_hooks' => '', 'local_file' => 'Lokaal bestand', diff --git a/languages/pl_PL/lang.inc b/languages/pl_PL/lang.inc index e4f597db0..69c5f1c24 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 (768), netixw (84), romi (93), uGn (112) +// Translators: Admin (770), netixw (84), romi (93), uGn (112) $text = array( '2_factor_auth' => '', @@ -140,7 +140,7 @@ URL: [url]', 'attrdef_regex' => 'Wyrażenie regularne', 'attrdef_type' => 'Typ', 'attrdef_type_boolean' => '', -'attrdef_type_date' => '', +'attrdef_type_date' => 'Data', 'attrdef_type_email' => '', 'attrdef_type_float' => 'Liczna zmiennoprzecinkowa', 'attrdef_type_int' => 'Liczba całkowita', @@ -222,6 +222,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => '', 'checkedout_file_is_unchanged' => '', 'checkin_document' => '', +'checkoutpath_does_not_exist' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', 'choose_attrdef' => 'Proszę wybrać definicję atrybutu', @@ -595,7 +596,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_folder' => '', +'in_folder' => 'w folderze', 'in_revision' => '', 'in_workflow' => 'W procesie', 'is_disabled' => 'Konto nieaktywne', diff --git a/languages/pt_BR/lang.inc b/languages/pt_BR/lang.inc index 51529713b..cb404d60e 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 (939), flaviove (627), lfcristofoli (352) +// Translators: Admin (945), flaviove (627), lfcristofoli (352) $text = array( '2_factor_auth' => '', @@ -229,6 +229,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => '', 'checkedout_file_is_unchanged' => '', 'checkin_document' => '', +'checkoutpath_does_not_exist' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', 'choose_attrdef' => 'Por favor escolha a definição de atributo', @@ -601,7 +602,7 @@ URL: [url]', 'invalid_target_folder' => 'Invalid Target Folder ID', 'invalid_user_id' => 'Invalid User ID', 'invalid_version' => 'Invalid Document Version', -'in_folder' => '', +'in_folder' => 'Na Pasta', 'in_revision' => '', 'in_workflow' => 'No fluxo de trabalho', 'is_disabled' => 'Desativar conta', @@ -1046,10 +1047,10 @@ URL: [url]', 'settings_advancedAcl_desc' => '', 'settings_apache_mod_rewrite' => 'Apache - Módulo Rewrite', 'settings_Authentication' => 'Definições de autenticação', -'settings_autoLoginUser' => '', +'settings_autoLoginUser' => 'Login automático', 'settings_autoLoginUser_desc' => '', 'settings_available_languages' => 'Idiomas disponíveis', -'settings_available_languages_desc' => '', +'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' => '', 'settings_backupDir_desc' => '', 'settings_cacheDir' => 'Diretório de cache', @@ -1066,7 +1067,7 @@ URL: [url]', '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', 'settings_contentOffsetDir_desc' => 'Para contornar as limitações do sistema de arquivos subjacente, uma nova estrutura de diretórios foi concebida que existe dentro do diretório de conteúdo (Content Directory). Isso requer um diretório base para começar. Normalmente, deixe Isso para a configuração padrão, 1048576, mas pode ser qualquer número ou cadeia de caracteres que ainda não existe dentro (Diretório de conteúdo)', -'settings_convertToPdf' => '', +'settings_convertToPdf' => 'Converte o PDF para visualização', 'settings_convertToPdf_desc' => '', 'settings_cookieLifetime' => 'Tempo de Vida dos Cookies', 'settings_cookieLifetime_desc' => 'O tempo de vida de um cookie em segundos. Se definido como 0, o cookie será removido quando o navegador é fechado.', @@ -1192,7 +1193,7 @@ URL: [url]', 'settings_firstDayOfWeek_desc' => 'Primeiro dia da semana', 'settings_footNote' => 'Nota de Pé', 'settings_footNote_desc' => 'Mensagem a ser exibida na parte inferior de cada página', -'settings_fullSearchEngine' => '', +'settings_fullSearchEngine' => 'Motor de texto', 'settings_fullSearchEngine_desc' => 'Selecione o método utilizado para a busca textual', 'settings_fullSearchEngine_vallucene' => 'Zend Lucene', 'settings_fullSearchEngine_valsqlitefts' => 'SQLiteFTS', @@ -1282,7 +1283,7 @@ URL: [url]', 'settings_rootFolderID_desc' => 'ID da pasta-raiz (na maioria das vezes não precisa ser mudado)', 'settings_SaveError' => 'Erro no arquivo de configuração salvo', 'settings_Server' => 'Configuraçoes do servidor', -'settings_showFullPreview' => '', +'settings_showFullPreview' => 'Mostra o documento completo', 'settings_showFullPreview_desc' => '', 'settings_showMissingTranslations' => 'Mostrar traduções em falta', 'settings_showMissingTranslations_desc' => 'Listar todas as traduções faltando na página na parte inferior da página. O usuário conectado será capaz de apresentar uma proposta para uma tradução em falta que serão salvos em um arquivo CSV. Não ativar eáa função, se em um ambiente de produção!', diff --git a/languages/ro_RO/lang.inc b/languages/ro_RO/lang.inc index 0a37fcdc7..5a65698cd 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 (1050), balan (87) +// Translators: Admin (1060), balan (87) $text = array( '2_factor_auth' => '', @@ -234,6 +234,7 @@ URL: [url]', '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', +'checkoutpath_does_not_exist' => '', 'checkout_document' => 'Verifica', 'checkout_is_disabled' => 'Verificarea documentelor este dezactivata in configurari.', 'choose_attrdef' => 'Vă rugăm să alegeți definiția atributului', @@ -255,7 +256,7 @@ URL: [url]', 'clear_password' => '', 'clipboard' => 'Clipboard', 'close' => 'Inchide', -'command' => '', +'command' => 'Comanda', 'comment' => 'Comentariu', 'comment_changed_email' => '', 'comment_for_current_version' => 'Comentariu versiune', @@ -571,7 +572,7 @@ URL: [url]', 'include_content' => '', 'include_documents' => 'Include documente', 'include_subdirectories' => 'Include subfoldere', -'indexing_tasks_in_queue' => '', +'indexing_tasks_in_queue' => 'Actiuni de indexare in stiva', 'index_converters' => 'Indexare conversie documente', 'index_done' => '', 'index_error' => '', @@ -654,7 +655,7 @@ URL: [url]', 'linked_to_this_version' => '', '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.', 'link_to_version' => '', -'list_access_rights' => '', +'list_access_rights' => 'Listeaza toate drepturile de acces', 'list_contains_no_access_docs' => '', 'list_hooks' => '', 'local_file' => 'Fișier local', @@ -797,7 +798,7 @@ URL: [url]', 'only_jpg_user_images' => 'Doar imagini .jpg pot fi utilizate ca imagine-utilizator', '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', -'overall_indexing_progress' => '', +'overall_indexing_progress' => 'Progres indexare total', 'owner' => 'Proprietar', 'ownership_changed_email' => 'Proprietar schimbat', 'ownership_changed_email_body' => 'Proprietar schimbat @@ -1053,7 +1054,7 @@ URL: [url]', 'select_users' => 'Click pentru a selecta utilizatori', 'select_workflow' => 'Selectați workflow', 'send_email' => '', -'send_test_mail' => '', +'send_test_mail' => 'Trimite e-mail de test', 'september' => 'Septembrie', 'sequence' => 'Poziție', 'seq_after' => 'După "[prevname]"', @@ -1071,9 +1072,9 @@ URL: [url]', 'settings_advancedAcl_desc' => '', 'settings_apache_mod_rewrite' => 'Apache - Module Rewrite', 'settings_Authentication' => 'Setări de autentificare', -'settings_autoLoginUser' => '', +'settings_autoLoginUser' => 'Login automat', 'settings_autoLoginUser_desc' => '', -'settings_available_languages' => '', +'settings_available_languages' => 'Limbi disponibile', 'settings_available_languages_desc' => '', 'settings_backupDir' => '', 'settings_backupDir_desc' => '', @@ -1091,7 +1092,7 @@ URL: [url]', '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', 'settings_contentOffsetDir_desc' => 'Pentru a lucra în jurul valorii de limităre în sistemul de fișiere de bază, o nouă structură director a fost concepută care există in directorul conținut (Content Director). Acest lucru necesită un director de bază din care să se înceapă. De obicei, lăsați asta la setarea implicită, 1048576, dar se poate trece orice număr sau șir care nu este deja inclus (Content Director)', -'settings_convertToPdf' => '', +'settings_convertToPdf' => 'Converteste PDF pentru previzualizare', 'settings_convertToPdf_desc' => '', 'settings_cookieLifetime' => 'Timp de viață Cookie', '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.', @@ -1307,7 +1308,7 @@ URL: [url]', 'settings_rootFolderID_desc' => 'ID-ul folder-ului rădăcină (de regulă nu este nevoie să se schimbe)', 'settings_SaveError' => 'Eroare la salvarea fișierului de configurare', 'settings_Server' => 'Setări server', -'settings_showFullPreview' => '', +'settings_showFullPreview' => 'Afiseaza document integral', 'settings_showFullPreview_desc' => '', 'settings_showMissingTranslations' => 'Arată traducerile lipsă', 'settings_showMissingTranslations_desc' => 'Listează toate traducerile lipsă în partea de jos a paginii. Utilizatorul autentificat va putea să propună o traducere lipsă care va fi apoi salvată într-un fișier csv. Nu porniți această funcționalitate într-un mediu de producție!', @@ -1482,7 +1483,7 @@ URL: [url]', 'thursday' => 'Joi', 'thursday_abbr' => 'Jo', 'timeline' => 'Cronologie', -'timeline_add_file' => '', +'timeline_add_file' => 'Atasament nou', 'timeline_add_version' => '', 'timeline_full_add_file' => '[document]
      Adaugă atașament', 'timeline_full_add_version' => '', diff --git a/languages/ru_RU/lang.inc b/languages/ru_RU/lang.inc index a51da48e8..8d0cc45a8 100644 --- a/languages/ru_RU/lang.inc +++ b/languages/ru_RU/lang.inc @@ -234,6 +234,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => 'Файл полученного документа не найден. Загрузка невозможна.', 'checkedout_file_is_unchanged' => 'Документ не изменен. Загрузка не возможна.', 'checkin_document' => 'Получение', +'checkoutpath_does_not_exist' => '', 'checkout_document' => 'Загрузка', 'checkout_is_disabled' => 'Загрузка отключена.', 'choose_attrdef' => 'Выберите атрибут', diff --git a/languages/sk_SK/lang.inc b/languages/sk_SK/lang.inc index 7deecf7f9..fee6ee8e1 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 (544), destinqo (19) +// Translators: Admin (547), destinqo (19) $text = array( '2_factor_auth' => '', @@ -211,6 +211,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => '', 'checkedout_file_is_unchanged' => '', 'checkin_document' => '', +'checkoutpath_does_not_exist' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', 'choose_attrdef' => '', @@ -422,7 +423,7 @@ URL: [url]', 'expiry_changed_email_body' => '', 'expiry_changed_email_subject' => '', 'export' => '', -'extension_manager' => '', +'extension_manager' => 'Správa rozšírení', 'february' => 'Február', 'file' => 'Súbor', 'files' => 'Súbory', @@ -489,7 +490,7 @@ URL: [url]', 'identical_version' => '', 'import' => '', 'importfs' => '', -'import_fs' => '', +'import_fs' => 'Importovanie zo súborového systému', 'import_fs_warning' => '', 'include_content' => '', 'include_documents' => 'Vrátane súborov', @@ -635,7 +636,7 @@ URL: [url]', 'new_attrdef' => '', 'new_default_keywords' => 'Pridať kľúčové slová', 'new_default_keyword_category' => 'Pridať kategóriu', -'new_document_category' => '', +'new_document_category' => 'Pridať kategóriu', 'new_document_email' => 'Novy dokument', 'new_document_email_body' => '', 'new_document_email_subject' => '', diff --git a/languages/sv_SE/lang.inc b/languages/sv_SE/lang.inc index 1edf20bc2..04f955c4f 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 (1140), tmichelfelder (106) +// Translators: Admin (1144), tmichelfelder (106) $text = array( '2_factor_auth' => '', @@ -57,7 +57,7 @@ URL: [url]', 'add_attrdefgroup' => '', 'add_document' => 'Lägg till dokument', 'add_document_link' => 'Lägg till länkat dokument', -'add_document_notify' => '', +'add_document_notify' => 'Lägg till notifiering', 'add_doc_reviewer_approver_warning' => 'OBS! Dokumentet kommer automatiskt att markeras klart för användning, om ingen person anges för granskning eller godkännande av dokumentet.', 'add_doc_workflow_warning' => 'OBS! Dokumentet kommer automatiskt att markeras klart för användning, om inget arbetsflöde anges.', 'add_event' => 'Lägg till händelse', @@ -222,6 +222,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => '', 'checkedout_file_is_unchanged' => '', 'checkin_document' => '', +'checkoutpath_does_not_exist' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', 'choose_attrdef' => 'Välj attributdefinition', @@ -473,7 +474,7 @@ URL: [url]', 'files' => 'Filer', 'files_deletion' => 'Ta bort alla filer', 'files_deletion_warning' => 'Med detta alternativ kan du ta bort alla filer i en dokumentkatalog. Versionsinformationen kommer fortfarande att visas.', -'files_loading' => '', +'files_loading' => 'V.v. vänta tills listan med filer har laddats ...', 'file_size' => 'Filstorlek', 'filter_for_documents' => '', 'filter_for_folders' => '', @@ -1003,12 +1004,12 @@ URL: [url]', 'select_grp_ind_notification' => '', 'select_grp_ind_recipients' => '', 'select_grp_ind_reviewers' => '', -'select_grp_notification' => '', +'select_grp_notification' => 'Klicka för att välja gruppnotifiering', 'select_grp_recipients' => '', 'select_grp_reviewers' => 'Välj en grupp som ska granska', 'select_grp_revisors' => '', 'select_ind_approvers' => 'Välj en person som ska godkänna', -'select_ind_notification' => '', +'select_ind_notification' => 'Klicka för att välja individuell notifiering', 'select_ind_recipients' => '', 'select_ind_reviewers' => 'Välj en person som ska granska', 'select_ind_revisors' => '', diff --git a/languages/tr_TR/lang.inc b/languages/tr_TR/lang.inc index f00a0913f..3e3cdfe5a 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 (1049), aydin (83) +// Translators: Admin (1051), aydin (83) $text = array( '2_factor_auth' => '', @@ -228,6 +228,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => '', 'checkedout_file_is_unchanged' => '', 'checkin_document' => '', +'checkoutpath_does_not_exist' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', 'choose_attrdef' => 'Lütfen nitelik tanımını seçiniz', @@ -648,7 +649,7 @@ URL: [url]', 'linked_to_this_version' => '', '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.', 'link_to_version' => '', -'list_access_rights' => '', +'list_access_rights' => 'Tüm erişim haklarini listele', 'list_contains_no_access_docs' => '', 'list_hooks' => '', 'local_file' => 'Yerel dosya', @@ -1448,7 +1449,7 @@ URL: [url]', 'sunday_abbr' => 'Pa', 'sv_SE' => 'İsveççe', 'switched_to' => 'Yerine geçilen', -'takeOverAttributeValue' => '', +'takeOverAttributeValue' => 'Son versiyondaki özellikleri devral', 'takeOverGrpApprover' => 'Bir önceki versiyon onayını yapan grubu al.', 'takeOverGrpReviewer' => 'Bir önceki versiyon kontrolünü yapan grubu al.', 'takeOverIndApprover' => 'Bir önceki versiyonu onaylayanı al.', diff --git a/languages/uk_UA/lang.inc b/languages/uk_UA/lang.inc index 8eca604ce..abade20aa 100644 --- a/languages/uk_UA/lang.inc +++ b/languages/uk_UA/lang.inc @@ -234,6 +234,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => 'Файл отримуваного документа не знайдено. Завантаження неможливе.', 'checkedout_file_is_unchanged' => 'Документ не змінено. Завантаження неможливе', 'checkin_document' => 'Отримання', +'checkoutpath_does_not_exist' => '', 'checkout_document' => 'Завантаження', 'checkout_is_disabled' => 'Завантаження відключене', 'choose_attrdef' => 'Оберіть атрибут', diff --git a/languages/zh_CN/lang.inc b/languages/zh_CN/lang.inc index a0e34f733..149d70e5c 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 (681), fengjohn (5) +// Translators: Admin (683), fengjohn (5) $text = array( '2_factor_auth' => '', @@ -211,6 +211,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => '', 'checkedout_file_is_unchanged' => '', 'checkin_document' => '', +'checkoutpath_does_not_exist' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', 'choose_attrdef' => '请选择属性', @@ -496,7 +497,7 @@ URL: [url]', 'include_content' => '', 'include_documents' => '包含文档', 'include_subdirectories' => '包含子目录', -'indexing_tasks_in_queue' => '', +'indexing_tasks_in_queue' => '队列中的检索任务', 'index_converters' => '索引文件转换', 'index_done' => '', 'index_error' => '', @@ -1044,7 +1045,7 @@ URL: [url]', 'settings_expandFolderTree_val0' => '', 'settings_expandFolderTree_val1' => '', 'settings_expandFolderTree_val2' => '', -'settings_Extensions' => '', +'settings_Extensions' => '设置扩展', 'settings_extraPath' => '额外的PHP的include路径', 'settings_extraPath_desc' => '附加软件的路径。这是包含目录,例如在ADODB目录或额外的PEAR包', 'settings_firstDayOfWeek' => '每周第一天', diff --git a/languages/zh_TW/lang.inc b/languages/zh_TW/lang.inc index 59d678d9c..01b127201 100644 --- a/languages/zh_TW/lang.inc +++ b/languages/zh_TW/lang.inc @@ -211,6 +211,7 @@ URL: [url]', 'checkedout_file_has_disappeared' => '', 'checkedout_file_is_unchanged' => '', 'checkin_document' => '', +'checkoutpath_does_not_exist' => '', 'checkout_document' => '', 'checkout_is_disabled' => '', 'choose_attrdef' => '請選擇屬性', From ab6665d64d0be4f6bd997276c252c30def73a623 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 10 Jul 2017 11:13:38 +0200 Subject: [PATCH 190/194] add entry form 4.3.35 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index d99fc60e8..0cb18c54c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,7 @@ - show role of users in user list and substitute user list - mysql sql_mode=only_full_group_by can be set without causing errors when creating a temporary table +- translation updates -------------------------------------------------------------------------------- Changes in version 4.3.34 From aad36c0973d95626196a06c2fc160394802a0132 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 10 Jul 2017 14:57:07 +0200 Subject: [PATCH 191/194] and changes for 5.0.12 --- CHANGELOG | 7 +++++++ SeedDMS_Core/package.xml | 1 + 2 files changed, 8 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 79405da07..96e4a989d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,13 @@ - show name and parent folder of document/folder in search list on different lines - check for guest login, admin ip and disabled accounts in webdav server +- update last access time in session only once a minute +- set Return-Path in emails if from_address in settings is set +- pass more arguments to hooks (pre|post)UpdateDocument and searchListHeader +- show help messages on settings page if available +- fix regex expression in op/op.Settings.php (Closes #317) +- better debugging of sql statements in SeedDM_Core +- move css for timeline into Timeline view - merged changes from 4.3.35 -------------------------------------------------------------------------------- diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index c3fdb0caa..49a844d47 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -24,6 +24,7 @@ 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 From 25d609d89484e7433db35ab70edc40ec62c5f8a8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 10 Jul 2017 15:08:16 +0200 Subject: [PATCH 192/194] add changelog for 5.0.12 --- SeedDMS_Core/package.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index afeca6979..d1fc21a83 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -1377,6 +1377,21 @@ do not sort some temporary tables anymore, because it causes an error in mysql i - all changes from 4.3.34 merged + + 2017-07-10 + + + 5.0.12 + 5.0.12 + + + stable + stable + + GPL License + + + 2017-02-20 From 0b6cb2648173c3cacdb6d5fcad54f8840efe0dd8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 10 Jul 2017 15:11:04 +0200 Subject: [PATCH 193/194] fix notes for 5.1.2 and 5.0.12 --- SeedDMS_Core/package.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index d1fc21a83..df18b1ea9 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -24,8 +24,13 @@ 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 +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 @@ -1389,7 +1394,9 @@ 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 From b1e45727618f668084179b04c5476474dec537ac Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 11 Jul 2017 11:12:54 +0200 Subject: [PATCH 194/194] turn all hrefs to out.XxxxVvvv.php into ../out/out.XxxxVvvv.php --- views/bootstrap/class.Bootstrap.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 7a4ef7871..33d8979d4 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1099,7 +1099,7 @@ $(document).ready(function() { print "
      \n"; print ""; print ""; - print "".getMLText("category")."…\n"; + print "".getMLText("category")."…\n"; print "
      \n"; ?>
      getID()."&showtree=".showtree()."\">imgpath."folder.svg\" width=\"24\" height=\"24\" border=0>getID()."&showtree=".showtree()."\">" . htmlspecialchars($folder->getName()) . ""; + $content .= "getID()."&showtree=".showtree()."\">imgpath."folder.svg\" width=\"24\" height=\"24\" border=0>getID()."&showtree=".showtree()."\">" . htmlspecialchars($folder->getName()) . ""; if($comment) { $content .= "
      ".htmlspecialchars($comment).""; } @@ -1548,7 +1548,7 @@ $(function() { } else $content .= "
      getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">" . htmlspecialchars($document->getName()) . ""; + $content .= "" . htmlspecialchars($document->getName()) . ""; if($comment) { $content .= "
      ".htmlspecialchars($comment).""; } @@ -1946,7 +1946,7 @@ $(document).ready( function() { $content .= "
      "; - $content .= "" . htmlspecialchars($document->getName()) . ""; + $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())."".($document->expires() ? ", ".getMLText('expires').": ".getReadableDate($document->getExpires())."" : "").""; if($comment) { $content .= "
      ".htmlspecialchars($comment).""; @@ -2018,8 +2018,8 @@ $(document).ready( function() { $content = ''; $content .= "
      getID()."\" draggable=\"false\" href=\"out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\">imgpath."folder.svg\" width=\"24\" height=\"24\" border=0>getID()."\" href=\"out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . ""; + $content .= "getID()."\" draggable=\"false\" href=\"../out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\">imgpath."folder.svg\" width=\"24\" height=\"24\" border=0>getID()."\" href=\"../out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . ""; $content .= "
      ".getMLText('owner').": ".htmlspecialchars($owner->getFullName()).", ".getMLText('creation_date').": ".date('Y-m-d', $subFolder->getDate()).""; if($comment) { $content .= "
      ".htmlspecialchars($comment)."";