@@ 527-543 (lines=17) @@ | ||
524 | $vote = null; |
|
525 | $game = $post->getPostvote(); |
|
526 | ||
527 | if ($user) { |
|
528 | if ($comment == null) { |
|
529 | $entryUser = count($postvoteVoteMapper->findBy(array('user' => $user, 'post' => $postId))); |
|
530 | $vote = $postvoteVoteMapper->findOneBy(array('user' => $user, 'post' => $postId)); |
|
531 | } else { |
|
532 | $entryUser = count($postvoteVoteMapper->findBy(array('user' => $user, 'post' => $postId, 'postComment' => $commentId))); |
|
533 | $vote = $postvoteVoteMapper->findOneBy(array('user' => $user, 'post' => $postId, 'postComment' => $commentId)); |
|
534 | } |
|
535 | } else { |
|
536 | if ($comment == null) { |
|
537 | $entryUser = count($postvoteVoteMapper->findBy(array('ip' => $ipAddress, 'post' => $postId))); |
|
538 | $vote = $postvoteVoteMapper->findOneBy(array('ip' => $ipAddress, 'post' => $postId)); |
|
539 | } else { |
|
540 | $entryUser = count($postvoteVoteMapper->findBy(array('ip' => $ipAddress, 'post' => $postId, 'postComment' => $commentId))); |
|
541 | $vote = $postvoteVoteMapper->findOneBy(array('ip' => $ipAddress, 'post' => $postId, 'postComment' => $commentId)); |
|
542 | } |
|
543 | } |
|
544 | ||
545 | $this->getEventManager()->trigger( |
|
546 | __FUNCTION__ .'.post', |
|
@@ 562-578 (lines=17) @@ | ||
559 | $vote = null; |
|
560 | $game = $post->getPostvote(); |
|
561 | ||
562 | if ($user) { |
|
563 | if ($comment == null) { |
|
564 | $entryUser = count($postvoteVoteMapper->findBy(array('user' => $user, 'post' => $postId))); |
|
565 | $vote = $postvoteVoteMapper->findOneBy(array('user' => $user, 'post' => $postId)); |
|
566 | } else { |
|
567 | $entryUser = count($postvoteVoteMapper->findBy(array('user' => $user, 'post' => $postId, 'postComment' => $commentId))); |
|
568 | $vote = $postvoteVoteMapper->findOneBy(array('user' => $user, 'post' => $postId, 'postComment' => $commentId)); |
|
569 | } |
|
570 | } else { |
|
571 | if ($comment == null) { |
|
572 | $entryUser = count($postvoteVoteMapper->findBy(array('ip' => $ipAddress, 'post' => $postId))); |
|
573 | $vote = $postvoteVoteMapper->findOneBy(array('ip' => $ipAddress, 'post' => $postId)); |
|
574 | } else { |
|
575 | $entryUser = count($postvoteVoteMapper->findBy(array('ip' => $ipAddress, 'post' => $postId, 'postComment' => $commentId))); |
|
576 | $vote = $postvoteVoteMapper->findOneBy(array('ip' => $ipAddress, 'post' => $postId, 'postComment' => $commentId)); |
|
577 | } |
|
578 | } |
|
579 | ||
580 | if ($entryUser && $entryUser > 0) { |
|
581 | return false; |