Bugzilla – Attachment 126090 Details for
Bug 28474
Pass process_message_queue.pl params to before_send_messages plugin hooks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28474: Pass process_message_queue.pl params to before_send_messages plugin hooks
Bug-28474-Pass-processmessagequeuepl-params-to-bef.patch (text/plain), 2.01 KB, created by
Andrew Fuerste-Henry
on 2021-10-12 14:45:16 UTC
(
hide
)
Description:
Bug 28474: Pass process_message_queue.pl params to before_send_messages plugin hooks
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2021-10-12 14:45:16 UTC
Size:
2.01 KB
patch
obsolete
>From d55e538a3cc3107228f0998745ab31ca688ad3c0 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 27 May 2021 09:53:01 -0400 >Subject: [PATCH] Bug 28474: Pass process_message_queue.pl params to > before_send_messages plugin hooks > >It would be useful to send most of the process_message_queue.pl script parameters to any plugin before_send_messages hooks. For example, the Twilio Voice plugin uses before_send_messages to send phone messages, but if the script is called with "-t email", it doesn't know and will make phone calls! If that info were passed in, the plugin could be made aware of it and only make calls if no "-t" or a "-t phone" were set in the parameters. > >Test Plan: >1) Apply this patch >2) Install Kitchen Sink plugin v2.2.0 or later > https://github.com/bywatersolutions/dev-koha-plugin-kitchen-sink/releases/download/v2.2.0/dev-koha-plugin-kitchen-sink-2.2.0.kpz >3) Run misc/cronjobs/process_message_queue.pl with any or all non-email > related paramters >4) Note the plugin output shows the parameters were passed to the plugin > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >--- > misc/cronjobs/process_message_queue.pl | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/misc/cronjobs/process_message_queue.pl b/misc/cronjobs/process_message_queue.pl >index 5ad1b2f79b..79f09357bf 100755 >--- a/misc/cronjobs/process_message_queue.pl >+++ b/misc/cronjobs/process_message_queue.pl >@@ -82,7 +82,14 @@ if ( C4::Context->config("enable_plugins") ) { > if (@plugins) { > foreach my $plugin ( @plugins ) { > try { >- $plugin->before_send_messages(); >+ $plugin->before_send_messages( >+ { >+ verbose => $verbose, >+ limit => $limit, >+ type => $type, >+ letter_code => $letter_code, >+ } >+ ); > } > catch { > warn "$_"; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28474
:
121452
|
126090
|
127199