- Fix volunteer reports to only show volunteers

- Also, show volunteers that haven't signed up for anything yet
This commit is contained in:
dave 2009-02-02 06:34:40 +00:00
parent f83a04ab04
commit 760b84f6ac

View File

@ -94,12 +94,6 @@ $report_volunteers_fields = array(
'table' => 'volunteer_positions.name', 'table' => 'volunteer_positions.name',
'components' => array('signup')), 'components' => array('signup')),
/* 'language' => array(
'name' => 'Project -- Language',
'header' => 'Lang',
'width' => 1.00,
'table' => 'projects.language' ),
*/
'fair_year' => array ( 'fair_year' => array (
'name' => 'Fair -- Year', 'name' => 'Fair -- Year',
'header' => 'Year', 'header' => 'Year',
@ -135,14 +129,14 @@ $report_volunteers_fields = array(
ON (users.id=volunteer_positions_signup.users_id) ON (users.id=volunteer_positions_signup.users_id)
LEFT JOIN volunteer_positions LEFT JOIN volunteer_positions
ON (volunteer_positions_signup.volunteer_positions_id=volunteer_positions.id)"; ON (volunteer_positions_signup.volunteer_positions_id=volunteer_positions.id)";
$signup_where = "AND volunteer_positions_signup.year = '$year'"; $signup_where = "AND (volunteer_positions_signup.year = '$year' OR volunteer_positions_signup.year IS NULL)";
} }
$q = " FROM $q = " FROM
users users
$signup_join $signup_join
WHERE WHERE
users.complete='yes' users.types LIKE '%volunteer%'
$signup_where $signup_where
"; ";