From 81a1110128af8141f583b82123463ff70a7fb810 Mon Sep 17 00:00:00 2001 From: slerena Date: Wed, 4 Mar 2009 18:09:21 +0000 Subject: [PATCH] 2009-03-04 Sancho Lerena * functions_html.php: Previous commit don't fix the problem, now works. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1512 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/include/functions_html.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 143313dda0..dc817c3632 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -159,6 +159,11 @@ function print_select_from_sql ($sql, $name, $selected = '', $script = '', $noth function print_input_text_extended ($name, $value, $id, $alt, $size, $maxlength, $disabled, $script, $attributes, $return = false, $password = false) { static $idcounter = 0; + if ($maxlength == 0) + $maxlength = 255; + if ($size == 0) + $size = 10; + ++$idcounter; $valid_attrs = array ("accept", "disabled", "maxlength", "name", "readonly", "size", "value", @@ -245,6 +250,11 @@ function print_input_password ($name, $value, $alt = '', $size = 50, $maxlength * @return string HTML code if return parameter is true. */ function print_input_text ($name, $value, $alt = '', $size = 50, $maxlength = 255, $return = false) { + if ($maxlength == 0) + $maxlength = 255; + if ($size == 0) + $size = 10; + return print_input_text_extended ($name, $value, 'text-'.$name, '', $size, $maxlength, false, '', '', $return); }