|
From: Benjamin C. <bc...@us...> - 2003-03-02 15:28:57
|
Update of /cvsroot/phpbt/phpbt/inc
In directory sc8-pr-cvs1:/tmp/cvs-serv22876/inc
Modified Files:
functions.php
Log Message:
Allow for renaming of the devloper group and for choosing which group can be assigned bugs. Need to run upgrade.php to insert the new configuration variable.
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- functions.php 19 Feb 2003 14:07:40 -0000 1.37
+++ functions.php 2 Mar 2003 15:28:54 -0000 1.38
@@ -151,7 +151,7 @@
}
break;
case 'owner':
- $rs = $db->query("select u.user_id, login from ".TBL_AUTH_USER." u, ".TBL_USER_GROUP." ug, ".TBL_AUTH_GROUP." g where u.active > 0 and u.user_id = ug.user_id and ug.group_id = g.group_id and group_name = 'Developer' order by login");
+ $rs = $db->query("select u.user_id, login from ".TBL_AUTH_USER." u, ".TBL_USER_GROUP." ug where u.active > 0 and u.user_id = ug.user_id and ug.group_id = ".GROUP_ASSIGN_TO." order by login");
while ($rs->fetchInto($row)) {
if ($selected == $row['user_id']) {
$sel = ' selected';
@@ -239,6 +239,18 @@
" from ".TBL_STATUS." order by status_name");
}
foreach ($bug_status_list as $id => $name) {
+ $sel = $id == $selected ? ' selected' : '';
+ $text .= "<option value=\"$id\"$sel>$name</option>";
+ }
+ break;
+ case 'GROUP_ASSIGN_TO' :
+ static $group_list = array();
+
+ if (empty($group_list)) {
+ $group_list = $db->getAssoc("select group_id, group_name".
+ " from ".TBL_AUTH_GROUP." order by group_name");
+ }
+ foreach ($group_list as $id => $name) {
$sel = $id == $selected ? ' selected' : '';
$text .= "<option value=\"$id\"$sel>$name</option>";
}
|