public $trigger_event_id; // int(11)
public $evtype; // event type (or method to call)fall
public $act_start;
-
+ public $person_table;
+
+
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
$this->person_id = is_object($set) ? $set->id : $set;
return;
}
+
+ $person_table =
$c = DB_DataObject::Factory('Person');
$c->get($this->person_id);
return $c;
";
$this->selectAs($d, 'core_notify_%s');
}
- if (isset($q['query']['person_id_name']) ) {
+ if (!empty($q['query']['person_id_name']) ) {
$this->whereAdd( "join_person_id_id.name LIKE '{$this->escape($q['query']['person_id_name'])}%'");
}
}
}
+ if(!empty($q['_evtype_align'])){
+ $this->selectAdd("
+ (SELECT
+ display_name
+ FROM
+ core_enum
+ WHERE
+ etype = 'Core.NotifyType'
+ AND
+ name = core_notify.evtype
+ AND
+ active = 1
+ ) AS evtype_align
+ ");
+ }
+ if(!empty($q['from'])){
+ $this->whereAdd("
+ act_when >= '{$q['from']}'
+ ");
+ }
-
-
+ if(!empty($q['to'])){
+ $this->whereAdd("
+ act_when <= '{$q['to']}'
+ ");
+ }
}