+ 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('force' => 1));
+ } catch (Exception $e) {
+ ob_end_clean();
+ return $e;
+ }
+
+ ob_end_clean();
+
+ return true;
+ }
+ // after called do not rely on content as it includes NOW()
+ function flagDone($event,$msgid)
+ {
+ $ww = clone($this);
+ if(strtotime($this->act_when) > strtotime("NOW")){
+ $this->act_when = $this->sqlValue('NOW()');
+ }
+ $this->sent = empty($this->sent) || strtotime($this->sent) < 1 ? $this->sqlValue('NOW()') :$this->sent; // do not update if sent.....
+ $this->msgid = $msgid;
+ $this->event_id = $event->id;
+ $this->update($ww);
+ }
+
+ function flagLater($when)
+ {
+ $ww = clone($this);
+ $this->act_when = $when;
+ $this->update($ww);
+ }
+