This commit is contained in:
Matthew Wilson 2006-05-10 01:22:19 +00:00
parent 3fe335f7d0
commit c5da0c8f30

View file

@ -260,10 +260,9 @@ sub addToScratchCart {
my @eventsInCart = split("\n",$self->session->scratch->get('EMS_scratch_cart'));
my ($isApproved) = $self->session->db->quickArray("select approved from EventManagementSystem_products where productId = ?",[$event]);
return undef unless $isApproved;
$self->session->errorHandler->warn("got here");
if (scalar(@eventsInCart) == 0) {
# the cart is empty, so check if this is a master event or not.
my ($isParent) = $self->session->db->quickArray("select productId from EventManagementSystem_products where productId = ? and (prerequisiteId is not NULL and prerequisiteId != '')",[$event]);
my ($isParent) = $self->session->db->quickArray("select productId from EventManagementSystem_products where productId = ? and (prerequisiteId is NULL or prerequisiteId = '')",[$event]);
return undef unless $isParent;
$self->session->scratch->set('currentMainEvent',$event);