summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2009-02-10 21:15:49 +0100
committerDerek Jones <derek.jones@ellislab.com>2009-02-10 21:15:49 +0100
commit2c8dc585dd4134e71a7356f99b6a0dac12bf9d1a (patch)
tree1ac6c9ea2b31ce425d42b8432683706352caf36a /system
parent08cae63859339faaac8809c6a1d1fceed5f2909f (diff)
added global cookie prefix to get_cookie() unless the cookie exists as-requested
Diffstat (limited to 'system')
-rw-r--r--system/helpers/cookie_helper.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php
index d906882ae..77f86e489 100644
--- a/system/helpers/cookie_helper.php
+++ b/system/helpers/cookie_helper.php
@@ -107,8 +107,14 @@ if ( ! function_exists('get_cookie'))
{
function get_cookie($index = '', $xss_clean = FALSE)
{
- $CI =& get_instance();
- return $CI->input->cookie($index, $xss_clean);
+ $prefix = '';
+
+ if ( ! isset($_COOKIE[$index]) && config_item('cookie_prefix') != '')
+ {
+ $prefix = config_item('cookie_prefix');
+ }
+
+ return $CI->input->cookie($prefix.$index, $xss_clean);
}
}