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

git-svn-id: https://develop.svn.wordpress.org/trunk@14327 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-05-01 22:06:48 +00:00
parent f049bc949c
commit 5f0218032f
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
}