mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Use correct directory separator on Windows when selecting email templates
This commit is contained in:
parent
ce2fe31bdd
commit
0abda42179
@ -521,8 +521,8 @@ class EmailRecipient extends DataObject
|
||||
}
|
||||
$templatePath = substr($absoluteFilename, strlen($prefixToStrip) + 1);
|
||||
|
||||
// Optionally remove "templates/" prefixes
|
||||
if (preg_match('/(?<=templates\/).*$/', $templatePath, $matches)) {
|
||||
// Optionally remove "templates/" ("templates\" on Windows respectively) prefixes
|
||||
if (preg_match('#(?<=templates' . DIRECTORY_SEPARATOR . ').*$#', $templatePath, $matches)) {
|
||||
$templatePath = $matches[0];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user