mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-10 10:44:20 +02:00
[ticket/12363] Mark winning (most votes) results bar
PHPBB3-12363
This commit is contained in:
@@ -864,6 +864,7 @@ if (!empty($topic_data['poll_start']))
|
||||
$option_pct_txt = sprintf("%.1d%%", round($option_pct * 100));
|
||||
$option_pct_rel = ($poll_most > 0) ? $poll_option['poll_option_total'] / $poll_most : 0;
|
||||
$option_pct_rel_txt = sprintf("%.1d%%", round($option_pct_rel * 100));
|
||||
$option_winner = ($poll_option['poll_option_total'] > 0 && $poll_option['poll_option_total'] == $poll_most) ? true : false;
|
||||
|
||||
$template->assign_block_vars('poll_option', array(
|
||||
'POLL_OPTION_ID' => $poll_option['poll_option_id'],
|
||||
@@ -874,6 +875,7 @@ if (!empty($topic_data['poll_start']))
|
||||
'POLL_OPTION_PCT' => round($option_pct * 100),
|
||||
'POLL_OPTION_WIDTH' => round($option_pct * 250),
|
||||
'POLL_OPTION_VOTED' => (in_array($poll_option['poll_option_id'], $cur_voted_id)) ? true : false,
|
||||
'POLL_OPTION_WINNER' => $option_winner,
|
||||
));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user