mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
setStatus will not fail if status is unchanged, finishRevision() will no longer set state waіting
This commit is contained in:
parent
50a39d439a
commit
f5db1b66cb
|
@ -2984,7 +2984,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
$this->getStatus();
|
||||
}
|
||||
if ($this->_status["status"]==$status) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
if($date)
|
||||
$ddate = $db->qstr($date);
|
||||
|
@ -4631,6 +4631,9 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
* this may not be possible.
|
||||
*/
|
||||
$db->startTransaction();
|
||||
/* Does it make sense to put all revisions into sleeping mode? I guess
|
||||
* not. If a document was released or rejected the revision are useless
|
||||
* anyway
|
||||
foreach($revisionStatus as $status) {
|
||||
if($status['status'] != S_LOG_SLEEPING && $status['status'] != S_LOG_USER_REMOVED) {
|
||||
$queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`,
|
||||
|
@ -4645,6 +4648,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
if(!$this->setStatus($docstatus, $docmsg, $requestUser)) {
|
||||
$db->rollbackTransaction();
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user