diff options
Diffstat (limited to 'system/helpers/form_helper.php')
-rw-r--r-- | system/helpers/form_helper.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index f343b6c71..692909c79 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -228,13 +228,10 @@ if ( ! function_exists('form_upload')) */ function form_upload($data = '', $value = '', $extra = '') { - if ( ! is_array($data)) - { - $data = array('name' => $data); - } - + $defaults = array('type' => 'file', 'name' => ''); + is_array($data) OR $data = array('name' => $data); $data['type'] = 'file'; - return form_input($data, $value, $extra); + return '<input '._parse_form_attributes($data, $defaults).$extra." />\n"; } } |