mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
issue 160, fix a bug for divide by zero
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9296 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7c496eb936
commit
5268f3bfbe
1 changed files with 8 additions and 2 deletions
|
|
@ -48,8 +48,14 @@
|
||||||
<p><a href="{$target_url}">{htmlspecialchars($item->title)}</a></p>
|
<p><a href="{$target_url}">{htmlspecialchars($item->title)}</a></p>
|
||||||
<p>{cut_str(htmlspecialchars($item->package_description),200)}</p>
|
<p>{cut_str(htmlspecialchars($item->package_description),200)}</p>
|
||||||
<p>
|
<p>
|
||||||
<span class="starRating"><span style="width:{sprintf("%d",$item->package_voted/$item->package_voter*20)}%">{sprintf($lang->rate, $item->package_start)}</span></span>
|
<block cond="(int)$item->package_voter > 0">
|
||||||
{sprintf("%0.1f",$item->package_voted/$item->package_voter*2)}/{number_format($item->package_voter)} |
|
<span class="starRating"><span style="width:{sprintf("%d",$item->package_voted/$item->package_voter*20)}%">{sprintf($lang->rate, $item->package_start)}</span></span>
|
||||||
|
{sprintf("%0.1f",$item->package_voted/$item->package_voter*2)}/{number_format($item->package_voter)} |
|
||||||
|
</block>
|
||||||
|
<block cond="(int)$item->package_voter <= 0">
|
||||||
|
<span class="starRating"><span style="width:0%">0</span></span>
|
||||||
|
0/0 |
|
||||||
|
</block>
|
||||||
{$lang->package_update} {zdate($item->item_regdate, "Y-m-d H:i")} |
|
{$lang->package_update} {zdate($item->item_regdate, "Y-m-d H:i")} |
|
||||||
{$lang->package_downloaded_count} : {number_format($item->package_downloaded)}
|
{$lang->package_downloaded_count} : {number_format($item->package_downloaded)}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue