summaryrefslogtreecommitdiffstats
path: root/editproducts.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-06-20 05:15:17 +0200
committerlpsolit%gmail.com <>2006-06-20 05:15:17 +0200
commit2545c0950c4f0fde8f78b265217fa9f523eff7bf (patch)
tree5bb305644ad11da196c7613b82743e426e2fd337 /editproducts.cgi
parentb687ddef9b6dfeec3d87b7ae211decbf21b6e9a9 (diff)
downloadbugzilla-2545c0950c4f0fde8f78b265217fa9f523eff7bf.tar.gz
bugzilla-2545c0950c4f0fde8f78b265217fa9f523eff7bf.tar.xz
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-xeditproducts.cgi20
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});