comparison msite.inc.php @ 103:c6b9041078ec

Add hard limit option for attendees, and add feature of using "0" to disable hard and soft limit completely.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 21 Oct 2013 14:52:06 +0300
parents 2169c3177f47
children 9a3f0ba4d72b
comparison
equal deleted inserted replaced
102:53b35cb4111b 103:c6b9041078ec
524 return FALSE; 524 return FALSE;
525 } 525 }
526 } 526 }
527 527
528 528
529 function stCheckRegistrationAvailable()
530 {
531 global $maxAttendeesHard, $maxAttendeesSoft, $numAttendees;
532
533 $maxAttendeesHard = stGetSetting("maxAttendeesHard");
534 $maxAttendeesSoft = stGetSetting("maxAttendeesSoft");
535 if (($numAttendees = stFetchSQLColumn("SELECT COUNT(*) FROM attendees")) === FALSE)
536 $numAttendees = 0;
537
538 return stChkSetting("allowRegister") && ($maxAttendeesHard <= 0 || $numAttendees < $maxAttendeesHard);
539 }
529 ?> 540 ?>