mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-09-30 13:19:23 +02:00
Merge pull request #828 from scott1702/pulls/5.3/where-have-my-templates-gone
FIX app email templates not resolving correctly
This commit is contained in:
commit
48e6117d81
@ -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