Skip to content

Commit

Permalink
Update repositories.php
Browse files Browse the repository at this point in the history
Update repositories.php
  • Loading branch information
nielsengelen committed Nov 26, 2019
1 parent 5e9dc54 commit 3147114
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions includes/repositories.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,19 @@
</table>
<?php
for ($i = 0; $i < count($objectrepos); $i++) {
if (isset($objectrepos[$i]['usedSpaceGB']) && !isset($objectrepos[$i]['freeSpaceGB'])) {
if (isset($objectrepos[$i]['usedSpaceBytes']) && !isset($objectrepos[$i]['freeSpaceBytes'])) {
?>
<script>
var usedspaceobject = filesize(<?php echo $objectrepos[$i]['usedSpaceGB']; ?>, {round: 1});
var usedspaceobject = filesize(<?php echo $objectrepos[$i]['usedSpaceBytes']; ?>, {round: 1});

document.getElementById('size-object-<?php echo $objectrepos[$i]['id']; ?>').innerHTML = usedspaceobject + ' used';
</script>
<?php
} else if (isset($objectrepos[$i]['usedSpaceGB']) && isset($objectrepos[$i]['freeSpaceGB'])) {
} else if (isset($objectrepos[$i]['usedSpaceBytes']) && isset($objectrepos[$i]['freeSpaceBytes'])) {
?>
<script>
var freespaceobject = filesize(<?php echo $objectrepos[$i]['freeSpaceGB']; ?>, {round: 1});
var usedspaceobject = filesize(<?php echo $objectrepos[$i]['usedSpaceGB']; ?>, {round: 1});
var freespaceobject = filesize(<?php echo $objectrepos[$i]['freeSpaceBytes']; ?>, {round: 1});
var usedspaceobject = filesize(<?php echo $objectrepos[$i]['usedSpaceBytes']; ?>, {round: 1});

document.getElementById('size-object-<?php echo $objectrepos[$i]['id']; ?>').innerHTML = usedspaceobject + ' used (' + freespaceobject + ' available)';
</script>
Expand Down

0 comments on commit 3147114

Please sign in to comment.