Skip to content

Commit

Permalink
[4.2] Workflow Notification no recipient (#37747)
Browse files Browse the repository at this point in the history
* [4.1] Workflow Notification no recipient

* cs

* Phase 1 convert BRANCH to PSR-12

* Phase 2 convert BRANCH to PSR-12
  • Loading branch information
brianteeman authored Jul 3, 2022
1 parent fd3dbc9 commit 81da883
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions administrator/language/en-GB/plg_workflow_notification.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ PLG_WORKFLOW_NOTIFICATION_ADDTEXT_DESC="This text will be sent: Title [title], c
PLG_WORKFLOW_NOTIFICATION_ADDTEXT_LABEL="Additional Message Text"
PLG_WORKFLOW_NOTIFICATION_ON_TRANSITION_MSG="Title: %1$s. Transition \"%2$s\" performed by %3$s. New state: %4$s."
PLG_WORKFLOW_NOTIFICATION_ON_TRANSITION_SUBJECT="The status of \"%s\" has been changed"
PLG_WORKFLOW_NOTIFICATION_NO_RECEIVER="No notifications sent as there are no users to send this message to."
PLG_WORKFLOW_NOTIFICATION_NO_TITLE="Unknown title"
PLG_WORKFLOW_NOTIFICATION_RECEIVERS_LABEL="Users"
PLG_WORKFLOW_NOTIFICATION_SENDMAIL_LABEL="Send Notification"
Expand Down
2 changes: 2 additions & 0 deletions plugins/workflow/notification/notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ public function onWorkflowAfterTransition(WorkflowTransitionEvent $event)

// If there are no receivers, stop here
if (empty($userIds)) {
$this->app->enqueueMessage(Text::_('PLG_WORKFLOW_NOTIFICATION_NO_RECEIVER'), 'error');

return;
}

Expand Down

0 comments on commit 81da883

Please sign in to comment.