Ticket #4728: mythweb_stats.diff

File mythweb_stats.diff, 1.1 KB (added by ma9mwah@…, 12 years ago)
  • mythweb/modules/stats/tmpl/default/stats.php

     
    6767            <dt><?php echo t('Last recording'); ?>:</dt>
    6868            <dd><?php echo date('l F jS, Y', $last); ?></dd>
    6969            <dt><?php echo t('Total Running Time'); ?>:</dt>
    70             <dd><?php echo nice_length($last - $first); ?></dd>
     70            <dd><?php if(($last - $first)!=0) echo nice_length($last - $first); else echo "0"; ?></dd>
    7171            <dt><?php echo t('Total Recorded'); ?>:</dt>
    72             <dd><?php echo nice_length($time); ?></dd>
     72            <dd><?php if(!is_null($time)) echo nice_length($time); else echo "0"; ?></dd>
    7373            <dt><?php echo t('Percent of time spent recording'); ?>:</dt>
    74             <dd><?php echo intval(($time / ($last - $first)) * 100); ?>%</dd>
     74            <dd><?php if(($last - $first)!=0) echo intval(($time / ($last - $first)) * 100); else echo "0"; ?>%</dd>
    7575        </dl>
    7676    </div>
    7777