DataObjects/Core_curr_rate.php
[Pman.Core] / NotifySend.php
index 646e0ea..f038182 100644 (file)
@@ -76,6 +76,8 @@ class Pman_Core_NotifySend extends Pman
    
     function get($id,$opts)
     {
+        
+        //print_r($opts);
         if ($opts['DB_DataObject-debug']) {
             DB_DataObject::debugLevel($opts['DB_DataObject-debug']);
         }
@@ -331,8 +333,8 @@ class Pman_Core_NotifySend extends Pman
                     'host'    => $dom ,
                     'localhost' => $ff->Mail['helo'],
                     'timeout' => 15,
-                    'socket_options' =>  isset($ff->Mail['socket_options']) ? $ff->Mail['socket_options'] : null
-                  //  'debug' => true
+                    'socket_options' =>  isset($ff->Mail['socket_options']) ? $ff->Mail['socket_options'] : null,
+                    'debug' => isset($opts['debug']) ?  1 : 0,
                 ));
             $res = $mailer->send($p->email, $email['headers'], $email['body']);
              
@@ -476,9 +478,17 @@ class Pman_Core_NotifySend extends Pman
     function makeEmail($object, $rcpt, $last_sent_date, $notify, $force =false)
     {
         $m = 'notify'. $notify->evtype;
-        //var_dump($m);
-        
+        //var_dump(get_class($object) . '::' .$m);
         if (!empty($notify->evtype) && method_exists($object,$m)) {
+            echo "calling :" . get_class($object) . '::' .$m . "\n";
+            return $object->$m($rcpt, $last_sent_date, $notify, $force);
+        }
+        
+        $type = explode('::', $notify->evtype);
+        
+        if(!empty($type[1]) && method_exists($object,$type[1])){
+            $m = $type[1];
+            echo "calling :" . get_class($object) . '::' .$m . "\n";
             return $object->$m($rcpt, $last_sent_date, $notify, $force);
         }