You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(34) |
Aug
(215) |
Sep
(180) |
Oct
(135) |
Nov
(105) |
Dec
(81) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(76) |
Feb
(22) |
Mar
(154) |
Apr
(149) |
May
(128) |
Jun
(94) |
Jul
(14) |
Aug
(24) |
Sep
(77) |
Oct
(52) |
Nov
(22) |
Dec
(6) |
| 2003 |
Jan
(4) |
Feb
(10) |
Mar
(6) |
Apr
(29) |
May
(10) |
Jun
(37) |
Jul
(39) |
Aug
(13) |
Sep
(23) |
Oct
(3) |
Nov
(7) |
Dec
(2) |
| 2004 |
Jan
|
Feb
(10) |
Mar
(4) |
Apr
|
May
(35) |
Jun
(4) |
Jul
(17) |
Aug
(6) |
Sep
(14) |
Oct
(18) |
Nov
(2) |
Dec
(14) |
| 2005 |
Jan
(9) |
Feb
(30) |
Mar
(6) |
Apr
|
May
(38) |
Jun
(23) |
Jul
(21) |
Aug
(76) |
Sep
(50) |
Oct
(51) |
Nov
(13) |
Dec
|
|
From: Benjamin C. <bc...@us...> - 2002-03-11 18:28:38
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv13382
Modified Files:
bug.php
Log Message:
Fixed the error message when no projects are available when trying to report a bug
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- bug.php 5 Mar 2002 22:14:00 -0000 1.82
+++ bug.php 11 Mar 2002 18:28:35 -0000 1.83
@@ -843,7 +843,7 @@
switch ($q->num_rows()) {
case 0 :
- $t->set_var('rows',$STRING['noprojects']);
+ $t->set_var('content',"<div class=\"error\">{$STRING['noprojects']}</div>");
return;
case 1 :
$row = $q->grab();
|
|
From: Benjamin C. <bc...@us...> - 2002-03-11 18:22:20
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv11625
Modified Files:
include.php
Log Message:
Bug fix for the restricted projects
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- include.php 11 Mar 2002 16:41:14 -0000 1.95
+++ include.php 11 Mar 2002 18:22:17 -0000 1.96
@@ -251,7 +251,8 @@
if (!$perm->have_perm('Admin')) {
$matching_projects = delimit_list(',',
$q->grab_field_set("select project_id from ".TBL_PROJECT_GROUP.
- " where group_id not in (".delimit_list(',', $auth->auth['group_ids']).")"));
+ " where group_id not in (".delimit_list(',', $auth->auth['group_ids']).
+ ") group by project_id"));
if ($matching_projects) {
$restricted_projects .= ",$matching_projects";
}
|
|
From: Benjamin C. <bc...@us...> - 2002-03-11 16:41:17
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv13013
Modified Files:
include.php upgrade.php
Log Message:
Fixes for upgrading
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- include.php 5 Mar 2002 22:11:47 -0000 1.94
+++ include.php 11 Mar 2002 16:41:14 -0000 1.95
@@ -245,14 +245,16 @@
$op = isset($_gv['op']) ? $_gv['op'] : (isset($_pv['op']) ? $_pv['op'] : '');
-// Check to see if we have projects that shouldn't be visible to the user
-$restricted_projects = '0';
-if (!$perm->have_perm('Admin')) {
- $matching_projects = delimit_list(',',
- $q->grab_field_set("select project_id from ".TBL_PROJECT_GROUP.
- " where group_id not in (".delimit_list(',', $auth->auth['group_ids']).")"));
- if ($matching_projects) {
- $restricted_projects .= ",$matching_projects";
+if (!defined('NO_AUTH')) {
+ // Check to see if we have projects that shouldn't be visible to the user
+ $restricted_projects = '0';
+ if (!$perm->have_perm('Admin')) {
+ $matching_projects = delimit_list(',',
+ $q->grab_field_set("select project_id from ".TBL_PROJECT_GROUP.
+ " where group_id not in (".delimit_list(',', $auth->auth['group_ids']).")"));
+ if ($matching_projects) {
+ $restricted_projects .= ",$matching_projects";
+ }
}
}
Index: upgrade.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/upgrade.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- upgrade.php 7 Mar 2002 00:35:38 -0000 1.8
+++ upgrade.php 11 Mar 2002 16:41:14 -0000 1.9
@@ -37,8 +37,8 @@
} else {
$q->query("create table ".TBL_BUG_VOTE." ( user_id int(10) unsigned NOT NULL default '0', bug_id int(10) unsigned NOT NULL default '0', created_date bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (user_id, bug_id), KEY bug_id (bug_id) )");
}
- $q->query("INSERT INTO TBL_CONFIGURATION VALUES ('PROMOTE_VOTES', 5, 'The number of votes required to promote a bug from Unconfirmed to New (Set to 0 to disable promotions by voting)', 'string')");
- $q->query("INSERT INTO TBL_CONFIGURATION VALUES ('MAX_USER_VOTES', 5, 'The maximum number of votes a user can cast across all bugs (Set to 0 to have no limit)', 'string')");
+ $q->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('PROMOTE_VOTES', 5, 'The number of votes required to promote a bug from Unconfirmed to New (Set to 0 to disable promotions by voting)', 'string')");
+ $q->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('MAX_USER_VOTES', 5, 'The maximum number of votes a user can cast across all bugs (Set to 0 to have no limit)', 'string')");
}
include 'templates/default/upgrade-finished.html';
}
|
|
From: Benjamin C. <bc...@us...> - 2002-03-11 16:26:15
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv8515 Modified Files: UPGRADING Log Message: Updated for 0.7.0 Index: UPGRADING =================================================================== RCS file: /cvsroot/phpbt/phpbt/UPGRADING,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- UPGRADING 7 Mar 2002 00:35:38 -0000 1.6 +++ UPGRADING 11 Mar 2002 16:26:11 -0000 1.7 @@ -1,8 +1,8 @@ Upgrading from 0.6.x to 0.7.0 ----------------------------- -A new table, project_group, has been added, and the auth_group table has been -altered. +A new table, bug_vote, has been added, and new configuration variables have +been added. Following the steps below will upgrade your installation of phpBT. |
|
From: Benjamin C. <bc...@us...> - 2002-03-11 16:17:58
|
Update of /cvsroot/phpbt/phpbt/inc
In directory usw-pr-cvs1:/tmp/cvs-serv6213/inc
Modified Files:
auth.php
Log Message:
Fixed a bug with the assigning of groups upon login
Index: auth.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/auth.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- auth.php 2 Mar 2002 18:47:16 -0000 1.8
+++ auth.php 11 Mar 2002 16:17:54 -0000 1.9
@@ -76,10 +76,12 @@
$this->auth['db_fields'] = @unserialize($u['bug_list_fields']);
// Grab group assignments and permissions based on groups
- $this->auth['group_ids'] = $q->grab_field_set("select group_id from ".
- TBL_USER_GROUP." where user_id = {$u['user_id']}");
- foreach ($this->auth['group_ids'] as $group) {
- $this->auth['group'][$group] = true;
+ $q->query("select u.group_id, group_name from ".TBL_USER_GROUP." u, ".
+ TBL_AUTH_GROUP." a where user_id = {$u['user_id']} ".
+ 'and u.group_id = a.group_id');
+ while (list($groupid, $groupname) = $q->grab()) {
+ $this->auth['group_ids'][] = $groupid;
+ $this->auth['group'][$groupname] = true;
}
$q->query("select perm_name from ".TBL_AUTH_PERM." ap, ".
TBL_GROUP_PERM." gp where group_id in (".
|
|
From: Ben C. <php...@be...> - 2002-03-07 17:20:58
|
Well, I've gotten to all the bugs (I think), so I'm getting ready to release 0.7.0. If any of you have the time and the inclination test, I would appreciate it. Here is the change log for the current version: : Removed the requirement for register_globals = on in PHP settings. : Added dynamic select boxes to the bug form for changing component and version information when selecting a different project. : Added bug voting : Added a filter for active and inactive users in the admin user list : Prettied up the default template : Fixed some bugginess with the restricted projects : Fixed a bug in the multi-page listing of the project admin : Allow Statuses, Severities, Resolutions, and OSes to be deleted that aren't referenced by bugs. The things that need the most testing are... 1. Having register_globals = off (and report all warnings on) to make sure I didn't miss any conversions 2. Restricting users from projects 3. Upgrading from the previous version. My target for release is Sunday or Monday, so if you have some time to do testing before then, that would be great! |
|
From: Benjamin C. <bc...@us...> - 2002-03-07 00:43:36
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory usw-pr-cvs1:/tmp/cvs-serv19249 Added Files: upgrade-finished.html Log Message: |
|
From: Benjamin C. <bc...@us...> - 2002-03-07 00:40:33
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory usw-pr-cvs1:/tmp/cvs-serv18341 Modified Files: upgrade.html Log Message: Updated for 0.7.0 Index: upgrade.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/upgrade.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- upgrade.html 7 Mar 2002 00:39:21 -0000 1.4 +++ upgrade.html 7 Mar 2002 00:40:30 -0000 1.5 @@ -6,7 +6,7 @@ <div align="center"> <br> <br> - This script will upgrade your database from version 0.5.x to version 0.6.0 + This script will upgrade your database from version 0.6.x to version 0.7.0 of phpBugTracker. <br> <br> |
|
From: Benjamin C. <bc...@us...> - 2002-03-07 00:39:24
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory usw-pr-cvs1:/tmp/cvs-serv17968 Added Files: upgrade.html Log Message: Bring out your dead! |
|
From: Benjamin C. <bc...@us...> - 2002-03-07 00:35:41
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv16986
Modified Files:
upgrade.php UPGRADING
Log Message:
Changes for 0.7.0
Index: upgrade.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/upgrade.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- upgrade.php 7 Mar 2002 00:30:28 -0000 1.7
+++ upgrade.php 7 Mar 2002 00:35:38 -0000 1.8
@@ -28,20 +28,17 @@
function upgrade() {
global $q;
- $upgraded = $q->grab_field("select nextid from ". TBL_DB_SEQUENCE.
- ' where seq_name = "'.TBL_AUTH_GROUP.'"');
+ $upgraded = $q->grab_field('select varvalue from '.TBL_CONFIGURATION.
+ ' where varname = "PROMOTE_VOTES"');
if (!$upgraded) {
- // Make changes to the auth_group table
- $q->query('alter table '.TBL_AUTH_GROUP.' add locked tinyint(1) not null default 0 after group_name');
- $q->query('update '.TBL_AUTH_GROUP.' set locked = 1');
- $q->query("insert into ".TBL_DB_SEQUENCE." values('".TBL_AUTH_GROUP."', 3)");
-
- // New table
+ // Add the bug_vote table and insert the new configuration options
if (DB_TYPE == 'pgsql') {
- $q->query("CREATE TABLE ".TBL_PROJECT_GROUP." ( project_id INT4 NOT NULL DEFAULT '0', group_id INT4 NOT NULL DEFAULT '0', created_by INT4 NOT NULL DEFAULT '0', created_date INT8 NOT NULL DEFAULT '0', PRIMARY KEY (project_id,group_id) )");
+ $q->query("CREATE TABLE ".TBL_BUG_VOTE." ( user_id INT4 NOT NULL DEFAULT '0', bug_id INT4 NOT NULL DEFAULT '0', created_date INT8 NOT NULL DEFAULT '0', PRIMARY KEY (user_id,bug_id) );");
} else {
- $q->query("create table ".TBL_PROJECT_GROUP." ( project_id int(10) unsigned NOT NULL default '0', group_id int(10) unsigned NOT NULL default '0', created_by int(10) unsigned NOT NULL default '0', created_date bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (project_id,group_id), KEY group_id (group_id) )");
+ $q->query("create table ".TBL_BUG_VOTE." ( user_id int(10) unsigned NOT NULL default '0', bug_id int(10) unsigned NOT NULL default '0', created_date bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (user_id, bug_id), KEY bug_id (bug_id) )");
}
+ $q->query("INSERT INTO TBL_CONFIGURATION VALUES ('PROMOTE_VOTES', 5, 'The number of votes required to promote a bug from Unconfirmed to New (Set to 0 to disable promotions by voting)', 'string')");
+ $q->query("INSERT INTO TBL_CONFIGURATION VALUES ('MAX_USER_VOTES', 5, 'The maximum number of votes a user can cast across all bugs (Set to 0 to have no limit)', 'string')");
}
include 'templates/default/upgrade-finished.html';
}
Index: UPGRADING
===================================================================
RCS file: /cvsroot/phpbt/phpbt/UPGRADING,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- UPGRADING 15 Dec 2001 18:45:19 -0000 1.5
+++ UPGRADING 7 Mar 2002 00:35:38 -0000 1.6
@@ -1,4 +1,4 @@
-Upgrading from 0.5.1 to 0.6.0
+Upgrading from 0.6.x to 0.7.0
-----------------------------
A new table, project_group, has been added, and the auth_group table has been
|
|
From: Benjamin C. <bc...@us...> - 2002-03-07 00:30:32
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv15686 Added Files: upgrade.php Log Message: Don't call it a comeback |
|
From: Benjamin C. <bc...@us...> - 2002-03-06 04:17:57
|
Update of /cvsroot/phpbt/phpbt/templates/default/admin
In directory usw-pr-cvs1:/tmp/cvs-serv3983/templates/default/admin
Modified Files:
userlist.html
Log Message:
Try to keep people from shooting themselves in the foot by removing the only admin from the system
Index: userlist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/userlist.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- userlist.html 1 Mar 2002 00:41:31 -0000 1.3
+++ userlist.html 6 Mar 2002 04:17:54 -0000 1.4
@@ -1,4 +1,24 @@
<!--<a href="{me}?op=add">Add a new user</a>-->
+<script language="JavaScript">
+<!--
+ function checkAdmin(slct) {
+ var hadAdmin = {hadadmin};
+ var numAdmins = {numadmins};
+ var adminSelected = false;
+
+ if (hadAdmin && numAdmins == 1) {
+ for (current = 0; current < slct.options.length; current++ ) {
+ if (slct.options[current].selected && slct.options[current].value == 1) {
+ adminSelected = true;
+ }
+ }
+ if (!adminSelected) {
+ alert('This is the only admin user for the system. Removing this user from the Admin group would be unwise.');
+ }
+ }
+ }
+// -->
+</script>
<br>
<table border="0">
<tr>
@@ -73,7 +93,7 @@
<tr>
<td align="right" valign="top">User Group:</td>
<td>
- <select name="fusergroup[]" size="3" multiple>
+ <select name="fusergroup[]" size="3" multiple onClick="checkAdmin(this)">
{fusergroup}
</select>
</td>
|
|
From: Benjamin C. <bc...@us...> - 2002-03-06 04:17:57
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv3983/admin
Modified Files:
user.php
Log Message:
Try to keep people from shooting themselves in the foot by removing the only admin from the system
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- user.php 1 Mar 2002 00:41:31 -0000 1.39
+++ user.php 6 Mar 2002 04:17:54 -0000 1.40
@@ -149,7 +149,10 @@
'femail' => $row['email'],
'fpassword' => $row['password'],
'factive' => $row['active'] ? 'checked' : '',
- 'fusergroup' => build_select('group', $user_groups)
+ 'fusergroup' => build_select('group', $user_groups),
+ // Whether or not this user has admin rights
+ 'hadadmin' => $q->grab_field('select count(*) from '.TBL_USER_GROUP.
+ " where user_id = {$row['user_id']} and group_id = 1")
));
} else {
$t->set_var(array(
@@ -167,9 +170,14 @@
'factive' => isset($_pv['factive']) ? ($_pv['factive'] ? 'checked' : '')
: 'checked',
'fusergroup' => build_select('group', (isset($_pv['fusergroup']) ?
- $_pv['fusergroup'] : array()))
+ $_pv['fusergroup'] : array())),
+ // Whether or not this user has admin rights
+ 'hadadmin' => 0
));
}
+ // The number of admins in the system
+ $t->set_var('numadmins', $q->grab_field('select count(*) from '.TBL_USER_GROUP.
+ ' where group_id = 1'));
// Show the login field only if login is not tied to email address
if (EMAIL_IS_LOGIN) {
|
|
From: Benjamin C. <bc...@us...> - 2002-03-06 00:06:13
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv18804 Modified Files: CHANGELOG Log Message: Index: CHANGELOG =================================================================== RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- CHANGELOG 2 Mar 2002 18:53:10 -0000 1.44 +++ CHANGELOG 6 Mar 2002 00:06:07 -0000 1.45 @@ -7,6 +7,8 @@ : Prettied up the default template : Fixed some bugginess with the restricted projects : Fixed a bug in the multi-page listing of the project admin +: Allow Statuses, Severities, Resolutions, and OSes to be deleted that aren't + referenced by bugs. -- 0.6.2 -- 27 Dec 2001 : Improved compatibility with Opera and IIS. |
|
From: Benjamin C. <bc...@us...> - 2002-03-06 00:04:16
|
Update of /cvsroot/phpbt/phpbt/templates/default/admin
In directory usw-pr-cvs1:/tmp/cvs-serv18257/templates/default/admin
Modified Files:
oslist.html resolutionlist.html severitylist.html
statuslist.html
Log Message:
UI tweaks
Index: oslist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/oslist.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- oslist.html 5 Mar 2002 23:54:15 -0000 1.2
+++ oslist.html 6 Mar 2002 00:04:09 -0000 1.3
@@ -4,7 +4,7 @@
<td valign="top">
<b> OS List</b>
<hr size="1">
- <table border="0">
+ <table border="0" cellpadding="2" cellspacing="1">
<tr bgcolor="#eeeeee">
<th><a href="{nameurl}">Name</a></th>
<th><a href="{regexurl}">Regex</a></th>
@@ -24,13 +24,12 @@
</tr>
<!-- END row -->
</table>
- <center>
- <font size="-1">
- OSes with a Sort Order = 0 will not be selectable by users
- <br>
- Only those OSes that have no bugs referencing them can be deleted
- </font>
- </center>
+ <br>
+ <div class="info">
+ OSes with a Sort Order = 0 will not be selectable by users
+ <br>
+ Only those OSes that have no bugs referencing them can be deleted
+ </div>
</td>
<td valign="top">
<div align="right"><b>{action} OS </b></div>
Index: resolutionlist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/resolutionlist.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- resolutionlist.html 5 Mar 2002 23:54:15 -0000 1.2
+++ resolutionlist.html 6 Mar 2002 00:04:09 -0000 1.3
@@ -4,7 +4,7 @@
<td valign="top">
<b> Resolution List</b>
<hr size="1">
- <table border="0">
+ <table border="0" cellpadding="2" cellspacing="1">
<tr bgcolor="#eeeeee">
<th><a href="{nameurl}">Name</a></th>
<th><a href="{descriptionurl}">Description</a></th>
@@ -24,13 +24,12 @@
</tr>
<!-- END row -->
</table>
- <center>
- <font size="-1">
+ <br>
+ <div class="info">
Resolutions with a Sort Order = 0 will not be selectable by users
<br>
Only those Resolutions that have no bugs referencing them can be deleted
- </font>
- </center>
+ </div>
</td>
<td valign="top">
<div align="right"><b>{action} resolution </b></div>
Index: severitylist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/severitylist.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- severitylist.html 5 Mar 2002 23:54:15 -0000 1.2
+++ severitylist.html 6 Mar 2002 00:04:09 -0000 1.3
@@ -4,7 +4,7 @@
<td valign="top">
<b> Severity List</b>
<hr size="1">
- <table border="0">
+ <table border="0" cellpadding="2" cellspacing="1">
<tr>
<th><a href="{nameurl}">Name</a></th>
<th><a href="{descriptionurl}">Description</a></th>
@@ -24,13 +24,12 @@
</tr>
<!-- END row -->
</table>
- <center>
- <font size="-1">
- Severities with a Sort Order = 0 will not be selectable by users
- <br>
- Only those Severities that have no bugs referencing them can be deleted
- </font>
- </center>
+ <br>
+ <div class="info">
+ Severities with a Sort Order = 0 will not be selectable by users
+ <br>
+ Only those Severities that have no bugs referencing them can be deleted
+ </div>
</td>
<td valign="top">
<div align="right"><b>{action} severity </b></div>
Index: statuslist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/statuslist.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- statuslist.html 5 Mar 2002 23:54:15 -0000 1.2
+++ statuslist.html 6 Mar 2002 00:04:09 -0000 1.3
@@ -24,13 +24,12 @@
</tr>
<!-- END row -->
</table>
- <center>
- <font size="-1">
- Statuses with a Sort Order = 0 will not be selectable by users
- <br>
- Only those Statuses that have no bugs referencing them can be deleted
- </font>
- </center>
+ <br>
+ <div class="info">
+ Statuses with a Sort Order = 0 will not be selectable by users
+ <br>
+ Only those Statuses that have no bugs referencing them can be deleted
+ </div>
</td>
<td valign="top">
<div align="right"><b>{action} status </b></div>
|
|
From: Benjamin C. <bc...@us...> - 2002-03-06 00:04:15
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv18257
Modified Files:
css.php
Log Message:
UI tweaks
Index: css.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/css.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- css.php 2 Mar 2002 18:49:50 -0000 1.5
+++ css.php 6 Mar 2002 00:04:09 -0000 1.6
@@ -261,3 +261,14 @@
font-size: 12px;
padding: 5px;
}
+
+.info {
+ font-size: 10px;
+ color: <?php echo $color['th'] ?>;
+ background: <?php echo $color['th-bg'] ?>;
+ border-width: 1px 1px 1px 1px;
+ border-color: #000000;
+ border-style: solid;
+ padding: 5px;
+ text-align: center;
+}
|
|
From: Benjamin C. <bc...@us...> - 2002-03-05 23:55:31
|
Update of /cvsroot/phpbt/phpbt/inc
In directory usw-pr-cvs1:/tmp/cvs-serv16144/inc
Modified Files:
functions.php
Log Message:
Fixed a bug with the OS select box
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- functions.php 5 Mar 2002 22:14:00 -0000 1.5
+++ functions.php 5 Mar 2002 23:55:28 -0000 1.6
@@ -112,7 +112,7 @@
}
break;
case 'os' :
- $q->query("select {$box}_id, {$box}_name, regex from ".TBL_OS." order by sort_order");
+ $q->query("select {$box}_id, {$box}_name, regex from ".TBL_OS." where sort_order > 0 order by sort_order");
while ($row = $q->grab()) {
if ($value == '' and isset($row['Regex']) and
preg_match($row['Regex'],$GLOBALS['HTTP_USER_AGENT'])) $sel = ' selected';
|
|
From: Benjamin C. <bc...@us...> - 2002-03-05 23:54:22
|
Update of /cvsroot/phpbt/phpbt/templates/default/admin
In directory usw-pr-cvs1:/tmp/cvs-serv15820/templates/default/admin
Modified Files:
oslist.html resolutionlist.html severitylist.html
statuslist.html
Log Message:
Allow for deleting items
Index: oslist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/oslist.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- oslist.html 11 Oct 2001 14:24:04 -0000 1.1
+++ oslist.html 5 Mar 2002 23:54:15 -0000 1.2
@@ -9,15 +9,28 @@
<th><a href="{nameurl}">Name</a></th>
<th><a href="{regexurl}">Regex</a></th>
<th><a href="{sortorderurl}">Sort Order</a></th>
+ <th>Delete</th>
</tr>
<!-- BEGIN row -->
<tr class="{trclass}">
<td><a href="{me}?op=edit&id={osid}">{name}</a></td>
<td> {regex}</td>
<td align="center">{sortorder}</td>
+ <td align="center">
+ <!-- BEGIN deleteblock -->
+ <a href="{me}?op=del&id={osid}" onClick="return confirm('Are you sure you want to delete this OS?')">Delete</a>
+ <!-- END deleteblock -->
+ </td>
</tr>
<!-- END row -->
</table>
+ <center>
+ <font size="-1">
+ OSes with a Sort Order = 0 will not be selectable by users
+ <br>
+ Only those OSes that have no bugs referencing them can be deleted
+ </font>
+ </center>
</td>
<td valign="top">
<div align="right"><b>{action} OS </b></div>
Index: resolutionlist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/resolutionlist.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- resolutionlist.html 11 Oct 2001 14:24:04 -0000 1.1
+++ resolutionlist.html 5 Mar 2002 23:54:15 -0000 1.2
@@ -9,15 +9,28 @@
<th><a href="{nameurl}">Name</a></th>
<th><a href="{descriptionurl}">Description</a></th>
<th><a href="{sortorderurl}">Sort Order</a></th>
+ <th>Delete</th>
</tr>
<!-- BEGIN row -->
<tr class="{trclass}">
<td><a href="{me}?op=edit&id={resolutionid}">{name}</a></td>
<td> {description}</td>
<td align="center">{sortorder}</td>
+ <td align="center">
+ <!-- BEGIN deleteblock -->
+ <a href="{me}?op=del&id={resolutionid}" onClick="return confirm('Are you sure you want to delete this resolution?')">Delete</a>
+ <!-- END deleteblock -->
+ </td>
</tr>
<!-- END row -->
</table>
+ <center>
+ <font size="-1">
+ Resolutions with a Sort Order = 0 will not be selectable by users
+ <br>
+ Only those Resolutions that have no bugs referencing them can be deleted
+ </font>
+ </center>
</td>
<td valign="top">
<div align="right"><b>{action} resolution </b></div>
Index: severitylist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/severitylist.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- severitylist.html 11 Oct 2001 14:24:04 -0000 1.1
+++ severitylist.html 5 Mar 2002 23:54:15 -0000 1.2
@@ -2,22 +2,35 @@
<table border="0" width="640">
<tr>
<td valign="top">
- <b> Status List</b>
+ <b> Severity List</b>
<hr size="1">
<table border="0">
<tr>
<th><a href="{nameurl}">Name</a></th>
<th><a href="{descriptionurl}">Description</a></th>
<th><a href="{sortorderurl}">Sort Order</a></th>
+ <th>Delete</th>
</tr>
<!-- BEGIN row -->
<tr class="{trclass}" bgcolor="{bgcolor}">
<td><a href="{me}?op=edit&id={severityid}">{name}</a></td>
<td> {description}</td>
<td align="center">{sortorder}</td>
+ <td align="center">
+ <!-- BEGIN deleteblock -->
+ <a href="{me}?op=del&id={severityid}" onClick="return confirm('Are you sure you want to delete this severity?')">Delete</a>
+ <!-- END deleteblock -->
+ </td>
</tr>
<!-- END row -->
</table>
+ <center>
+ <font size="-1">
+ Severities with a Sort Order = 0 will not be selectable by users
+ <br>
+ Only those Severities that have no bugs referencing them can be deleted
+ </font>
+ </center>
</td>
<td valign="top">
<div align="right"><b>{action} severity </b></div>
Index: statuslist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/statuslist.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- statuslist.html 11 Oct 2001 14:24:04 -0000 1.1
+++ statuslist.html 5 Mar 2002 23:54:15 -0000 1.2
@@ -4,20 +4,33 @@
<td valign="top">
<b> Status List</b>
<hr size="1">
- <table border="0">
+ <table border="0" cellpadding="2" cellspacing="1">
<tr bgcolor="#eeeeee">
<th><a href="{nameurl}">Name</a></th>
<th><a href="{descriptionurl}">Description</a></th>
<th><a href="{sortorderurl}">Sort Order</a></th>
+ <th>Delete</th>
</tr>
<!-- BEGIN row -->
<tr class="{trclass}">
<td><a href="{me}?op=edit&id={statusid}">{name}</a></td>
<td> {description}</td>
<td align="center">{sortorder}</td>
+ <td align="center">
+ <!-- BEGIN deleteblock -->
+ <a href="{me}?op=del&id={statusid}" onClick="return confirm('Are you sure you want to delete this status?')">Delete</a>
+ <!-- END deleteblock -->
+ </td>
</tr>
<!-- END row -->
</table>
+ <center>
+ <font size="-1">
+ Statuses with a Sort Order = 0 will not be selectable by users
+ <br>
+ Only those Statuses that have no bugs referencing them can be deleted
+ </font>
+ </center>
</td>
<td valign="top">
<div align="right"><b>{action} status </b></div>
|
|
From: Benjamin C. <bc...@us...> - 2002-03-05 23:54:19
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv15820/admin
Modified Files:
os.php resolution.php severity.php status.php
Log Message:
Allow for deleting items
Index: os.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/os.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- os.php 26 Jan 2002 16:46:52 -0000 1.20
+++ os.php 5 Mar 2002 23:54:15 -0000 1.21
@@ -25,6 +25,23 @@
define('TEMPLATE_PATH', 'admin');
include '../include.php';
+function del_item($osid = 0) {
+ global $q, $me;
+
+ if ($osid) {
+ // Make sure we are going after a valid record
+ $itemexists = $q->grab_field('select count(*) from '.TBL_OS.
+ " where os_id = $osid");
+ // Are there any bugs tied to this one?
+ $bugcount = $q->grab_field('select count(*) from '.TBL_BUG.
+ " where os_id = $osid");
+ if ($itemexists and !$bugcount) {
+ $q->query('delete from '.TBL_OS." where os_id = $osid");
+ }
+ }
+ header("Location: $me?");
+}
+
function do_form($osid = 0) {
global $q, $me, $_pv, $STRING;
@@ -72,6 +89,7 @@
$t->set_file('content','oslist.html');
$t->set_block('content','row','rows');
+ $t->set_block('row','deleteblock','deleteb');
if (empty($_gv['order'])) {
$order = 'sort_order';
@@ -95,8 +113,11 @@
'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
'records' => $nr));
- $q->limit_query("select * from ".TBL_OS." order by $order $sort",
- $selrange, $llimit);
+ $q->limit_query('select s.os_id, os_name, regex, sort_order,'.
+ ' count(bug_id) as bug_count from '.TBL_OS.
+ ' s left join '.TBL_BUG.' using (os_id) group by s.os_id,'.
+ ' os_name, regex, sort_order'.
+ " order by $order $sort", $selrange, $llimit);
if (!$q->num_rows()) {
$t->set_var('rows',"<tr><td>{$STRING['nooses']}</td></tr>");
@@ -120,6 +141,11 @@
'name' => $row['os_name'],
'regex' => $row['regex'],
'sortorder' => $row['sort_order']));
+ if ($row['bug_count']) {
+ $t->set_var('deleteb', ' ');
+ } else {
+ $t->parse('deleteb', 'deleteblock', false);
+ }
$t->parse('rows','row',true);
}
@@ -134,6 +160,7 @@
if (isset($_gv['op'])) switch($_gv['op']) {
case 'add' : list_items(); break;
case 'edit' : list_items($_gv['id']); break;
+ case 'del' : del_item($_gv['id']); break;
} elseif(isset($_pv['submit'])) {
do_form($_pv['id']);
} else list_items();
Index: resolution.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/resolution.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- resolution.php 26 Jan 2002 16:46:52 -0000 1.21
+++ resolution.php 5 Mar 2002 23:54:15 -0000 1.22
@@ -25,6 +25,23 @@
define('TEMPLATE_PATH', 'admin');
include '../include.php';
+function del_item($resolutionid = 0) {
+ global $q, $me;
+
+ if ($resolutionid) {
+ // Make sure we are going after a valid record
+ $itemexists = $q->grab_field('select count(*) from '.TBL_RESOLUTION.
+ " where resolution_id = $resolutionid");
+ // Are there any bugs tied to this one?
+ $bugcount = $q->grab_field('select count(*) from '.TBL_BUG.
+ " where resolution_id = $resolutionid");
+ if ($itemexists and !$bugcount) {
+ $q->query('delete from '.TBL_RESOLUTION." where resolution_id = $resolutionid");
+ }
+ }
+ header("Location: $me?");
+}
+
function do_form($resolutionid = 0) {
global $q, $me, $_pv, $STRING;
@@ -79,6 +96,7 @@
$t->set_file('content','resolutionlist.html');
$t->set_block('content','row','rows');
+ $t->set_block('row','deleteblock','deleteb');
if (empty($_gv['order'])) {
$order = 'sort_order';
@@ -101,8 +119,11 @@
'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
'records' => $nr));
- $q->limit_query("select * from ".TBL_RESOLUTION." order by $order $sort",
- $selrange, $llimit);
+ $q->limit_query('select s.resolution_id, resolution_name, resolution_desc,'.
+ ' sort_order, count(bug_id) as bug_count from '.TBL_RESOLUTION.
+ ' s left join '.TBL_BUG.' using (resolution_id) group by s.resolution_id,'.
+ ' resolution_name, resolution_desc, sort_order'.
+ " order by $order $sort", $selrange, $llimit);
if (!$q->num_rows()) {
$t->set_var('rows',"<tr><td>{$STRING['noresolutions']}</td></tr>");
@@ -126,6 +147,11 @@
'name' => $row['resolution_name'],
'description' => $row['resolution_desc'],
'sortorder' => $row['sort_order']));
+ if ($row['bug_count']) {
+ $t->set_var('deleteb', ' ');
+ } else {
+ $t->parse('deleteb', 'deleteblock', false);
+ }
$t->parse('rows','row',true);
}
@@ -140,6 +166,7 @@
if (isset($_gv['op'])) switch($_gv['op']) {
case 'add' : list_items(); break;
case 'edit' : list_items($_gv['id']); break;
+ case 'del' : del_item($_gv['id']); break;
} elseif(isset($_pv['submit'])) {
do_form($_pv['id']);
} else list_items();
Index: severity.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/severity.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- severity.php 26 Jan 2002 16:46:52 -0000 1.17
+++ severity.php 5 Mar 2002 23:54:15 -0000 1.18
@@ -25,6 +25,23 @@
define('TEMPLATE_PATH', 'admin');
include '../include.php';
+function del_item($severityid = 0) {
+ global $q, $me;
+
+ if ($severityid) {
+ // Make sure we are going after a valid record
+ $itemexists = $q->grab_field('select count(*) from '.TBL_SEVERITY.
+ " where severity_id = $severityid");
+ // Are there any bugs tied to this one?
+ $bugcount = $q->grab_field('select count(*) from '.TBL_BUG.
+ " where severity_id = $severityid");
+ if ($itemexists and !$bugcount) {
+ $q->query('delete from '.TBL_SEVERITY." where severity_id = $severityid");
+ }
+ }
+ header("Location: $me?");
+}
+
function do_form($severityid = 0) {
global $q, $me, $_pv, $STRING;
@@ -82,6 +99,7 @@
$t->set_file('content','severitylist.html');
$t->set_block('content','row','rows');
+ $t->set_block('row','deleteblock','deleteb');
if (empty($_gv['order'])) {
$order = 'sort_order';
@@ -104,8 +122,11 @@
'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
'records' => $nr));
- $q->limit_query("select * from ".TBL_SEVERITY." order by $order $sort",
- $selrange, $llimit);
+ $q->limit_query('select s.severity_id, severity_name, severity_desc,'.
+ ' severity_color, sort_order, count(bug_id) as bug_count from '.TBL_SEVERITY.
+ ' s left join '.TBL_BUG.' using (severity_id) group by s.severity_id,'.
+ ' severity_name, severity_desc, severity_color, sort_order'.
+ " order by $order $sort", $selrange, $llimit);
if (!$q->num_rows()) {
@@ -132,6 +153,11 @@
'name' => $row['severity_name'],
'description' => $row['severity_desc'],
'sortorder' => $row['sort_order']));
+ if ($row['bug_count']) {
+ $t->set_var('deleteb', ' ');
+ } else {
+ $t->parse('deleteb', 'deleteblock', false);
+ }
$t->parse('rows','row',true);
}
@@ -146,6 +172,7 @@
if (isset($_gv['op'])) switch($_gv['op']) {
case 'add' : list_items(); break;
case 'edit' : list_items($_gv['id']); break;
+ case 'del' : del_item($_gv['id']); break;
} elseif(isset($_pv['submit'])) {
do_form($_pv['id']);
} else list_items();
Index: status.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/status.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- status.php 26 Jan 2002 16:46:52 -0000 1.21
+++ status.php 5 Mar 2002 23:54:15 -0000 1.22
@@ -25,6 +25,23 @@
define('TEMPLATE_PATH', 'admin');
include '../include.php';
+function del_item($statusid = 0) {
+ global $q, $me;
+
+ if ($statusid) {
+ // Make sure we are going after a valid record
+ $itemexists = $q->grab_field('select count(*) from '.TBL_STATUS.
+ " where status_id = $statusid");
+ // Are there any bugs tied to this one?
+ $bugcount = $q->grab_field('select count(*) from '.TBL_BUG.
+ " where status_id = $statusid");
+ if ($itemexists and !$bugcount) {
+ $q->query('delete from '.TBL_STATUS." where status_id = $statusid");
+ }
+ }
+ header("Location: $me?");
+}
+
function do_form($statusid = 0) {
global $q, $me, $_pv, $STRING;
@@ -79,6 +96,7 @@
$t->set_file('content','statuslist.html');
$t->set_block('content','row','rows');
+ $t->set_block('row','deleteblock','deleteb');
if (empty($_gv['order'])) {
$order = 'sort_order';
@@ -101,8 +119,10 @@
'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
'records' => $nr));
- $q->limit_query("select * from ".TBL_STATUS." order by $order $sort",
- $selrange, $llimit);
+ $q->limit_query('select s.status_id, status_name, status_desc,'.
+ ' sort_order, count(bug_id) as bug_count from '.TBL_STATUS.' s left join '.
+ TBL_BUG.' using (status_id) group by s.status_id, status_name, status_desc,'.
+ " sort_order order by $order $sort", $selrange, $llimit);
if (!$q->num_rows()) {
$t->set_var('rows',"<tr><td>{$STRING['nostatuses']}</td></tr>");
@@ -125,7 +145,13 @@
'statusid' => $row['status_id'],
'name' => $row['status_name'],
'description' => $row['status_desc'],
- 'sortorder' => $row['sort_order']));
+ 'sortorder' => $row['sort_order'],
+ ));
+ if ($row['bug_count']) {
+ $t->set_var('deleteb', ' ');
+ } else {
+ $t->parse('deleteb', 'deleteblock', false);
+ }
$t->parse('rows','row',true);
}
@@ -140,6 +166,7 @@
if (isset($_gv['op'])) switch($_gv['op']) {
case 'add' : list_items(); break;
case 'edit' : list_items($_gv['id']); break;
+ case 'del' : del_item($_gv['id']); break;
} elseif(isset($_pv['submit'])) {
do_form($_pv['id']);
} else list_items();
|
|
From: Benjamin C. <bc...@us...> - 2002-03-05 23:04:24
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv919 Modified Files: query.php Log Message: Clobbered a warning Index: query.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/query.php,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- query.php 5 Mar 2002 22:14:00 -0000 1.58 +++ query.php 5 Mar 2002 23:04:21 -0000 1.59 @@ -327,7 +327,7 @@ case 'query' : show_query(); break; case 'doquery' : $_sv['queryinfo'] = array(); list_items(); break; case 'delquery' : delete_saved_query($_gv['queryid']); break; - case 'mybugs' : list_items($_gv['assignedto'], $_gv['reportedby'], $_gv['open']); break; + case 'mybugs' : list_items($assignedto, $reportedby, $open); break; default : show_query(); break; } else list_items($assignedto, $reportedby, $open); |
|
From: Benjamin C. <bc...@us...> - 2002-03-05 22:14:03
|
Update of /cvsroot/phpbt/phpbt/inc
In directory usw-pr-cvs1:/tmp/cvs-serv17352/inc
Modified Files:
functions.php
Log Message:
Use the new project restriction code
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- functions.php 1 Mar 2002 00:41:30 -0000 1.4
+++ functions.php 5 Mar 2002 22:14:00 -0000 1.5
@@ -43,7 +43,7 @@
///
/// Build a select box with the item matching $value selected
function build_select($box, $value = '', $project = 0) {
- global $q, $select, $perm, $auth, $STRING;
+ global $q, $select, $perm, $auth, $STRING, $restricted_projects;
//create hash to map tablenames
$cfgDatabase = array(
@@ -66,11 +66,8 @@
'resolution' => $querystart.' where sort_order > 0 order by sort_order',
'project' => $perm->have_perm('Admin')
? $querystart." where active > 0 order by {$box}_name"
- : "select p.{$box}_id, {$box}_name from $cfgDatabase[$box] p left join ".
- TBL_PROJECT_GROUP.' pg using(project_id) where active > 0
- and (pg.project_id is null or pg.group_id in ('.
- delimit_list(',', $auth->auth['group_ids']).')) group by
- p.project_id, p.project_name order by project_name',
+ : $querystart." where project_id not in ($restricted_projects)".
+ " and active > 0 order by {$box}_name",
'component' => $querystart." where project_id = $project order by {$box}_name",
'version' => $querystart." where project_id = $project order by {$box}_id desc"
);
|
|
From: Benjamin C. <bc...@us...> - 2002-03-05 22:14:03
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv17352
Modified Files:
bug.php query.php report.php
Log Message:
Use the new project restriction code
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- bug.php 28 Feb 2002 18:21:30 -0000 1.81
+++ bug.php 5 Mar 2002 22:14:00 -0000 1.82
@@ -827,32 +827,27 @@
}
function show_projects() {
- global $me, $q, $t, $STRING, $TITLE, $perm, $auth;
+ global $me, $q, $t, $STRING, $TITLE, $perm, $auth, $restricted_projects, $_gv;
// Show only active projects with at least one component
if ($perm->have_perm('Admin')) { // Show admins all projects
- $q->query('select p.project_id, p.project_name, p.project_desc, p.created_date
- from '.TBL_PROJECT.' p, '.TBL_COMPONENT.
- ' c where p.active = 1 and p.project_id = c.project_id group by
- p.project_id, p.project_name, p.project_desc, p.created_date
- order by project_name');
+ $p_query = '';
} else { // Filter out projects that can't be seen by this user
- $q->query('select p.project_id, p.project_name, p.project_desc, p.created_date
- from '.TBL_PROJECT.' p left join '.TBL_PROJECT_GROUP.' pg
- using(project_id), '.TBL_COMPONENT.' c
- where p.active = 1 and p.project_id = c.project_id
- and (pg.project_id is null or pg.group_id in ('.
- delimit_list(',', $auth->auth['group_ids']).')) group by
- p.project_id, p.project_name, p.project_desc, p.created_date
- order by project_name');
+ $p_query = " and p.project_id not in ($restricted_projects)";
}
+ $q->query('select p.project_id, p.project_name, p.project_desc, p.created_date
+ from '.TBL_PROJECT.' p, '.TBL_COMPONENT.
+ ' c where p.active = 1 and p.project_id = c.project_id'.$p_query.
+ ' group by p.project_id, p.project_name, p.project_desc, p.created_date'.
+ ' order by project_name');
+
switch ($q->num_rows()) {
case 0 :
$t->set_var('rows',$STRING['noprojects']);
return;
case 1 :
$row = $q->grab();
- $project = $row['project_id'];
+ $_gv['project'] = $row['project_id'];
show_form();
break;
default :
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- query.php 26 Jan 2002 17:18:36 -0000 1.57
+++ query.php 5 Mar 2002 22:14:00 -0000 1.58
@@ -73,7 +73,7 @@
}
function build_query($assignedto, $reportedby, $open) {
- global $q, $auth, $_gv, $perm, $auth;
+ global $q, $auth, $_gv, $perm, $restricted_projects;
foreach ($_gv as $k => $v) { $$k = $v; }
@@ -138,12 +138,7 @@
if ($components) $proj[] = "b.component_id = $components";
$query[] = '('.delimit_list(' and ',$proj).')';
} elseif (!$perm->have_perm('Admin')) { // Filter results from hidden projects
- $query[] = 'b.project_id in ('.
- delimit_list(',', $q->grab_field_set('select p.project_id
- from '.TBL_PROJECT.' p left join '.TBL_PROJECT_GROUP.' pg using(project_id)
- where active > 0 and (pg.project_id is null or pg.group_id in ('.
- delimit_list(',', $auth->auth['group_ids']).')) group by p.project_id')).
- ')';
+ $query[] = "b.project_id not in ($restricted_projects)";
}
}
Index: report.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/report.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- report.php 16 Jan 2002 11:12:33 -0000 1.18
+++ report.php 5 Mar 2002 22:14:00 -0000 1.19
@@ -25,7 +25,7 @@
include 'include.php';
function resolution_by_engineer($projectid = 0) {
- global $q, $t;
+ global $q, $t, $restricted_projects, $perm;
$t->set_block('content', 'row', 'rows');
$t->set_block('row', 'col', 'cols');
@@ -45,6 +45,8 @@
if ($projectid && is_numeric($projectid)) {
$projectquery = "where project_id = $projectid";
+ } elseif (!$perm->have_perm('Admin')) {
+ $projectquery = "where project_id not in ($restricted_projects)";
} else {
$projectquery = '';
}
|
|
From: Benjamin C. <bc...@us...> - 2002-03-05 22:11:53
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv16717
Modified Files:
index.php include.php
Log Message:
Move the project restriction code from index.php to include.php
Index: index.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/index.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- index.php 2 Mar 2002 18:48:30 -0000 1.16
+++ index.php 5 Mar 2002 22:11:47 -0000 1.17
@@ -92,17 +92,6 @@
"<img align=\"right\" src=\"jpgimages/".GenImgName()."\" ISMAP USEMAP=\"#myimagemap\" border=0>";
}
-// Check to see if we have bugs from projects that shouldn't be visible to the user
-$restricted_projects = '0';
-if (!$perm->have_perm('Admin')) {
- $matching_projects = delimit_list(',',
- $q->grab_field_set("select project_id from ".TBL_PROJECT_GROUP.
- " where group_id not in (".delimit_list(',', $auth->auth['group_ids']).")"));
- if ($matching_projects) {
- $restricted_projects .= ",$matching_projects";
- }
-}
-
// Show the overall bug stats
if (USE_JPGRAPH) {
$t->set_var('sblock', build_image($restricted_projects));
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- include.php 26 Jan 2002 16:46:52 -0000 1.93
+++ include.php 5 Mar 2002 22:11:47 -0000 1.94
@@ -245,4 +245,15 @@
$op = isset($_gv['op']) ? $_gv['op'] : (isset($_pv['op']) ? $_pv['op'] : '');
+// Check to see if we have projects that shouldn't be visible to the user
+$restricted_projects = '0';
+if (!$perm->have_perm('Admin')) {
+ $matching_projects = delimit_list(',',
+ $q->grab_field_set("select project_id from ".TBL_PROJECT_GROUP.
+ " where group_id not in (".delimit_list(',', $auth->auth['group_ids']).")"));
+ if ($matching_projects) {
+ $restricted_projects .= ",$matching_projects";
+ }
+}
+
?>
|
|
From: Benjamin C. <bc...@us...> - 2002-03-05 21:52:11
|
Update of /cvsroot/phpbt/phpbt/schemas In directory usw-pr-cvs1:/tmp/cvs-serv9839/schemas Modified Files: pgsql.in Log Message: Typo Index: pgsql.in =================================================================== RCS file: /cvsroot/phpbt/phpbt/schemas/pgsql.in,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- pgsql.in 26 Jan 2002 16:59:20 -0000 1.16 +++ pgsql.in 5 Mar 2002 21:52:06 -0000 1.17 @@ -113,7 +113,7 @@ created_date INT8 NOT NULL DEFAULT '0' ); -CREATE TABLE TBL_BUG_GROUP ( +CREATE TABLE TBL_BUG_VOTE ( user_id INT4 NOT NULL DEFAULT '0', bug_id INT4 NOT NULL DEFAULT '0', created_date INT8 NOT NULL DEFAULT '0', |
|
From: Benjamin C. <bc...@us...> - 2002-03-05 21:35:35
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv4541
Modified Files:
install.php
Log Message:
Fixed a warning with call-by-reference
Index: install.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/install.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- install.php 26 Jan 2002 16:46:52 -0000 1.11
+++ install.php 5 Mar 2002 21:35:32 -0000 1.12
@@ -75,7 +75,7 @@
header("Location: index.php");
}
-function build_select($box, $value = '', $ary) {
+function build_select($box, $value = '', &$ary) {
$text = '';
foreach ($ary as $val => $item) {
if ($value == $val and $value != '') $sel = ' selected';
@@ -203,7 +203,7 @@
$t->set_block('content', 'unwriteableblock', 'unwriteable');
$t->set_var(array(
'error' => !empty($error) ? "<div class=\"error\">$error</div>" : '',
- 'db_type' => build_select('db', (isset($db_type) ? $db_type : ''), &$db_types),
+ 'db_type' => build_select('db', (isset($db_type) ? $db_type : ''), $db_types),
'db_host' => !empty($db_host) ? $db_host : 'localhost',
'db_database' => !empty($db_database) ? $db_database : 'bug_tracker',
'db_user' => !empty($db_user) ? $db_user : 'root',
|