so visitors never see a badge selector.
This commit is contained in:
parent
44e03d36e5
commit
08b45ca68e
1 changed files with 6 additions and 1 deletions
|
|
@ -768,6 +768,10 @@ sub getBadgeSelector {
|
|||
if ($isAdmin) {
|
||||
# all badges in the system.
|
||||
$badges = $self->session->db->buildHashRef("select badgeId, CONCAT(lastName,', ',firstName) from EventManagementSystem_badges order by lastName");
|
||||
} elsif ($me eq '1') {
|
||||
#none
|
||||
$badges = {};
|
||||
%options = ();
|
||||
} else {
|
||||
#badges we have purchased.
|
||||
$badges = $self->session->db->buildHashRef("select b.badgeId, CONCAT(b.lastName,', ',b.firstName) from EventManagementSystem_badges as b where b.userId='".$me."' or b.createdByUserId='".$me."' order by b.lastName");
|
||||
|
|
@ -801,7 +805,8 @@ sub getBadgeSelector {
|
|||
name => 'badgeId',value=>$addBadgeId
|
||||
}) : '');
|
||||
|
||||
return $js.$output;
|
||||
return $js.$output if scalar(keys(%options));
|
||||
return '';
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue