Whoops! the last commit was for this file - not the scheduler.. DOH

BUGFIX From Just Reardon:
If specialawardnomination is set to "none" (fair doesnt use special award self-nominations) then the pick winners page will instead show all projects that are eligible for the award to choose a winner, instead of those that are nominated for it (which is none).
This commit is contained in:
james 2006-01-26 15:06:56 +00:00
parent fefd9c8e35
commit 7076b17366

View File

@ -169,31 +169,42 @@ function getProjectsNominatedForSpecialAward($award_id)
{ {
global $config; global $config;
$prjq=mysql_query("SELECT //if they dont use special award nominations, then we will instead get all of the projects that
projects.projectnumber, //are eligible for the award, instead of nominated for it.
projects.title, if($config['specialawardnomination']!="none")
projects.id AS projects_id
FROM
project_specialawards_link,
projects
WHERE
project_specialawards_link.award_awards_id='$award_id'
AND project_specialawards_link.projects_id=projects.id
AND projects.projectnumber is not null
AND projects.year='".$config['FAIRYEAR']."'
ORDER BY
projectnumber
");
$projects=array();
while($prjr=mysql_fetch_object($prjq))
{ {
$projects[$prjr->projectnumber]=array( $prjq=mysql_query("SELECT
"id"=>$prjr->projects_id, projects.projectnumber,
"projectnumber"=>$prjr->projectnumber, projects.title,
"title"=>$prjr->title projects.id AS projects_id
); FROM
project_specialawards_link,
projects
WHERE
project_specialawards_link.award_awards_id='$award_id'
AND project_specialawards_link.projects_id=projects.id
AND projects.projectnumber is not null
AND projects.year='".$config['FAIRYEAR']."'
ORDER BY
projectnumber
");
$projects=array();
while($prjr=mysql_fetch_object($prjq))
{
$projects[$prjr->projectnumber]=array(
"id"=>$prjr->projects_id,
"projectnumber"=>$prjr->projectnumber,
"title"=>$prjr->title
);
}
//return the projects that have self-nominated themselves for the award
return $projects;
}
else
{
//return the projects that are eligible for the award instead
return getProjectsEligibleForAward($award_id);
} }
return $projects;
} }
function getSpecialAwardsNominatedByRegistrationID($id) function getSpecialAwardsNominatedByRegistrationID($id)