Update to CodeIgniter 2.1.0
This commit is contained in:
8
system/helpers/form_helper.php
Executable file → Normal file
8
system/helpers/form_helper.php
Executable file → Normal file
@@ -64,8 +64,8 @@ if ( ! function_exists('form_open'))
|
||||
|
||||
$form .= '>';
|
||||
|
||||
// CSRF
|
||||
if ($CI->config->item('csrf_protection') === TRUE)
|
||||
// Add CSRF field if enabled, but leave it out for GET requests and requests to external websites
|
||||
if ($CI->config->item('csrf_protection') === TRUE AND ! (strpos($action, $CI->config->site_url()) === FALSE OR strpos($form, 'method="get"')))
|
||||
{
|
||||
$hidden[$CI->security->get_csrf_token_name()] = $CI->security->get_csrf_hash();
|
||||
}
|
||||
@@ -94,7 +94,7 @@ if ( ! function_exists('form_open'))
|
||||
*/
|
||||
if ( ! function_exists('form_open_multipart'))
|
||||
{
|
||||
function form_open_multipart($action, $attributes = array(), $hidden = array())
|
||||
function form_open_multipart($action = '', $attributes = array(), $hidden = array())
|
||||
{
|
||||
if (is_string($attributes))
|
||||
{
|
||||
@@ -249,7 +249,7 @@ if ( ! function_exists('form_textarea'))
|
||||
{
|
||||
function form_textarea($data = '', $value = '', $extra = '')
|
||||
{
|
||||
$defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'cols' => '90', 'rows' => '12');
|
||||
$defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'cols' => '40', 'rows' => '10');
|
||||
|
||||
if ( ! is_array($data) OR ! isset($data['value']))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user