Bug 93167 - &GroupExists and &GroupIsActive should push and pop sql state
r=justdave, jouni git-svn-id: svn://10.0.0.236/trunk@122549 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
bd45eaa9a0
commit
33f62fc9c7
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user