and pop sql state
r=justdave, jouni
return 0;
}
ConnectToDatabase();
+ PushGlobalSQLState();
SendSQL("select (bit & $::usergroupset) != 0 from groups where name = " . SqlQuote($groupname));
my $bit = FetchOneColumn();
+ PopGlobalSQLState();
if ($bit) {
return 1;
}
sub GroupExists {
my ($groupname) = (@_);
ConnectToDatabase();
+ PushGlobalSQLState();
SendSQL("select count(*) from groups where name=" . SqlQuote($groupname));
my $count = FetchOneColumn();
+ PopGlobalSQLState();
return $count;
}
my ($groupbit) = (@_);
$groupbit ||= 0;
ConnectToDatabase();
+ PushGlobalSQLState();
SendSQL("select isactive from groups where bit=$groupbit");
my $isactive = FetchOneColumn();
+ PopGlobalSQLState();
return $isactive;
}