fixed perm check. also, if no count is provided, falls back to configured max
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 15 Sep 2008 16:55:23 +0000 (16:55 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 15 Sep 2008 16:55:23 +0000 (16:55 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10595 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 3748feb..3d6f3d0 100644 (file)
@@ -616,8 +616,9 @@ sub view_circs {
             $copy->circ_lib : $copy->call_number->owning_lib);
         
     my $max_history = $U->ou_ancestor_setting_value(
-        $user->home_ou, 'circ.item_checkout_history.max', $e);
-    $count = ($max_history and $max_history < $count) ? $max_history : $count;
+        $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;