Fix total player statistics calculation in events

This commit is contained in:
Brian Miyaji
2014-03-21 14:25:44 +11:00
parent 40ee5f4910
commit f7d6057ed9

View File

@@ -10,13 +10,13 @@ if ( !function_exists( 'sportspress_event_players' ) ) {
$stats = (array)get_post_meta( $id, 'sp_players', true );
$statistic_labels = sportspress_get_var_labels( 'sp_statistic' );
$totals = array();
$output = '';
foreach( $teams as $key => $team_id ):
if ( ! $team_id ) continue;
$totals = array();
// Get results for players in the team
$players = sportspress_array_between( (array)get_post_meta( $id, 'sp_player', false ), 0, $key );
$data = sportspress_array_combine( $players, sportspress_array_value( $stats, $team_id, array() ) );