prevent divisons by zero for progress bars
This commit is contained in:
parent
51ce52c539
commit
6c5fbb3f22
5 changed files with 7 additions and 7 deletions
|
|
@ -26,7 +26,7 @@
|
|||
<p class="ltopc"><a href="<?=$linker->link(array('library','topic',$seminary['url'],$topic['url']))?>"><?=$topic['title']?></a></p>
|
||||
<p><small>Fortschritt: <?=$topic['characterQuestcount']?> / <?=$topic['questcount']?></small></p>
|
||||
<div class="xpbar">
|
||||
<span style="width:<?=round($topic['characterQuestcount']/$topic['questcount']*100)?>%"></span>
|
||||
<span style="width:<?=($topic['questcount'] > 0) ? round($topic['characterQuestcount']/$topic['questcount']*100) : 0?>%"></span>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<div class="libindxpr cf">
|
||||
<p><small>Themenfortschritt: <?=$questtopic['characterQuestcount']?> / <?=$questtopic['questcount']?></small></p>
|
||||
<div class="xpbar">
|
||||
<span style="width:<?=round($questtopic['characterQuestcount']/$questtopic['questcount']*100)?>%"></span>
|
||||
<span style="width:<?=($questtopic['questcount'] > 0) ? round($questtopic['characterQuestcount']/$questtopic['questcount']*100) : 0?>%"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue