Browse Source
Merge pull request #16200 from nextcloud/revert/16049-wrong-round
Revert incorrect rouding
pull/16209/head
Morris Jobke
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
2 deletions
-
apps/files/lib/Controller/ViewController.php
-
apps/files/tests/Controller/ViewControllerTest.php
|
|
|
@ -230,7 +230,7 @@ class ViewController extends Controller { |
|
|
|
|
|
|
|
$nav->assign('navigationItems', $navItems); |
|
|
|
|
|
|
|
$nav->assign('usage', \OC_Helper::humanFileSize(ceil($storageInfo['used'] / 102400) * 102400)); |
|
|
|
$nav->assign('usage', \OC_Helper::humanFileSize($storageInfo['used'])); |
|
|
|
if ($storageInfo['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED) { |
|
|
|
$totalSpace = $this->l10n->t('Unlimited'); |
|
|
|
} else { |
|
|
|
|
|
|
|
@ -141,7 +141,7 @@ class ViewControllerTest extends TestCase { |
|
|
|
|
|
|
|
$nav = new Template('files', 'appnavigation'); |
|
|
|
$nav->assign('usage_relative', 123); |
|
|
|
$nav->assign('usage', '100 KB'); |
|
|
|
$nav->assign('usage', '123 B'); |
|
|
|
$nav->assign('quota', 100); |
|
|
|
$nav->assign('total_space', '100 B'); |
|
|
|
//$nav->assign('webdavurl', '');
|
|
|
|
|