From 50d2f00d45524d1e4abeb912888aa4f172729778 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 --- 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 2c8e6c2ecc..96029dced0 100755 --- a/misc/cronjobs/advance_notices.pl +++ b/misc/cronjobs/advance_notices.pl @@ -203,7 +203,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