Adding karma.

This commit is contained in:
JT Smith 2002-06-19 02:05:34 +00:00
parent 5cf47ced5a
commit c2f4800620

View file

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