Set everything to do with the project number, project sort, and sequence numbers to null, not just the project number, when

unregistering a project.
This commit is contained in:
james 2008-03-20 01:52:47 +00:00
parent e320230a3e
commit 3fc27ceb04

View File

@ -284,7 +284,7 @@ echo mysql_Error();
$reg_num=intval(trim($_GET['registration_number']));
$q=mysql_query("SELECT registrations.id AS reg_id, projects.id AS proj_id FROM projects,registrations WHERE projects.registrations_id=registrations.id AND registrations.year='{$config['FAIRYEAR']}' AND registrations.num='$reg_num'");
$r=mysql_fetch_object($q);
mysql_query("UPDATE projects SET projectnumber=null WHERE id='$r->proj_id' AND year='{$config['FAIRYEAR']}'");
mysql_query("UPDATE projects SET projectnumber=null, projectsort=null, projectnumber_seq=null, projectsort_seq=null WHERE id='$r->proj_id' AND year='{$config['FAIRYEAR']}'");
mysql_query("UPDATE registrations SET status='open' WHERE id='$r->reg_id' AND year='{$config['FAIRYEAR']}'");
echo happy(i18n("Successfully unregistered project"));
}