- if(!empty($obj['rcpts_gp'])) {
- $rcpts = $obj['rcpts_gp'];
- if (strpos($obj['rcpts_gp'], '@') == false) {
- $rcpts = array();
- $gp = DB_DataObject::factory('core_group');
- $gp->get('name', $obj['rcpts_gp']);
- foreach ($gp->members() as $v) {
- $rcpts[] = $v->email;
- }
- $obj['rcpts'] = $rcpts;
- }
- }
-
- if (!empty($obj['is_subject_replace']) && $obj['is_subject_replace'] > 0) {
- $mapping = array(
- '/{person.name}/' => $obj['person']->name
- );
- $subject = $this->subject;
- foreach ($mapping as $pattern => $replace) {
- $subject = preg_replace($pattern,$replace,$subject);
- }
- $obj['subject'] = $subject;
- }
-