Skip to content
Snippets Groups Projects

Dev#31762 workflow notifications 2 notifications aussi pour les statuts de workflow personnalises

Compare and
+ 117
38
Preferences
Compare changes
Files
@@ -321,15 +321,17 @@ class Admin_CmsController extends ZendAfi_Controller_Action {
protected function prepareBodyMail($article, $message) {
$replacements =
['TITRE_ARTICLE' => $article->getTitre(),
'URL_ARTICLE' => $this->view->absoluteUrl($article->getUrl(), null, true),
'AUTHOR_ARTICLE' => $article->getNomCompletAuteur(),
'SAVED_BY_ARTICLE' => $this->identity->getNomComplet(),
'NEXT_STATUS_ARTICLE' => $article->getNextWorkflowStatusLabel(),
'STATUS_ARTICLE' => $article->getStatusLabel()];
return
str_replace(['TITRE_ARTICLE', 'URL_ARTICLE', 'AUTHOR_ARTICLE', 'SAVED_BY_ARTICLE'],
[
$article->getTitre(),
$this->view->absoluteUrl($article->getUrl(), null, true),
$article->getNomCompletAuteur(),
$this->identity->getNomComplet(),
],
str_replace(array_keys($replacements),
array_values($replacements),
$message);
}
@@ -366,7 +368,7 @@ class Admin_CmsController extends ZendAfi_Controller_Action {
protected function _getValidatorsMail($article) {
return array_unique(
Class_Permission::getWorkflow(Class_Article::STATUS_VALIDATED)
Class_Permission::getWorkflow($article->getNextWorkflowStatus())
->getUsersOnModel($article->getCategorie())
->collect('mail')
->getArrayCopy());