diff --git a/change_log.txt b/change_log.txt index 688707ff..e79bb457 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,3 +1,7 @@ +11/20/2009 +- bugfix for empty config files +- convert timestamps of registered resources to integer + 11/19/2009 - compiled templates are no longer touched with the filemtime of template source diff --git a/libs/sysplugins/smarty_internal_config_file_compiler.php b/libs/sysplugins/smarty_internal_config_file_compiler.php index 796bace2..8c530100 100644 --- a/libs/sysplugins/smarty_internal_config_file_compiler.php +++ b/libs/sysplugins/smarty_internal_config_file_compiler.php @@ -41,7 +41,7 @@ class Smarty_Internal_Config_File_Compiler { then written to compiled files. */ $this->config = $config; // get config file source - $_content = $config->getConfigSource(); + $_content = $config->getConfigSource()."\n"; // on empty template just return if ($_content == '') { return true; diff --git a/libs/sysplugins/smarty_internal_resource_registered.php b/libs/sysplugins/smarty_internal_resource_registered.php index 43fa0e04..e24b5e3d 100644 --- a/libs/sysplugins/smarty_internal_resource_registered.php +++ b/libs/sysplugins/smarty_internal_resource_registered.php @@ -63,7 +63,7 @@ class Smarty_Internal_Resource_Registered { $time_stamp = false; call_user_func_array($this->smarty->_plugins['resource'][$_template->resource_type][0][1], array($_template->resource_name, &$time_stamp, $this->smarty)); - return $time_stamp; + return is_numeric($time_stamp) ? (int)$time_stamp : $time_stamp; } /** * Get timestamp to template source by type and name @@ -77,7 +77,7 @@ class Smarty_Internal_Resource_Registered { $time_stamp = false; call_user_func_array($this->smarty->_plugins['resource'][$_resource_type][0][1], array($_resource_name, &$time_stamp, $this->smarty)); - return $time_stamp; + return is_numeric($time_stamp) ? (int)$time_stamp : $time_stamp; } /**