From 2c005a2c09a1fb466744539cf0592c7acdcf6ac3 Mon Sep 17 00:00:00 2001 From: konrad Date: Sat, 17 Nov 2007 18:15:16 +0000 Subject: [PATCH] add some paranoid resets git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@76 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- www/inc/cart.php | 1 + www/inc/event.php | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/www/inc/cart.php b/www/inc/cart.php index 68a20c2..7ebb0f3 100644 --- a/www/inc/cart.php +++ b/www/inc/cart.php @@ -153,6 +153,7 @@ class Cart if($this->cartid===false)return array(); $res=$db->select("cart_ticket","*","cartid=".$db->escapeString($this->cartid)); $ret=array(); + reset($res); if(count($res)>0) foreach($res as $k => $tc) $ret[]=new CartTicket($tc["cartid"],$tc["eventid"],$tc["amount"]); diff --git a/www/inc/event.php b/www/inc/event.php index 2e5cabc..1b6cd0a 100644 --- a/www/inc/event.php +++ b/www/inc/event.php @@ -138,6 +138,7 @@ class Event //get existing tickets $res=$db->select("ticket","status","eventid=".$db->escapeInt($this->evid)); $amt=0; + reset($res); if(count($res)>0) foreach($res as $tk){ if(!($tk["status"]&TICKET_CANCELLED))$amt++; -- 1.7.2.5