Overview
Comment:Fix division by zero
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable | 1.1.4
Files: files | file ages | folders
SHA3-256: 820510025dd60d0689e9ea361eb6b8c4e3b696301c977a628877eddeac6c750f
User & Date: bohwaz on 2021-04-27 18:13:11
Other Links: manifest | tags
Context
2021-04-28
20:30
Add alternative export option for years check-in: 71f62e466e user: bohwaz tags: trunk, stable
2021-04-27
18:13
Fix division by zero check-in: 820510025d user: bohwaz tags: trunk, stable, 1.1.4
17:49
Implement custom admin CSS file, change config files logic so that if config key is null, then file is not loaded check-in: 4f47920080 user: bohwaz tags: trunk, stable, 1.1.4
Changes

Modified src/www/admin/docs/index.php from [c2e76c334f] to [9eee8d2a3a].

37
38
39
40
41
42
43
44
45
46
47
48
$breadcrumbs = Files::getBreadcrumbs($path);

$parent_path = Utils::dirname($path);

$quota_used = Files::getUsedQuota();
$quota_max = Files::getQuota();
$quota_left = Files::getRemainingQuota();
$quota_percent = round(($quota_used / $quota_max) * 100);

$tpl->assign(compact('path', 'files', 'can_write', 'can_delete', 'can_mkdir', 'can_upload', 'context', 'context_ref', 'breadcrumbs', 'parent_path', 'quota_used', 'quota_max', 'quota_percent', 'quota_left'));

$tpl->display('docs/index.tpl');







|




37
38
39
40
41
42
43
44
45
46
47
48
$breadcrumbs = Files::getBreadcrumbs($path);

$parent_path = Utils::dirname($path);

$quota_used = Files::getUsedQuota();
$quota_max = Files::getQuota();
$quota_left = Files::getRemainingQuota();
$quota_percent = $quota_max ? round(($quota_used / $quota_max) * 100) : 100;

$tpl->assign(compact('path', 'files', 'can_write', 'can_delete', 'can_mkdir', 'can_upload', 'context', 'context_ref', 'breadcrumbs', 'parent_path', 'quota_used', 'quota_max', 'quota_percent', 'quota_left'));

$tpl->display('docs/index.tpl');