mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-22 17:41:48 +00:00
Merge branch 'seeddms-5.0.x' into seeddms-5.1.x
This commit is contained in:
commit
20c3ddfd1e
|
@ -64,6 +64,11 @@
|
|||
- add .xml to online file types by default
|
||||
- add home folder for users
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 4.3.30
|
||||
--------------------------------------------------------------------------------
|
||||
- fix adding new workflows
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 4.3.29
|
||||
--------------------------------------------------------------------------------
|
||||
|
|
2
Makefile
2
Makefile
|
@ -52,6 +52,6 @@ doc:
|
|||
$(PHPDOC) -d SeedDMS_Core --ignore 'getusers.php,getfoldertree.php,config.php,reverselookup.php' --force -t html
|
||||
|
||||
apidoc:
|
||||
apigen generate -s SeedDMS_Core --exclude tests --skip-doc-prefix tests -d html
|
||||
apigen generate -s SeedDMS_Core --exclude tests -d html
|
||||
|
||||
.PHONY: webdav webapp
|
||||
|
|
|
@ -52,12 +52,29 @@ if (!isset($_POST["expires"]) || $_POST["expires"] != "false") {
|
|||
$expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]);
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['setExpires'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['setExpires'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'preSetExpires')) {
|
||||
$hookObj->preSetExpires(array('document'=>$document, 'expires'=>&$expires));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$document->setExpires($expires)){
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
||||
}
|
||||
|
||||
$document->verifyLastestContentExpriry();
|
||||
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['setExpires'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['setExpires'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'postSetExpires')) {
|
||||
$hookObj->postSetExpires(array('document'=>$document, 'expires'=>$expires));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
add_log_line("?documentid=".$documentid);
|
||||
|
||||
header("Location:../out/out.ViewDocument.php?documentid=".$documentid);
|
||||
|
|
|
@ -68,23 +68,19 @@ if(!$version->triggerWorkflowTransitionIsAllowed($user, $transition)) {
|
|||
|
||||
$workflow = $transition->getWorkflow();
|
||||
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['triggerWorkflowTransition'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['triggerWorkflowTransition'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'preTriggerWorkflowTransition')) {
|
||||
$hookObj->preTriggerWorkflowTransition(array('version'=>$version, 'transition'=>$transition, 'comment'=>$_POST["comment"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($version->triggerWorkflowTransition($user, $transition, $_POST["comment"])) {
|
||||
if ($notifier) {
|
||||
$nl = $document->getNotifyList();
|
||||
$folder = $document->getFolder();
|
||||
|
||||
/*
|
||||
$subject = "###SITENAME###: ".$document->getName()." - ".getMLText("transition_triggered_email");
|
||||
$message = getMLText("transition_triggered_email")."\r\n";
|
||||
$message .=
|
||||
getMLText("document").": ".$document->getName()."\r\n".
|
||||
getMLText("workflow").": ".$workflow->getName()."\r\n".
|
||||
getMLText("action").": ".$transition->getAction()->getName()."\r\n".
|
||||
getMLText("comment").": ".$_POST["comment"]."\r\n".
|
||||
getMLText("previous_state").": ".$transition->getState()->getName()."\r\n".
|
||||
getMLText("current_state").": ".$transition->getNextState()->getName()."\r\n".
|
||||
getMLText("user").": ".$user->getFullName()." <". $user->getEmail() ."> ";
|
||||
*/
|
||||
$subject = "transition_triggered_email_subject";
|
||||
$message = "transition_triggered_email_body";
|
||||
$params = array();
|
||||
|
@ -131,6 +127,14 @@ if($version->triggerWorkflowTransition($user, $transition, $_POST["comment"])) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['triggerWorkflowTransition'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['triggerWorkflowTransition'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'postTriggerWorkflowTransition')) {
|
||||
$hookObj->postTriggerWorkflowTransition(array('version'=>$version, 'transition'=>$transition, 'comment'=>$_POST["comment"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
add_log_line("?documentid=".$documentid."&version".$version_num);
|
||||
|
|
|
@ -143,7 +143,7 @@ $(document).ready(function() {
|
|||
?>
|
||||
<table class="table-condensed">
|
||||
<?php
|
||||
if(!$workflow->isUsed()) {
|
||||
if($workflow && !$workflow->isUsed()) {
|
||||
?>
|
||||
<tr><td></td><td><a class="standardText btn" href="../out/out.RemoveWorkflow.php?workflowid=<?php print $workflow->getID();?>"><i class="icon-remove"></i> <?php printMLText("rm_workflow");?></a></td></tr>
|
||||
<?php
|
||||
|
@ -288,7 +288,6 @@ $(document).ready(function() {
|
|||
function form() { /* {{{ */
|
||||
$selworkflow = $this->params['selworkflow'];
|
||||
|
||||
if($selworkflow)
|
||||
$this->showWorkflowForm($selworkflow);
|
||||
} /* }}} */
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user