diff options
author | Derek Allard <derek.allard@ellislab.com> | 2010-01-17 08:23:00 +0100 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2010-01-17 08:23:00 +0100 |
commit | 33d4b6aac7f33d6cddfa5fb39c5701ecc9cfa80b (patch) | |
tree | 326392a11e30731d6ba21d0fbc3a7156be05eab8 /system/helpers | |
parent | 04eb070b87da9ffa40e48ef3660e664b48760c97 (diff) |
adding the ability for form_open_multipart() to accept string attribute arguments
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/form_helper.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index c78b805e5..60d2631e9 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -84,7 +84,15 @@ if ( ! function_exists('form_open_multipart')) { function form_open_multipart($action, $attributes = array(), $hidden = array()) { - $attributes['enctype'] = 'multipart/form-data'; + if (is_string($attributes)) + { + $attributes .= ' enctype="multipart/form-data"'; + } + else + { + $attributes['enctype'] = 'multipart/form-data'; + } + return form_open($action, $attributes, $hidden); } } |