htdocs/modules/publisher/class/utils.php 1 location
|
@@ 895-900 (lines=6) @@
|
| 892 |
|
$ip = getenv('REMOTE_ADDR'); |
| 893 |
|
|
| 894 |
|
/* @var $ratingObj PublisherRating */ |
| 895 |
|
foreach ($ratingObjs as $ratingObj) { |
| 896 |
|
$current_rating += $ratingObj->getVar('rate'); |
| 897 |
|
if ($ratingObj->getVar('ip') == $ip || ($uid > 0 && $uid == $ratingObj->getVar('uid'))) { |
| 898 |
|
$voted = true; |
| 899 |
|
} |
| 900 |
|
} |
| 901 |
|
|
| 902 |
|
$tense = $count == 1 ? _MD_PUBLISHER_VOTE_lVOTE : _MD_PUBLISHER_VOTE_lVOTES; //plural form votes/vote |
| 903 |
|
|
htdocs/modules/publisher/include/ajax_rating.php 1 location
|
@@ 80-85 (lines=6) @@
|
| 77 |
|
$voted = false; |
| 78 |
|
$ip = getenv('REMOTE_ADDR'); |
| 79 |
|
/* @var $ratingObj PublisherRating */ |
| 80 |
|
foreach ($ratingObjs as $ratingObj) { |
| 81 |
|
$current_rating += $ratingObj->getVar('rate'); |
| 82 |
|
if ($ratingObj->getVar('ip') == $ip || ($uid > 0 && $uid == $ratingObj->getVar('uid'))) { |
| 83 |
|
$voted = true; |
| 84 |
|
} |
| 85 |
|
} |
| 86 |
|
|
| 87 |
|
if ($voted) { |
| 88 |
|
$output = "unit_long$itemid|" . _MD_PUBLISHER_VOTE_ALREADY . "\n"; |
htdocs/modules/publisher/rate.php 1 location
|
@@ 57-62 (lines=6) @@
|
| 54 |
|
$ip = getenv('REMOTE_ADDR'); |
| 55 |
|
|
| 56 |
|
/* @var $ratingObj PublisherRating */ |
| 57 |
|
foreach ($ratingObjs as $ratingObj) { |
| 58 |
|
$current_rating += $ratingObj->getVar('rate'); |
| 59 |
|
if ($ratingObj->getVar('ip') == $ip || ($uid > 0 && $uid == $ratingObj->getVar('uid'))) { |
| 60 |
|
$voted = true; |
| 61 |
|
} |
| 62 |
|
} |
| 63 |
|
|
| 64 |
|
if ($voted) { |
| 65 |
|
$xoops->redirect(PUBLISHER_URL . '/item.php?itemid=' . $itemid, 2, _MD_PUBLISHER_VOTE_ALREADY); |