*** empty log message ***

This commit is contained in:
andrey
2001-04-12 20:53:21 +00:00
parent 79db2aecfa
commit 1794688256
3 changed files with 27 additions and 27 deletions

View File

@@ -1,19 +1,19 @@
1.4.0 1.4.0
----- -----
The most significant change to Smarty 1.4.0 is the parse engine. Instead of The most significant change to Smarty 1.4.0 is the compilation process. Instead
compiling all the templates up front, it now compiles them at runtime. This has of compiling all the templates up front, it now compiles them at runtime. This
several advantages. First off, there is no longer a need to have a single has several advantages. First off, there is no longer a need to have a single
template directory. You can now have arbitrary template sources, such as template directory. You can now have arbitrary template sources, such as
multiple directories or even database calls. This also speeds the performance multiple directories or even database calls. This also speeds the performance of
of Smarty when $compile_check is enabled, since it is only checking the Smarty when $compile_check is enabled, since it is only checking the template
template that is being executed instead of everything found in the template that is being executed instead of everything found in the template directory.
directory. The $tpl_file_ext variable was removed since this is no longer The $tpl_file_ext variable was removed since this is no longer needed, so
needed, so templates can be named anything you like with any extension. Smarty templates can be named anything you like with any extension. Smarty makes use of
makes use of the PEAR database abstraction class for obtaining templates from the PEAR database abstraction class for obtaining templates from databases. Now
databases. Now aren't you glad we require PEAR :-) aren't you glad we require PEAR :-)
We also added a workaround for LOCK_EX on windows systems, and change a couple We also added a workaround for LOCK_EX on Windows systems, and changed a couple
of file permissions for better security on public servers. Thanks goes to of file permissions for better security on public servers. Thanks goes to
Fernando Nunes for his code contributions. Fernando Nunes for his code contributions.
@@ -29,7 +29,7 @@ source, the compiled versions have encoded names. Each file has a comment at
the top that states which resource was used as the source file. In unix, "head the top that states which resource was used as the source file. In unix, "head
-2 *" shows the first two lines of each file. If you have $compile_check set to -2 *" shows the first two lines of each file. If you have $compile_check set to
false and the compiled template does not yet exist, it will compile it false and the compiled template does not yet exist, it will compile it
regardless of this setting. Once it is compiled though, it will not check to regardless of this setting. Once it is compiled though, it will not check to see
see if recompilation is necessary. if recompilation is necessary.
-Monte -Monte

View File

@@ -139,7 +139,7 @@ class Smarty
function Smarty() function Smarty()
{ {
foreach ($this->global_assign as $var_name) { foreach ($this->global_assign as $var_name) {
if(isset($GLOBALS[$var_name])) { if (isset($GLOBALS[$var_name])) {
$this->assign($var_name, $GLOBALS[$var_name]); $this->assign($var_name, $GLOBALS[$var_name]);
} }
} }
@@ -194,8 +194,8 @@ class Smarty
\*======================================================================*/ \*======================================================================*/
function clear_assign($tpl_var) function clear_assign($tpl_var)
{ {
if(is_array($tpl_var)) if (is_array($tpl_var))
foreach($tpl_var as $curr_var) foreach ($tpl_var as $curr_var)
unset($this->_tpl_vars[$curr_var]); unset($this->_tpl_vars[$curr_var]);
else else
unset($this->_tpl_vars[$tpl_var]); unset($this->_tpl_vars[$tpl_var]);
@@ -369,7 +369,7 @@ class Smarty
extract($this->_tpl_vars); extract($this->_tpl_vars);
if($this->show_info_header) if ($this->show_info_header)
$info_header = '<!-- Smarty '.$this->version.' '.strftime("%Y-%m-%d %H:%M:%S %Z").' -->'."\n\n"; $info_header = '<!-- Smarty '.$this->version.' '.strftime("%Y-%m-%d %H:%M:%S %Z").' -->'."\n\n";
else else
$info_header = ""; $info_header = "";
@@ -390,16 +390,16 @@ class Smarty
ob_end_clean(); ob_end_clean();
} }
if($this->caching) { if ($this->caching) {
$this->_write_file($cache_file, $results, true); $this->_write_file($cache_file, $results, true);
$results = $this->_process_cached_inserts($results); $results = $this->_process_cached_inserts($results);
} }
if ($display) { if ($display) {
if(isset($results)) { echo $results; } if (isset($results)) { echo $results; }
return; return;
} else { } else {
if(isset($results)) { return $results; } if (isset($results)) { return $results; }
} }
} }

View File

@@ -139,7 +139,7 @@ class Smarty
function Smarty() function Smarty()
{ {
foreach ($this->global_assign as $var_name) { foreach ($this->global_assign as $var_name) {
if(isset($GLOBALS[$var_name])) { if (isset($GLOBALS[$var_name])) {
$this->assign($var_name, $GLOBALS[$var_name]); $this->assign($var_name, $GLOBALS[$var_name]);
} }
} }
@@ -194,8 +194,8 @@ class Smarty
\*======================================================================*/ \*======================================================================*/
function clear_assign($tpl_var) function clear_assign($tpl_var)
{ {
if(is_array($tpl_var)) if (is_array($tpl_var))
foreach($tpl_var as $curr_var) foreach ($tpl_var as $curr_var)
unset($this->_tpl_vars[$curr_var]); unset($this->_tpl_vars[$curr_var]);
else else
unset($this->_tpl_vars[$tpl_var]); unset($this->_tpl_vars[$tpl_var]);
@@ -369,7 +369,7 @@ class Smarty
extract($this->_tpl_vars); extract($this->_tpl_vars);
if($this->show_info_header) if ($this->show_info_header)
$info_header = '<!-- Smarty '.$this->version.' '.strftime("%Y-%m-%d %H:%M:%S %Z").' -->'."\n\n"; $info_header = '<!-- Smarty '.$this->version.' '.strftime("%Y-%m-%d %H:%M:%S %Z").' -->'."\n\n";
else else
$info_header = ""; $info_header = "";
@@ -390,16 +390,16 @@ class Smarty
ob_end_clean(); ob_end_clean();
} }
if($this->caching) { if ($this->caching) {
$this->_write_file($cache_file, $results, true); $this->_write_file($cache_file, $results, true);
$results = $this->_process_cached_inserts($results); $results = $this->_process_cached_inserts($results);
} }
if ($display) { if ($display) {
if(isset($results)) { echo $results; } if (isset($results)) { echo $results; }
return; return;
} else { } else {
if(isset($results)) { return $results; } if (isset($results)) { return $results; }
} }
} }