Skip to content

Commit

Permalink
Fix a bug in the EMS related to showing badge data when the badge dat…
Browse files Browse the repository at this point in the history
…a does not have related badge groups.
  • Loading branch information
perlDreamer committed Sep 18, 2012
1 parent ca78e1d commit 8aaa37e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/changelog/7.x.x.txt
Expand Up @@ -8,6 +8,7 @@
- fixed #12385: UTF-8 characters in Asset title break the Trash
- fixed ... and the same problem in the Clipboard
- fixed: UpdateAssetSubscribers workflow activity ERRORs if the group cannot be found.
- fixed: EMS has issues showing badges WITHOUT related badge groups.

7.10.26
- fixed: Template diagnostics when called without a session asset.
Expand Down
16 changes: 10 additions & 6 deletions lib/WebGUI/Asset/Wobject/EventManagementSystem.pm
Expand Up @@ -872,9 +872,11 @@ sub www_addTicketsToBadge {
my $badge = WebGUI::Asset->new($session, $assetId, 'WebGUI::Asset::Sku::EMSBadge');
if ( defined $badge ) {
my @badgeGroups = split("\n",$badge->get('relatedBadgeGroups'));
%badgeGroups = $db->buildHash(
"SELECT badgeGroupId, ticketsPerBadge FROM EMSBadgeGroup WHERE badgeGroupId IN (" . $db->quoteAndJoin(\@badgeGroups) . ")",
);
if (@badgeGroups) {
%badgeGroups = $db->buildHash(
"SELECT badgeGroupId, ticketsPerBadge FROM EMSBadgeGroup WHERE badgeGroupId IN (" . $db->quoteAndJoin(\@badgeGroups) . ")",
);
}
}
}

Expand Down Expand Up @@ -1909,9 +1911,11 @@ className='WebGUI::Asset::Sku::EMSTicket' and state='published' and revisionDate
my $badge = WebGUI::Asset->new($session, $assetId, 'WebGUI::Asset::Sku::EMSBadge');
if ( defined $badge ) {
my @badgeGroups = split("\n",$badge->get('relatedBadgeGroups'));
%badgeGroups = $db->buildHash(
"SELECT badgeGroupId, ticketsPerBadge FROM EMSBadgeGroup WHERE badgeGroupId IN (" . $db->quoteAndJoin(\@badgeGroups) . ")",
);
if (@badgeGroups) {
%badgeGroups = $db->buildHash(
"SELECT badgeGroupId, ticketsPerBadge FROM EMSBadgeGroup WHERE badgeGroupId IN (" . $db->quoteAndJoin(\@badgeGroups) . ")",
);
}
}
}

Expand Down

0 comments on commit 8aaa37e

Please sign in to comment.