sync
authorAlan Knowles <alan@roojs.com>
Wed, 15 Feb 2012 04:41:43 +0000 (12:41 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 15 Feb 2012 04:41:43 +0000 (12:41 +0800)
DataObjects/core.sql
NotifySend.php
Pman.Request.js

index e47a777..340e03d 100644 (file)
@@ -348,12 +348,16 @@ ALTER TABLE core_notify ADD COLUMN  onid int(11)  NOT NULL DEFAULT 0;
 ALTER TABLE core_notify ADD COLUMN  ontable varchar(128)  NOT NULL DEFAULT '';
 ALTER TABLE core_notify ADD COLUMN  person_id int(11)  NOT NULL DEFAULT 0;
 ALTER TABLE core_notify ADD COLUMN  msgid varchar(128)  NOT NULL  DEFAULT '';
+
 ALTER TABLE core_notify ADD COLUMN  sent DATETIME ;
 ALTER TABLE core_notify ADD COLUMN  event_id int(11)  NOT NULL DEFAULT 0;
 ALTER TABLE core_notify ADD COLUMN  watch_id INT(11) NOT NULL DEFAULT 0;
 ALTER TABLE core_notify ADD COLUMN  trigger_person_id INT(11) NOT NULL DEFAULT 0;
 ALTER TABLE core_notify ADD COLUMN  trigger_event_id INT(11) NOT NULL DEFAULT 0;
 ALTER TABLE core_notify ADD   INDEX lookup(act_when, msgid);
+ALTER TABLE core_notify ADD COLUMN  to_email varchar(255)  NOT NULL  DEFAULT '';
+ALTER TABLE core_notify ADD   INDEX lookup_a(onid, ontable, person_id, act_when, msgid, to_email);
+
 #old mysql..
 ALTER TABLE core_notify CHANGE COLUMN bounced event_id INT(11) NOT NULL DEFAULT 0;
   
index e033f29..c91cc7e 100644 (file)
@@ -134,6 +134,7 @@ class Pman_Core_NotifySend extends Pman
         }
         $next_try = $next_try_min . ' MINUTES';
         
+        // this may modify $p->email. (it will not update it though)
         $email =  $this->makeEmail($o, $p, $last, $w);
         
         
@@ -241,7 +242,7 @@ class Pman_Core_NotifySend extends Pman
             // older that 1 day.
             $retry = 120;
         }
-        
+        $w->to_email = $p->email; 
         //$this->addEvent('NOTIFY', $w, 'GREYLISTED ' . $p->email . ' ' . $res->toString());
         $w->act_when = date('Y-m-d H:i:s', strtotime('NOW + ' . $retry . ' MINUTES'));
         $w->update($ww);
index 85e85d1..2a5102f 100644 (file)
@@ -104,7 +104,7 @@ Roo.extend(Pman.Request, Roo.data.Connection, {
         if (res !== true) {
             var decode = this.processResponse(response);
             Roo.log(decode);
-            if (Roo.MessageBox.isVisable()) {
+            if (Roo.MessageBox.isVisible()) {
                 alert(decode && decode.errorMsg ?  decode.errorMsg : "Error Sending data");
                 return;
             }