summaryrefslogtreecommitdiffstats
path: root/editmilestones.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-08-24 04:31:19 +0200
committermkanat%bugzilla.org <>2007-08-24 04:31:19 +0200
commit845aacfb3652a18ef12828628e68180591f6baf6 (patch)
tree32f462212ee80be748c073f221489d4a935f1aea /editmilestones.cgi
parentd721954afb4458f240d3be8e020c619c57c9c1ed (diff)
downloadbugzilla-845aacfb3652a18ef12828628e68180591f6baf6.tar.gz
bugzilla-845aacfb3652a18ef12828628e68180591f6baf6.tar.xz
Bug 373440: Make "check" into a generic function in Bugzilla::Object
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'editmilestones.cgi')
-rwxr-xr-xeditmilestones.cgi24
1 files changed, 10 insertions, 14 deletions
diff --git a/editmilestones.cgi b/editmilestones.cgi
index 17733bdb1..880e1d4a7 100755
--- a/editmilestones.cgi
+++ b/editmilestones.cgi
@@ -168,8 +168,8 @@ if ($action eq 'new') {
#
if ($action eq 'del') {
- my $milestone = Bugzilla::Milestone::check_milestone($product,
- $milestone_name);
+ my $milestone = Bugzilla::Milestone->check({ product => $product,
+ name => $milestone_name });
$vars->{'milestone'} = $milestone;
$vars->{'product'} = $product;
@@ -193,9 +193,8 @@ if ($action eq 'del') {
if ($action eq 'delete') {
check_token_data($token, 'delete_milestone');
- my $milestone =
- Bugzilla::Milestone::check_milestone($product,
- $milestone_name);
+ my $milestone = Bugzilla::Milestone->check({ product => $product,
+ name => $milestone_name });
$vars->{'milestone'} = $milestone;
$vars->{'product'} = $product;
@@ -245,9 +244,8 @@ if ($action eq 'delete') {
if ($action eq 'edit') {
- my $milestone =
- Bugzilla::Milestone::check_milestone($product,
- $milestone_name);
+ my $milestone = Bugzilla::Milestone->check({ product => $product,
+ name => $milestone_name });
$vars->{'milestone'} = $milestone;
$vars->{'product'} = $product;
@@ -269,9 +267,8 @@ if ($action eq 'edit') {
if ($action eq 'update') {
check_token_data($token, 'edit_milestone');
my $milestone_old_name = trim($cgi->param('milestoneold') || '');
- my $milestone_old =
- Bugzilla::Milestone::check_milestone($product,
- $milestone_old_name);
+ my $milestone_old = Bugzilla::Milestone->check(
+ { product => $product, name => $milestone_old_name });
if (length($milestone_name) > 20) {
ThrowUserError('milestone_name_too_long',
@@ -343,9 +340,8 @@ if ($action eq 'update') {
$dbh->bz_unlock_tables();
- my $milestone =
- Bugzilla::Milestone::check_milestone($product,
- $milestone_name);
+ my $milestone = Bugzilla::Milestone->check({ product => $product,
+ name => $milestone_name });
delete_token($token);
$vars->{'milestone'} = $milestone;