diff options
author | Daniel Hunsaker <danhunsaker@gmail.com> | 2013-02-22 21:49:33 +0100 |
---|---|---|
committer | Daniel Hunsaker <danhunsaker@gmail.com> | 2013-02-22 21:49:33 +0100 |
commit | 44a6d1da2be916fe0f23a3ea4d5fcb391d7f65dd (patch) | |
tree | 31549ebf6ea5ea98e4347eb640d1caa685316f3e /system/helpers/form_helper.php | |
parent | 353f9834adf3f44c6c7a0f924089bb2b43360404 (diff) | |
parent | eb291c1d1e1116a4420fa30e587adeea0451eeb7 (diff) |
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into feature/exit-status
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"; } } |