|
@@ 554-570 (lines=17) @@
|
| 551 |
|
$vote = null; |
| 552 |
|
$game = $post->getPostvote(); |
| 553 |
|
|
| 554 |
|
if ($user) { |
| 555 |
|
if ($comment == null) { |
| 556 |
|
$entryUser = count($postvoteVoteMapper->findBy(array('user' => $user, 'post' => $postId))); |
| 557 |
|
$vote = $postvoteVoteMapper->findOneBy(array('user' => $user, 'post' => $postId)); |
| 558 |
|
} else { |
| 559 |
|
$entryUser = count($postvoteVoteMapper->findBy(array('user' => $user, 'post' => $postId, 'postComment' => $commentId))); |
| 560 |
|
$vote = $postvoteVoteMapper->findOneBy(array('user' => $user, 'post' => $postId, 'postComment' => $commentId)); |
| 561 |
|
} |
| 562 |
|
} else { |
| 563 |
|
if ($comment == null) { |
| 564 |
|
$entryUser = count($postvoteVoteMapper->findBy(array('ip' => $ipAddress, 'post' => $postId))); |
| 565 |
|
$vote = $postvoteVoteMapper->findOneBy(array('ip' => $ipAddress, 'post' => $postId)); |
| 566 |
|
} else { |
| 567 |
|
$entryUser = count($postvoteVoteMapper->findBy(array('ip' => $ipAddress, 'post' => $postId, 'postComment' => $commentId))); |
| 568 |
|
$vote = $postvoteVoteMapper->findOneBy(array('ip' => $ipAddress, 'post' => $postId, 'postComment' => $commentId)); |
| 569 |
|
} |
| 570 |
|
} |
| 571 |
|
|
| 572 |
|
$this->getEventManager()->trigger( |
| 573 |
|
__FUNCTION__ .'.post', |
|
@@ 589-605 (lines=17) @@
|
| 586 |
|
$vote = null; |
| 587 |
|
$game = $post->getPostvote(); |
| 588 |
|
|
| 589 |
|
if ($user) { |
| 590 |
|
if ($comment == null) { |
| 591 |
|
$entryUser = count($postvoteVoteMapper->findBy(array('user' => $user, 'post' => $postId))); |
| 592 |
|
$vote = $postvoteVoteMapper->findOneBy(array('user' => $user, 'post' => $postId)); |
| 593 |
|
} else { |
| 594 |
|
$entryUser = count($postvoteVoteMapper->findBy(array('user' => $user, 'post' => $postId, 'postComment' => $commentId))); |
| 595 |
|
$vote = $postvoteVoteMapper->findOneBy(array('user' => $user, 'post' => $postId, 'postComment' => $commentId)); |
| 596 |
|
} |
| 597 |
|
} else { |
| 598 |
|
if ($comment == null) { |
| 599 |
|
$entryUser = count($postvoteVoteMapper->findBy(array('ip' => $ipAddress, 'post' => $postId))); |
| 600 |
|
$vote = $postvoteVoteMapper->findOneBy(array('ip' => $ipAddress, 'post' => $postId)); |
| 601 |
|
} else { |
| 602 |
|
$entryUser = count($postvoteVoteMapper->findBy(array('ip' => $ipAddress, 'post' => $postId, 'postComment' => $commentId))); |
| 603 |
|
$vote = $postvoteVoteMapper->findOneBy(array('ip' => $ipAddress, 'post' => $postId, 'postComment' => $commentId)); |
| 604 |
|
} |
| 605 |
|
} |
| 606 |
|
|
| 607 |
|
if ($entryUser && $entryUser > 0) { |
| 608 |
|
return false; |