Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Modules
easynews
Commits
0aa177b1
Commit
0aa177b1
authored
7 years ago
by
Tony Savorelli
Browse files
Options
Download
Email Patches
Plain Diff
Fixes
#1
: Mail key "unsubscribe_confirm" pattern not recognized in _easynews_get_mail_key
parent
9a46d1ff
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
easynews.module
+7
-2
easynews.module
with
7 additions
and
2 deletions
+7
-2
easynews.module
View file @
0aa177b1
...
...
@@ -692,10 +692,15 @@ function easynews_mail($key, &$message, $params) {
* Extracts key and id (if present) from a dynamic mail key.
*/
function
_easynews_get_mail_key
(
$key
)
{
preg_match_all
(
"/([a-z_]*)__(\d*)/"
,
$key
,
$matches
);
$allowed_keys
=
array
(
'newsletter'
,
'unsubscribe_confirm'
,
);
$allowed_keys
=
implode
(
'|'
,
$allowed_keys
);
preg_match_all
(
"/(
{
$allowed_keys
}
)(__(\d*))?/"
,
$key
,
$matches
);
return
array
(
'key'
=>
$matches
[
1
][
0
],
'id'
=>
$matches
[
2
][
0
],
'id'
=>
$matches
[
3
][
0
],
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
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
Menu
Projects
Groups
Snippets
Help