Fix listenerstat page
Deactivates the bandwidth limit stuff if none is configured.
This commit is contained in:
parent
c8b4d40eb2
commit
260ebe2476
2 changed files with 5 additions and 12 deletions
|
@ -15,8 +15,9 @@
|
|||
</fieldset>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
<?php $bandwidthUsage = Application_Model_Preference::getBandwidthLimitCounter(); ?>
|
||||
<?php $bandwidthLimit = Application_Model_Preference::getBandwidthLimit(); ?>
|
||||
<?php if ($bandwidthLimit): ?>
|
||||
<?php $bandwidthUsage = Application_Model_Preference::getBandwidthLimitCounter(); ?>
|
||||
<?php $percentInUse = sprintf("%01.1f%% ", $bandwidthUsage/$bandwidthLimit*100); ?>
|
||||
<div id="bandwidth_usage">
|
||||
<div style="padding-bottom: 2px;"><?php echo _("Monthly Listener Bandwidth Usage") ?></div>
|
||||
|
@ -26,4 +27,5 @@
|
|||
|
||||
<div style="margin-top: 17px; font-size: 12px;"><?php echo sprintf("%01.1fGB of %01.1fGB", $bandwidthUsage/pow(2, 30), $bandwidthLimit/pow(2, 30)); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue