mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-03 19:30:49 +02:00
- bugfix compileAllTemplates() and compileAllConfig() did not return the number of compiled files (Forum Topic 21286)
This commit is contained in:
@@ -87,6 +87,7 @@ class Smarty_Internal_Utility {
|
||||
$_tpl = $smarty->createTemplate($_template_file,null,null,null,false);
|
||||
if ($_tpl->mustCompile()) {
|
||||
$_tpl->compileTemplateSource();
|
||||
$_count++;
|
||||
echo ' compiled in ', microtime(true) - $_start_time, ' seconds';
|
||||
flush();
|
||||
} else {
|
||||
@@ -150,6 +151,7 @@ class Smarty_Internal_Utility {
|
||||
$_config = new Smarty_Internal_Config($_config_file, $smarty);
|
||||
if ($_config->mustCompile()) {
|
||||
$_config->compileConfigSource();
|
||||
$_count++;
|
||||
echo ' compiled in ', microtime(true) - $_start_time, ' seconds';
|
||||
flush();
|
||||
} else {
|
||||
@@ -299,7 +301,7 @@ class Smarty_Internal_Utility {
|
||||
echo "Smarty Installation test...\n";
|
||||
echo "Testing template directory...\n";
|
||||
}
|
||||
|
||||
|
||||
$_stream_resolve_include_path = function_exists('stream_resolve_include_path');
|
||||
|
||||
// test if all registered template_dir are accessible
|
||||
@@ -315,7 +317,7 @@ class Smarty_Internal_Utility {
|
||||
} else {
|
||||
$template_dir = Smarty_Internal_Get_Include_Path::getIncludePath($_template_dir);
|
||||
}
|
||||
|
||||
|
||||
if ($template_dir !== false) {
|
||||
if ($errors === null) {
|
||||
echo "$template_dir is OK.\n";
|
||||
@@ -436,7 +438,7 @@ class Smarty_Internal_Utility {
|
||||
} else {
|
||||
$plugin_dir = Smarty_Internal_Get_Include_Path::getIncludePath($_plugin_dir);
|
||||
}
|
||||
|
||||
|
||||
if ($plugin_dir !== false) {
|
||||
if ($errors === null) {
|
||||
echo "$plugin_dir is OK.\n";
|
||||
@@ -568,7 +570,7 @@ class Smarty_Internal_Utility {
|
||||
} else {
|
||||
$config_dir = Smarty_Internal_Get_Include_Path::getIncludePath($_config_dir);
|
||||
}
|
||||
|
||||
|
||||
if ($config_dir !== false) {
|
||||
if ($errors === null) {
|
||||
echo "$config_dir is OK.\n";
|
||||
|
||||
Reference in New Issue
Block a user