From c19f3b2596ae846f5de73f562a0288af8c82855a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 15 Jul 2015 16:41:06 +0300 Subject: Polish changes from PR #3893 --- system/helpers/form_helper.php | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) (limited to 'system/helpers/form_helper.php') diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index f8c6a9dde..fd807769a 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -208,9 +208,7 @@ if ( ! function_exists('form_input')) 'value' => $value ); - $extra = _attributes_to_string($extra); - - return '\n"; + return '\n"; } } @@ -256,9 +254,7 @@ if ( ! function_exists('form_upload')) is_array($data) OR $data = array('name' => $data); $data['type'] = 'file'; - $extra = _attributes_to_string($extra); - - return '\n"; + return '\n"; } } @@ -292,9 +288,9 @@ if ( ! function_exists('form_textarea')) unset($data['value']); // textareas don't use the value attribute } - $extra = _attributes_to_string($extra); - - return '\n"; + return '\n"; } } @@ -314,8 +310,7 @@ if ( ! function_exists('form_multiselect')) function form_multiselect($name = '', $options = array(), $selected = array(), $extra = '') { $extra = _attributes_to_string($extra); - - if ( ! strpos($extra, 'multiple')) + if (stripos($extra, 'multiple') === FALSE) { $extra .= ' multiple="multiple"'; } @@ -381,7 +376,7 @@ if ( ! function_exists('form_dropdown')) $extra = _attributes_to_string($extra); - $multiple = (count($selected) > 1 && strpos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : ''; + $multiple = (count($selected) > 1 && stripos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : ''; $form = '\n"; + return '\n"; } } @@ -507,9 +500,7 @@ if ( ! function_exists('form_submit')) 'value' => $value ); - $extra = _attributes_to_string($extra); - - return '\n"; + return '\n"; } } @@ -533,9 +524,7 @@ if ( ! function_exists('form_reset')) 'value' => $value ); - $extra = _attributes_to_string($extra); - - return '\n"; + return '\n"; } } @@ -564,9 +553,9 @@ if ( ! function_exists('form_button')) unset($data['content']); // content is not an attribute } - $extra = _attributes_to_string($extra); - - return '\n"; + return '\n"; } } -- cgit v1.2.3-24-g4f1b