switch ($q['query']['status']) {
case 'SUCCESS';
- $this->is_active = 1;
+ $this->whereAdd("event_id < 0");
break;
case 'FAILED';
- $this->is_active = 0;
+ $this->whereAdd('event_id > 0 AND act_when <= NOW() ');
+
break;
- case 'PENDING';
- $this->is_active = 0;
+ case 'PENDING';
+ $this->whereAdd('event_id = 0 OR (event_id > 0 AND act_when > NOW() )');
break;
case 'ALL':
default: