From 9fcdc67a551a089ebd926a560580e77c58c8ae21 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Thu, 2 Mar 2006 05:33:01 +0000 Subject: Bug 328435: Move GroupNameToId into Bugzilla/Group.pm and eliminate GroupExists Patch By Max Kanat-Alexander r=wicked, a=justdave --- editproducts.cgi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'editproducts.cgi') diff --git a/editproducts.cgi b/editproducts.cgi index 1101f3182..25bad900d 100755 --- a/editproducts.cgi +++ b/editproducts.cgi @@ -43,6 +43,7 @@ use Bugzilla::BugMail; use Bugzilla::Product; use Bugzilla::Classification; use Bugzilla::Milestone; +use Bugzilla::Group; # Shut up misguided -w warnings about "used only once". "use vars" just # doesn't work for me. @@ -234,7 +235,7 @@ if ($action eq 'new') { if (Param("makeproductgroups")) { # Next we insert into the groups table my $productgroup = $product->name; - while (GroupExists($productgroup)) { + while (group_name_to_id($productgroup)) { $productgroup .= '_'; } my $group_description = "Access to bugs in the " . @@ -249,7 +250,7 @@ if ($action eq 'new') { # If we created a new group, give the "admin" group priviledges # initially. - my $admin = GroupNameToId('admin'); + my $admin = group_name_to_id('admin'); my $sth = $dbh->prepare('INSERT INTO group_group_map (member_id, grantor_id, grant_type) -- cgit v1.2.3-24-g4f1b