Permalink
Browse files

Simplify percent on MythWeb stats page.

  • Loading branch information...
1 parent 3a6fee7 commit ffe7c54c1e571b062c3e53bb4e83c0f5012e33ce @sphery sphery committed Dec 29, 2011
Showing with 2 additions and 5 deletions.
  1. +1 −4 modules/stats/handler.php
  2. +1 −1 modules/stats/tmpl/default/stats.php
@@ -34,11 +34,8 @@
if ($_REQUEST['count_dropdown'] == 'all')
$limit = '';
-// How many tuners are tehre?
- $tuners = $db->query_col('SELECT COUNT(*)
- FROM capturecard');
-// Get how many show titles their are
+// Get how many show titles there are
$title_count = $db->query_num_rows('SELECT DISTINCT title
FROM oldrecorded'.$where);
@@ -67,7 +67,7 @@
<dt><?php echo t('Total Recorded'); ?>:</dt>
<dd><?php if(!is_null($time)) echo nice_length($time); else echo "0"; ?></dd>
<dt><?php echo t('Percent of time spent recording'); ?>:</dt>
- <dd><?php if(($last - $first)!=0 && $tuners > 0) echo intval((($time / ($last - $first)) * 100)/$tuners); else echo "0"; ?>%</dd>
+ <dd><?php if(($last - $first)!=0) echo intval(($time / ($last - $first)) * 100); else echo "0"; ?>%</dd>
</dl>
</div>

0 comments on commit ffe7c54

Please sign in to comment.