Introduced view_own_tasks right and its handling.
[timetracker.git] / WEB-INF / lib / common.lib.php
index 629e7d7..325ae73 100644 (file)
@@ -332,8 +332,8 @@ function ttValidCondition($val, $emptyValid = true)
 function ttValidIP($val, $emptyValid = false)
 {
   $val = trim($val);
-  if (strlen($val) == 0 && !$emptyValid)
-    return false;
+  if (strlen($val) == 0 && $emptyValid)
+    return true;
 
   $subnets = explode(',', $val);
   foreach ($subnets as $subnet) {