From dec3f8ec70df17ed8f67a5bf706544989c429905 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 21 Jan 2014 09:28:24 +0100 Subject: [PATCH] Bug 10851: (follow-up) fix issues reported by QA script This patch fixes following warnings: FAIL C4/Serials.pm FAIL valid Useless use of a constant (43) in void context Useless use of a constant (41) in void context Useless use of a constant (44) in void context Useless use of a constant (42) in void context Useless use of a constant (4) in void context Signed-off-by: Katrin Fischer Signed-off-by: Galen Charlton --- C4/Serials.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index e745458b14..2fb639bb52 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -425,7 +425,7 @@ sub PrepareSerialsData { } } $subs->{ "status" . $subs->{'status'} } = 1; - if ( grep { $_ == $subs->{status} } ( 1, 3, 4, 41, 42, 43, 44, 7 ) ) { + if ( grep { $_ == $subs->{status} } qw( 1 3 4 41 42 43 44 7 ) ) { $subs->{"checked"} = 1; } @@ -1250,10 +1250,11 @@ sub ModSerialStatus { if ( $status == 2 || ($oldstatus == 2 && $status != 2) ) { _update_receivedlist($subscriptionid); } - if( grep { $_ == $status } ( 4, 41, 42, 43, 44, 5 ) + my @missing_statuses = qw( 4 41 42 43 44 ); + if ( ( grep { $_ == $status } ( @missing_statuses, 5 ) ) || ( - grep { $_ == $oldstatus } ( 4, 41, 42, 43, 44 ) - && ! grep { $_ == $status } ( 4, 41, 42, 43, 44 ) ) + ( grep { $_ == $oldstatus } @missing_statuses ) + && ! ( grep { $_ == $status } @missing_statuses ) ) || ($oldstatus == 5 && $status != 5)) { _update_missinglist($subscriptionid); } -- 2.39.5