|
From: Benjamin C. <bc...@us...> - 2004-07-03 13:19:15
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9695 Modified Files: Tag: htmltemplates bug.php Log Message: Fixed a bug with choosing a reporter when creating a bug Index: bug.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/bug.php,v retrieving revision 1.134.2.6 retrieving revision 1.134.2.7 diff -u -r1.134.2.6 -r1.134.2.7 --- bug.php 3 Jul 2004 12:58:13 -0000 1.134.2.6 +++ bug.php 3 Jul 2004 13:19:07 -0000 1.134.2.7 @@ -494,6 +494,9 @@ if ($url == 'http://') { $url = ''; } + + // Use the selected reporter, if specified + $reporter = ($reporter and is_numeric($reporter)) ? $reporter : $u; // Check to see if this bug's component has an owner and should be assigned if ($owner = $db->getOne("select owner from ".TBL_COMPONENT." c where component_id = $component")) { @@ -506,7 +509,7 @@ $bugid = $db->nextId(TBL_BUG); - $db->query('insert into '.TBL_BUG.' (bug_id, title, description, url, severity_id, priority, status_id, assigned_to, created_by, created_date, last_modified_by, last_modified_date, project_id, site_id, database_id, version_id, component_id, os_id, browser_string) values ('.$bugid.', '.join(', ', array($db->quote(stripslashes($title)), $db->quote(stripslashes($description)), $db->quote(stripslashes($url)))).', '.(int)$severity.', '.(int)$priority.', '.(int)$status.', '.$owner.', '.$u.', '.$now.', '.$u.', '.$now.', '.$project.', '.(int)$site.', '.(int)$database.', '.(int)$version.', '.(int)$component.', '.(int)$os.', '.$db->quote(stripslashes($_SERVER['HTTP_USER_AGENT'])).')'); + $db->query('insert into '.TBL_BUG.' (bug_id, title, description, url, severity_id, priority, status_id, assigned_to, created_by, created_date, last_modified_by, last_modified_date, project_id, site_id, database_id, version_id, component_id, os_id, browser_string) values ('.$bugid.', '.join(', ', array($db->quote(stripslashes($title)), $db->quote(stripslashes($description)), $db->quote(stripslashes($url)))).', '.(int)$severity.', '.(int)$priority.', '.(int)$status.', '.$owner.', '.$reporter.', '.$now.', '.$u.', '.$now.', '.$project.', '.(int)$site.', '.(int)$database.', '.(int)$version.', '.(int)$component.', '.(int)$os.', '.$db->quote(stripslashes($_SERVER['HTTP_USER_AGENT'])).')'); $buginfo = $db->getRow('select * from '.TBL_BUG." where bug_id = $bugid"); do_changedfields($u, $buginfo); |