mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
delRevisor() returns -4 if user has placed revision already
This commit is contained in:
parent
bf11f7cc87
commit
a31524df09
|
@ -879,10 +879,13 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
* Check if latest content of the document has a scheduled
|
||||
* revision workflow.
|
||||
* The method will update the document status log database table
|
||||
* if needed.
|
||||
* if needed and set the revisiondate of the content to $next.
|
||||
*
|
||||
* FIXME: This method does not check if there are any revisors left. Even
|
||||
* if all revisors have been removed, it will still start the revision workflow!
|
||||
* NOTE: This seems not the case anymore. The status of each revision is
|
||||
* checked. Only if at least one status is S_LOG_SLEEPING the revision will be
|
||||
* started. This wouldn't be the case if all revisors had been removed.
|
||||
*
|
||||
* @param object $user user requesting the possible automatic change
|
||||
* @param string $next next date for review
|
||||
|
@ -5495,7 +5498,10 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
if ($indstatus["status"] != S_LOG_WAITING && $indstatus["status"] != S_LOG_SLEEPING) {
|
||||
// User has already submitted a revision or has already been deleted;
|
||||
// return an error.
|
||||
return -3;
|
||||
if($indstatus["status"] == S_LOG_USER_REMOVED)
|
||||
return -3;
|
||||
else
|
||||
return -4;
|
||||
}
|
||||
|
||||
$queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ".
|
||||
|
|
Loading…
Reference in New Issue
Block a user