]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/ttTimeHelper.class.php
Fixed sorting of projects in dropdown on the reports.php page.
[timetracker.git] / WEB-INF / lib / ttTimeHelper.class.php
index 57790e22bde7aa7af3565ed82780132733a48f65..d7278c69e747f621c8b3deff9b2f194f97787cf0 100644 (file)
@@ -65,8 +65,10 @@ class ttTimeHelper {
    $holiDateSpecArray = explode('-', $holiDateSpec);
 
    // Check year.
-   if ($dateArray[0] != $holiDateSpecArray[0] && $holiDateSpecArray[0] != '****') // **** means all years.
-     return false;
+   for($i = 0; $i < 4; $i++) {
+     if ($dateArray[0][$i] != $holiDateSpecArray[0][$i] && $holiDateSpecArray[0][$i] != '*') // * means any digit matches
+       return false;
+   }
    // Check month.
    if ($dateArray[1] != $holiDateSpecArray[1])
      return false;
@@ -647,8 +649,8 @@ class ttTimeHelper {
   static function getUncompleted($user_id) {
     $mdb2 = getConnection();
 
-    $sql = "select id, start from tt_log  
-      where user_id = $user_id and start is not null and time_to_sec(duration) = 0 and status = 1";
+    $sql = "select id, start, date from tt_log".
+      where user_id = $user_id and start is not null and time_to_sec(duration) = 0 and status = 1";
     $res = $mdb2->query($sql);
     if (!is_a($res, 'PEAR_Error')) {
       if (!$res->numRows()) {