[-] Core: Fix #PSCFV-7813 override of modules email templates not working because of directory separator

This commit is contained in:
Rémi Gaillard committed 2013-03-04 16:43:51 +01:00
1 parent 204821eee6
commit 74b4fd398f
1 file changed
+1 -1
+1 -1
View File
@@ -197,7 +197,7 @@ class MailCore
$override_mail = false; $override_mail = false;
// get templatePath // get templatePath
if (preg_match('#'.__PS_BASE_URI__.'modules/#', $template_path) && preg_match('#modules/([a-z0-9_-]+)/#ui', $template_path, $res)) if (preg_match('#'.__PS_BASE_URI__.'modules/#', str_replace(DIRECTORY_SEPARATOR, '/', $template_path)) && preg_match('#modules/([a-z0-9_-]+)/#ui', str_replace(DIRECTORY_SEPARATOR, '/',$template_path), $res))
$module_name = $res[1]; $module_name = $res[1];
if ($module_name !== false && (file_exists($theme_path.'modules/'.$module_name.'/mails/'.$template.'.txt') || if ($module_name !== false && (file_exists($theme_path.'modules/'.$module_name.'/mails/'.$template.'.txt') ||