issue 574, fixed a division by zero error on poll skin'

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9738 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2011-10-25 16:37:19 +00:00
parent 0c5f501692
commit 372a7db929
2 changed files with 12 additions and 2 deletions

View file

@ -28,7 +28,12 @@
<!--@foreach($poll->poll as $poll_srl_index => $val)-->
<div class="title">{$val->title} ({$val->poll_count})</div>
<!--@foreach($val->item as $item_srl => $item)-->
{@$per = (int)(( $item->poll_count / $val->poll_count)*100) }
<block cond="$val->poll_count">
{@$per = (int)(( $item->poll_count / $val->poll_count)*100) }
</block>
<block cond="!$val->poll_count">
{@$per = 0}
</block>
<div class="item_text">
<strong>{$item_srl+1}</strong> <img src="./images/pipe.png" alt="" /> {$item->title}

View file

@ -12,7 +12,12 @@
<div class="title">{$val->title} ({$val->poll_count})</div>
<!--@foreach($val->item as $item_srl => $item)-->
{@$per = (int)(( $item->poll_count / $val->poll_count)*100) }
<block cond="$val->poll_count">
{@$per = (int)(( $item->poll_count / $val->poll_count)*100) }
</block>
<block cond="!$val->poll_count">
{@$per = 0}
</block>
<div class="resultItem">
{$item->title}