Apply players (individual sport) mode throughout

This commit is contained in:
Brian Miyaji
2015-01-25 16:45:21 +11:00
parent 352c6632da
commit 5d5368d1bf
19 changed files with 656 additions and 559 deletions

View File

@@ -61,8 +61,15 @@ if ( is_array( $teams ) ):
$totals = array();
if ( $team_id ) {
if ( 0 < $team_id ) {
$data = sp_array_combine( $players, sp_array_value( $performance, $team_id, array() ) );
} elseif ( 0 == $team_id ) {
$data = array();
foreach ( $players as $player_id ) {
if ( isset( $performance[ $player_id ][ $player_id ] ) ) {
$data[ $player_id ] = $performance[ $player_id ][ $player_id ];
}
}
} else {
$data = sp_array_value( array_values( $performance ), $index );
}