mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-02 19:42:54 +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">
|
<div class="storage-chart">
|
||||||
{foreach from=$STORAGE_CHART_DATA key=type item=details}
|
{foreach from=$STORAGE_CHART_DATA key=type item=details}
|
||||||
<span data-type="storage-{$type}" style="width:{$details.total.filesize/$STORAGE_TOTAL*100}%">
|
<span data-type="storage-{$type}" style="width:{if $STORAGE_TOTAL > 0}{$details.total.filesize/$STORAGE_TOTAL*100}{else}0{/if}%">
|
||||||
<p>{round($details.total.filesize/$STORAGE_TOTAL*100)}%</p>
|
<p>{if $STORAGE_TOTAL > 0}{round($details.total.filesize/$STORAGE_TOTAL*100)}{else}0{/if}%</p>
|
||||||
</span>
|
</span>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user