From 9e4d47622622b872f5fa1afadb98a03579723d82 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 10 Feb 2008 12:41:57 +0000 Subject: [PATCH] use PMA_generate_html_radio() --- libraries/common.lib.php | 7 ++++--- tbl_structure.php | 24 +++++++++++++++++------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/libraries/common.lib.php b/libraries/common.lib.php index c8db52c05..4ad91fee0 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -2291,15 +2291,16 @@ function PMA_externalBug($functionality, $component, $minimum_version, $bugref) /** - * Generates a set of radio HTML fields + * Generates and echoes a set of radio HTML fields * * @uses htmlspecialchars() * @param string $html_field_name the radio HTML field * @param array $choices the choices values and labels * @param string $checked_choice the choice to check by default * @param boolean $line_break whether to add an HTML line break after a choice + * @param boolean $escape_label whether to use htmlspecialchars() on label */ -function PMA_generate_html_radio($html_field_name, $choices, $checked_choice = '', $line_break = true) { +function PMA_generate_html_radio($html_field_name, $choices, $checked_choice = '', $line_break = true, $escape_label = true) { foreach ($choices as $choice_value => $choice_label) { $html_field_id = $html_field_name . '_' . $choice_value; echo '' . "\n"; - echo ''; + echo ''; if ($line_break) { echo '
'; } diff --git a/tbl_structure.php b/tbl_structure.php index 2d25bfb3d..c7f3ddb8d 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -500,17 +500,27 @@ if (! $tbl_is_view && ! $db_is_information_schema) { echo '' . $strAddNewField . ''; } echo sprintf($strAddFields, ''); - ?> - - -'; foreach ($aryFields as $fieldname) { $fieldOptions .= '' . "\n"; } unset($aryFields); - $fieldOptions .= '