From a9ca05f90a8a3245882ce653f52f08bde9fd53cb Mon Sep 17 00:00:00 2001 From: boots Date: Tue, 6 Feb 2007 18:32:32 +0000 Subject: [PATCH] Correct default template handler function example. --- docs/en/programmers/advanced-features/template-resources.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/programmers/advanced-features/template-resources.xml b/docs/en/programmers/advanced-features/template-resources.xml index 1e483051..39e7fd1e 100644 --- a/docs/en/programmers/advanced-features/template-resources.xml +++ b/docs/en/programmers/advanced-features/template-resources.xml @@ -217,8 +217,8 @@ function make_template ($resource_type, $resource_name, &$template_source, &$tem if ( ! is_readable ( $resource_name )) { // create the template file, return contents. $template_source = "This is a new template."; - $template_timestamp = time(); - $smarty_obj->_write_file($resource_name,$template_source); + require_once SMARTY_CORE_DIR . 'core.write_file.php'; + smarty_core_write_file( array( 'filename'=>$smarty_obj->template_dir . DIRECTORY_SEPARATOR . $resource_name, 'contents'=>$template_source ), $smarty_obj ); return true; } } else {