[prev in list] [next in list] [prev in thread] [next in thread] 

List:       smarty-cvs
Subject:    [SMARTY-CVS] cvs: smarty / Smarty.class.php  /docs programmers.sgml
From:       "Monte Ohrt" <monte () ispi ! net>
Date:       2003-01-28 15:05:13
[Download RAW message or body]

mohrt		Tue Jan 28 10:05:13 2003 EDT

  Modified files:              
    /smarty	Smarty.class.php 
    /smarty/docs	programmers.sgml 
  Log:
  make separate var for compiler file
  
  
Index: smarty/Smarty.class.php
diff -u smarty/Smarty.class.php:1.333 smarty/Smarty.class.php:1.334
--- smarty/Smarty.class.php:1.333	Sat Jan 25 15:31:45 2003
+++ smarty/Smarty.class.php	Tue Jan 28 10:05:13 2003
@@ -152,8 +152,8 @@
     var $left_delimiter  =  '{';        // template tag delimiters.
     var $right_delimiter =  '}';
 
-    var $compiler_class        =   'Smarty_Compiler'; // the compiler class used by
-                                                      // Smarty to compile templates
+    var $compiler_file        =    'Smarty_Compiler.class.php'; // the compiler filename
+    var $compiler_class        =   'Smarty_Compiler'; // the compiler class
     var $config_class          =   'Config_File';     // the config class used by
                                                       // Smarty to load config vars
 
@@ -1122,7 +1122,12 @@
 \*======================================================================*/
     function _compile_template($tpl_file, $template_source, &$template_compiled)
     {
-        require_once SMARTY_DIR.$this->compiler_class . '.class.php';
+		if(file_exists(SMARTY_DIR.$this->compiler_file)) {
+        	require_once SMARTY_DIR.$this->compiler_file;			
+		} else {
+			// use include_path
+        	require_once $this->compiler_file;
+		}
 
         $smarty_compiler = new $this->compiler_class;
 
Index: smarty/docs/programmers.sgml
diff -u smarty/docs/programmers.sgml:1.24 smarty/docs/programmers.sgml:1.25
--- smarty/docs/programmers.sgml:1.24	Tue Dec 24 11:09:12 2002
+++ smarty/docs/programmers.sgml	Tue Jan 28 10:05:13 2003
@@ -1979,7 +1979,7 @@
 // from PHP script
 
 // put these function somewhere in your application
-function db_get_template ($tpl_name, &amp;tpl_source, &amp;$smarty_obj)
+function db_get_template ($tpl_name, &amp;$tpl_source, &amp;$smarty_obj)
 {
     // do database call here to fetch your template,
     // populating $tpl_source
@@ -1995,7 +1995,7 @@
     }
 }
 
-function db_get_timestamp($tpl_name, &$tpl_timestamp, &$smarty_obj)
+function db_get_timestamp($tpl_name, &amp;$tpl_timestamp, &amp;$smarty_obj)
 {
     // do database call here to populate $tpl_timestamp.
     $sql = new SQL;



-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic