summaryrefslogtreecommitdiff
path: root/rhimport.pm
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2010-03-29 07:37:15 (GMT)
committerChristian Pointner <equinox@helsinki.at>2010-03-29 07:37:15 (GMT)
commit8906b9a5e8f87af82b67e6b98f60503d4b3f484c (patch)
tree8f7a43fe0e3f2bb831078aa0ed837b3571a76328 /rhimport.pm
parentd6ff970c44ce7488f138a1cee3515b48c383d299 (diff)
sanity check for clear carts when in pool mode for single cart show
git-svn-id: https://svn.helsinki.at/rhimport/trunk@30 7c65635b-ec39-4f67-a626-873dbafdd612
Diffstat (limited to 'rhimport.pm')
-rw-r--r--rhimport.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/rhimport.pm b/rhimport.pm
index 4729969..333e61c 100644
--- a/rhimport.pm
+++ b/rhimport.pm
@@ -97,7 +97,12 @@ sub clear_carts
{
my $dbh = shift;
my $group = shift;
- my ($low_cart, $high_cart) = get_cart_range($dbh, $group);
+ my $to_cart = shift;
+
+ my ($low_cart, $high_cart) = ($to_cart, $to_cart);
+ if($to_cart == 0) {
+ ($low_cart, $high_cart) = get_cart_range($dbh, $group);
+ }
print "clearing Carts $low_cart - $high_cart\n";
my $cart = $low_cart;