@@ 103-105 (lines=3) @@ | ||
100 | /* there was a problem registering the vote */ |
|
101 | redirect_header($GLOBALS['xoops']->buildUrl('index.php', ['poll_id' => $poll_id]), $classConstants::REDIRECT_DELAY_MEDIUM, constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_VOTE_ERROR')); |
|
102 | } |
|
103 | } else { |
|
104 | $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_ALREADYVOTED'); |
|
105 | } |
|
106 | /* set anon user vote (and the time they voted) */ |
|
107 | if (!is_object($GLOBALS['xoopsUser'])) { |
|
108 | xoops_load('pollUtility', $GLOBALS['xoopsModuleConfig']['poll_module']); |
|
@@ 113-115 (lines=3) @@ | ||
110 | $classPollUtility = new Xoopspoll\Utility(); |
|
111 | $classPollUtility::setVoteCookie($poll_id, $voteTime, 0); |
|
112 | } |
|
113 | } else { |
|
114 | $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_CANNOTVOTE'); |
|
115 | } |
|
116 | } else { |
|
117 | /* poll has expired so just show the results */ |
|
118 | $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . 'SORRYEXPIRED'); |
|
@@ 116-119 (lines=4) @@ | ||
113 | } else { |
|
114 | $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_CANNOTVOTE'); |
|
115 | } |
|
116 | } else { |
|
117 | /* poll has expired so just show the results */ |
|
118 | $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . 'SORRYEXPIRED'); |
|
119 | } |
|
120 | } else { |
|
121 | $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_ERROR_INVALID_POLLID'); |
|
122 | } |
|
@@ 120-122 (lines=3) @@ | ||
117 | /* poll has expired so just show the results */ |
|
118 | $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . 'SORRYEXPIRED'); |
|
119 | } |
|
120 | } else { |
|
121 | $msg = constant('_MD_' . strtoupper($GLOBALS['xoopsModuleConfig']['poll_module']) . '_ERROR_INVALID_POLLID'); |
|
122 | } |
|
123 | if (null !== $url) { |
|
124 | redirect_header($url, $classConstants::REDIRECT_DELAY_MEDIUM, $msg); |
|
125 | } else { |