summaryrefslogtreecommitdiffstats
path: root/system/helpers/form_helper.php
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-06-04 16:28:23 +0200
committerTimothy Warren <tim@timshomepage.net>2012-06-04 16:28:23 +0200
commit3902e383b41c6c0ef77b65e95d451cb2ea3d85db (patch)
treeeb2adb1cf4f1dea1e4d14c69a3f1a275b14cff08 /system/helpers/form_helper.php
parentfd2ceab417bbb696134910ce0eaeca34bea3e1e5 (diff)
parentfc11dcc82cefa7299e6f8c74d0e005ebb6fa568c (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into email
Diffstat (limited to 'system/helpers/form_helper.php')
-rw-r--r--system/helpers/form_helper.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index eca6c5f1e..410972187 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -52,7 +52,7 @@ if ( ! function_exists('form_open'))
{
$CI =& get_instance();
- if ($attributes == '')
+ if ($attributes === '')
{
$attributes = 'method="post"';
}
@@ -325,7 +325,7 @@ 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"' : '';
@@ -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';
}
@@ -506,7 +506,7 @@ if ( ! function_exists('form_label'))
$label = '<label';
- if ($id != '')
+ if ($id !== '')
{
$label .= ' for="'.$id.'"';
}
@@ -540,7 +540,7 @@ if ( ! function_exists('form_fieldset'))
function form_fieldset($legend_text = '', $attributes = array())
{
$fieldset = '<fieldset'._attributes_to_string($attributes, FALSE).">\n";
- if ($legend_text != '')
+ if ($legend_text !== '')
{
return $fieldset.'<legend>'.$legend_text."</legend>\n";
}
@@ -623,7 +623,7 @@ if ( ! function_exists('form_prep'))
return $str;
}
- if ($field_name != '')
+ if ($field_name !== '')
{
$prepped_fields[$field_name] = $field_name;
}
@@ -686,7 +686,7 @@ if ( ! function_exists('set_select'))
{
if ( ! isset($_POST[$field]))
{
- if (count($_POST) === 0 && $default == TRUE)
+ if (count($_POST) === 0 && $default === TRUE)
{
return ' selected="selected"';
}
@@ -702,7 +702,7 @@ if ( ! function_exists('set_select'))
return '';
}
}
- elseif (($field == '' OR $value == '') OR ($field != $value))
+ elseif (($field === '' OR $value === '') OR ($field !== $value))
{
return '';
}
@@ -737,7 +737,7 @@ if ( ! function_exists('set_checkbox'))
{
if ( ! isset($_POST[$field]))
{
- if (count($_POST) === 0 && $default == TRUE)
+ if (count($_POST) === 0 && $default === TRUE)
{
return ' checked="checked"';
}
@@ -753,7 +753,7 @@ if ( ! function_exists('set_checkbox'))
return '';
}
}
- elseif (($field == '' OR $value == '') OR ($field != $value))
+ elseif (($field === '' OR $value === '') OR ($field !== $value))
{
return '';
}
@@ -788,7 +788,7 @@ if ( ! function_exists('set_radio'))
{
if ( ! isset($_POST[$field]))
{
- if (count($_POST) === 0 && $default == TRUE)
+ if (count($_POST) === 0 && $default === TRUE)
{
return ' checked="checked"';
}
@@ -806,7 +806,7 @@ if ( ! function_exists('set_radio'))
}
else
{
- if (($field == '' OR $value == '') OR ($field != $value))
+ if (($field === '' OR $value === '') OR ($field !== $value))
{
return '';
}
@@ -907,7 +907,7 @@ if ( ! function_exists('_parse_form_attributes'))
foreach ($default as $key => $val)
{
- if ($key == 'value')
+ if ($key === 'value')
{
$val = form_prep($val, $default['name']);
}
@@ -936,12 +936,12 @@ if ( ! function_exists('_attributes_to_string'))
{
if (is_string($attributes) && strlen($attributes) > 0)
{
- if ($formtag == TRUE && strpos($attributes, 'method=') === FALSE)
+ if ($formtag === TRUE && strpos($attributes, 'method=') === FALSE)
{
$attributes .= ' method="post"';
}
- if ($formtag == TRUE && strpos($attributes, 'accept-charset=') === FALSE)
+ if ($formtag === TRUE && strpos($attributes, 'accept-charset=') === FALSE)
{
$attributes .= ' accept-charset="'.strtolower(config_item('charset')).'"';
}