[open-ils-commits] r10851 -
trunk/Open-ILS/src/perlmods/OpenILS/Application
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Oct 16 15:04:13 EDT 2008
Author: erickson
Date: 2008-10-16 15:04:09 -0400 (Thu, 16 Oct 2008)
New Revision: 10851
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
Log:
if no max is configured and no valid count from the SC, default to 4, which was the previous default
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm 2008-10-16 19:03:06 UTC (rev 10850)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm 2008-10-16 19:04:09 UTC (rev 10851)
@@ -606,10 +606,12 @@
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);
+ if(defined $max_history) {
+ $count = $max_history unless defined $count and $count < $max_history;
+ } else {
+ $count = 4 unless defined $count;
+ }
- return [] unless $count;
-
return $e->search_action_circulation([
{target_copy => $copyid},
{limit => $count, order_by => { circ => "xact_start DESC" }}
More information about the open-ils-commits
mailing list