]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/common.lib.php
Fix report exports to honor user decimal mark designation.
[timetracker.git] / WEB-INF / lib / common.lib.php
index 3644c0587471ac433005eb93b83010c60785490a..d98e8889298ca10d37dbe70a86051a4ca3d045d4 100644 (file)
        }
 
 function time_to_decimal($a) {
+  global $user;
   $tmp = explode(":", $a);
   if($tmp[1]{0}=="0") $tmp[1] = $tmp[1]{1};
 
   $m = round($tmp[1]*100/60);
 
   if($m<10) $m = "0".$m;
-  $time = $tmp[0].".".$m;
+  $time = $tmp[0].$user->decimal_mark.$m;
   return $time;
 }
 
@@ -340,10 +341,3 @@ function ttAccessCheck($required_rights)
     
   return true;
 }
-
-// ttPluginEnabled is used to check whether a plugin is enabled for user.
-function ttPluginEnabled($plugin)
-{
-  global $user;
-  return in_array($plugin, explode(',', $user->plugins));
-}