Skip to content

Commit 8aaa37e

Browse files
committedSep 18, 2012
Fix a bug in the EMS related to showing badge data when the badge data does not have related badge groups.
1 parent ca78e1d commit 8aaa37e

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed
 

‎docs/changelog/7.x.x.txt

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- fixed #12385: UTF-8 characters in Asset title break the Trash
99
- fixed ... and the same problem in the Clipboard
1010
- fixed: UpdateAssetSubscribers workflow activity ERRORs if the group cannot be found.
11+
- fixed: EMS has issues showing badges WITHOUT related badge groups.
1112

1213
7.10.26
1314
- fixed: Template diagnostics when called without a session asset.

‎lib/WebGUI/Asset/Wobject/EventManagementSystem.pm

+10-6
Original file line numberDiff line numberDiff line change
@@ -872,9 +872,11 @@ sub www_addTicketsToBadge {
872872
my $badge = WebGUI::Asset->new($session, $assetId, 'WebGUI::Asset::Sku::EMSBadge');
873873
if ( defined $badge ) {
874874
my @badgeGroups = split("\n",$badge->get('relatedBadgeGroups'));
875-
%badgeGroups = $db->buildHash(
876-
"SELECT badgeGroupId, ticketsPerBadge FROM EMSBadgeGroup WHERE badgeGroupId IN (" . $db->quoteAndJoin(\@badgeGroups) . ")",
877-
);
875+
if (@badgeGroups) {
876+
%badgeGroups = $db->buildHash(
877+
"SELECT badgeGroupId, ticketsPerBadge FROM EMSBadgeGroup WHERE badgeGroupId IN (" . $db->quoteAndJoin(\@badgeGroups) . ")",
878+
);
879+
}
878880
}
879881
}
880882

@@ -1909,9 +1911,11 @@ className='WebGUI::Asset::Sku::EMSTicket' and state='published' and revisionDate
19091911
my $badge = WebGUI::Asset->new($session, $assetId, 'WebGUI::Asset::Sku::EMSBadge');
19101912
if ( defined $badge ) {
19111913
my @badgeGroups = split("\n",$badge->get('relatedBadgeGroups'));
1912-
%badgeGroups = $db->buildHash(
1913-
"SELECT badgeGroupId, ticketsPerBadge FROM EMSBadgeGroup WHERE badgeGroupId IN (" . $db->quoteAndJoin(\@badgeGroups) . ")",
1914-
);
1914+
if (@badgeGroups) {
1915+
%badgeGroups = $db->buildHash(
1916+
"SELECT badgeGroupId, ticketsPerBadge FROM EMSBadgeGroup WHERE badgeGroupId IN (" . $db->quoteAndJoin(\@badgeGroups) . ")",
1917+
);
1918+
}
19151919
}
19161920
}
19171921

0 commit comments

Comments
 (0)
Please sign in to comment.