diff options
-rw-r--r-- | system/helpers/cookie_helper.php | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php index b46f80540..38a2f78fc 100644 --- a/system/helpers/cookie_helper.php +++ b/system/helpers/cookie_helper.php @@ -1,13 +1,13 @@ -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); +<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * * An open source application development framework for PHP 5.2.4 or newer * * NOTICE OF LICENSE - * + * * Licensed under the Open Software License version 3.0 - * + * * This source file is subject to the Open Software License (OSL 3.0) that is * bundled with this package in the files license.txt / license.rst. It is * also available through the world wide web at this URL: @@ -25,8 +25,6 @@ * @filesource */ -// ------------------------------------------------------------------------ - /** * CodeIgniter Cookie Helpers * @@ -45,7 +43,6 @@ * Accepts six parameter, or you can submit an associative * array in the first parameter containing all the values. * - * @access public * @param mixed * @param string the value of the cookie * @param string the number of seconds until expiration @@ -69,7 +66,6 @@ if ( ! function_exists('set_cookie')) /** * Fetch an item from the COOKIE array * - * @access public * @param string * @param bool * @return mixed @@ -79,14 +75,7 @@ if ( ! function_exists('get_cookie')) function get_cookie($index = '', $xss_clean = FALSE) { $CI =& get_instance(); - - $prefix = ''; - - if ( ! isset($_COOKIE[$index]) && config_item('cookie_prefix') != '') - { - $prefix = config_item('cookie_prefix'); - } - + $prefix = isset($_COOKIE[$index]) ? '' : config_item('cookie_prefix'); return $CI->input->cookie($prefix.$index, $xss_clean); } } @@ -97,7 +86,7 @@ if ( ! function_exists('get_cookie')) * Delete a COOKIE * * @param mixed - * @param string the cookie domain. Usually: .yourdomain.com + * @param string the cookie domain. Usually: .yourdomain.com * @param string the cookie path * @param string the cookie prefix * @return void @@ -110,6 +99,5 @@ if ( ! function_exists('delete_cookie')) } } - /* End of file cookie_helper.php */ -/* Location: ./system/helpers/cookie_helper.php */
\ No newline at end of file +/* Location: ./system/helpers/cookie_helper.php */ |