diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-01 08:30:58 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-01 08:30:58 +0100 |
commit | fd4742d4308aef6e1d628e19cece5cc04aaee481 (patch) | |
tree | b8cd4ed9be88680f013ba50a5f878ab6e568ff25 /settings | |
parent | e1acad7ae2a47c3aaeca747ceb734bfbc37c87df (diff) | |
parent | 11215f4e275f7e7d1aafdb8af440550d27562ad8 (diff) | |
download | nextcloud-server-fd4742d4308aef6e1d628e19cece5cc04aaee481.tar.gz nextcloud-server-fd4742d4308aef6e1d628e19cece5cc04aaee481.zip |
Merge pull request #22613 from owncloud/quota-changedavreturnvaluewhennoquotaset
Don't return quota when none set
Diffstat (limited to 'settings')
-rw-r--r-- | settings/personal.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/settings/personal.php b/settings/personal.php index d2d4fc90f5e..62a718985f8 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -137,9 +137,15 @@ if ($externalStorageEnabled) { // Return template +$l = \OC::$server->getL10N('settings'); $tmpl = new OC_Template( 'settings', 'personal', 'user'); $tmpl->assign('usage', OC_Helper::humanFileSize($storageInfo['used'])); -$tmpl->assign('total_space', OC_Helper::humanFileSize($storageInfo['total'])); +if ($storageInfo['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED) { + $totalSpace = $l->t('Unlimited'); +} else { + $totalSpace = OC_Helper::humanFileSize($storageInfo['total']); +} +$tmpl->assign('total_space', $totalSpace); $tmpl->assign('usage_relative', $storageInfo['relative']); $tmpl->assign('clients', $clients); $tmpl->assign('email', $email); @@ -162,7 +168,6 @@ sort($groups2); $tmpl->assign('groups', $groups2); // add hardcoded forms from the template -$l = \OC::$server->getL10N('settings'); $formsAndMore = []; $formsAndMore[]= ['anchor' => 'avatar', 'section-name' => $l->t('Personal info')]; $formsAndMore[]= ['anchor' => 'clientsbox', 'section-name' => $l->t('Sync clients')]; |