sync
[web.mtrack] / MTrackWeb / Ticket.php
index 89ae38d..7170d20 100644 (file)
@@ -186,7 +186,7 @@ class MTrackWeb_Ticket extends MTrackWeb
         if (!empty($_FILES['attachments'])) {
             foreach ($_FILES['attachments']['name'] as $fileid => $name) {
                 $i = DB_DataObject::factory('Images');
-                $i->associate($this->issue);
+                $i->object($this->issue);
                 $i->ontable = $this->issue->tableName();
                 $i->onid = $this->issue->id;
                 $i->created_by = $this->authUser->id;
@@ -237,11 +237,13 @@ class MTrackWeb_Ticket extends MTrackWeb
             );
         //DB_DataObject::debugLevel(1);
         // who to notify..
-       
+        // who to notify.. -- originall did not send to issuer..
+        // we should probably make this configurable..
         $w->notify( 'mtrack_ticket' , $this->issue->id,
-                 " ( $notify_query )
+                    $notify_query 
+                /* " ( $notify_query )
                     AND
-                    (person_id != {$this->authUser->id})   "  
+                    (person_id != {$this->authUser->id})   "   */
         );
         
         
@@ -270,7 +272,7 @@ class MTrackWeb_Ticket extends MTrackWeb
         $pd = DB_DataObject::factory('ProjectDirectory');
         $pd->project_id = $this->currentProject();
         $pd->whereAdd("ProjectDirectory.role != ''");
-        $pd->joinAdd(DB_DataObject::factory('Person'), 'LEFT');
+        $pd->joinAdd(DB_DataObject::factory('core_person'), 'LEFT');
         $pd->selectAdd();
         $pd->selectAdd("distinct(Person.id) as id ,  CONCAT(Person.name , '<', Person.email , '>') as name");
         $pd->groupBy('Person.id, Person.name');