mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 19:34:27 +02:00
- bugfix for empty config files
- convert timestamps of registered resources to integer
This commit is contained in:
@@ -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
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user