cvs: smarty /docs/en/programmers/advanced-features template-resources.xml
[email protected] ("boots") Tue, 06 Feb 2007 18:32:32 -0000
| Newsgroups | php.smarty.cvs |
|---|---|
| Message-ID | <cvsboots1170786752@cvsserver> |
boots Tue Feb 6 18:32:32 2007 UTC
Modified files:
/smarty/docs/en/programmers/advanced-features
template-resources.xml
Log:
Correct default template handler function example.
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/advanced-features/template-resources.xml?r1=1.5&r2=1.6&diff_format=u
Index: smarty/docs/en/programmers/advanced-features/template-resources.xml
diff -u smarty/docs/en/programmers/advanced-features/template-resources.xml:1.5 smarty/docs/en/programmers/advanced-features/template-resources.xml:1.6
--- smarty/docs/en/programmers/advanced-features/template-resources.xml:1.5 Wed Sep 27 01:47:51 2006
+++ smarty/docs/en/programmers/advanced-features/template-resources.xml Tue Feb 6 18:32:32 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<sect1 id="template.resources">
<title>Resources</title>
<para>
@@ -217,8 +217,8 @@
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 {