mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-03 09:54:27 +02:00
Fix sectionelse.
This commit is contained in:
@@ -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 .= '<select name="'.$date_prefix.'Month">'."\n";
|
||||
$html_result .= '<select name="'.$prefix.'Month">'."\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 .= '<select name="'.$date_prefix.'Day">'."\n";
|
||||
$html_result .= '<select name="'.$prefix.'Day">'."\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 .= '<input type="text" name="'.$date_prefix.'Year" value="'.strftime('%Y', $time).'" size="4" maxlength="4">';
|
||||
$html_result .= '<input type="text" name="'.$prefix.'Year" value="'.strftime('%Y', $time).'" size="4" maxlength="4">';
|
||||
} else {
|
||||
$years = range($start_year, $end_year);
|
||||
|
||||
$html_result .= '<select name="'.$date_prefix.'Year">'."\n";
|
||||
$html_result .= '<select name="'.$prefix.'Year">'."\n";
|
||||
$html_result .= smarty_func_html_options(array('output' => $years,
|
||||
'values' => $years,
|
||||
'selected' => strftime("%Y", $time),
|
||||
|
@@ -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";
|
||||
}
|
||||
|
@@ -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";
|
||||
}
|
||||
|
Reference in New Issue
Block a user