if no max is configured and no valid count from the SC, default to 4, which was the...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 16 Oct 2008 19:04:09 +0000 (19:04 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 16 Oct 2008 19:04:09 +0000 (19:04 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10851 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ.pm

index 6881081..3fe64b4 100644 (file)
@@ -606,9 +606,11 @@ sub view_circs {
     my $max_history = $U->ou_ancestor_setting_value(
         $e->requestor->ws_ou, 'circ.item_checkout_history.max', $e);
 
-    $count = $max_history if $max_history and (!$count or $count > $max_history);
-
-       return [] unless $count;
+    if(defined $max_history) {
+        $count = $max_history unless defined $count and $count < $max_history;
+    } else {
+        $count = 4 unless defined $count;
+    }
 
     return $e->search_action_circulation([
         {target_copy => $copyid},