diff --git a/docs/upgrades/upgrade_7.5.10-7.5.11.pl b/docs/upgrades/upgrade_7.5.10-7.5.11.pl index 0d43ae115..db0fae72a 100644 --- a/docs/upgrades/upgrade_7.5.10-7.5.11.pl +++ b/docs/upgrades/upgrade_7.5.10-7.5.11.pl @@ -456,6 +456,15 @@ sub upgradeEMS { } } } + $db->write("drop table EventManagementSystem_badges"); + $db->write("drop table EventManagementSystem_discountPasses"); + $db->write("drop table EventManagementSystem_metaData"); + $db->write("drop table EventManagementSystem_prerequisiteEvents"); + $db->write("drop table EventManagementSystem_prerequisites"); + $db->write("drop table EventManagementSystem_products"); + $db->write("drop table EventManagementSystem_purchases"); + $db->write("drop table EventManagementSystem_registrations"); + $db->write("drop table EventManagementSystem_sessionPurchaseRef"); } #------------------------------------------------- @@ -565,6 +574,8 @@ sub convertTransactionLog { }, $oldItem->{itemId}); } } + $db->write("drop table oldtransaction"); + $db->write("drop table oldtransactionitem"); } #------------------------------------------------- diff --git a/lib/WebGUI/Asset/Wobject/Shelf.pm b/lib/WebGUI/Asset/Wobject/Shelf.pm index 6533173bd..ac5fce202 100644 --- a/lib/WebGUI/Asset/Wobject/Shelf.pm +++ b/lib/WebGUI/Asset/Wobject/Shelf.pm @@ -82,19 +82,26 @@ sub view { my $session = $self->session; # get other shelves - my @children = (); + my @childShelves = (); foreach my $child (@{$self->getLineage(['children'],{returnObjects=>1,includeOnlyClasses=>['WebGUI::Asset::Wobject::Shelf']})}) { my $properties = $child->get; $child->{url} = $self->getUrl; - push @children, $child; + push @childShelves, $child; + } + + # get other child skus + my @childSkus = (); + foreach my $child (@{$self->getLineage(['children'],{includeOnlyClasses=>['WebGUI::Asset::Wobject::Shelf']})}) { + my $properties = $child->get; + $child->{url} = $self->getUrl; + push @childSkus, $child; } # find products based upon keywords my @keywords = $self->get('keywords'); - my $p = WebGUI::Keyword->new($session)->getMatchingAssets({ + my $keywordBasedAsssetIds = WebGUI::Keyword->new($session)->getMatchingAssets({ matchAssetKeywords => $self, isa => 'WebGUI::Asset::Sku', - usePaginator => 1, }); $p->setBaseUrl($self->getUrl('func=view')); @@ -115,7 +122,7 @@ sub view { } } my %var = ( - shelves => \@children, + shelves => \@childShelves, products => \@skus, ); $p->appendTemplateVars(\%var); diff --git a/lib/WebGUI/Keyword.pm b/lib/WebGUI/Keyword.pm index 75bb6ce20..0075c1868 100644 --- a/lib/WebGUI/Keyword.pm +++ b/lib/WebGUI/Keyword.pm @@ -234,6 +234,7 @@ sub getMatchingAssets { push @placeholders, '?'; push @params, $word; } + next unless scalar @placeholders; push @clauses, 'keyword in ('.join(',', @placeholders).')'; } diff --git a/lib/WebGUI/Paginator.pm b/lib/WebGUI/Paginator.pm index 1c54e8d1d..bbf7c0fe9 100644 --- a/lib/WebGUI/Paginator.pm +++ b/lib/WebGUI/Paginator.pm @@ -709,7 +709,7 @@ sub setDataByQuery { ($self->{_totalRows}) = $dbh->quickArray("select found_rows()"); $self->{_columnNames} = [ $sth->getColumnNames ]; - my @row; + my @row = (); while (my $data = $sth->hashRef) { push(@row,$data); }