summaryrefslogtreecommitdiffstats
path: root/editusers.cgi
diff options
context:
space:
mode:
authorbbaetz%student.usyd.edu.au <>2002-08-12 14:42:42 +0200
committerbbaetz%student.usyd.edu.au <>2002-08-12 14:42:42 +0200
commit61ddf0a32846fdf2607043d94af1a0a86b80f6fc (patch)
tree714517b4c6b9e33b10a12aa5a4b99641bcafefef /editusers.cgi
parent17b301e76d886afd5be8f4e9919afb4446e49405 (diff)
downloadbugzilla-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.tar.gz
bugzilla-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.tar.xz
Bug 43600 - Convert products/components to use ids instead of names.
Initial attempt by jake@bugzilla.org, updated by me r=joel, preed
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-xeditusers.cgi14
1 files changed, 8 insertions, 6 deletions
diff --git a/editusers.cgi b/editusers.cgi
index f9800c704..0e25f0ac3 100755
--- a/editusers.cgi
+++ b/editusers.cgi
@@ -579,9 +579,10 @@ if ($action eq 'del') {
# Check if the user is an initialowner
my $nodelete = '';
- SendSQL("SELECT program, value
- FROM components
- WHERE initialowner=" . DBname_to_id($user));
+ SendSQL("SELECT products.name, components.name " .
+ "FROM products, components " .
+ "WHERE products.id = components.product_id " .
+ " AND initialowner=" . DBname_to_id($user));
$found = 0;
while (MoreSQLData()) {
if ($found) {
@@ -603,9 +604,10 @@ if ($action eq 'del') {
# Check if the user is an initialqacontact
- SendSQL("SELECT program, value
- FROM components
- WHERE initialqacontact=" . DBname_to_id($user));
+ SendSQL("SELECT products.name, components.name " .
+ "FROM products, components " .
+ "WHERE products.id = components.id " .
+ " AND initialqacontact=" . DBname_to_id($user));
$found = 0;
while (MoreSQLData()) {
if ($found) {