Update to CodeIgniter 2.1.0

This commit is contained in:
Karsten Heiken
2011-12-04 14:24:27 +01:00
parent fde35df5bd
commit 79c236dc49
149 changed files with 4384 additions and 590 deletions

8
system/helpers/form_helper.php Executable file → Normal file
View 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']))
{