NotifySend.php
[Pman.Core] / NotifySend.php
index 47d834c..6617a75 100644 (file)
@@ -166,7 +166,12 @@ class Pman_Core_NotifySend extends Pman
                 'ontable' => $w->ontable,
                 'onid' => $w->onid,
         );
-        $lar[strtolower($w->person_table).'_id'] = $w->{strtolower($w->person_table).'_id'};
+        // only newer version of the database us this..
+        $personid_col = strtolower($w->person_table).'_id';
+        if (isset($w->{$personid_col})) {
+            $lar[$personid_col] = $w->{$personid_col};
+        }
+        
         
         $l->setFrom( $lar );       
         $l->whereAdd('id != '. $w->id);
@@ -228,7 +233,7 @@ class Pman_Core_NotifySend extends Pman
             $old = clone($w);
             $w->act_when = $email['later'];
             $w->update($old);
-            $this->errorHandler(date('Y-m-d h:i:s ') . " Delivery postponed by email creator");
+            $this->errorHandler(date('Y-m-d h:i:s ') . " Delivery postponed by email creator to {$email['later']}");
         }
         
          
@@ -512,6 +517,7 @@ class Pman_Core_NotifySend extends Pman
     function makeEmail($object, $rcpt, $last_sent_date, $notify, $force =false)
     {
         $m = 'notify'. $notify->evtype;
+        
         //var_dump(get_class($object) . '::' .$m);
         if (!empty($notify->evtype) && method_exists($object,$m)) {
             echo "calling :" . get_class($object) . '::' .$m . "\n";