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

r=justdave, jouni
parent 9985608a
......@@ -1271,8 +1271,10 @@ sub BugInGroup {
sub GroupExists {
my ($groupname) = (@_);
ConnectToDatabase();
PushGlobalSQLState();
SendSQL("select count(*) from groups where name=" . SqlQuote($groupname));
my $count = FetchOneColumn();
PopGlobalSQLState();
return $count;
}
......@@ -1296,8 +1298,10 @@ sub GroupIsActive {
my ($groupbit) = (@_);
$groupbit ||= 0;
ConnectToDatabase();
PushGlobalSQLState();
SendSQL("select isactive from groups where bit=$groupbit");
my $isactive = FetchOneColumn();
PopGlobalSQLState();
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