This commit is contained in:
andrei
2002-04-30 13:57:14 +00:00
parent 8e3e2e0027
commit 180f8f3d8d
5 changed files with 13 additions and 5 deletions

View File

@@ -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) {

View File

@@ -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'];

View File

@@ -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) {

View File

@@ -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:

View File

@@ -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: