summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-06-30 04:57:54 +0200
committermkanat%bugzilla.org <>2008-06-30 04:57:54 +0200
commitc1ca86053ed276aa05eac8468cea61785629ac5e (patch)
tree836d5cae869dc47008b16bccb1de47320a36fcc8 /process_bug.cgi
parent9ed763d945ffe2a468871d4731f3bd001caab21c (diff)
downloadbugzilla-c1ca86053ed276aa05eac8468cea61785629ac5e.tar.gz
bugzilla-c1ca86053ed276aa05eac8468cea61785629ac5e.tar.xz
Bug 440612 – Use Bugzilla::Bug->check everywhere instead of ValidateBugID
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi15
1 files changed, 4 insertions, 11 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index bb680fab2..814ff5612 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -112,23 +112,16 @@ sub should_set {
# Create a list of objects for all bugs being modified in this request.
my @bug_objects;
if (defined $cgi->param('id')) {
- my $id = $cgi->param('id');
- ValidateBugID($id);
-
- # Store the validated, and detainted id back in the cgi data, as
- # lots of later code will need it, and will obtain it from there
- $cgi->param('id', $id);
- push(@bug_objects, new Bugzilla::Bug($id));
+ my $bug = Bugzilla::Bug->check(scalar $cgi->param('id'));
+ $cgi->param('id', $bug->id);
+ push(@bug_objects, $bug);
} else {
- my @ids;
foreach my $i ($cgi->param()) {
if ($i =~ /^id_([1-9][0-9]*)/) {
my $id = $1;
- ValidateBugID($id);
- push(@ids, $id);
+ push(@bug_objects, Bugzilla::Bug->check($id));
}
}
- @bug_objects = @{Bugzilla::Bug->new_from_list(\@ids)};
}
# Make sure there are bugs to process.