Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
extensions
cc.tadpole.petitionemail
Commits
2f8c5645
Commit
2f8c5645
authored
Dec 05, 2014
by
Jamie McClelland
Browse files
ensure we do proper matching fields with address fields.
parent
78e5630f
Changes
1
Hide whitespace changes
Inline
Side-by-side
petitionemail.php
View file @
2f8c5645
...
...
@@ -918,13 +918,10 @@ function petitionemail_get_recipients($contact_id, $petition_id) {
}
$location_name
=
$field_pieces
[
'location_name'
];
$field_name
=
$field_pieces
[
'field_name'
];
// NOTE: we only work with primary fields.
if
(
$location_name
==
'Primary'
&&
array_key_exists
(
$field_name
,
$contact
))
{
// We have to unset the field that was saved as fieldname-locatiname
unset
(
$matching_fields
[
$matching_field
]);
// And now set the proper key
$matching_field
=
$field_name
;
$matching_fields
[
$matching_field
]
=
$contact
[
$matching_field
];
// The field name returned by the API won't have the -location part.
$matching_fields
[
$matching_field
]
=
$contact
[
$field_name
];
continue
;
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment