Merge pull request #21002 from elsp1991/add/emailCollector_parse_extrafields
add option to parse extrafield (options_) in emailcollector
This commit is contained in:
commit
8bc4f10d73
@ -901,9 +901,17 @@ class EmailCollector extends CommonObject
|
||||
// Overwrite param $tmpproperty
|
||||
$valueextracted = isset($regforval[count($regforval) - 1]) ?trim($regforval[count($regforval) - 1]) : null;
|
||||
if (strtolower($sourcefield) == 'header') {
|
||||
$object->$tmpproperty = $this->decodeSMTPSubject($valueextracted);
|
||||
if (preg_match('/^options_/', $tmpproperty)) {
|
||||
$object->array_options[preg_replace('/^options_/', '', $tmpproperty)] = $this->decodeSMTPSubject($valueextracted);
|
||||
} else {
|
||||
$object->$tmpproperty = $this->decodeSMTPSubject($valueextracted);
|
||||
}
|
||||
} else {
|
||||
$object->$tmpproperty = $valueextracted;
|
||||
if (preg_match('/^options_/', $tmpproperty)) {
|
||||
$object->array_options[preg_replace('/^options_/', '', $tmpproperty)] = $this->decodeSMTPSubject($valueextracted);
|
||||
} else {
|
||||
$object->$tmpproperty = $this->decodeSMTPSubject($valueextracted);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Regex not found
|
||||
|
||||
Loading…
Reference in New Issue
Block a user