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:
Robbie Averill 2018-11-18 09:26:25 +02:00 committed by GitHub
commit 48e6117d81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -506,8 +506,8 @@ class EmailRecipient extends DataObject
$templatePath = substr($absoluteFilename, strlen($prefixToStrip) + 1);
// Optionally remove "templates/" prefixes
if (substr($templatePath, 0, 10)) {
$templatePath = substr($templatePath, 10);
if (preg_match('/(?<=templates\/).*$/', $templatePath, $matches)) {
$templatePath = $matches[0];
}
$templates[$templatePath] = $template['filename'];