]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 93167 - &GroupExists and &GroupIsActive and &UserInGroup need to push
authorbbaetz%student.usyd.edu.au <>
Mon, 3 Jun 2002 20:34:29 +0000 (20:34 +0000)
committerbbaetz%student.usyd.edu.au <>
Mon, 3 Jun 2002 20:34:29 +0000 (20:34 +0000)
and pop sql state
r=justdave, jouni

globals.pl

index 5d806a2f507833d70e2bcae75e24a2b8ec2eae4c..87d07d14cb685690cc58e8c391512b9859302ba4 100644 (file)
@@ -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;
 }