cvs: smarty / NEWS /libs Smarty_Compiler.class.php
| From: | Messju Mohr | Date: | Wed, 11 Jun 2003 14:38:25 +0000 |
| Subject: | cvs: smarty / NEWS /libs Smarty_Compiler.class.php | ||
| Groups: | php.smarty.cvs | ||
| Request: | Send a blank email to php-smarty-cvs+get-640@lists.php.net to get a copy of this message | ||
messju Wed Jun 11 10:38:25 2003 EDT
Modified files:
/smarty NEWS
/smarty/libs Smarty_Compiler.class.php
Log:
removed newlines in compiled templates after closing tags
Index: smarty/NEWS
diff -u smarty/NEWS:1.372 smarty/NEWS:1.373
--- smarty/NEWS:1.372 Sat Jun 7 21:07:39 2003
+++ smarty/NEWS Wed Jun 11 10:38:24 2003
@@ -1,3 +1,4 @@
+ - removed newlines in compiled templates after closing tags (messju)
- added block-methods for registered objects (Bharat Mediratta, messju)
- ignore one char resource names like c:foo.tpl (Monte)
- added default_resource_type feature (Monte)
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.232 smarty/libs/Smarty_Compiler.class.php:1.233
--- smarty/libs/Smarty_Compiler.class.php:1.232 Sat Jun 7 21:07:39 2003
+++ smarty/libs/Smarty_Compiler.class.php Wed Jun 11 10:38:24 2003
@@ -39,7 +39,7 @@
* @package Smarty
*/
-/* $Id: Smarty_Compiler.class.php,v 1.232 2003/06/08 01:07:39 messju Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.233 2003/06/11 14:38:24 messju Exp $ */
/**
* Template compiling class
* @package Smarty
@@ -348,14 +348,14 @@
}
$_plugins_params .= '))';
$_plugin_filepath = $this->_get_plugin_filepath('core', 'load_plugins');
- $plugins_code = "<?php
require_once('$_plugin_filepath');\nsmarty_core_load_plugins($_plugins_params, \$this);
?>\n";
+ $plugins_code = "<?php
require_once('$_plugin_filepath');\nsmarty_core_load_plugins($_plugins_params, \$this);
?>";
$template_header .= $plugins_code;
$this->_plugin_info = array();
}
if ($this->_init_smarty_vars) {
$_plugin_filepath = $this->_get_plugin_filepath('core',
'assign_smarty_interface');
- $template_header .= "<?php
require_once('$_plugin_filepath');\nsmarty_core_assign_smarty_interface(null, \$this);
?>\n";
+ $template_header .= "<?php
require_once('$_plugin_filepath');\nsmarty_core_assign_smarty_interface(null, \$this);
?>";
$this->_init_smarty_vars = false;
}
@@ -394,9 +394,9 @@
if (preg_match('!^' . $this->_obj_call_regexp . '|' .
$this->_var_regexp . '$!', $tag_command)) {
$_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";
+ return "<?php \$this->assign('" .
$this->_dequote($_tag_attrs['assign']) . "', $_return ); ?>";
} else {
- return "<?php echo $_return; ?>\n";
+ return "<?php echo $_return; ?>";
}
}
@@ -468,7 +468,7 @@
case 'literal':
list (,$literal_block) = each($this->_literal_blocks);
$this->_current_line_no += substr_count($literal_block, "\n");
- return "<?php echo '".str_replace("'",
"\'", str_replace("\\", "\\\\", $literal_block))."';
?>\n";
+ return "<?php echo '".str_replace("'",
"\'", str_replace("\\", "\\\\", $literal_block))."';
?>";
case 'php':
if ($this->security &&
!$this->security_settings['PHP_TAGS']) {
@@ -678,7 +678,7 @@
$this->_parse_modifiers($return, $tag_modifier);
}
- return '<?php echo ' . $return . " ; ?>\n";
+ return '<?php echo ' . $return . " ; ?>";
}
/**
@@ -770,7 +770,7 @@
$output = '';
}
- return '<?php ' . $prefix . $output . $postfix . "?>\n";
+ return '<?php ' . $prefix . $output . $postfix . "?>";
}
/**
@@ -805,7 +805,7 @@
$_params = "array('args' => array(".implode(', ',
(array)$arg_list)."))";
$_plugin_filepath = $this->_get_plugin_filepath('core',
'run_insert_handler');
- return "<?php require_once('$_plugin_filepath');\necho
smarty_core_run_insert_handler($_params, \$this); ?>\n";
+ return "<?php require_once('$_plugin_filepath');\necho
smarty_core_run_insert_handler($_params, \$this); ?>";
}
/**
@@ -891,7 +891,7 @@
$_params = "array('smarty_file' => " . $attrs['file'] .
", 'smarty_assign' => '$assign_var', 'smarty_once' =>
$once_var, 'smarty_include_vars' => array(".implode(',',
(array)$arg_list)."))";
$_plugin_filepath = $this->_get_plugin_filepath('core',
'smarty_include_php');
- return "<?php
require_once('$_plugin_filepath');\nsmarty_core_smarty_include_php($_params, \$this);
?>\n";
+ return "<?php
require_once('$_plugin_filepath');\nsmarty_core_smarty_include_php($_params, \$this);
?>";
}