Fix equestion based stats in player lists

This commit is contained in:
Nabil Kadimi
2019-12-20 15:19:16 +01:00
committed by GitHub
parent bc609c245f
commit 30df0734a2

View File

@@ -597,11 +597,13 @@ class SP_Player_List extends SP_Secondary_Post {
endif; endif;
endif; endif;
if ( $placeholder !== '' && is_numeric( $placeholder ) ): if ( ! $stat->equation ) {
$placeholder = sp_array_value( $placeholders[ $player_id ], $stat->post_name, 0 ) + $placeholder; if ( $placeholder !== '' && is_numeric( $placeholder ) ):
else: $placeholder = sp_array_value( $placeholders[ $player_id ], $stat->post_name, 0 ) + $placeholder;
$placeholder = sp_array_value( $placeholders[ $player_id ], $stat->post_name, '-' ); else:
endif; $placeholder = sp_array_value( $placeholders[ $player_id ], $stat->post_name, '-' );
endif;
}
if ( is_numeric( $placeholder ) && $stat->precision ): if ( is_numeric( $placeholder ) && $stat->precision ):
$placeholder = number_format( $placeholder, $stat->precision, '.', '' ); $placeholder = number_format( $placeholder, $stat->precision, '.', '' );