sync
authorAlan Knowles <alan@akbkhome.com>
Wed, 6 Apr 2011 04:52:27 +0000 (12:52 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 6 Apr 2011 04:52:27 +0000 (12:52 +0800)
MTrackWeb/Ticket.php

index 2340bd1..583f075 100644 (file)
@@ -180,13 +180,16 @@ class MTrackWeb_Ticket extends MTrackWeb
         $this->issue->updated = $CS->id;
         $this->issue->update($old);
         
-        
-        $w->ensureNotify(  'mtrack_ticket' , $this->issue->id,  $this->authUser->id,
-                "
+        $notify_query = "
                 (ontable='mtrack_ticket' and onid = {$this->issue->id})
                  OR
                  (ontable='mtrack_project' and onid = {$this->issue->project_id})
-                      ) "
+                      ) ";
+        
+        $w->ensureNotify(  'mtrack_ticket' ,
+                            $this->issue->id,
+                            $this->authUser->id,
+                        $notify_query
             );
         
         
@@ -195,9 +198,7 @@ class MTrackWeb_Ticket extends MTrackWeb
         $w = DB_DataObject::factory('core_watch');
         $w->notify( 'mtrack_ticket' , $this->issue->id,
                  "
-                    (ontable='mtrack_ticket' and onid = {$this->issue->id})
-                    OR
-                    (ontable='mtrack_project' and onid = {$this->issue->project_id})
+                   $notify_query
                     AND
                     (person_id != {$this->authUser->id})
                 "