X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=DataObjects%2FCore_notify.php;h=6cc632ab553d517b8366eb262da5abcb37b4b76b;hb=581a3326f8c30baf3b33873f2335042753295d2b;hp=21d8f9f24d60d4239486d2c90499c1e2f486c711;hpb=0657eda06d59999b891ee686a284ba0e020dfae3;p=Pman.Core diff --git a/DataObjects/Core_notify.php b/DataObjects/Core_notify.php index 21d8f9f2..6cc632ab 100644 --- a/DataObjects/Core_notify.php +++ b/DataObjects/Core_notify.php @@ -1,7 +1,7 @@ person_table = is_object($set) ? $set->tableName() : ''; - - $person_table = empty($this->person_table) ? $def_pt : strtolower($this->person_table); $col = $person_table == $def_pt ? 'person_id' : $person_table . '_id'; @@ -318,17 +316,21 @@ class Pman_Core_DataObjects_Core_notify extends DB_DataObject } - function sendManual() + function sendManual($debug=false) { require_once 'Pman/Core/NotifySend.php'; $send = new Pman_Core_NotifySend(); $send->error_handler = 'exception'; + if ($debug) { + $send->get($this->id, array()); + return true; + } + try { $send->get($this->id, array()); } catch (Exception $e) { - print_R($e);exit; ob_end_clean(); return $e; }