diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-20 14:38:49 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-20 14:38:49 +0100 |
commit | 151ba1c919af3316543b1871d3bd56cbb210fdca (patch) | |
tree | 5f8a65b0a074d2bc380267e46bd88e62c1f5cf20 /system/helpers/cookie_helper.php | |
parent | 6b47711e85671fcfe1bd08ce80d23ca2e91e8e55 (diff) | |
parent | 820999cb0d82c80d6dc5dde133568812c8113e29 (diff) |
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop-helpers-acc
Diffstat (limited to 'system/helpers/cookie_helper.php')
-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); } } |