Refactored profile_edit.php for subgroups.
[timetracker.git] / WEB-INF / lib / common.lib.php
index d29ba1a..0e9ff9e 100644 (file)
@@ -165,7 +165,7 @@ function check_extension($ext)
 // isTrue is a helper function to return correct false for older config.php values defined as a string 'false'.
 function isTrue($val)
 {
-  return ($val == false || $val === 'false') ? false : true;
+  return ($val === true);
 }
 
 // ttValidString is used to check user input to validate a string.
@@ -226,7 +226,7 @@ function ttValidFloat($val, $emptyValid = false)
     return ($emptyValid ? true : false);
     
   global $user;
-  $decimal = $user->decimal_mark;
+  $decimal = $user->getDecimalMark();
        
   if (!preg_match('/^-?[0-9'.$decimal.']+$/', $val))
     return false;