Bug 93167 - &GroupExists and &GroupIsActive should push and pop sql state

r=justdave, jouni
parent 9985608a
...@@ -1271,8 +1271,10 @@ sub BugInGroup { ...@@ -1271,8 +1271,10 @@ sub BugInGroup {
sub GroupExists { sub GroupExists {
my ($groupname) = (@_); my ($groupname) = (@_);
ConnectToDatabase(); ConnectToDatabase();
PushGlobalSQLState();
SendSQL("select count(*) from groups where name=" . SqlQuote($groupname)); SendSQL("select count(*) from groups where name=" . SqlQuote($groupname));
my $count = FetchOneColumn(); my $count = FetchOneColumn();
PopGlobalSQLState();
return $count; return $count;
} }
...@@ -1296,8 +1298,10 @@ sub GroupIsActive { ...@@ -1296,8 +1298,10 @@ sub GroupIsActive {
my ($groupbit) = (@_); my ($groupbit) = (@_);
$groupbit ||= 0; $groupbit ||= 0;
ConnectToDatabase(); ConnectToDatabase();
PushGlobalSQLState();
SendSQL("select isactive from groups where bit=$groupbit"); SendSQL("select isactive from groups where bit=$groupbit");
my $isactive = FetchOneColumn(); my $isactive = FetchOneColumn();
PopGlobalSQLState();
return $isactive; return $isactive;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment