Adding karma.

This commit is contained in:
JT Smith 2002-06-24 00:44:22 +00:00
parent a0a2192119
commit f09b00ffc9
3 changed files with 22 additions and 3 deletions

View file

@ -239,7 +239,7 @@ sub identifier {
sub karma {
if (defined $_[1] && defined $_[2] && defined $_[3]) {
WebGUI::SQL->write("update users set karma=karma+$_[1] where userId=".$_[0]->userId);
WebGUI::SQL->write("insert into karmaLog values (".$_[0]->userId,$_[1].",".quote($_[2]).",".quote($_[3]).")");
WebGUI::SQL->write("insert into karmaLog values (".$_[0]->userId.",$_[1],".quote($_[2]).",".quote($_[3]).")");
}
return $_[0]->{_user}{karma};
}