X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=MessagePreview.php;h=f59cde177e0f2f376661919f83a9a373777494a8;hp=97751c091bf1c126beb9f515c3c05d2e7372a013;hb=refs%2Fheads%2Fwip_alan_T5884_add_photo_to_report;hpb=9732e686f4dd1dac1a06fa69869ca6bd7e113ef9 diff --git a/MessagePreview.php b/MessagePreview.php index 97751c09..f59cde17 100644 --- a/MessagePreview.php +++ b/MessagePreview.php @@ -18,7 +18,7 @@ class Pman_Core_MessagePreview extends Pman return true; } - function get() + function get($v, $opts=array()) { if(empty($_REQUEST['_id']) || empty($_REQUEST['_table'])){ $this->jerr('Missing Options'); @@ -34,7 +34,7 @@ class Pman_Core_MessagePreview extends Pman } - function post() + function post($v) { if(empty($_REQUEST['_id']) || empty($_REQUEST['_table'])){ $this->jerr('Missing Options'); @@ -59,15 +59,12 @@ class Pman_Core_MessagePreview extends Pman $sent = $cn->sendManual(); - print_R(get_class($sent));exit; - - if($sent === true){ - $this->jerr($sent); + if(get_class($sent) != 'Pman_Core_NotifySend_Exception_Success'){ + $this->jerr($sent->getMessage()); } $this->jok("SUCCESS"); - /* $mid = $_REQUEST['_id']; @@ -116,6 +113,8 @@ class Pman_Core_MessagePreview extends Pman $content = $x->{$method}($this, $this->authUser); + $content['bcc'] = array(); + $sent = $core_email->send($content); if(is_object($sent)){