mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-02 11:32:52 +02:00
fixes #2369 avoid division by zero in case of STORAGE_TOTAL < 1kB
This commit is contained in:
@@ -240,8 +240,8 @@ translate_type['{$type_to_translate}'] = "{$type_to_translate|translate}";
|
||||
|
||||
<div class="storage-chart">
|
||||
{foreach from=$STORAGE_CHART_DATA key=type item=details}
|
||||
<span data-type="storage-{$type}" style="width:{$details.total.filesize/$STORAGE_TOTAL*100}%">
|
||||
<p>{round($details.total.filesize/$STORAGE_TOTAL*100)}%</p>
|
||||
<span data-type="storage-{$type}" style="width:{if $STORAGE_TOTAL > 0}{$details.total.filesize/$STORAGE_TOTAL*100}{else}0{/if}%">
|
||||
<p>{if $STORAGE_TOTAL > 0}{round($details.total.filesize/$STORAGE_TOTAL*100)}{else}0{/if}%</p>
|
||||
</span>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user