summaryrefslogtreecommitdiffstats
path: root/system/helpers/form_helper.php
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2010-01-17 08:23:00 +0100
committerDerek Allard <derek.allard@ellislab.com>2010-01-17 08:23:00 +0100
commit33d4b6aac7f33d6cddfa5fb39c5701ecc9cfa80b (patch)
tree326392a11e30731d6ba21d0fbc3a7156be05eab8 /system/helpers/form_helper.php
parent04eb070b87da9ffa40e48ef3660e664b48760c97 (diff)
adding the ability for form_open_multipart() to accept string attribute arguments
Diffstat (limited to 'system/helpers/form_helper.php')
-rw-r--r--system/helpers/form_helper.php10
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);
}
}