From 910ff7ad430f47ebcf3d801314fcee9a3c10f011 Mon Sep 17 00:00:00 2001 From: Michiel Vugteveen Date: Wed, 6 Jun 2012 20:03:14 +0200 Subject: form_checkbox set_value fix --- system/helpers/form_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 410972187..04d11837e 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -378,7 +378,7 @@ if ( ! function_exists('form_checkbox')) { $checked = $data['checked']; - if ($checked === FALSE) + if ($checked == FALSE) { unset($data['checked']); } @@ -388,7 +388,7 @@ if ( ! function_exists('form_checkbox')) } } - if ($checked === TRUE) + if ($checked == TRUE) { $defaults['checked'] = 'checked'; } -- cgit v1.2.3-24-g4f1b From 9640a037c51c1efea2e64caa974c577dc1594f5d Mon Sep 17 00:00:00 2001 From: Michiel Vugteveen Date: Wed, 6 Jun 2012 20:20:27 +0200 Subject: fixes --- system/helpers/form_helper.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 04d11837e..40c7d8823 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -325,7 +325,10 @@ if ( ! function_exists('form_dropdown')) $selected = array($_POST[$name]); } - if ($extra !== '') $extra = ' '.$extra; + if ($extra != '') + { + $extra = ' '.$extra; + } $multiple = (count($selected) > 1 && strpos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : ''; @@ -702,7 +705,7 @@ if ( ! function_exists('set_select')) return ''; } } - elseif (($field === '' OR $value === '') OR ($field !== $value)) + elseif (($field == '' OR $value == '') OR ($field != $value)) { return ''; } @@ -753,7 +756,7 @@ if ( ! function_exists('set_checkbox')) return ''; } } - elseif (($field === '' OR $value === '') OR ($field !== $value)) + elseif (($field == '' OR $value == '') OR ($field != $value)) { return ''; } @@ -806,7 +809,7 @@ if ( ! function_exists('set_radio')) } else { - if (($field === '' OR $value === '') OR ($field !== $value)) + if (($field == '' OR $value == '') OR ($field != $value)) { return ''; } -- cgit v1.2.3-24-g4f1b From a6f3423388c2c51119e71d7aac2917b34911bf5c Mon Sep 17 00:00:00 2001 From: Michiel Vugteveen Date: Thu, 7 Jun 2012 10:14:29 +0200 Subject: fixes --- system/helpers/form_helper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 40c7d8823..984634315 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -705,7 +705,7 @@ if ( ! function_exists('set_select')) return ''; } } - elseif (($field == '' OR $value == '') OR ($field != $value)) + elseif (($field == '' OR $value == '') OR $field !== $value) { return ''; } @@ -756,7 +756,7 @@ if ( ! function_exists('set_checkbox')) return ''; } } - elseif (($field == '' OR $value == '') OR ($field != $value)) + elseif (($field == '' OR $value == '') OR $field !== $value) { return ''; } @@ -809,7 +809,7 @@ if ( ! function_exists('set_radio')) } else { - if (($field == '' OR $value == '') OR ($field != $value)) + if (($field == '' OR $value == '') OR $field !== $value) { return ''; } -- cgit v1.2.3-24-g4f1b