| Line 831... |
Line 831... |
| 831 |
$user->{$limitkey} = signUpCount('get', $user->{RCid}, $dept);
|
831 |
$user->{$limitkey} = signUpCount('get', $user->{RCid}, $dept);
|
| 832 |
}
|
832 |
}
|
| Line 833... |
Line 833... |
| 833 |
|
833 |
|
| 834 |
if ($shifttype eq "game") {
|
834 |
if ($shifttype eq "game") {
|
| 835 |
# if ($t->{gtype} !~ /^selected/ and $t->{gtype} ne "short track" and $user->{$limitkey} < $limit) {
|
835 |
# if ($t->{gtype} !~ /^selected/ and $t->{gtype} ne "short track" and $user->{$limitkey} < $limit) {
|
| - |
|
836 |
if ($t->{gtype} eq "full length" and ($dept eq "OFF" or $dept eq "ANN")) {
|
| 836 |
# if ($t->{gtype} eq "full length" and $dept eq "OFF") {
|
837 |
my $table = $dept eq "OFF" ? "v_shift_officiating" : "v_shift_announcer";
|
| 837 |
# my ($full_length_count) = $dbh->selectrow_array ("select count(*) from v_shift_officiating where RCid = ? and gtype = 'full length' and date > '2023-01-01'", undef, $user->{RCid});
|
838 |
my ($full_length_count) = $dbh->selectrow_array ("select count(*) from $table where RCid = ? and gtype = 'full length' and year(date) = year(now())", undef, $user->{RCid});
|
| 838 |
# if ($full_length_count >= 3) {
|
839 |
if ($full_length_count >= getSetting ("MAX_FULL_LENGTH_SIGNUP_".$dept)) {
|
| 839 |
# return 0;
|
840 |
return 0;
|
| 840 |
# }
|
841 |
}
|
| 841 |
# }
|
842 |
}
|
| 842 |
if (lc $t->{signup} ne "selected" and $user->{$limitkey} < $limit) {
|
843 |
if (lc $t->{signup} ne "selected" and $user->{$limitkey} < $limit) {
|
| 843 |
return 1;
|
844 |
return 1;
|
| 844 |
} else {
|
845 |
} else {
|
| 845 |
return 0;
|
846 |
return 0;
|