From f8aa8a7b58b311bb863dce6fe202cc18dd74f6f7 Mon Sep 17 00:00:00 2001 From: andrey Date: Fri, 19 Jan 2001 14:36:52 +0000 Subject: [PATCH] Fix the compiled template check. --- Smarty.class.php | 4 ++-- libs/Smarty.class.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Smarty.class.php b/Smarty.class.php index 3e1610c7..20a8f8d4 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -273,7 +273,7 @@ class Smarty { if(preg_match("/^(.+)\/([^\/]+)$/", $filepath, $match)) { $tpl_file_dir = $match[1]; - $tpl_file_name = $match[2]; + $tpl_file_name = $match[2] . ".php"; //assemble compile directory path $compile_dir = preg_replace("/([\.\/]*[^\/]+)(.*)/","\\1".preg_quote($this->compile_dir_ext,"/")."\\2",$match[1]); @@ -371,7 +371,7 @@ class Smarty $strip_tags_modified[$i], $compiled_contents, 1); } - if(!$this->_write_file($compilepath . ".php", $compiled_contents)) + if(!$this->_write_file($compilepath, $compiled_contents)) return false; return true; diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 3e1610c7..20a8f8d4 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -273,7 +273,7 @@ class Smarty { if(preg_match("/^(.+)\/([^\/]+)$/", $filepath, $match)) { $tpl_file_dir = $match[1]; - $tpl_file_name = $match[2]; + $tpl_file_name = $match[2] . ".php"; //assemble compile directory path $compile_dir = preg_replace("/([\.\/]*[^\/]+)(.*)/","\\1".preg_quote($this->compile_dir_ext,"/")."\\2",$match[1]); @@ -371,7 +371,7 @@ class Smarty $strip_tags_modified[$i], $compiled_contents, 1); } - if(!$this->_write_file($compilepath . ".php", $compiled_contents)) + if(!$this->_write_file($compilepath, $compiled_contents)) return false; return true;