From: bbaetz%student.usyd.edu.au <> Date: Mon, 3 Jun 2002 20:34:29 +0000 (+0000) Subject: Bug 93167 - &GroupExists and &GroupIsActive and &UserInGroup need to push X-Git-Tag: bugzilla-2.14.3~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e75e4d0f87207db08fd86231084bf71dc5bcbcac;p=thirdparty%2Fbugzilla.git Bug 93167 - &GroupExists and &GroupIsActive and &UserInGroup need to push and pop sql state r=justdave, jouni --- diff --git a/globals.pl b/globals.pl index 5d806a2f50..87d07d14cb 100644 --- a/globals.pl +++ b/globals.pl @@ -1135,8 +1135,10 @@ sub UserInGroup { return 0; } ConnectToDatabase(); + PushGlobalSQLState(); SendSQL("select (bit & $::usergroupset) != 0 from groups where name = " . SqlQuote($groupname)); my $bit = FetchOneColumn(); + PopGlobalSQLState(); if ($bit) { return 1; } @@ -1156,8 +1158,10 @@ sub BugInGroup { sub GroupExists { my ($groupname) = (@_); ConnectToDatabase(); + PushGlobalSQLState(); SendSQL("select count(*) from groups where name=" . SqlQuote($groupname)); my $count = FetchOneColumn(); + PopGlobalSQLState(); return $count; } @@ -1181,8 +1185,10 @@ sub GroupIsActive { my ($groupbit) = (@_); $groupbit ||= 0; ConnectToDatabase(); + PushGlobalSQLState(); SendSQL("select isactive from groups where bit=$groupbit"); my $isactive = FetchOneColumn(); + PopGlobalSQLState(); return $isactive; }