| @@ 495-501 (lines=7) @@ | ||
| 492 | $vote->setIp($ipAddress); |
|
| 493 | $vote->setNote($note); |
|
| 494 | // If the vote is for a comment |
|
| 495 | if ($comment != null) { |
|
| 496 | $vote->setPostComment($comment); |
|
| 497 | $vote->setPostvote($post->getPostvote()); |
|
| 498 | // else if the vote is for the post itself |
|
| 499 | } else { |
|
| 500 | $vote->setPostvote($post->getPostvote(), true); |
|
| 501 | } |
|
| 502 | ||
| 503 | if ($user) { |
|
| 504 | $vote->setUser($user); |
|
| @@ 588-594 (lines=7) @@ | ||
| 585 | $vote->setIp($ipAddress); |
|
| 586 | $vote->setNote(1); |
|
| 587 | // If the vote is for a comment |
|
| 588 | if ($comment != null) { |
|
| 589 | $vote->setPostComment($comment); |
|
| 590 | $vote->setPostvote($post->getPostvote()); |
|
| 591 | // else if the vote is for the post itself |
|
| 592 | } else { |
|
| 593 | $vote->setPostvote($post->getPostvote(), true); |
|
| 594 | } |
|
| 595 | if ($user) { |
|
| 596 | $vote->setUser($user); |
|
| 597 | } |
|