Bug 13287: Remove warning if --days is not passed and pref empty
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 26 Feb 2018 16:01:05 +0000 (13:01 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 26 Feb 2018 16:24:46 +0000 (13:24 -0300)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
misc/cronjobs/purge_suggestions.pl

index 543d629..766f501 100755 (executable)
@@ -62,7 +62,7 @@ $days = C4::Context->preference('PurgeSuggestionsOlderThan') if !defined($days);
 if( !$confirm || $help || !defined($days) ) {
     print "No confirm parameter passed!\n\n" if !$confirm && !$help;
     print $usage;
-} elsif( $days > 0 ) {
+} elsif( $days and $days > 0 ) {
     cronlogaction();
     DelSuggestionsOlderThan($days);
 } else {