mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
Fix.
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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'];
|
||||
|
@@ -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) {
|
||||
|
@@ -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:
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user