From 2545c0950c4f0fde8f78b265217fa9f523eff7bf Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 20 Jun 2006 03:15:17 +0000 Subject: Bug 304601: Bugzilla::Config's :locations exports need to be in their own module - Patch by Frédéric Buclin r=mkanat for the main patch, r=myk for the patch about CGI.pm a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug 328637: Remove all legal_* versioncache arrays - Patch by Frédéric Buclin r=mkanat a=justdave Bug 110503 - Eliminate versioncache --- editproducts.cgi | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'editproducts.cgi') diff --git a/editproducts.cgi b/editproducts.cgi index b21ceb8fd..46b3a0145 100755 --- a/editproducts.cgi +++ b/editproducts.cgi @@ -45,10 +45,7 @@ use Bugzilla::Classification; use Bugzilla::Milestone; use Bugzilla::Group; use Bugzilla::User; - -# Shut up misguided -w warnings about "used only once". "use vars" just -# doesn't work for me. -use vars qw(@legal_bug_status @legal_resolution); +use Bugzilla::Field; # # Preliminary checks: @@ -273,8 +270,7 @@ if ($action eq 'new') { if ($cgi->param('createseries')) { # Insert default charting queries for this product. # If they aren't using charting, this won't do any harm. - GetVersionTable(); - + # # $open_name and $product are sqlquoted by the series code # and never used again here, so we can trick_taint them. my $open_name = $cgi->param('open_name'); @@ -283,12 +279,12 @@ if ($action eq 'new') { my @series; # We do every status, every resolution, and an "opened" one as well. - foreach my $bug_status (@::legal_bug_status) { + foreach my $bug_status (@{get_legal_field_values('bug_status')}) { push(@series, [$bug_status, "bug_status=" . url_quote($bug_status)]); } - foreach my $resolution (@::legal_resolution) { + foreach my $resolution (@{get_legal_field_values('resolution')}) { next if !$resolution; push(@series, [$resolution, "resolution=" .url_quote($resolution)]); } @@ -309,11 +305,8 @@ if ($action eq 'new') { $series->writeToDatabase(); } } - # Make versioncache flush - unlink "$datadir/versioncache"; - $vars->{'product'} = $product; - + $template->process("admin/products/created.html.tmpl", $vars) || ThrowTemplateError($template->error()); exit; @@ -417,8 +410,6 @@ if ($action eq 'delete') { $dbh->bz_unlock_tables(); - unlink "$datadir/versioncache"; - $template->process("admin/products/deleted.html.tmpl", $vars) || ThrowTemplateError($template->error()); exit; @@ -878,7 +869,6 @@ if ($action eq 'update') { } $dbh->bz_unlock_tables(); - unlink "$datadir/versioncache"; my $product = new Bugzilla::Product({name => $product_name}); -- cgit v1.2.3-24-g4f1b