From f1a61f68ac7880df4e62f67b7fd766f56f65541d Mon Sep 17 00:00:00 2001 From: Mason James Date: Thu, 22 Sep 2011 21:35:43 +1200 Subject: [PATCH] Bug 6908 - increase DEBUG level for *NOISY* Dates.pm init() messages Content-Type: text/plain; charset="utf-8" http://koha-community.org --- C4/Dates.pm | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/C4/Dates.pm b/C4/Dates.pm index 335de1c..1430004 100644 --- a/C4/Dates.pm +++ b/C4/Dates.pm @@ -167,8 +167,11 @@ sub init ($;$$) { $self->{'dateformat'} = $dformat = ( scalar(@_) >= 2 ) ? $_[1] : _prefformat(); ( $format_map{$dformat} ) or croak "Invalid date format '$dformat' from " . ( ( scalar(@_) >= 2 ) ? 'argument' : 'system preferences' ); $self->{'dmy_arrayref'} = [ ( (@_) ? $self->dmy_map(shift) : localtime ) ]; - $debug and warn "(during init) \@\$self->{'dmy_arrayref'}: " . join( ' ', @{ $self->{'dmy_arrayref'} } ) . "\n"; - return $self; + + if ($debug > 1) { + warn "(during init) \@\$self->{'dmy_arrayref'}: " . join( ' ', @{ $self->{'dmy_arrayref'} } ) . "\n"; + return $self; + } } sub output ($;$) { -- 1.7.1