22 if (!@is_dir($params[
'auto_base']))
25 if(!isset($params[
'auto_id']) && !isset($params[
'auto_source'])) {
27 'dirname' => $params[
'auto_base'],
29 'exp_time' => $params[
'exp_time']
31 require_once(SMARTY_CORE_DIR .
'core.rmdir.php');
34 $_tname = $smarty->_get_auto_filename($params[
'auto_base'], $params[
'auto_source'], $params[
'auto_id']);
36 if(isset($params[
'auto_source'])) {
37 if (isset($params[
'extensions'])) {
39 foreach ((array)$params[
'extensions'] as $_extension)
40 $_res |= $smarty->_unlink($_tname.$_extension, $params[
'exp_time']);
42 $_res = $smarty->_unlink($_tname, $params[
'exp_time']);
44 } elseif ($smarty->use_sub_dirs) {
48 'exp_time' => $params[
'exp_time']
50 require_once(SMARTY_CORE_DIR .
'core.rmdir.php');
54 $_handle = opendir($params[
'auto_base']);
56 while (
false !== ($_filename = readdir($_handle))) {
57 if($_filename ==
'.' || $_filename ==
'..') {
59 } elseif (substr($params[
'auto_base'] .
DIRECTORY_SEPARATOR . $_filename, 0, strlen($_tname)) == $_tname) {
60 $_res &= (bool)$smarty->_unlink($params[
'auto_base'] .
DIRECTORY_SEPARATOR . $_filename, $params[
'exp_time']);