mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 12:11:19 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
3cd766468d
|
@ -298,7 +298,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
*/
|
||||
function getDir() { /* {{{ */
|
||||
if($this->_dms->maxDirID) {
|
||||
$dirid = (int) (($this->_id-1) / $this->_dms->maxDirID) + 1;
|
||||
$dirid = (int) (($this->_id-1) / $this->_dms->maxDirID) + 1;
|
||||
return $dirid."/".$this->_id."/";
|
||||
} else {
|
||||
return $this->_id."/";
|
||||
|
@ -1067,7 +1067,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
* has no access list the returned array contains the two elements
|
||||
* 'users' and 'groups' which are than empty. The methode returns false
|
||||
* if the function fails.
|
||||
*
|
||||
*
|
||||
* @param integer $mode access mode (defaults to M_ANY)
|
||||
* @param integer $op operation (defaults to O_EQ)
|
||||
* @return array multi dimensional array or false in case of an error
|
||||
|
@ -2204,7 +2204,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
$link = new SeedDMS_Core_DocumentLink($resArr["id"], $document, $target, $resArr["userID"], $resArr["public"]);
|
||||
$user = $this->_dms->getLoggedInUser();
|
||||
if($link->getAccessMode($user, $document, $target) >= M_READ)
|
||||
return $file;
|
||||
return $link;
|
||||
return null;
|
||||
} /* }}} */
|
||||
|
||||
|
@ -2356,7 +2356,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
$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,";
|
||||
|
@ -2736,7 +2736,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
|
||||
/**
|
||||
* Calculate the disk space including all versions of the document
|
||||
*
|
||||
*
|
||||
* This is done by using the internal database field storing the
|
||||
* filesize of a document version.
|
||||
*
|
||||
|
@ -2755,7 +2755,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
|
||||
/**
|
||||
* Returns a list of events happend during the life of the document
|
||||
*
|
||||
*
|
||||
* This includes the creation of new versions, approval and reviews, etc.
|
||||
*
|
||||
* @return array list of events
|
||||
|
@ -3276,7 +3276,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
|
||||
/**
|
||||
* Rewrites the complete status log
|
||||
*
|
||||
*
|
||||
* Attention: this function is highly dangerous.
|
||||
* It removes an existing status log and rewrites it.
|
||||
* This method was added for importing an xml dump.
|
||||
|
@ -3327,7 +3327,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
* Returns the access mode similar to a document
|
||||
*
|
||||
* There is no real access mode for document content, so this is more
|
||||
* like a virtual access mode, derived from the status of the document
|
||||
* like a virtual access mode, derived from the status of the document
|
||||
* content. The function checks if {@link SeedDMS_Core_DMS::noReadForStatus}
|
||||
* contains the status of the version and returns M_NONE if it exists and
|
||||
* the user is not involved in a workflow or review/approval/revision.
|
||||
|
@ -3337,7 +3337,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
* prevent access on the whole document if there is no accessible version.
|
||||
*
|
||||
* FIXME: This function only works propperly if $u is the currently logged in
|
||||
* user, because noReadForStatus will be set for this user.
|
||||
* user, because noReadForStatus will be set for this user.
|
||||
* FIXED: instead of using $dms->noReadForStatus it is take from the user's role
|
||||
*
|
||||
* @param object $u user
|
||||
|
@ -3527,7 +3527,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
|
||||
/**
|
||||
* Rewrites the complete review log
|
||||
*
|
||||
*
|
||||
* Attention: this function is highly dangerous.
|
||||
* It removes an existing review log and rewrites it.
|
||||
* This method was added for importing an xml dump.
|
||||
|
@ -3655,7 +3655,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
|
||||
/**
|
||||
* Rewrites the complete approval log
|
||||
*
|
||||
*
|
||||
* Attention: this function is highly dangerous.
|
||||
* It removes an existing review log and rewrites it.
|
||||
* This method was added for importing an xml dump.
|
||||
|
@ -5239,7 +5239,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
$recs = $db->getResultArray($queryStr);
|
||||
if (is_bool($recs) && !$recs)
|
||||
return false;
|
||||
$this->_workflowState = new SeedDMS_Core_Workflow_State($recs[0]['id'], $recs[0]['name'], $recs[0]['maxtime'], $recs[0]['precondfunc'], $recs[0]['documentstatus']);
|
||||
$this->_workflowState = new SeedDMS_Core_Workflow_State($recs[0]['id'], $recs[0]['name'], $recs[0]['maxtime'], $recs[0]['precondfunc'], $recs[0]['documentstatus']);
|
||||
$this->_workflowState->setDMS($this->_document->_dms);
|
||||
}
|
||||
return $this->_workflowState;
|
||||
|
@ -5262,7 +5262,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
$db->rollbackTransaction();
|
||||
return false;
|
||||
}
|
||||
$this->_workflow = $workflow;
|
||||
$this->_workflow = $workflow;
|
||||
if(!$this->setStatus(S_IN_WORKFLOW, "Added workflow '".$workflow->getName()."'", $user)) {
|
||||
$db->rollbackTransaction();
|
||||
return false;
|
||||
|
@ -5296,7 +5296,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
return false;
|
||||
if(!$recs)
|
||||
return false;
|
||||
$this->_workflow = new SeedDMS_Core_Workflow($recs[0]['id'], $recs[0]['name'], $this->_document->_dms->getWorkflowState($recs[0]['initstate']), $recs[0]["layoutdata"]);
|
||||
$this->_workflow = new SeedDMS_Core_Workflow($recs[0]['id'], $recs[0]['name'], $this->_document->_dms->getWorkflowState($recs[0]['initstate']), $recs[0]["layoutdata"]);
|
||||
$this->_workflow->setDMS($this->_document->_dms);
|
||||
}
|
||||
return $this->_workflow;
|
||||
|
@ -5304,7 +5304,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
|
||||
/**
|
||||
* Rewrites the complete workflow log
|
||||
*
|
||||
*
|
||||
* Attention: this function is highly dangerous.
|
||||
* It removes an existing workflow log and rewrites it.
|
||||
* This method was added for importing an xml dump.
|
||||
|
@ -5456,7 +5456,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
|
||||
if($recs[0]['parentworkflow'])
|
||||
return $this->_document->_dms->getWorkflow($recs[0]['parentworkflow']);
|
||||
|
||||
|
||||
return false;
|
||||
} /* }}} */
|
||||
|
||||
|
@ -5483,7 +5483,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
if (!$db->getResult($queryStr)) {
|
||||
return false;
|
||||
}
|
||||
$this->_workflow = $subworkflow;
|
||||
$this->_workflow = $subworkflow;
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
@ -5530,7 +5530,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
return false;
|
||||
}
|
||||
|
||||
$this->_workflow = $this->_document->_dms->getWorkflow($recs[0]['parentworkflow']);
|
||||
$this->_workflow = $this->_document->_dms->getWorkflow($recs[0]['parentworkflow']);
|
||||
$this->_workflow->setDMS($this->_document->_dms);
|
||||
|
||||
if($transition) {
|
||||
|
@ -5739,7 +5739,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
return $nextstate;
|
||||
}
|
||||
return true;
|
||||
|
||||
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
|
|
File diff suppressed because it is too large
Load Diff
2069
restapi/index.php
2069
restapi/index.php
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user