Group.t: group karma tests, better clean-up at end
User.t: better clean-up at end Scratch.t: no newlines in test output Session/Scratch.pm: convert to use placeholders Ad.pm: Add missing line of POD. Group.pm: add method to get all users in a group by karma. User.pm: isInGroup to use getKarmaUsers.
This commit is contained in:
parent
fd5be2ce2d
commit
3e179fa4ad
7 changed files with 120 additions and 47 deletions
|
|
@ -174,7 +174,7 @@ The current session.
|
|||
sub new {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
my $data = $session->db->buildHashRef("select name,value from userSessionScratch where sessionId=".$session->db->quote($session->getId));
|
||||
my $data = $session->db->buildHashRef("select name,value from userSessionScratch where sessionId=?",[$session->getId]);
|
||||
bless {_session=>$session,_sessionId=>$session->getId, _data=>$data}, $class;
|
||||
}
|
||||
|
||||
|
|
@ -215,7 +215,7 @@ sub set {
|
|||
my $value = shift;
|
||||
return undef unless ($name);
|
||||
$self->{_data}{$name} = $value;
|
||||
$self->session->db->write("replace into userSessionScratch (sessionId, name, value) values (".$self->session->db->quoteAndJoin([$self->{_sessionId}, $name, $value]).")");
|
||||
$self->session->db->write("replace into userSessionScratch (sessionId, name, value) values (?,?,?)", [$self->{_sessionId}, $name, $value]);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue