fixed bug in _rm_auto with catenated null values

This commit is contained in:
mohrt
2001-11-30 15:23:10 +00:00
parent c5bfaf1899
commit 91eb23a9f0
3 changed files with 21 additions and 22 deletions

1
NEWS
View File

@@ -1,3 +1,4 @@
- fixed bug in _rm_auto with catendated null values (Monte, Thomas Pundt)
- added $smarty.section.* syntax for accessing section properties. (Andrei) - added $smarty.section.* syntax for accessing section properties. (Andrei)
- added custom cache handling function ability. (Monte) - added custom cache handling function ability. (Monte)
- added assign attribute to insert, fetch, math, and counter functions, - added assign attribute to insert, fetch, math, and counter functions,

View File

@@ -86,23 +86,22 @@ class Smarty
// initially compiled. Leave set to true // initially compiled. Leave set to true
// during development. true/false default true. // during development. true/false default true.
var $force_compile = false; // force templates to compile every time. var $force_compile = false; // force templates to compile every time,
// if caching is on, a cached file will // overrides cache settings. default false.
// override compile_check and force_compile.
// true/false. default false.
var $caching = false; // whether to use caching or not. true/false var $caching = false; // enable caching. true/false default false.
var $cache_dir = './cache'; // name of directory for template cache var $cache_dir = './cache'; // name of directory for template cache files
var $cache_lifetime = 3600; // number of seconds cached content will persist. var $cache_lifetime = 3600; // number of seconds cached content will persist.
// 0 = never expires. default is one hour (3600) // 0 = never expires. default is one hour (3600)
var $insert_tag_check = true; // if you have caching turned on and you var $insert_tag_check = true; // if you have caching turned on and you
// don't use {insert} tags anywhere // don't use {insert} tags anywhere
// in your templates, set this to false. // in your templates, set this to false.
// this will tell Smarty not to look for // this will tell Smarty not to look for
// insert tags and speed up cached page // insert tags, thus speeding up cached page
// fetches. // fetches. true/false default true.
var $cache_handler_func = ''; // function used for cached content. this is var $cache_handler_func = ''; // function used for cached content. this is
// an alternative to using the file based $cache_dir. // an alternative to using the built-in file
// based caching. See docs for usage.
var $tpl_file_ext = '.tpl'; // template file extention (deprecated) var $tpl_file_ext = '.tpl'; // template file extention (deprecated)
@@ -1172,10 +1171,10 @@ function _run_insert_handler($args)
if (!is_dir($auto_base)) if (!is_dir($auto_base))
return false; return false;
if (!isset($auto_source)) { if (empty($auto_source)) {
$res = $this->_rmdir($auto_base, 0); $res = $this->_rmdir($auto_base, 0);
} else { } else {
if (isset($auto_id)) { if (!empty($auto_id)) {
$tname = $this->_get_auto_filename($auto_base, $auto_source, $auto_id); $tname = $this->_get_auto_filename($auto_base, $auto_source, $auto_id);
$res = is_file($tname) && unlink( $tname); $res = is_file($tname) && unlink( $tname);
} else { } else {

View File

@@ -86,23 +86,22 @@ class Smarty
// initially compiled. Leave set to true // initially compiled. Leave set to true
// during development. true/false default true. // during development. true/false default true.
var $force_compile = false; // force templates to compile every time. var $force_compile = false; // force templates to compile every time,
// if caching is on, a cached file will // overrides cache settings. default false.
// override compile_check and force_compile.
// true/false. default false.
var $caching = false; // whether to use caching or not. true/false var $caching = false; // enable caching. true/false default false.
var $cache_dir = './cache'; // name of directory for template cache var $cache_dir = './cache'; // name of directory for template cache files
var $cache_lifetime = 3600; // number of seconds cached content will persist. var $cache_lifetime = 3600; // number of seconds cached content will persist.
// 0 = never expires. default is one hour (3600) // 0 = never expires. default is one hour (3600)
var $insert_tag_check = true; // if you have caching turned on and you var $insert_tag_check = true; // if you have caching turned on and you
// don't use {insert} tags anywhere // don't use {insert} tags anywhere
// in your templates, set this to false. // in your templates, set this to false.
// this will tell Smarty not to look for // this will tell Smarty not to look for
// insert tags and speed up cached page // insert tags, thus speeding up cached page
// fetches. // fetches. true/false default true.
var $cache_handler_func = ''; // function used for cached content. this is var $cache_handler_func = ''; // function used for cached content. this is
// an alternative to using the file based $cache_dir. // an alternative to using the built-in file
// based caching. See docs for usage.
var $tpl_file_ext = '.tpl'; // template file extention (deprecated) var $tpl_file_ext = '.tpl'; // template file extention (deprecated)
@@ -1172,10 +1171,10 @@ function _run_insert_handler($args)
if (!is_dir($auto_base)) if (!is_dir($auto_base))
return false; return false;
if (!isset($auto_source)) { if (empty($auto_source)) {
$res = $this->_rmdir($auto_base, 0); $res = $this->_rmdir($auto_base, 0);
} else { } else {
if (isset($auto_id)) { if (!empty($auto_id)) {
$tname = $this->_get_auto_filename($auto_base, $auto_source, $auto_id); $tname = $this->_get_auto_filename($auto_base, $auto_source, $auto_id);
$res = is_file($tname) && unlink( $tname); $res = is_file($tname) && unlink( $tname);
} else { } else {