Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -330,21 +330,23 @@ class _Smf extends \IPS\convert\Software
|
||||
$poll_data = $this->db->select( '*', 'polls', array( "id_poll=?", $row['id_poll'] ) )->first();
|
||||
|
||||
$options = $this->db->select( '*', 'poll_choices', array( "id_poll=?", $poll_data['id_poll'] ) );
|
||||
|
||||
$choices = array();
|
||||
$votes = 0;
|
||||
|
||||
$choices = $votes = $search = [];
|
||||
$index = 1;
|
||||
foreach( $options AS $option )
|
||||
{
|
||||
$choices[ $option['id_choice'] ] = $option['label'];
|
||||
$votes += $option['votes'];
|
||||
$choices[ $index ] = $option['label'];
|
||||
$votes[ $index ] = $option['votes'];
|
||||
$search[ $index ] = $option['id_choice'];
|
||||
$index++;
|
||||
}
|
||||
|
||||
$member_votes = array();
|
||||
foreach( $this->db->select( '*', 'log_polls', array( "id_poll=?", $poll_data['id_poll'] ) ) AS $vote )
|
||||
{
|
||||
$member_votes[$vote['id_member']] = array(
|
||||
$member_votes[ $vote['id_member'] ] = array(
|
||||
'member_id' => $vote['id_member'],
|
||||
'member_choices' => array( $vote['id_choice'] )
|
||||
'member_choices' => array( 1 => array_search( $vote['id_choice'], $search ) )
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user