projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4d8764c
)
NotifySend.php
author
Alan Knowles
<alan@roojs.com>
Thu, 28 Jan 2016 07:47:29 +0000
(15:47 +0800)
committer
Alan Knowles
<alan@roojs.com>
Thu, 28 Jan 2016 07:47:29 +0000
(15:47 +0800)
NotifySend.php
patch
|
blob
|
history
diff --git
a/NotifySend.php
b/NotifySend.php
index
ace03b6
..
9e986bc
100644
(file)
--- a/
NotifySend.php
+++ b/
NotifySend.php
@@
-211,9
+211,14
@@
class Pman_Core_NotifySend extends Pman
."\n");
}
."\n");
}
-
+ if (empty($p) && !empty($email['rcpts'])) {
+ // make a fake person..
+ $p = (object) array(
+ 'email' => $email['rcpts']
+ );
+ }
- if ($email === false || isset($email['error'])) {
+ if ($email === false || isset($email['error'])
|| empty($p)
) {
// object returned 'false' - it does not know how to send it..
$ev = $this->addEvent('NOTIFY', $w, isset($email['error']) ?
$email['error'] : "INTERNAL ERROR - We can not handle " . $w->ontable);
// object returned 'false' - it does not know how to send it..
$ev = $this->addEvent('NOTIFY', $w, isset($email['error']) ?
$email['error'] : "INTERNAL ERROR - We can not handle " . $w->ontable);
@@
-242,6
+247,11
@@
class Pman_Core_NotifySend extends Pman
$email['headers']['Message-Id'] = "<{$this->table}-{$id}@{$HOST}>";
}
$email['headers']['Message-Id'] = "<{$this->table}-{$id}@{$HOST}>";
}
+
+
+ if (empty($p)) {
+
+
//$p->email = 'alan@akbkhome.com'; //for testing..
//print_r($email);exit;
// should we fetch the watch that caused it.. - which should contain the method to call..
//$p->email = 'alan@akbkhome.com'; //for testing..
//print_r($email);exit;
// should we fetch the watch that caused it.. - which should contain the method to call..
@@
-253,7
+263,7
@@
class Pman_Core_NotifySend extends Pman
if (!empty($opts['send-to'])) {
$p->email = $opts['send-to'];
}
if (!empty($opts['send-to'])) {
$p->email = $opts['send-to'];
}
- if ($p) {
+
// since some of them have spaces?!?!
$p->email = trim($p->email);
}
// since some of them have spaces?!?!
$p->email = trim($p->email);
}