diff --git a/Smarty.class.php b/Smarty.class.php index b319e707..345c5a77 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -518,6 +518,10 @@ class Smarty return $this->_rm_auto($this->compile_dir, $tpl_file, $compile_id); } + /*======================================================================*\ + Function: template_exists() + Purpose: Checks whether requested template exists. +\*======================================================================*/ function template_exists($tpl_file) { return $this->_fetch_template_info($tpl_file, $source, $timestamp, true, true); @@ -1445,7 +1449,7 @@ function _run_insert_handler($args) \*======================================================================*/ function _create_dir_structure($dir) { - if (!file_exists($dir)) { + if (!@file_exists($dir)) { $dir_parts = preg_split('!\\'.DIR_SEP.'+!', $dir, -1, PREG_SPLIT_NO_EMPTY); $new_dir = ($dir{0} == DIR_SEP) ? DIR_SEP : ''; foreach ($dir_parts as $dir_part) { diff --git a/docs/programmers.sgml b/docs/programmers.sgml index 8f9a1bd5..910d6f86 100644 --- a/docs/programmers.sgml +++ b/docs/programmers.sgml @@ -1941,7 +1941,7 @@ function smarty_modifier_truncate($string, $length = 80, $etc = '...', * Purpose: translate a block of text * ------------------------------------------------------------- */ -function smarty_block_eightball($params, $content, &$smarty) +function smarty_block_translate($params, $content, &$smarty) { if ($content) { $lang = $params['lang']; diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index b319e707..345c5a77 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -518,6 +518,10 @@ class Smarty return $this->_rm_auto($this->compile_dir, $tpl_file, $compile_id); } + /*======================================================================*\ + Function: template_exists() + Purpose: Checks whether requested template exists. +\*======================================================================*/ function template_exists($tpl_file) { return $this->_fetch_template_info($tpl_file, $source, $timestamp, true, true); @@ -1445,7 +1449,7 @@ function _run_insert_handler($args) \*======================================================================*/ function _create_dir_structure($dir) { - if (!file_exists($dir)) { + if (!@file_exists($dir)) { $dir_parts = preg_split('!\\'.DIR_SEP.'+!', $dir, -1, PREG_SPLIT_NO_EMPTY); $new_dir = ($dir{0} == DIR_SEP) ? DIR_SEP : ''; foreach ($dir_parts as $dir_part) { diff --git a/libs/plugins/function.fetch.php b/libs/plugins/function.fetch.php index 4b34f65e..467f228e 100644 --- a/libs/plugins/function.fetch.php +++ b/libs/plugins/function.fetch.php @@ -130,7 +130,7 @@ function smarty_function_fetch($params, &$smarty) case "cluster_host": if(!empty($param_value) && (gethostbyname($param_value) != $param_value)) { - $server_name = $param_value; + $server_name = $param_value; } break; default: diff --git a/plugins/function.fetch.php b/plugins/function.fetch.php index 4b34f65e..467f228e 100644 --- a/plugins/function.fetch.php +++ b/plugins/function.fetch.php @@ -130,7 +130,7 @@ function smarty_function_fetch($params, &$smarty) case "cluster_host": if(!empty($param_value) && (gethostbyname($param_value) != $param_value)) { - $server_name = $param_value; + $server_name = $param_value; } break; default: