diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index f57530ff19..fe22bbf9d8 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2009-03-17 Esteban Sanchez + + * include/functions_html.php: Do not add id counter if it's 0 on + print_select. It's a backwards compatibility workaround until we + take a decision on correct HTML elements. Fixed comment styles, please + do not add comments in the same line. + 2009-03-17 Jorge Gonzalez * include/languages/es.po, include/languages/es.mo: Updated Spanish diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 3dfe945bba..b85a3def4a 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -48,8 +48,8 @@ function print_select ($fields, $name, $selected = '', $script = '', $nothing = $idcounter[$name] = 0; } - $id = preg_replace('/[^a-z0-9\:\;\-\_]/i', '', $name.$idcounter[$name]); - + $id = preg_replace('/[^a-z0-9\:\;\-\_]/i', '', $name.($idcounter[$name] ? $idcounter[$name] : '')); + $attributes = ""; if (!empty ($script)) { $attributes .= ' onchange="'.$script.'"'; @@ -74,7 +74,6 @@ function print_select ($fields, $name, $selected = '', $script = '', $nothing = if ($nothing_value == $selected) { $output .= ' selected="selected"'; } - //You should pass a translated string already $output .= '>'.$nothing.''; } @@ -86,9 +85,11 @@ function print_select ($fields, $name, $selected = '', $script = '', $nothing = $output .= '