forked from science-ation/science-ation
revert 2052. It was causing the AC script to show all award that the selected categories were ELIGIBLE for, rather than all awards won by a selected category. This causes an award available to a junior and senior to appear in both scripts regardless of who won it, rather than only in the script of the project category that won the award.
This commit is contained in:
parent
bb1823b2db
commit
4d67f395f3
@ -24,7 +24,11 @@
|
||||
if(is_array($_GET['show_category'])) {
|
||||
$show_category = array();
|
||||
foreach($_GET['show_category'] as $id=>$val) {
|
||||
$show_category[] = "award_awards_projectcategories.projectcategories_id='$id'";
|
||||
$show_category[] = "projects.projectcategories_id='$id'";
|
||||
}
|
||||
if($show_unawarded_prizes=="yes")
|
||||
{
|
||||
$show_category[] = "projects.projectcategories_id IS NULL";
|
||||
}
|
||||
$and_categories = join(' OR ', $show_category);
|
||||
} else {
|
||||
@ -64,18 +68,14 @@ if(!$scriptformat) $scriptformat="default";
|
||||
FROM
|
||||
award_awards,
|
||||
award_types,
|
||||
sponsors,
|
||||
award_awards_projectcategories
|
||||
sponsors
|
||||
WHERE
|
||||
award_awards.year='$foryear'
|
||||
AND award_types.year='$foryear'
|
||||
AND award_awards.award_types_id=award_types.id
|
||||
AND award_awards.sponsors_id=sponsors.id
|
||||
AND award_awards.id=award_awards_projectcategories.award_awards_id
|
||||
AND award_awards.excludefromac='0'
|
||||
AND ($and_categories)
|
||||
$awardtype
|
||||
GROUP BY award_awards.id
|
||||
ORDER BY awards_order");
|
||||
|
||||
echo mysql_error();
|
||||
@ -107,6 +107,7 @@ if(!$scriptformat) $scriptformat="default";
|
||||
award_awards_id='{$r->id}'
|
||||
AND award_prizes.year='$foryear'
|
||||
AND award_prizes.excludefromac='0'
|
||||
AND ($and_categories)
|
||||
ORDER BY
|
||||
`order`,
|
||||
projects.projectnumber");
|
||||
|
Loading…
Reference in New Issue
Block a user