LSformElement/quota : fixed bug in value rounded.
authorBenjamin Renard <brenard@easter-eggs.com>
Tue, 27 Jul 2010 08:45:48 +0000 (10:45 +0200)
committerBenjamin Renard <brenard@easter-eggs.com>
Tue, 27 Jul 2010 08:45:48 +0000 (10:45 +0200)
public_html/includes/class/class.LSformElement_quota.php

index 977e3ac..350e8b6 100644 (file)
@@ -136,7 +136,8 @@ class LSformElement_quota extends LSformElement {
           if (isset($_POST[$this -> name.'_sizeFact'][$key]) && ($_POST[$this -> name.'_sizeFact'][$key]!=1)) {
             $f = $_POST[$this -> name.'_sizeFact'][$key];
           }
-          $return[$this -> name][$key] = intval(ceil(($val*$f)*$this -> getFactor()));
+          $val=preg_replace('/,/','.',$val);
+          $return[$this -> name][$key] = ceil(ceil(($val*$f)*$this -> getFactor()));
         }
       }
       return true;