diff options
Diffstat (limited to 'scripts/forms.php')
-rw-r--r-- | scripts/forms.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/scripts/forms.php b/scripts/forms.php index fd426d67..3c700415 100644 --- a/scripts/forms.php +++ b/scripts/forms.php @@ -125,13 +125,8 @@ function InputToHTML($pagename, $type, $args, &$opt) { ## get input arguments if (!is_array($args)) $args = ParseArgs($args, '(?>([\\w-]+)[=])'); ## convert any positional arguments to named arguments - $posnames = @$InputTags[$type][':args']; - if (!$posnames) $posnames = array('name', 'value'); - while (count($posnames) > 0 && @$args[''] && count($args['']) > 0) { - $n = array_shift($posnames); - if (!isset($args[$n])) $args[$n] = array_shift($args['']); - } - + $posnames = IsEnabled($InputTags[$type][':args'], array('name', 'value')); + $args = PosArgs($args, $posnames); ## merge defaults for input type with arguments $opt = array_merge($InputTags[$type], $args); |