mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-15 06:01:19 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
87ee71a1a1
3
Makefile
3
Makefile
|
@ -26,6 +26,9 @@ dist:
|
||||||
quickstart:
|
quickstart:
|
||||||
vendor/bin/phing -Dversion=$(VERSION) package
|
vendor/bin/phing -Dversion=$(VERSION) package
|
||||||
|
|
||||||
|
unittest:
|
||||||
|
vendor/bin/phing -Dversion=$(VERSION) phpunitfast
|
||||||
|
|
||||||
pear:
|
pear:
|
||||||
(cd SeedDMS_Core/; pear package)
|
(cd SeedDMS_Core/; pear package)
|
||||||
(cd SeedDMS_Lucene/; pear package)
|
(cd SeedDMS_Lucene/; pear package)
|
||||||
|
|
|
@ -841,6 +841,8 @@ class SeedDMS_Core_DMS {
|
||||||
"WHERE `tblDocuments`.`name` = " . $this->db->qstr($name);
|
"WHERE `tblDocuments`.`name` = " . $this->db->qstr($name);
|
||||||
if($folder)
|
if($folder)
|
||||||
$queryStr .= " AND `tblDocuments`.`folder` = ". $folder->getID();
|
$queryStr .= " AND `tblDocuments`.`folder` = ". $folder->getID();
|
||||||
|
if($this->checkWithinRootDir)
|
||||||
|
$queryStr .= " AND `tblDocuments`.`folderList` LIKE '%:".$this->rootFolderID.":%'";
|
||||||
$queryStr .= " ORDER BY `tblDocuments`.`id` DESC LIMIT 1";
|
$queryStr .= " ORDER BY `tblDocuments`.`id` DESC LIMIT 1";
|
||||||
|
|
||||||
$resArr = $this->db->getResultArray($queryStr);
|
$resArr = $this->db->getResultArray($queryStr);
|
||||||
|
|
|
@ -6573,7 +6573,6 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ($this->_workflow) {
|
if ($this->_workflow) {
|
||||||
$workflow = $this->_workflow['workflow'];
|
|
||||||
$db->startTransaction();
|
$db->startTransaction();
|
||||||
|
|
||||||
$queryStr = "UPDATE `tblWorkflowDocumentContent` SET `state` = NULL WHERE `id` = '" . $this->_workflow['id']."'";
|
$queryStr = "UPDATE `tblWorkflowDocumentContent` SET `state` = NULL WHERE `id` = '" . $this->_workflow['id']."'";
|
||||||
|
@ -6898,7 +6897,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
* dimensional list. Without a running workflow the log entries of
|
* dimensional list. Without a running workflow the log entries of
|
||||||
* all workflows in the past are returned grouped by workflow.
|
* all workflows in the past are returned grouped by workflow.
|
||||||
*
|
*
|
||||||
* @return array list of operations
|
* @return array list of objects
|
||||||
*/
|
*/
|
||||||
function getWorkflowLog($transition = null) { /* {{{ */
|
function getWorkflowLog($transition = null) { /* {{{ */
|
||||||
$db = $this->_document->getDMS()->getDB();
|
$db = $this->_document->getDMS()->getDB();
|
||||||
|
@ -6933,20 +6932,23 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the latest logged transition for the document content within the
|
* Get the latest workflow log entry for the document content within the
|
||||||
* workflow
|
* workflow. Even after finishing the workflow (when the document content
|
||||||
|
* does not have workflow set anymore) this function returns the last
|
||||||
|
* log entry.
|
||||||
*
|
*
|
||||||
* @return array list of operations
|
* @return object
|
||||||
*/
|
*/
|
||||||
function getLastWorkflowTransition() { /* {{{ */
|
function getLastWorkflowLog() { /* {{{ */
|
||||||
$db = $this->_document->getDMS()->getDB();
|
$db = $this->_document->getDMS()->getDB();
|
||||||
|
|
||||||
|
/*
|
||||||
if(!$this->_workflow)
|
if(!$this->_workflow)
|
||||||
$this->getWorkflow();
|
$this->getWorkflow();
|
||||||
|
|
||||||
if(!$this->_workflow)
|
if(!$this->_workflow)
|
||||||
return false;
|
return false;
|
||||||
|
*/
|
||||||
$queryStr=
|
$queryStr=
|
||||||
"SELECT * FROM `tblWorkflowLog` WHERE `workflowdocumentcontent` = ". $this->_workflow['id'];
|
"SELECT * FROM `tblWorkflowLog` WHERE `workflowdocumentcontent` = ". $this->_workflow['id'];
|
||||||
$queryStr .= " ORDER BY `id` DESC LIMIT 1";
|
$queryStr .= " ORDER BY `id` DESC LIMIT 1";
|
||||||
|
@ -6954,9 +6956,9 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
if (is_bool($resArr) && !$resArr)
|
if (is_bool($resArr) && !$resArr)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
$workflowlogs = array();
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$workflowlog = new SeedDMS_Core_Workflow_Log($resArr[$i]["id"], $this->_document->getDMS()->getDocument($resArr[$i]["document"]), $resArr[$i]["version"], $this->_workflow, $this->_document->getDMS()->getUser($resArr[$i]["userid"]), $this->_workflow['workflow']->getTransition($resArr[$i]["transition"]), $resArr[$i]["date"], $resArr[$i]["comment"]);
|
$workflow = $this->_document->getDMS()->getWorkflow($resArr[$i]["workflow"]);
|
||||||
|
$workflowlog = new SeedDMS_Core_Workflow_Log($resArr[$i]["id"], $this->_document->getDMS()->getDocument($resArr[$i]["document"]), $resArr[$i]["version"], $workflow, $this->_document->getDMS()->getUser($resArr[$i]["userid"]), $workflow->getTransition($resArr[$i]["transition"]), $resArr[$i]["date"], $resArr[$i]["comment"]);
|
||||||
$workflowlog->setDMS($this);
|
$workflowlog->setDMS($this);
|
||||||
|
|
||||||
return $workflowlog;
|
return $workflowlog;
|
||||||
|
|
|
@ -921,7 +921,6 @@ class SeedDMS_Core_User { /* {{{ */
|
||||||
$homefolder = intval($homefolder);
|
$homefolder = intval($homefolder);
|
||||||
|
|
||||||
$queryStr = "UPDATE `tblUsers` SET `homefolder` = " . ($homefolder ? $homefolder : 'NULL') . " WHERE `id` = " . $this->_id;
|
$queryStr = "UPDATE `tblUsers` SET `homefolder` = " . ($homefolder ? $homefolder : 'NULL') . " WHERE `id` = " . $this->_id;
|
||||||
echo $queryStr;
|
|
||||||
if (!$db->getResult($queryStr))
|
if (!$db->getResult($queryStr))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -2319,7 +2318,7 @@ class SeedDMS_Core_User { /* {{{ */
|
||||||
if (is_bool($resArr) && !$resArr) return false;
|
if (is_bool($resArr) && !$resArr) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2355,7 +2354,7 @@ class SeedDMS_Core_User { /* {{{ */
|
||||||
if (is_bool($resArr) && !$resArr) return false;
|
if (is_bool($resArr) && !$resArr) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2376,7 +2375,7 @@ class SeedDMS_Core_User { /* {{{ */
|
||||||
$resArr = $db->getResult($queryStr);
|
$resArr = $db->getResult($queryStr);
|
||||||
if (is_bool($resArr) && !$resArr) return false;
|
if (is_bool($resArr) && !$resArr) return false;
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<email>uwe@steinmann.cx</email>
|
<email>uwe@steinmann.cx</email>
|
||||||
<active>yes</active>
|
<active>yes</active>
|
||||||
</lead>
|
</lead>
|
||||||
<date>2022-02-14</date>
|
<date>2022-02-18</date>
|
||||||
<time>13:44:55</time>
|
<time>13:44:55</time>
|
||||||
<version>
|
<version>
|
||||||
<release>6.0.18</release>
|
<release>6.0.18</release>
|
||||||
|
@ -1953,11 +1953,11 @@ add method SeedDMS_Core_DatabaseAccess::setLogFp()
|
||||||
</notes>
|
</notes>
|
||||||
</release>
|
</release>
|
||||||
<release>
|
<release>
|
||||||
<date>2021-08-20</date>
|
<date>2022-02-18</date>
|
||||||
<time>13:44:55</time>
|
<time>13:44:55</time>
|
||||||
<version>
|
<version>
|
||||||
<release>5.1.24</release>
|
<release>5.1.25</release>
|
||||||
<api>5.1.24</api>
|
<api>5.1.25</api>
|
||||||
</version>
|
</version>
|
||||||
<stability>
|
<stability>
|
||||||
<release>stable</release>
|
<release>stable</release>
|
||||||
|
@ -1965,22 +1965,8 @@ add method SeedDMS_Core_DatabaseAccess::setLogFp()
|
||||||
</stability>
|
</stability>
|
||||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||||
<notes>
|
<notes>
|
||||||
- in SeedDMS_Core_DocumentContent::removeWorkflow() remove records from tblWorklflowLog before tblDWorkflowDocumentContent
|
- rename getLastWorkflowTransition() to getLastWorkflowLog()
|
||||||
- make all class variables of SeedDMS_Core_User protected
|
- getLastWorkflowLog() returns a workflow entry even if the workflow has ended
|
||||||
- fix various errors in SeedDMS_Core_AttributeDefinition::validate()
|
|
||||||
- add lots of unit tests
|
|
||||||
- replace incorrect use of array_search() by in_array()
|
|
||||||
- move method SeedDMS_Core_DMS::createDump() into SeedDMS_Core_DatabaseAccess
|
|
||||||
- lots of parameter checking when calling methods()
|
|
||||||
- make sure callbacks are callable
|
|
||||||
- SeedDMS_Core_Folder::getParent() returns null if there is no parent (used to be false)
|
|
||||||
- SeedDMS_Core_DMS::search() will not find document without an expiration date anymore, if the search is limited by an expiration end date but no start date
|
|
||||||
- add method SeedDMS_Core_Folder::getFoldersMinMax()
|
|
||||||
- init internal cache variables of SeedDMS_Core_Folder and add method clearCache()
|
|
||||||
- SeedDMS_Core_Folder::hasDocuments() does not use the interal document cache anymore
|
|
||||||
- SeedDMS_Core_Document::addDocumentLink() returns an object of type SeedDMS_Core_DocumentLink in case of success
|
|
||||||
- trim email, comment, language, theme when setting data of user
|
|
||||||
- more checks whether an id > 0 when getting a database record
|
|
||||||
</notes>
|
</notes>
|
||||||
</release>
|
</release>
|
||||||
<release>
|
<release>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user