mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 04:31:32 +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() { /* {{{ */
|
function getDir() { /* {{{ */
|
||||||
if($this->_dms->maxDirID) {
|
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."/";
|
return $dirid."/".$this->_id."/";
|
||||||
} else {
|
} else {
|
||||||
return $this->_id."/";
|
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
|
* has no access list the returned array contains the two elements
|
||||||
* 'users' and 'groups' which are than empty. The methode returns false
|
* 'users' and 'groups' which are than empty. The methode returns false
|
||||||
* if the function fails.
|
* if the function fails.
|
||||||
*
|
*
|
||||||
* @param integer $mode access mode (defaults to M_ANY)
|
* @param integer $mode access mode (defaults to M_ANY)
|
||||||
* @param integer $op operation (defaults to O_EQ)
|
* @param integer $op operation (defaults to O_EQ)
|
||||||
* @return array multi dimensional array or false in case of an error
|
* @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"]);
|
$link = new SeedDMS_Core_DocumentLink($resArr["id"], $document, $target, $resArr["userID"], $resArr["public"]);
|
||||||
$user = $this->_dms->getLoggedInUser();
|
$user = $this->_dms->getLoggedInUser();
|
||||||
if($link->getAccessMode($user, $document, $target) >= M_READ)
|
if($link->getAccessMode($user, $document, $target) >= M_READ)
|
||||||
return $file;
|
return $link;
|
||||||
return null;
|
return null;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
@ -2356,7 +2356,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
||||||
$queryStr = "SELECT * FROM `tblDocumentFiles` WHERE `document` = " . $this->_id;
|
$queryStr = "SELECT * FROM `tblDocumentFiles` WHERE `document` = " . $this->_id;
|
||||||
if($version) {
|
if($version) {
|
||||||
$queryStr .= " AND (`version`=0 OR `version`=".(int) $version.")";
|
$queryStr .= " AND (`version`=0 OR `version`=".(int) $version.")";
|
||||||
}
|
}
|
||||||
$queryStr .= " ORDER BY ";
|
$queryStr .= " ORDER BY ";
|
||||||
if($version) {
|
if($version) {
|
||||||
$queryStr .= "`version` DESC,";
|
$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
|
* Calculate the disk space including all versions of the document
|
||||||
*
|
*
|
||||||
* This is done by using the internal database field storing the
|
* This is done by using the internal database field storing the
|
||||||
* filesize of a document version.
|
* 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
|
* Returns a list of events happend during the life of the document
|
||||||
*
|
*
|
||||||
* This includes the creation of new versions, approval and reviews, etc.
|
* This includes the creation of new versions, approval and reviews, etc.
|
||||||
*
|
*
|
||||||
* @return array list of events
|
* @return array list of events
|
||||||
|
@ -3276,7 +3276,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rewrites the complete status log
|
* Rewrites the complete status log
|
||||||
*
|
*
|
||||||
* Attention: this function is highly dangerous.
|
* Attention: this function is highly dangerous.
|
||||||
* It removes an existing status log and rewrites it.
|
* It removes an existing status log and rewrites it.
|
||||||
* This method was added for importing an xml dump.
|
* 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
|
* Returns the access mode similar to a document
|
||||||
*
|
*
|
||||||
* There is no real access mode for document content, so this is more
|
* 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}
|
* content. The function checks if {@link SeedDMS_Core_DMS::noReadForStatus}
|
||||||
* contains the status of the version and returns M_NONE if it exists and
|
* 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.
|
* 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.
|
* 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
|
* 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
|
* FIXED: instead of using $dms->noReadForStatus it is take from the user's role
|
||||||
*
|
*
|
||||||
* @param object $u user
|
* @param object $u user
|
||||||
|
@ -3527,7 +3527,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rewrites the complete review log
|
* Rewrites the complete review log
|
||||||
*
|
*
|
||||||
* Attention: this function is highly dangerous.
|
* Attention: this function is highly dangerous.
|
||||||
* It removes an existing review log and rewrites it.
|
* It removes an existing review log and rewrites it.
|
||||||
* This method was added for importing an xml dump.
|
* 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
|
* Rewrites the complete approval log
|
||||||
*
|
*
|
||||||
* Attention: this function is highly dangerous.
|
* Attention: this function is highly dangerous.
|
||||||
* It removes an existing review log and rewrites it.
|
* It removes an existing review log and rewrites it.
|
||||||
* This method was added for importing an xml dump.
|
* 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);
|
$recs = $db->getResultArray($queryStr);
|
||||||
if (is_bool($recs) && !$recs)
|
if (is_bool($recs) && !$recs)
|
||||||
return false;
|
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);
|
$this->_workflowState->setDMS($this->_document->_dms);
|
||||||
}
|
}
|
||||||
return $this->_workflowState;
|
return $this->_workflowState;
|
||||||
|
@ -5262,7 +5262,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
$db->rollbackTransaction();
|
$db->rollbackTransaction();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->_workflow = $workflow;
|
$this->_workflow = $workflow;
|
||||||
if(!$this->setStatus(S_IN_WORKFLOW, "Added workflow '".$workflow->getName()."'", $user)) {
|
if(!$this->setStatus(S_IN_WORKFLOW, "Added workflow '".$workflow->getName()."'", $user)) {
|
||||||
$db->rollbackTransaction();
|
$db->rollbackTransaction();
|
||||||
return false;
|
return false;
|
||||||
|
@ -5296,7 +5296,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
return false;
|
return false;
|
||||||
if(!$recs)
|
if(!$recs)
|
||||||
return false;
|
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);
|
$this->_workflow->setDMS($this->_document->_dms);
|
||||||
}
|
}
|
||||||
return $this->_workflow;
|
return $this->_workflow;
|
||||||
|
@ -5304,7 +5304,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rewrites the complete workflow log
|
* Rewrites the complete workflow log
|
||||||
*
|
*
|
||||||
* Attention: this function is highly dangerous.
|
* Attention: this function is highly dangerous.
|
||||||
* It removes an existing workflow log and rewrites it.
|
* It removes an existing workflow log and rewrites it.
|
||||||
* This method was added for importing an xml dump.
|
* 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'])
|
if($recs[0]['parentworkflow'])
|
||||||
return $this->_document->_dms->getWorkflow($recs[0]['parentworkflow']);
|
return $this->_document->_dms->getWorkflow($recs[0]['parentworkflow']);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
@ -5483,7 +5483,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
if (!$db->getResult($queryStr)) {
|
if (!$db->getResult($queryStr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$this->_workflow = $subworkflow;
|
$this->_workflow = $subworkflow;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -5530,7 +5530,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
return false;
|
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);
|
$this->_workflow->setDMS($this->_document->_dms);
|
||||||
|
|
||||||
if($transition) {
|
if($transition) {
|
||||||
|
@ -5739,7 +5739,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
return $nextstate;
|
return $nextstate;
|
||||||
}
|
}
|
||||||
return true;
|
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