JoomlaPolska / jezyk-J4

Język polski dla Joomla 4
GNU General Public License v2.0
3 stars 5 forks source link

[4.2] Workflow Notification no recipient #206

Closed joomlapl-bot closed 2 years ago

joomlapl-bot commented 2 years ago

PR w związku ze zmianą oryginału https://github.com/joomla/joomla-cms/pull/37747 Poniżej zmiany w oryginale:

Click to expand the diff! ```diff diff --git a/administrator/language/en-GB/plg_workflow_notification.ini b/administrator/language/en-GB/plg_workflow_notification.ini index 599caccdbdde..f6ee4e71faeb 100644 --- a/administrator/language/en-GB/plg_workflow_notification.ini +++ b/administrator/language/en-GB/plg_workflow_notification.ini @@ -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" diff --git a/plugins/workflow/notification/notification.php b/plugins/workflow/notification/notification.php index 8b58e2be5c76..b31c87463e4d 100644 --- a/plugins/workflow/notification/notification.php +++ b/plugins/workflow/notification/notification.php @@ -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; } ```