diff --git a/NEWS b/NEWS index 3079dac0..62ca2790 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - fixed issue with php executing in literal blocks (Monte) + Version 1.3.0 ------------- - moved license from GPL to LGPL (Monte) diff --git a/README b/README index 50bcee42..9587d2b6 100644 --- a/README +++ b/README @@ -55,8 +55,9 @@ DESCRIPTION: * it is possible to imbed PHP code right in your template files, although not recommended and doubtfully needed since the engine is so customizable. + * built in caching COPYRIGHT: Copyright (c) 2001 ispi of Lincoln, Inc. All rights reserved. - This software is released under the GNU General Public License. + This software is released under the GNU Lesser General Public License. Please read the disclaimer at the top of the Smarty.class.php file. diff --git a/Smarty.class.php b/Smarty.class.php index 57468560..1daa5b3a 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -85,8 +85,7 @@ class Smarty var $custom_funcs = array( 'html_options' => 'smarty_func_html_options', - 'html_select_date' => 'smarty_func_html_select_date', - 'header' => 'smarty_func_header' + 'html_select_date' => 'smarty_func_html_select_date' ); var $custom_mods = array( 'lower' => 'strtolower', @@ -683,7 +682,7 @@ class Smarty case 'literal': list (,$literal_block) = each($this->_literal_blocks); $this->_current_line_no += substr_count($literal_block, "\n"); - return $literal_block; + return "\n"; case 'insert': return $this->_compile_insert_tag($tag_args); diff --git a/demo/templates/index.tpl b/demo/templates/index.tpl index dacfb8c6..f1a1b496 100644 --- a/demo/templates/index.tpl +++ b/demo/templates/index.tpl @@ -16,11 +16,11 @@ hello, my name is {$Name|upper} My interests are: {section name=outer loop=$FirstName} - {if %outer.index% is odd by 2} - {%outer.rownum%} . {$outer/FirstName} {$outer/LastName} - {else} - {%outer.rownum%} * {$outer/FirstName} {$outer/LastName} - {/if} +{if %outer.index% is odd by 2} + {%outer.rownum%} . {$outer/FirstName} {$outer/LastName} +{else} + {%outer.rownum%} * {$outer/FirstName} {$outer/LastName} +{/if} {sectionelse} none {/section} diff --git a/docs.sgml b/docs.sgml index be82cd6b..e2f25357 100644 --- a/docs.sgml +++ b/docs.sgml @@ -189,9 +189,9 @@ not have the CGI version of PHP available and you are concerned about world-writable directory access, you can chmod 777 the compile_dir, let the templates compile once as the web server user, then change the - directory mode back to 700. If you are using the caching feature of - Smarty, the cache directory must always have write access for the web - server user. + directory mode to 755. If you are using the caching feature of Smarty, + the cache directory must always have write access for the web server + user. TECHNICAL NOTE: If you do not have access to the php.ini file, you can diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 57468560..1daa5b3a 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -85,8 +85,7 @@ class Smarty var $custom_funcs = array( 'html_options' => 'smarty_func_html_options', - 'html_select_date' => 'smarty_func_html_select_date', - 'header' => 'smarty_func_header' + 'html_select_date' => 'smarty_func_html_select_date' ); var $custom_mods = array( 'lower' => 'strtolower', @@ -683,7 +682,7 @@ class Smarty case 'literal': list (,$literal_block) = each($this->_literal_blocks); $this->_current_line_no += substr_count($literal_block, "\n"); - return $literal_block; + return "\n"; case 'insert': return $this->_compile_insert_tag($tag_args); diff --git a/templates/index.tpl b/templates/index.tpl index dacfb8c6..f1a1b496 100644 --- a/templates/index.tpl +++ b/templates/index.tpl @@ -16,11 +16,11 @@ hello, my name is {$Name|upper} My interests are: {section name=outer loop=$FirstName} - {if %outer.index% is odd by 2} - {%outer.rownum%} . {$outer/FirstName} {$outer/LastName} - {else} - {%outer.rownum%} * {$outer/FirstName} {$outer/LastName} - {/if} +{if %outer.index% is odd by 2} + {%outer.rownum%} . {$outer/FirstName} {$outer/LastName} +{else} + {%outer.rownum%} * {$outer/FirstName} {$outer/LastName} +{/if} {sectionelse} none {/section}