fix
This commit is contained in:
parent
231d8afb0b
commit
8ce485c770
1 changed files with 3 additions and 4 deletions
|
|
@ -262,12 +262,11 @@ sub addToScratchCart {
|
|||
return undef unless $isApproved;
|
||||
if (scalar(@eventsInCart) == 0) {
|
||||
# the cart is empty, so check if this is a master event or not.
|
||||
my ($isChild) = $self->session->db->quickArray("select productId from EventManagementSystem_products where productId = ? and (prerequisiteId is NULL or prerequisiteId = '')",[$event]);
|
||||
return undef if $isChild;
|
||||
my ($isParent) = $self->session->db->quickArray("select productId from EventManagementSystem_products where productId = ? and (prerequisiteId is not NULL and prerequisiteId != '')",[$event]);
|
||||
return undef unless $isParent;
|
||||
$self->session->scratch->set('currentMainEvent',$event);
|
||||
push(@eventsInCart, $event) unless isIn($event,@eventsInCart);
|
||||
|
||||
$self->session->scratch->set('EMS_scratch_cart', join("\n", @eventsInCart));
|
||||
$self->session->scratch->set('EMS_scratch_cart', $event);
|
||||
return $event;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue