|
@@ -68,7 +68,7 @@ discard block |
|
|
block discarded – undo |
|
68
|
68
|
* @param array $topic_data |
|
69
|
69
|
* @param \phpbb\template\twig\twig $template |
|
70
|
70
|
*/ |
|
71
|
|
- public function build(array $topic_data, \phpbb\template\twig\twig &$template) |
|
|
71
|
+ public function build(array $topic_data, \phpbb\template\twig\twig & $template) |
|
72
|
72
|
{ |
|
73
|
73
|
$this->translator->add_lang('viewtopic'); |
|
74
|
74
|
|
|
@@ -100,7 +100,7 @@ discard block |
|
|
block discarded – undo |
|
100
|
100
|
'S_POLL_ACTION' => $viewtopic_url, |
|
101
|
101
|
'S_FORM_TOKEN' => $this->sitemaker->get_form_key('posting'), |
|
102
|
102
|
|
|
103
|
|
- 'U_VIEW_RESULTS' => $viewtopic_url . '&view=viewpoll', |
|
|
103
|
+ 'U_VIEW_RESULTS' => $viewtopic_url.'&view=viewpoll', |
|
104
|
104
|
)); |
|
105
|
105
|
} |
|
106
|
106
|
|
|
@@ -171,7 +171,7 @@ discard block |
|
|
block discarded – undo |
|
171
|
171
|
$post_id = (int) $topic_data['topic_first_post_id']; |
|
172
|
172
|
|
|
173
|
173
|
$sql = 'SELECT o.*, p.bbcode_bitfield, p.bbcode_uid |
|
174
|
|
- FROM ' . POLL_OPTIONS_TABLE . ' o, ' . POSTS_TABLE . " p |
|
|
174
|
+ FROM ' . POLL_OPTIONS_TABLE.' o, '.POSTS_TABLE." p |
|
175
|
175
|
WHERE o.topic_id = $topic_id |
|
176
|
176
|
AND p.post_id = $post_id |
|
177
|
177
|
AND p.topic_id = o.topic_id |
|
@@ -216,7 +216,7 @@ discard block |
|
|
block discarded – undo |
|
216
|
216
|
* @param int $poll_most |
|
217
|
217
|
* @param \phpbb\template\twig\twig $template |
|
218
|
218
|
*/ |
|
219
|
|
- private function build_poll_options(array $cur_voted_id, array $poll_info, $poll_total, $poll_most, \phpbb\template\twig\twig &$template) |
|
|
219
|
+ private function build_poll_options(array $cur_voted_id, array $poll_info, $poll_total, $poll_most, \phpbb\template\twig\twig & $template) |
|
220
|
220
|
{ |
|
221
|
221
|
foreach ($poll_info as $poll_option) |
|
222
|
222
|
{ |
|
@@ -247,8 +247,8 @@ discard block |
|
|
block discarded – undo |
|
247
|
247
|
if ($this->user->data['is_registered']) |
|
248
|
248
|
{ |
|
249
|
249
|
$sql = 'SELECT poll_option_id |
|
250
|
|
- FROM ' . POLL_VOTES_TABLE . ' |
|
251
|
|
- WHERE topic_id = ' . (int) $topic_id . ' |
|
|
250
|
+ FROM ' . POLL_VOTES_TABLE.' |
|
|
251
|
+ WHERE topic_id = ' . (int) $topic_id.' |
|
252
|
252
|
AND vote_user_id = ' . $this->user->data['user_id']; |
|
253
|
253
|
$result = $this->db->sql_query($sql); |
|
254
|
254
|
|
|
@@ -263,9 +263,9 @@ discard block |
|
|
block discarded – undo |
|
263
|
263
|
// Cookie based guest tracking ... I don't like this but hum ho |
|
264
|
264
|
// it's oft requested. This relies on "nice" users who don't feel |
|
265
|
265
|
// the need to delete cookies to mess with results. |
|
266
|
|
- if ($this->request->is_set($this->config['cookie_name'] . '_poll_' . $topic_id, \phpbb\request\request_interface::COOKIE)) |
|
|
266
|
+ if ($this->request->is_set($this->config['cookie_name'].'_poll_'.$topic_id, \phpbb\request\request_interface::COOKIE)) |
|
267
|
267
|
{ |
|
268
|
|
- $cur_voted_id = explode(',', $this->request->variable($this->config['cookie_name'] . '_poll_' . $topic_id, '', true, \phpbb\request\request_interface::COOKIE)); |
|
|
268
|
+ $cur_voted_id = explode(',', $this->request->variable($this->config['cookie_name'].'_poll_'.$topic_id, '', true, \phpbb\request\request_interface::COOKIE)); |
|
269
|
269
|
$cur_voted_id = array_map('intval', $cur_voted_id); |
|
270
|
270
|
} |
|
271
|
271
|
} |