set correct path to template in CompileAll

When the template is in a subdirectory of the sourcedir, the the template could not be loaded
This commit is contained in:
Kars Frijters
2015-12-21 14:27:26 +01:00
parent fa482f09f5
commit d8109dda75

View File

@@ -69,7 +69,7 @@ class Smarty_Internal_Method_CompileAllTemplates
if (!substr_compare($_file, $extension, - strlen($extension)) == 0) { if (!substr_compare($_file, $extension, - strlen($extension)) == 0) {
continue; continue;
} }
if ($_fileinfo->getPath() == !substr($_dir, 0, - 1)) { if ($_fileinfo->getPath() !== substr($_dir, 0, - 1)) {
$_file = substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file; $_file = substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file;
} }
echo "\n<br>", $_dir, '---', $_file; echo "\n<br>", $_dir, '---', $_file;
@@ -108,4 +108,4 @@ class Smarty_Internal_Method_CompileAllTemplates
echo "\n<br>"; echo "\n<br>";
return $_count; return $_count;
} }
} }