| @@ 522-528 (lines=7) @@ | ||
| 519 | $vote->setIp($ipAddress); |
|
| 520 | $vote->setNote($note); |
|
| 521 | // If the vote is for a comment |
|
| 522 | if ($comment != null) { |
|
| 523 | $vote->setPostComment($comment); |
|
| 524 | $vote->setPostvote($post->getPostvote()); |
|
| 525 | // else if the vote is for the post itself |
|
| 526 | } else { |
|
| 527 | $vote->setPostvote($post->getPostvote(), true); |
|
| 528 | } |
|
| 529 | ||
| 530 | if ($user) { |
|
| 531 | $vote->setUser($user); |
|
| @@ 615-621 (lines=7) @@ | ||
| 612 | $vote->setIp($ipAddress); |
|
| 613 | $vote->setNote(1); |
|
| 614 | // If the vote is for a comment |
|
| 615 | if ($comment != null) { |
|
| 616 | $vote->setPostComment($comment); |
|
| 617 | $vote->setPostvote($post->getPostvote()); |
|
| 618 | // else if the vote is for the post itself |
|
| 619 | } else { |
|
| 620 | $vote->setPostvote($post->getPostvote(), true); |
|
| 621 | } |
|
| 622 | if ($user) { |
|
| 623 | $vote->setUser($user); |
|
| 624 | } |
|