]> source.dussan.org Git - nextcloud-server.git/commitdiff
settings/personal: calculate the relative usage with 2 decimals
authorFlorian Pritz <bluewind@xinu.at>
Fri, 23 Sep 2011 17:45:00 +0000 (19:45 +0200)
committerFlorian Pritz <bluewind@xinu.at>
Sat, 24 Sep 2011 16:42:04 +0000 (18:42 +0200)
Normally a browser window will be large enough that the bar is wider
than 100px so we can use decimals to display the real usage more
closely.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
settings/personal.php

index aea997aff227384f7ede8024e39ad58318469492..05dbda473acdb913b1c37960c99e561de449a834 100644 (file)
@@ -17,7 +17,7 @@ OC_App::setActiveNavigationEntry( "personal" );
 $used=OC_Filesystem::filesize('/');
 $free=OC_Filesystem::free_space();
 $total=$free+$used;
-$relative=round(($used/$total)*100);
+$relative=round(($used/$total)*10000)/100;
 
 $lang=OC_Preferences::getValue( OC_User::getUser(), 'core', 'lang', 'en' );
 $languageCodes=OC_L10N::findAvailableLanguages();