diff --git a/classes/class_format.php b/classes/class_format.php index db52778c..1dfa59e8 100644 --- a/classes/class_format.php +++ b/classes/class_format.php @@ -83,15 +83,14 @@ public static function get_ratio_html($Dividend, $Divisor, $Color = true) * Returns ratio * @param int $Dividend * @param int $Divisor - * @return boolean|string|float + * @param int $Decimal floor to n decimals (eg Subtract .005 to floor to 2 decimals) + * @return boolean|string */ public function get_ratio ($Dividend, $Divisor, $Decimal = 2) { if ($Divisor == 0 && $Dividend == 0) return false; if ($Divisor == 0) return '∞'; - -// Subtract .005 to floor to 2 decimals - return number_format(max($Dividend/$Divisor - 0.005, 0), $Decimal); + return number_format(max($Dividend/$Divisor - (0.5/pow(10, $Decimal)), 0), $Decimal); } /** diff --git a/classes/class_torrent_form.php b/classes/class_torrent_form.php index 86fcb996..2c873c19 100644 --- a/classes/class_torrent_form.php +++ b/classes/class_torrent_form.php @@ -80,17 +80,11 @@ function head() { if($this->NewTorrent) { ?>
- Torrent file - | -- - | +Torrent file: | +|
- Type - | +Type: |