diff options
author | bbaetz%student.usyd.edu.au <> | 2002-08-12 12:42:42 +0000 |
---|---|---|
committer | bbaetz%student.usyd.edu.au <> | 2002-08-12 12:42:42 +0000 |
commit | 61ddf0a32846fdf2607043d94af1a0a86b80f6fc (patch) | |
tree | 714517b4c6b9e33b10a12aa5a4b99641bcafefef /enter_bug.cgi | |
parent | Bug 162217: fixed my bustage introduced in bug 160410; yes, I owe the whole B... (diff) | |
download | bugzilla-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.tar.gz bugzilla-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.tar.bz2 bugzilla-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.zip |
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 'enter_bug.cgi')
-rwxr-xr-x | enter_bug.cgi | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/enter_bug.cgi b/enter_bug.cgi index 726179722..83f1126f9 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -239,7 +239,9 @@ if (lsearch(\@::enterable_products, $product) == -1) { DisplayError("'" . html_quote($product) . "' is not a valid product."); exit; } - + +my $product_id = get_product_id($product); + if (0 == @{$::components{$product}}) { my $error = "Sorry; there needs to be at least one component for this " . "product in order to create a new bug. "; @@ -261,8 +263,8 @@ elsif (1 == @{$::components{$product}}) { } my @components; -SendSQL("SELECT value, description FROM components " . - "WHERE program = " . SqlQuote($product) . " ORDER BY value"); +SendSQL("SELECT name, description FROM components " . + "WHERE product_id = $product_id ORDER BY name"); while (MoreSQLData()) { my ($name, $description) = FetchSQLData(); @@ -315,7 +317,7 @@ if (exists $::COOKIE{"VERSION-$product"} && my @status = "NEW"; if (UserInGroup("editbugs") || UserInGroup("canconfirm")) { - SendSQL("SELECT votestoconfirm FROM products WHERE product = " . + SendSQL("SELECT votestoconfirm FROM products WHERE name = " . SqlQuote($product)); push(@status, $unconfirmedstate) if (FetchOneColumn()); } |