*** empty log message ***

This commit is contained in:
andrey
2001-01-12 20:48:43 +00:00
parent bad3cdae5a
commit 89df5c8e38
2 changed files with 14 additions and 14 deletions

View File

@@ -158,7 +158,7 @@ class Smarty
// compile files // compile files
$this->_compile($this->template_dir); $this->_compile($this->template_dir);
//assemble compile directory path to file //assemble compile directory path to file
$_compile_file = preg_replace("/([\.\/]*[^\/]+)(.*)/","\\1".preg_quote($this->compile_dir_ext,"/")."\\2",$tpl_file); $_compile_file = preg_replace("/([\.\/]*[^\/]+)(.*)/","\\1".preg_quote($this->compile_dir_ext,"/")."\\2.php", $tpl_file);
extract($this->_tpl_vars); extract($this->_tpl_vars);
include($_compile_file); include($_compile_file);
@@ -265,8 +265,8 @@ class Smarty
// compile the template file if none exists or has been modified // compile the template file if none exists or has been modified
if(!file_exists($compile_dir."/".$tpl_file_name) || if(!file_exists($compile_dir."/".$tpl_file_name) ||
($this->_modified_file($filepath,$compile_dir."/".$tpl_file_name))) { ($this->_modified_file($filepath, $compile_dir."/".$tpl_file_name))) {
if(!$this->_compile_file($filepath,$compile_dir."/".$tpl_file_name)) if(!$this->_compile_file($filepath, $compile_dir."/".$tpl_file_name))
return false; return false;
} else { } else {
// no compilation needed // no compilation needed
@@ -297,7 +297,7 @@ class Smarty
Input: compile a template file Input: compile a template file
\*======================================================================*/ \*======================================================================*/
function _compile_file($filepath,$compilepath) function _compile_file($filepath, $compilepath)
{ {
if(!($template_contents = $this->_read_file($filepath))) if(!($template_contents = $this->_read_file($filepath)))
return false; return false;
@@ -343,7 +343,7 @@ class Smarty
$strip_tags_modified[$i], $compiled_contents, 1); $strip_tags_modified[$i], $compiled_contents, 1);
} }
if(!$this->_write_file($compilepath, $compiled_contents)) if(!$this->_write_file($compilepath . ".php", $compiled_contents))
return false; return false;
return true; return true;
@@ -516,11 +516,11 @@ class Smarty
"{\n" . "{\n" .
" extract(\$def_vars);\n" . " extract(\$def_vars);\n" .
" extract(\$include_vars);\n" . " extract(\$include_vars);\n" .
" include \"\$file_name\";\n" . " include \"\$file_name.php\";\n" .
"}\n" . "}\n" .
"$include_func_name(\"$include_file_name\", get_defined_vars(), array(".implode(',', (array)$arg_list)."));\n?>\n"; "$include_func_name(\"$include_file_name\", get_defined_vars(), array(".implode(',', (array)$arg_list)."));\n?>\n";
} else } else
return '<?php include "'.$this->template_dir.$this->compile_dir_ext.'/'.$attrs['file'].'"; ?>'; return '<?php include "'.$this->template_dir.$this->compile_dir_ext.'/'.$attrs['file'].'.php"; ?>';
} }
function _compile_section_start($tag_args) function _compile_section_start($tag_args)

View File

@@ -158,7 +158,7 @@ class Smarty
// compile files // compile files
$this->_compile($this->template_dir); $this->_compile($this->template_dir);
//assemble compile directory path to file //assemble compile directory path to file
$_compile_file = preg_replace("/([\.\/]*[^\/]+)(.*)/","\\1".preg_quote($this->compile_dir_ext,"/")."\\2",$tpl_file); $_compile_file = preg_replace("/([\.\/]*[^\/]+)(.*)/","\\1".preg_quote($this->compile_dir_ext,"/")."\\2.php", $tpl_file);
extract($this->_tpl_vars); extract($this->_tpl_vars);
include($_compile_file); include($_compile_file);
@@ -265,8 +265,8 @@ class Smarty
// compile the template file if none exists or has been modified // compile the template file if none exists or has been modified
if(!file_exists($compile_dir."/".$tpl_file_name) || if(!file_exists($compile_dir."/".$tpl_file_name) ||
($this->_modified_file($filepath,$compile_dir."/".$tpl_file_name))) { ($this->_modified_file($filepath, $compile_dir."/".$tpl_file_name))) {
if(!$this->_compile_file($filepath,$compile_dir."/".$tpl_file_name)) if(!$this->_compile_file($filepath, $compile_dir."/".$tpl_file_name))
return false; return false;
} else { } else {
// no compilation needed // no compilation needed
@@ -297,7 +297,7 @@ class Smarty
Input: compile a template file Input: compile a template file
\*======================================================================*/ \*======================================================================*/
function _compile_file($filepath,$compilepath) function _compile_file($filepath, $compilepath)
{ {
if(!($template_contents = $this->_read_file($filepath))) if(!($template_contents = $this->_read_file($filepath)))
return false; return false;
@@ -343,7 +343,7 @@ class Smarty
$strip_tags_modified[$i], $compiled_contents, 1); $strip_tags_modified[$i], $compiled_contents, 1);
} }
if(!$this->_write_file($compilepath, $compiled_contents)) if(!$this->_write_file($compilepath . ".php", $compiled_contents))
return false; return false;
return true; return true;
@@ -516,11 +516,11 @@ class Smarty
"{\n" . "{\n" .
" extract(\$def_vars);\n" . " extract(\$def_vars);\n" .
" extract(\$include_vars);\n" . " extract(\$include_vars);\n" .
" include \"\$file_name\";\n" . " include \"\$file_name.php\";\n" .
"}\n" . "}\n" .
"$include_func_name(\"$include_file_name\", get_defined_vars(), array(".implode(',', (array)$arg_list)."));\n?>\n"; "$include_func_name(\"$include_file_name\", get_defined_vars(), array(".implode(',', (array)$arg_list)."));\n?>\n";
} else } else
return '<?php include "'.$this->template_dir.$this->compile_dir_ext.'/'.$attrs['file'].'"; ?>'; return '<?php include "'.$this->template_dir.$this->compile_dir_ext.'/'.$attrs['file'].'.php"; ?>';
} }
function _compile_section_start($tag_args) function _compile_section_start($tag_args)