aboutsummaryrefslogtreecommitdiffstats
path: root/settings/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'settings/index.php')
-rw-r--r--settings/index.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/settings/index.php b/settings/index.php
index 31db326f6bc..521f2ade9da 100644
--- a/settings/index.php
+++ b/settings/index.php
@@ -8,7 +8,14 @@ if( !OC_USER::isLoggedIn()){
}
-$tmpl = new OC_TEMPLATE( "settings", "index", "admin" );
+$tmpl = new OC_TEMPLATE( "settings", "index", "admin");
+$used=OC_FILESYSTEM::filesize('/');
+$free=disk_free_space(OC_CONFIG::getValue('datadirectory'));
+$total=$free+$used;
+$relative=round(($used/$total)*100);
+$tmpl->assign('usage',OC_HELPER::humanFileSize($used));
+$tmpl->assign('total_space',OC_HELPER::humanFileSize($total));
+$tmpl->assign('usage_relative',$relative);
$tmpl->printPage();
?>