Move BugInGroupId from globals.pl to process_bug.cgi

RESOLVED FIXED in Bugzilla 3.0

Status

()

Bugzilla
Bugzilla-General
--
enhancement
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: Max Kanat-Alexander, Assigned: Max Kanat-Alexander)

Tracking

2.23
Bugzilla 3.0
Dependency tree / graph
Bug Flags:
approval +

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

12 years ago
This function is only used in process_bug.cgi, and people really ought to be using Bug objects to get this information anyhow. So we're moving the function to process_bug.cgi.
(Assignee)

Updated

12 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 1

12 years ago
Created attachment 213025 [details] [diff] [review]
v1

Once again, a very straightforward patch. Tested only for compilation.
Attachment #213025 - Flags: review?(wicked)

Updated

12 years ago
Blocks: 328437
Comment on attachment 213025 [details] [diff] [review]
v1

>Index: process_bug.cgi
>===================================================================
>+    my ($in_group) = Bugzilla->dbh->selectrow_array(
>+        "SELECT CASE WHEN bug_id != 0 THEN 1 ELSE 0 END
>+           FROM bug_group_map
>+          WHERE bug_id = ? AND group_id = ?", undef, $bug_id, $group_id);

Nit: Add parenthesis around $bug_id, $group_id parameters. Should be done on checkin.
Attachment #213025 - Flags: review?(wicked) → review+
Flags: approval?

Comment 3

12 years ago
Comment on attachment 213025 [details] [diff] [review]
v1


>+sub BugInGroupId {
>+    my ($bug_id, $group_id) = @_;
>+    trick_taint($bug_id);
>+    trick_taint($group_id);

You should write detaint_natural() for both of them. Please fix that on checkin.
Flags: approval? → approval+
(Assignee)

Comment 4

12 years ago
There was some minor, easily-fixed bitrot when I went to check in the patch, but I fixed it.

Checking in globals.pl;
/cvsroot/mozilla/webtools/bugzilla/globals.pl,v  <--  globals.pl
new revision: 1.354; previous revision: 1.353
done
Checking in process_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v  <--  process_bug.cgi
new revision: 1.306; previous revision: 1.305
done
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
(Assignee)

Comment 5

12 years ago
Created attachment 213649 [details] [diff] [review]
Checked-in version

Here's what actually got checked in.
Attachment #213025 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.