Merge branch 'master' of /home/git/private/web.mtrack
[web.mtrack] / MTrack / CommitChecker.php
index daed91c..1924c50 100644 (file)
@@ -196,7 +196,8 @@ class MTrack_CommitChecker {
             $c->changelog   = $bridge->getCommitMessage();
             $c->changeby    = $this->authUser->email; //???
             $c->changeby_id = $this->authUser->id; //???
-            $c->ctime       = time();
+            //print_r($bridge);exit;
+            $c->ctime       = isset($bridge->props['Date']) ? strtotime($bridge->props['Date']) : time();
             $c->fileActions = $bridge->fileActions;
             $changes[] = $c;
         }
@@ -224,7 +225,7 @@ class MTrack_CommitChecker {
         $changes = $this->_getChanges($bridge);
         
         
-        print_R($changes);
+        //print_R($changes);
         
 
         // Deferred by tid
@@ -264,17 +265,23 @@ class MTrack_CommitChecker {
             }
             
             // apply changes to tickets
+            $T = false;
             foreach ($tickets as $tkt => $act) {
                 // removed all the code that handles hashed ticked ids...
-                
+                //DB_DataObject::DebugLevel(1);
                 $T = DB_DataObject::Factory('mtrack_ticket');
-                
+                $T->project_id = $this->repo->project_id;
                 if (!$T->get($tkt)) {
                     continue;
                 }
+                break;
                 
                 $T_by_tid[$T->id] = $T;
             }
+            
+            if (!$T) {
+                continue;
+            }
             /*
             $accounted = false;