committing first round of GUID changes

This commit is contained in:
JT Smith 2004-08-09 15:45:44 +00:00
parent 0ba6b7c911
commit 48fd2d44e9
48 changed files with 9012 additions and 8870 deletions

View file

@ -42,7 +42,7 @@ sub duplicate {
$w = $_[0]->SUPER::duplicate($_[1]);
$sth = WebGUI::SQL->read("select * from Poll_answer where wobjectId=".$_[0]->get("wobjectId"));
while (@row = $sth->array) {
WebGUI::SQL->write("insert into Poll_answer values (".$w.", '$row[1]', $row[2], '$row[3]')");
WebGUI::SQL->write("insert into Poll_answer values (".quote($w).", ".quote($row[1]).", ".quote($row[2]).", ".quote($row[3]).")");
}
$sth->finish;
}
@ -281,8 +281,8 @@ sub www_view {
sub www_vote {
my $u;
if ($session{form}{answer} ne "" && WebGUI::Grouping::isInGroup($_[0]->get("voteGroup"),$session{user}{userId}) && !($_[0]->_hasVoted())) {
WebGUI::SQL->write("insert into Poll_answer values (".$_[0]->get("wobjectId").",
".quote($session{form}{answer}).", $session{user}{userId}, '$session{env}{REMOTE_ADDR}')");
WebGUI::SQL->write("insert into Poll_answer values (".quote($_[0]->get("wobjectId")).",
".quote($session{form}{answer}).", ".quote($session{user}{userId}).", '$session{env}{REMOTE_ADDR}')");
if ($session{setting}{useKarma}) {
$u = WebGUI::User->new($session{user}{userId});
$u->karma($_[0]->get("karmaPerVote"),$_[0]->get("namespace")." (".$_[0]->get("wobjectId").")","Voted on this poll.");