From 96a3e6b153e16e361d0f56fcf22bd2dc43763950 Mon Sep 17 00:00:00 2001 From: Hayley Pelham Date: Mon, 20 Sep 2021 04:23:11 +0000 Subject: [PATCH] Bug 29054: Add verbose check for warn in advance_notices.pl To test: 1) Set EnhancedMessagingPreferences to Don't allow 2) In the koha-shell, run misc/cronjobs/advance_notices.pl -c 3) Note that you see the warning "The "EnhancedMessagingPreferences" syspref is off... etc." 4) Apply the patch and restart services 5) In the koha-shell, run misc/cronjobs/advance_notices.pl -c and note the warning no longer shows 6) Still in the shell, run misc/cronjobs/advance_notices.pl -c -v and note the warning does show Sponsored-by: Catalyst IT Signed-off-by: Fridolin Somers Signed-off-by: Marcel de Rooy Signed-off-by: Fridolin Somers Signed-off-by: Kyle M Hall (cherry picked from commit f15c9462e30ce3b813a63bd395bc2f74ab9c309b) Signed-off-by: Andrew Fuerste-Henry --- misc/cronjobs/advance_notices.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl index f1df975c26..a018cd948f 100755 --- a/misc/cronjobs/advance_notices.pl +++ b/misc/cronjobs/advance_notices.pl @@ -213,7 +213,7 @@ pod2usage( -verbose => 2 ) if $man; # Since advance notice options are not visible in the web-interface # unless EnhancedMessagingPreferences is on, let the user know that # this script probably isn't going to do much -if ( ! C4::Context->preference('EnhancedMessagingPreferences') ) { +if ( ! C4::Context->preference('EnhancedMessagingPreferences') && $verbose ) { warn <<'END_WARN'; The "EnhancedMessagingPreferences" syspref is off. -- 2.39.5