summaryrefslogtreecommitdiffstats
path: root/system/helpers/cookie_helper.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-01-06 13:41:50 +0100
committerAndrey Andreev <narf@bofh.bg>2012-01-06 13:41:50 +0100
commitf1b43d43385c81788dab9103a4f9be7e02432852 (patch)
treec53fb3270f3e7c71b80d0e370f2f00f04ef7a141 /system/helpers/cookie_helper.php
parent20b4fa2fc12d0630aa8c5d9ce09623e58d98f9ca (diff)
Improve array, captcha & cookie helpers
Diffstat (limited to 'system/helpers/cookie_helper.php')
-rw-r--r--system/helpers/cookie_helper.php17
1 files changed, 5 insertions, 12 deletions
diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php
index 7b439c47f..d6f836670 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.1.6 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:
@@ -79,13 +79,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);
}
@@ -110,6 +104,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 */