mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
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:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user