Show > 100% blog space used in MS Right Now.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-05-01 22:06:48 +00:00
parent 3a2f3b3433
commit 6ebe054817
1 changed files with 2 additions and 5 deletions

View File

@ -445,10 +445,7 @@ function display_space_usage() {
$space = get_space_allowed();
$used = get_dirsize( BLOGUPLOADDIR ) / 1024 / 1024;
if ( $used > $space )
$percentused = '100';
else
$percentused = ( $used / $space ) * 100;
$percentused = ( $used / $space ) * 100;
if ( $space > 1000 ) {
$space = number_format( $space / 1024 );
@ -459,7 +456,7 @@ function display_space_usage() {
$space .= __( 'MB' );
}
?>
<strong><?php printf( __( 'Used: %1s%% of %2s' ), number_format( $percentused ), $space );?></strong>
<strong><?php printf( __( 'Used: %1s%% of %2s' ), number_format( $percentused ), $space ); ?></strong>
<?php
}