diff options
Diffstat (limited to 'system/helpers/form_helper.php')
-rwxr-xr-x | system/helpers/form_helper.php | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 8aa788c6c..2925d3c7c 100755 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -67,12 +67,12 @@ if ( ! function_exists('form_open')) // CSRF if ($CI->config->item('csrf_protection') === TRUE) { - $hidden[$CI->security->csrf_token_name] = $CI->security->csrf_hash; + $hidden[$CI->security->get_csrf_token_name()] = $CI->security->get_csrf_hash(); } if (is_array($hidden) AND count($hidden) > 0) { - $form .= sprintf("\n<div class=\"hidden\">%s</div>", form_hidden($hidden)); + $form .= sprintf("<div style=\"display:none\">%s</div>", form_hidden($hidden)); } return $form; @@ -1032,25 +1032,23 @@ if ( ! function_exists('_get_validation_object')) { $CI =& get_instance(); - // We set this as a variable since we're returning by reference + // We set this as a variable since we're returning by reference. $return = FALSE; - - if ( ! isset($CI->load->_ci_classes) OR ! isset($CI->load->_ci_classes['form_validation'])) - { - return $return; - } - - $object = $CI->load->_ci_classes['form_validation']; - - if ( ! isset($CI->$object) OR ! is_object($CI->$object)) + + if (FALSE !== ($object = $CI->load->is_loaded('form_validation'))) { - return $return; + if ( ! isset($CI->$object) OR ! is_object($CI->$object)) + { + return $return; + } + + return $CI->$object; } - - return $CI->$object; + + return $return; } } /* End of file form_helper.php */ -/* Location: ./system/helpers/form_helper.php */
\ No newline at end of file +/* Location: ./system/helpers/form_helper.php */ |