Fix number formatting for decimals, tag 1.2.6

This commit is contained in:
Brian Miyaji
2014-07-27 04:02:42 +10:00
parent b871b5f796
commit 64865a3723
15 changed files with 895 additions and 797 deletions

View File

@@ -5,7 +5,7 @@
* The SportsPress league table class handles individual league table data.
*
* @class SP_League_Table
* @version 1.2.5
* @version 1.2.6
* @package SportsPress/Classes
* @category Class
* @author ThemeBoy
@@ -274,7 +274,7 @@ class SP_League_Table extends SP_Custom_Post{
if ( $adjustment != 0 ):
$placeholder += sp_array_value( $adjustment, $stat->post_name, 0 );
$placeholder = number_format( $placeholder, $stat->precision, '', '' );
$placeholder = number_format( $placeholder, $stat->precision, '.', '' );
endif;
endif;
endif;

View File

@@ -5,7 +5,7 @@
* The SportsPress player list class handles individual player list data.
*
* @class SP_Player_List
* @version 1.2.5
* @version 1.2.6
* @package SportsPress/Classes
* @category Class
* @author ThemeBoy
@@ -295,7 +295,7 @@ class SP_Player_List extends SP_Custom_Post {
if ( $adjustment != 0 ):
$placeholder += sp_array_value( $adjustment, $stat->post_name, 0 );
$placeholder = number_format( $placeholder, $stat->precision, '', '' );
$placeholder = number_format( $placeholder, $stat->precision, '.', '' );
endif;
endif;

View File

@@ -7,7 +7,7 @@
* @author ThemeBoy
* @category Core
* @package SportsPress/Functions
* @version 1.2.5
* @version 1.2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -1011,7 +1011,7 @@ if ( !function_exists( 'sp_solve' ) ) {
endif;
// Return solution
return number_format( $eos->solveIF( str_replace( ' ', '', $equation ), $vars ), $precision, '', '' );
return number_format( $eos->solveIF( str_replace( ' ', '', $equation ), $vars ), $precision, '.', '' );
}
}