[Koha-patches] [PATCH] Removed a buggy conditional if that resulted in an incorrect item status

David Birmingham dbirmingham at ptfs.com
Fri Jun 5 22:40:55 CEST 2009


Previous conditional check with if ($restype) is not needed because a true
result for one item will result in subsqeuent items defaulting to this true
value.
---
 C4/Items.pm |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/C4/Items.pm b/C4/Items.pm
index f47f9c8..595812c 100644
--- a/C4/Items.pm
+++ b/C4/Items.pm
@@ -1267,9 +1267,10 @@ sub GetItemsInfo {
 		if ( $datedue eq '' ) {
             my ( $restype, $reserves ) =
               C4::Reserves::CheckReserves( $data->{'itemnumber'} );
-            if ($restype) {
-                $count_reserves = $restype;
-            }
+# Previous conditional check with if ($restype) is not needed because a true
+# result for one item will result in subsequent items defaulting to this true
+# value.
+            $count_reserves = $restype;
         }
         $isth->finish;
         $ssth->finish;
-- 
1.5.6.5




More information about the Koha-patches mailing list