|
From: Benjamin C. <bc...@us...> - 2001-11-08 14:27:38
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv12608
Modified Files:
bug.php
Log Message:
You can use a text box or a select box for assigning bugs to developers
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- bug.php 2001/11/08 13:28:55 1.56
+++ bug.php 2001/11/08 14:27:35 1.57
@@ -244,10 +244,17 @@
return;
}
- if ($outcome == 'reassign' and
- (!$assignedto = $q->grab_field("select user_id from ".TBL_AUTH_USER." where login = '$reassignto'"))) {
- show_bug($bugid,array('status' => $STRING['nouser']));
- return;
+ if ($outcome == 'reassign') {
+ if (is_numeric($reassignto)) { // select box
+ $assign_user_query = " where user_id = $reassignto";
+ } else { // text box
+ $assign_user_query = " where login = '$reassignto'";
+ }
+ if (!$assignedto = $q->grab_field("select user_id from ".TBL_AUTH_USER.
+ $assign_user_query)) {
+ show_bug($bugid,array('status' => $STRING['nouser']));
+ return;
+ }
}
if ($last_modified_date != $buginfo['last_modified_date']) {
@@ -281,7 +288,8 @@
case 'unchanged' : break;
case 'assign' : $assignedto = $u; $statusfield = 'Assigned'; break;
case 'reassign' :
- if (!$assignedto = $q->grab_field("select user_id from ".TBL_AUTH_USER." where login = '$reassignto'")) {
+ if (!$assignedto = $q->grab_field("select user_id from ".TBL_AUTH_USER.
+ $assign_user_query)) {
show_bug($bugid,array('status' => $STRING['nouser']));
return;
} else {
@@ -480,7 +488,7 @@
'version' => $row['version_name'],
'component' => $row['component_name'],
'os' => $row['os_name'],
- 'browserstring' => $row['browser_string'],
+ 'browserstring' => $row['browser_string']
));
// Show the comments
@@ -556,7 +564,8 @@
'bugresolution' => build_select('resolution'),
'cclist' => build_select('bug_cc', $bugid),
'submit' => $u == 'nobody' ? $STRING['logintomodify'] :
- '<input type="submit" value="Submit">'
+ '<input type="submit" value="Submit">',
+ 'developer_list' => build_select('owner')
));
switch($row['status_name']) {
case 'Unconfirmed' :
|