mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-16 01:59:16 +00:00
pass document status to notification
This commit is contained in:
parent
c524add775
commit
531e11ce57
|
@ -97,6 +97,7 @@ if(!$controller->run()) {
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText($controller->getErrorMsg()));
|
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText($controller->getErrorMsg()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$newdocstatus = $content->getStatus();
|
||||||
if ($_POST["revisionType"] == "ind" || $_POST["revisionType"] == "grp") {
|
if ($_POST["revisionType"] == "ind" || $_POST["revisionType"] == "grp") {
|
||||||
if($notifier) {
|
if($notifier) {
|
||||||
$nl=$document->getNotifyList();
|
$nl=$document->getNotifyList();
|
||||||
|
@ -121,7 +122,6 @@ if ($_POST["revisionType"] == "ind" || $_POST["revisionType"] == "grp") {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Send notification about status change only if status has actually changed */
|
/* Send notification about status change only if status has actually changed */
|
||||||
$newdocstatus = $content->getStatus();
|
|
||||||
if($olddocstatus['status'] != $newdocstatus['status']) {
|
if($olddocstatus['status'] != $newdocstatus['status']) {
|
||||||
// Send notification to subscribers.
|
// Send notification to subscribers.
|
||||||
if($notifier) {
|
if($notifier) {
|
||||||
|
@ -131,7 +131,8 @@ if($olddocstatus['status'] != $newdocstatus['status']) {
|
||||||
$params = array();
|
$params = array();
|
||||||
$params['name'] = $document->getName();
|
$params['name'] = $document->getName();
|
||||||
$params['folder_path'] = $folder->getFolderPathPlain();
|
$params['folder_path'] = $folder->getFolderPathPlain();
|
||||||
$params['status'] = getRevisionStatusText(S_REJECTED);
|
$params['status'] = getOverallStatusText($newdocstatus['status']);
|
||||||
|
$params['new_status_code'] = $newdocstatus['status'];
|
||||||
$params['username'] = $user->getFullName();
|
$params['username'] = $user->getFullName();
|
||||||
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
$params['url'] = getBaseUrl().$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$document->getID();
|
||||||
$params['sitename'] = $settings->_siteName;
|
$params['sitename'] = $settings->_siteName;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user