Update Smarty und RedBean
Smarty: 3.1.30 - Redbean: 5.0.0
This commit is contained in:
parent
eb0835ff74
commit
0795a87ecd
193 changed files with 22035 additions and 14455 deletions
|
@ -73,7 +73,8 @@ function smarty_function_html_radios($params, $template)
|
|||
if (method_exists($_val, "__toString")) {
|
||||
$selected = smarty_function_escape_special_chars((string) $_val->__toString());
|
||||
} else {
|
||||
trigger_error("html_radios: selected attribute is an object of class '" . get_class($_val) . "' without __toString() method", E_USER_NOTICE);
|
||||
trigger_error("html_radios: selected attribute is an object of class '" . get_class($_val) .
|
||||
"' without __toString() method", E_USER_NOTICE);
|
||||
}
|
||||
} else {
|
||||
$selected = (string) $_val;
|
||||
|
@ -96,7 +97,8 @@ function smarty_function_html_radios($params, $template)
|
|||
break;
|
||||
|
||||
case 'radios':
|
||||
trigger_error('html_radios: the use of the "radios" attribute is deprecated, use "options" instead', E_USER_WARNING);
|
||||
trigger_error('html_radios: the use of the "radios" attribute is deprecated, use "options" instead',
|
||||
E_USER_WARNING);
|
||||
$options = (array) $_val;
|
||||
break;
|
||||
|
||||
|
@ -108,9 +110,10 @@ function smarty_function_html_radios($params, $template)
|
|||
|
||||
case 'disabled':
|
||||
case 'readonly':
|
||||
if (!empty($params['strict'])) {
|
||||
if (!empty($params[ 'strict' ])) {
|
||||
if (!is_scalar($_val)) {
|
||||
trigger_error("html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute", E_USER_NOTICE);
|
||||
trigger_error("html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute",
|
||||
E_USER_NOTICE);
|
||||
}
|
||||
|
||||
if ($_val === true || $_val === $_key) {
|
||||
|
@ -141,23 +144,28 @@ function smarty_function_html_radios($params, $template)
|
|||
|
||||
if (isset($options)) {
|
||||
foreach ($options as $_key => $_val) {
|
||||
$_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape);
|
||||
$_html_result[] =
|
||||
smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels,
|
||||
$label_ids, $escape);
|
||||
}
|
||||
} else {
|
||||
foreach ($values as $_i => $_key) {
|
||||
$_val = isset($output[$_i]) ? $output[$_i] : '';
|
||||
$_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape);
|
||||
$_val = isset($output[ $_i ]) ? $output[ $_i ] : '';
|
||||
$_html_result[] =
|
||||
smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels,
|
||||
$label_ids, $escape);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($params['assign'])) {
|
||||
$template->assign($params['assign'], $_html_result);
|
||||
if (!empty($params[ 'assign' ])) {
|
||||
$template->assign($params[ 'assign' ], $_html_result);
|
||||
} else {
|
||||
return implode("\n", $_html_result);
|
||||
}
|
||||
}
|
||||
|
||||
function smarty_function_html_radios_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids, $escape)
|
||||
function smarty_function_html_radios_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids,
|
||||
$escape)
|
||||
{
|
||||
$_output = '';
|
||||
|
||||
|
@ -165,7 +173,8 @@ function smarty_function_html_radios_output($name, $value, $output, $selected, $
|
|||
if (method_exists($value, "__toString")) {
|
||||
$value = (string) $value->__toString();
|
||||
} else {
|
||||
trigger_error("html_options: value is an object of class '" . get_class($value) . "' without __toString() method", E_USER_NOTICE);
|
||||
trigger_error("html_options: value is an object of class '" . get_class($value) .
|
||||
"' without __toString() method", E_USER_NOTICE);
|
||||
|
||||
return '';
|
||||
}
|
||||
|
@ -177,7 +186,8 @@ function smarty_function_html_radios_output($name, $value, $output, $selected, $
|
|||
if (method_exists($output, "__toString")) {
|
||||
$output = (string) $output->__toString();
|
||||
} else {
|
||||
trigger_error("html_options: output is an object of class '" . get_class($output) . "' without __toString() method", E_USER_NOTICE);
|
||||
trigger_error("html_options: output is an object of class '" . get_class($output) .
|
||||
"' without __toString() method", E_USER_NOTICE);
|
||||
|
||||
return '';
|
||||
}
|
||||
|
@ -187,7 +197,8 @@ function smarty_function_html_radios_output($name, $value, $output, $selected, $
|
|||
|
||||
if ($labels) {
|
||||
if ($label_ids) {
|
||||
$_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!' . Smarty::$_UTF8_MODIFIER, '_', $name . '_' . $value));
|
||||
$_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!' . Smarty::$_UTF8_MODIFIER, '_',
|
||||
$name . '_' . $value));
|
||||
$_output .= '<label for="' . $_id . '">';
|
||||
} else {
|
||||
$_output .= '<label>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue