Bugzilla – Attachment 96048 Details for
Bug 24183
Introduce `before_send_messages` hook
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24183: Add before_send_messages hook
Bug-24183-Add-beforesendmessages-hook.patch (text/plain), 1.44 KB, created by
Martin Renvoize (ashimema)
on 2019-12-05 17:45:55 UTC
(
hide
)
Description:
Bug 24183: Add before_send_messages hook
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-12-05 17:45:55 UTC
Size:
1.44 KB
patch
obsolete
>From 165979d87fef0ec18d70d6b3a4bb7797c808794c Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 5 Dec 2019 17:42:50 +0000 >Subject: [PATCH] Bug 24183: Add before_send_messages hook > >This patch adds a simple hook to the process_message_queue cronjob >to allow plugins to pre-process messages in the messaging queue before >they are sent. >--- > misc/cronjobs/process_message_queue.pl | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) > >diff --git a/misc/cronjobs/process_message_queue.pl b/misc/cronjobs/process_message_queue.pl >index 0532a5b899..a9191f406d 100755 >--- a/misc/cronjobs/process_message_queue.pl >+++ b/misc/cronjobs/process_message_queue.pl >@@ -70,11 +70,28 @@ die $usage if $help; > > cronlogaction(); > >+if ( C4::Context->preference('UseKohaPlugins') && C4::Context->config("enable_plugins") ) { >+ my @plugins = Koha::Plugins->new->GetPlugins({ >+ method => 'before_send_messages', >+ }); >+ >+ if (@plugins) { >+ foreach my $plugin ( @plugins ) { >+ try { >+ $plugin->before_send_messages(); >+ } >+ catch { >+ warn "$_"; >+ }; >+ } >+ } >+} >+ > C4::Letters::SendQueuedMessages( > { > verbose => $verbose, > username => $username, >- password => $password, >+ password => $password, > method => $method, > limit => $limit, > type => $type, >-- >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 24183
:
96048
|
102079
|
103463