Skip to content

Commit

Permalink
Simplify percent on MythWeb stats page.
Browse files Browse the repository at this point in the history
  • Loading branch information
sphery committed Dec 29, 2011
1 parent 3a6fee7 commit ffe7c54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions modules/stats/handler.php
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion modules/stats/tmpl/default/stats.php
Expand Up @@ -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>

Expand Down

0 comments on commit ffe7c54

Please sign in to comment.