diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-19 11:09:38 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-19 11:09:38 +0100 |
commit | cf10de5aa03bd7c0036a8347f22ace3089779092 (patch) | |
tree | 63c403df162d5d94ec11eb8f86949d4016fe4e4e /system/helpers | |
parent | 25357cd7886b95d1e77b6a539a4588a265688874 (diff) | |
parent | 4ad0fd86e8dc6dba74305dbb0c88c593b46a19a2 (diff) |
Merge pull request #1182 from freewil/cookies-httponly
Cookies httponly
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/cookie_helper.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php index 38a2f78fc..ec8aa3250 100644 --- a/system/helpers/cookie_helper.php +++ b/system/helpers/cookie_helper.php @@ -40,7 +40,7 @@ /** * Set cookie * - * Accepts six parameter, or you can submit an associative + * Accepts seven parameters, or you can submit an associative * array in the first parameter containing all the values. * * @param mixed @@ -49,15 +49,17 @@ * @param string the cookie domain. Usually: .yourdomain.com * @param string the cookie path * @param string the cookie prefix + * @param bool true makes the cookie secure + * @param bool true makes the cookie accessible via http(s) only (no javascript) * @return void */ if ( ! function_exists('set_cookie')) { - function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE) + function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE, $httponly = FALSE) { // Set the config file options $CI =& get_instance(); - $CI->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure); + $CI->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure, $httponly); } } |