Backout the patch, but leave the complete status removal there

This commit is contained in:
dave 2010-03-12 08:05:44 +00:00
parent a4e5761788
commit adf606f0d3

View File

@ -167,7 +167,7 @@ function neweditor()
/* Grab a list of users */
$w = array();
foreach($show_types as $t) {
$w [] = "users.types LIKE '%$t%'";
$w [] = "u1.types LIKE '%$t%'";
}
$where_types = "AND (".join(" OR ", $w).")";
@ -179,21 +179,23 @@ function neweditor()
}
if($show_year == 'current')
$having_year = "AND users.year={$config['FAIRYEAR']}";
$having_year = "AND u1.year={$config['FAIRYEAR']}";
echo "<table class=\"tableview\">";
$querystr="SELECT *,MAX(users.year) as MAXYEAR
$querystr="SELECT
*
FROM
users
LEFT JOIN `users_committee` ON `users_committee`.`users_id`=`users`.`id`
LEFT JOIN `users_judge` ON `users_judge`.`users_id`=`users`.`id`
LEFT JOIN `users_volunteer` ON `users_volunteer`.`users_id`=`users`.`id`
LEFT JOIN `users_fair` ON `users_fair`.`users_id`=`users`.`id`
LEFT JOIN `users_sponsor` ON `users_sponsor`.`users_id`=`users`.`id`
GROUP BY users.uid
users u1
LEFT JOIN `users_committee` ON `users_committee`.`users_id`=`u1`.`id`
LEFT JOIN `users_judge` ON `users_judge`.`users_id`=`u1`.`id`
LEFT JOIN `users_volunteer` ON `users_volunteer`.`users_id`=`u1`.`id`
LEFT JOIN `users_fair` ON `users_fair`.`users_id`=`u1`.`id`
LEFT JOIN `users_sponsor` ON `users_sponsor`.`users_id`=`u1`.`id`
WHERE u1.year=( SELECT MAX(`year`) FROM users u2 WHERE u1.uid=u2.uid )
GROUP BY uid
HAVING
users.deleted='no'
u1.deleted='no'
$having_year
$where_types
$where_complete