From 52605704295aee2f7c794d2a74166a3447220db4 Mon Sep 17 00:00:00 2001 From: andrey Date: Wed, 13 Dec 2000 15:08:25 +0000 Subject: [PATCH] Fix sectionelse. --- Smarty.addons.php | 8 ++++---- Smarty.class.php | 2 +- libs/Smarty.class.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Smarty.addons.php b/Smarty.addons.php index 25c74000..312ca3af 100644 --- a/Smarty.addons.php +++ b/Smarty.addons.php @@ -157,7 +157,7 @@ function smarty_func_html_select_date() for ($i = 1; $i <= 12; $i++) $month_names[] = strftime($month_format, mktime(0, 0, 0, $i, 1, 2000)); - $html_result .= ''."\n"; $html_result .= smarty_func_html_options(array('output' => $month_names, 'values' => range(1, 12), 'selected' => strftime("%m", $time), @@ -169,7 +169,7 @@ function smarty_func_html_select_date() $days = range(1, 31); array_walk($days, create_function('&$x', '$x = sprintf("'.$day_format.'", $x);')); - $html_result .= ''."\n"; $html_result .= smarty_func_html_options(array('output' => $days, 'values' => range(1, 31), 'selected' => strftime("%d", $time), @@ -179,11 +179,11 @@ function smarty_func_html_select_date() if ($display_years) { if ($year_as_text) { - $html_result .= ''; + $html_result .= ''; } else { $years = range($start_year, $end_year); - $html_result .= ''."\n"; $html_result .= smarty_func_html_options(array('output' => $years, 'values' => $years, 'selected' => strftime("%Y", $time), diff --git a/Smarty.class.php b/Smarty.class.php index 8328d30f..a1491806 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -540,7 +540,7 @@ class Smarty } if (isset($attrs['loop'])) { - $loop_check_code = "count({$section_props}['loop']) > 0 && "; + $loop_check_code = "{$section_props}['loop'] > 0 && "; } else { $output .= "{$section_props}['loop'] = 1;\n"; } diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 8328d30f..a1491806 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -540,7 +540,7 @@ class Smarty } if (isset($attrs['loop'])) { - $loop_check_code = "count({$section_props}['loop']) > 0 && "; + $loop_check_code = "{$section_props}['loop'] > 0 && "; } else { $output .= "{$section_props}['loop'] = 1;\n"; }