зеркало из https://github.com/mozilla/pjs.git
Bug 328436: Move BugInGroupId from globals.pl to process_bug.cgi
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=wicked, a=justdave
This commit is contained in:
Родитель
a1c1389e9c
Коммит
fc7cc94221
|
@ -487,18 +487,6 @@ sub get_legal_field_values {
|
||||||
return @$result_ref;
|
return @$result_ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub BugInGroupId {
|
|
||||||
my ($bugid, $groupid) = (@_);
|
|
||||||
PushGlobalSQLState();
|
|
||||||
SendSQL("SELECT CASE WHEN bug_id != 0 THEN 1 ELSE 0 END
|
|
||||||
FROM bug_group_map
|
|
||||||
WHERE bug_id = $bugid
|
|
||||||
AND group_id = $groupid");
|
|
||||||
my $bugingroup = FetchOneColumn();
|
|
||||||
PopGlobalSQLState();
|
|
||||||
return $bugingroup;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub GroupIdToName {
|
sub GroupIdToName {
|
||||||
my ($groupid) = (@_);
|
my ($groupid) = (@_);
|
||||||
PushGlobalSQLState();
|
PushGlobalSQLState();
|
||||||
|
|
|
@ -85,6 +85,21 @@ my $vars = {};
|
||||||
|
|
||||||
my $requiremilestone = 0;
|
my $requiremilestone = 0;
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Subroutines
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
sub BugInGroupId {
|
||||||
|
my ($bug_id, $group_id) = @_;
|
||||||
|
detaint_natural($bug_id);
|
||||||
|
detaint_natural($group_id);
|
||||||
|
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));
|
||||||
|
return $in_group;
|
||||||
|
}
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Begin Data/Security Validation
|
# Begin Data/Security Validation
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
Загрузка…
Ссылка в новой задаче