cvs: smarty /libs Smarty_Compiler.class.php

"Messju Mohr" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmessju1067111006@cvsserver>
messju		Sat Oct 25 15:43:27 2003 EDT

  Modified files:              
    /smarty/libs	Smarty_Compiler.class.php 
  Log:
  removed unused property _output_type
  removed unused param $tag_attrs of _parse_var_props()
  cleaned up alignment of class-properties
  
  
  
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.291 smarty/libs/Smarty_Compiler.class.php:1.292
--- smarty/libs/Smarty_Compiler.class.php:1.291	Thu Oct 23 17:04:12 2003
+++ smarty/libs/Smarty_Compiler.class.php	Sat Oct 25 15:43:14 2003
@@ -39,7 +39,7 @@
  * @package Smarty
  */
 
-/* $Id: Smarty_Compiler.class.php,v 1.291 2003/10/23 21:04:12 messju Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.292 2003/10/25 19:43:14 messju Exp $ */
 
 /**
  * Template compiling class
@@ -60,27 +60,25 @@
     var $_capture_stack         =   array();    // keeps track of nested capture buffers
     var $_plugin_info           =   array();    // keeps track of plugins to load
     var $_init_smarty_vars      =   false;
-    var $_permitted_tokens        =    array('true','false','yes','no','on','off','null');
-    var $_output_type            =    'php';
-    var $_db_qstr_regexp        =    null;        // regexps are setup in the constructor
-    var $_si_qstr_regexp        =    null;
-    var $_qstr_regexp            =    null;
-    var $_func_regexp            =    null;
-    var $_var_bracket_regexp    =    null;
-    var $_dvar_guts_regexp        =    null;
-    var $_dvar_regexp            =    null;
-    var $_cvar_regexp            =    null;
-    var $_svar_regexp            =    null;
-    var $_avar_regexp            =    null;
-    var $_mod_regexp            =    null;
-    var $_var_regexp            =    null;
-    var $_parenth_param_regexp    =    null;
-    var $_func_call_regexp        =    null;
-    var $_obj_ext_regexp        =    null;
-    var $_obj_start_regexp        =    null;
-    var $_obj_params_regexp        =    null;
-    var $_obj_call_regexp        =    null;
-
+    var $_permitted_tokens      =   array('true','false','yes','no','on','off','null');
+    var $_db_qstr_regexp        =   null;        // regexps are setup in the constructor
+    var $_si_qstr_regexp        =   null;
+    var $_qstr_regexp           =   null;
+    var $_func_regexp           =   null;
+    var $_var_bracket_regexp    =   null;
+    var $_dvar_guts_regexp      =   null;
+    var $_dvar_regexp           =   null;
+    var $_cvar_regexp           =   null;
+    var $_svar_regexp           =   null;
+    var $_avar_regexp           =   null;
+    var $_mod_regexp            =   null;
+    var $_var_regexp            =   null;
+    var $_parenth_param_regexp  =   null;
+    var $_func_call_regexp      =   null;
+    var $_obj_ext_regexp        =   null;
+    var $_obj_start_regexp      =   null;
+    var $_obj_params_regexp     =   null;
+    var $_obj_call_regexp       =   null;
     var $_cacheable_state       =   0;
     var $_cache_attrs_count     =   0;
     var $_nocache_count         =   0;
@@ -88,7 +86,7 @@
     var $_cache_include         =   null;
 
     var $_strip_depth           =   0;
-    var $_additional_newline           =   "\n";
+    var $_additional_newline    =   "\n";
 
     /**#@-*/
     /**
@@ -407,9 +405,6 @@
      */
     function _compile_tag($template_tag)
     {
-        // default to php output
-        $this->_output_type = 'php';
-
         /* Matched comment. */
         if ($template_tag{0} == '*' && $template_tag{strlen($template_tag) - 1} == '*')
             return '';
@@ -431,11 +426,8 @@
             $_return = $this->_parse_var_props($tag_command . $tag_modifier, $this->_parse_attrs($tag_args));
             if(isset($_tag_attrs['assign'])) {
                 return "<?php \$this->assign('" . $this->_dequote($_tag_attrs['assign']) . "', $_return ); ?>\n";
-            } elseif ($this->_output_type == 'php') {
-                return "<?php echo $_return; ?>" . $this->_additional_newline;
             } else {
-                // static
-                return $_return;
+                return "<?php echo $_return; ?>" . $this->_additional_newline;
             }
         }
 
@@ -1511,7 +1503,7 @@
      * @param string $tag_attrs
      * @return string
      */
-    function _parse_var_props($val, $tag_attrs = null)
+    function _parse_var_props($val)
     {
         $val = trim($val);
 
@@ -1585,9 +1577,6 @@
      */
     function _parse_var($var_expr, $in_math = false)
     {
-        // inform the calling expression the return type (php, static)
-        $this->_output_type = 'php';
-
         $_has_math = false;
         $_math_vars = preg_split('!('.$this->_dvar_math_regexp.'|'.$this->_qstr_regexp.')!', $var_expr, -1, PREG_SPLIT_DELIM_CAPTURE);
 

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.