mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
FIX app email templates not resolving correctly
This commit is contained in:
parent
20ff59c0f8
commit
5cce7cb519
@ -506,8 +506,8 @@ class EmailRecipient extends DataObject
|
|||||||
$templatePath = substr($absoluteFilename, strlen($prefixToStrip) + 1);
|
$templatePath = substr($absoluteFilename, strlen($prefixToStrip) + 1);
|
||||||
|
|
||||||
// Optionally remove "templates/" prefixes
|
// Optionally remove "templates/" prefixes
|
||||||
if (substr($templatePath, 0, 10)) {
|
if (preg_match('/(?<=templates\/).*$/', $templatePath, $matches)) {
|
||||||
$templatePath = substr($templatePath, 10);
|
$templatePath = $matches[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
$templates[$templatePath] = $template['filename'];
|
$templates[$templatePath] = $template['filename'];
|
||||||
|
Loading…
Reference in New Issue
Block a user