remove duplicate of sendRequestWorkflowActionMail()

This commit is contained in:
Uwe Steinmann 2021-08-30 16:00:51 +02:00
parent 567488cab9
commit 0ac0ca5760

View File

@ -145,39 +145,6 @@ class SeedDMS_NotificationService {
return $error; return $error;
} /* }}} */ } /* }}} */
/**
* This notification is sent when a workflow action is needed.
*/
public function sendRequestWorkflowActionMail($content, $user) { /* {{{ */
$document = $content->getDocument();
$folder = $document->getFolder();
/* Send mail only if enabled in the configuration */
if($this->settings->_enableNotificationWorkflow && ($workflow = $content->getWorkflow())) {
$subject = "request_workflow_action_email_subject";
$message = "request_workflow_action_email_body";
$params = array();
$params['name'] = $document->getName();
$params['version'] = $content->getVersion();
$params['workflow'] = $workflow->getName();
$params['folder_path'] = $folder->getFolderPathPlain();
$params['current_state'] = $workflow->getInitState()->getName();
$params['username'] = $user->getFullName();
$params['sitename'] = $this->settings->_siteName;
$params['http_root'] = $this->settings->_httpRoot;
$params['url'] = getBaseUrl().$this->settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
foreach($workflow->getNextTransitions($workflow->getInitState()) as $ntransition) {
foreach($ntransition->getUsers() as $tuser) {
$this->toIndividual($user, $tuser->getUser(), $subject, $message, $params, SeedDMS_NotificationService::RECV_WORKFLOW);
}
foreach($ntransition->getGroups() as $tuser) {
$this->toGroup($user, $tuser->getGroup(), $subject, $message, $params, SeedDMS_NotificationService::RECV_WORKFLOW);
}
}
}
} /* }}} */
/** /**
* This notification is sent when a review or approval is needed. * This notification is sent when a review or approval is needed.
*/ */