diff options
author | lpsolit%gmail.com <> | 2006-06-20 03:15:17 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-06-20 03:15:17 +0000 |
commit | 2545c0950c4f0fde8f78b265217fa9f523eff7bf (patch) | |
tree | 5bb305644ad11da196c7613b82743e426e2fd337 /editproducts.cgi | |
parent | Bug 342053: Quicksearch.pm defines $cgi outside routines - Patch by Frédéri... (diff) | |
download | bugzilla-2545c0950c4f0fde8f78b265217fa9f523eff7bf.tar.gz bugzilla-2545c0950c4f0fde8f78b265217fa9f523eff7bf.tar.bz2 bugzilla-2545c0950c4f0fde8f78b265217fa9f523eff7bf.zip |
Bug 304601: Bugzilla::Config's :locations exports need to be in their own module - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat for the main patch, r=myk for the patch about CGI.pm a=justdave
Bug 328637: Remove all legal_* versioncache arrays - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=justdave
Bug 110503 - Eliminate versioncache
Diffstat (limited to 'editproducts.cgi')
-rwxr-xr-x | editproducts.cgi | 20 |
1 files changed, 5 insertions, 15 deletions
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}); |