Skip to content

Commit

Permalink
Have getCurrentMemberCount cope with dissolution.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Jun 4, 2024
1 parent c3be1dc commit cd03923
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion classes/Party.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ public function __construct($name) {
}

public function getCurrentMemberCount($house) {
$dissolution = Dissolution::dates();
if (isset($dissolution[$house])) {
$date = $dissolution[$house];
} else {
$date = date('Y-m-d');
}
$member_count = $this->db->query(
"SELECT count(*) as num_members
FROM member
Expand All @@ -39,7 +45,7 @@ public function getCurrentMemberCount($house) {
array(
':party' => $this->name,
':house' => $house,
':date' => date('Y-m-d'),
':date' => $date,
)
)->first();
if ($member_count) {
Expand Down

0 comments on commit cd03923

Please sign in to comment.