summaryrefslogtreecommitdiffstats
path: root/system/helpers/cookie_helper.php
diff options
context:
space:
mode:
authorIban Eguia <admin@razican.com>2012-06-08 23:01:31 +0200
committerIban Eguia <admin@razican.com>2012-06-08 23:01:31 +0200
commit895e98c0f04f1087e8900ce8423ad3210a423770 (patch)
tree6adfe487293df38807084599f1f04157b5531e54 /system/helpers/cookie_helper.php
parent0ed4f63f4268b0c98f549ffd711702fd45a761d0 (diff)
parenta593c69de4ea125c096f611c78dd0839489e7ebd (diff)
Merge remote-tracking branch 'upstream/develop' into new_date
Diffstat (limited to 'system/helpers/cookie_helper.php')
-rw-r--r--system/helpers/cookie_helper.php64
1 files changed, 32 insertions, 32 deletions
diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php
index 06560e723..f396c76b0 100644
--- a/system/helpers/cookie_helper.php
+++ b/system/helpers/cookie_helper.php
@@ -37,24 +37,24 @@
// ------------------------------------------------------------------------
-/**
- * Set cookie
- *
- * Accepts seven parameters, or you can submit an associative
- * array in the first parameter containing all the values.
- *
- * @param mixed
- * @param string the value of the cookie
- * @param string the number of seconds until expiration
- * @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'))
{
+ /**
+ * Set cookie
+ *
+ * Accepts seven parameters, or you can submit an associative
+ * array in the first parameter containing all the values.
+ *
+ * @param mixed
+ * @param string the value of the cookie
+ * @param string the number of seconds until expiration
+ * @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
+ */
function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE, $httponly = FALSE)
{
// Set the config file options
@@ -65,15 +65,15 @@ if ( ! function_exists('set_cookie'))
// --------------------------------------------------------------------
-/**
- * Fetch an item from the COOKIE array
- *
- * @param string
- * @param bool
- * @return mixed
- */
if ( ! function_exists('get_cookie'))
{
+ /**
+ * Fetch an item from the COOKIE array
+ *
+ * @param string
+ * @param bool
+ * @return mixed
+ */
function get_cookie($index = '', $xss_clean = FALSE)
{
$CI =& get_instance();
@@ -84,17 +84,17 @@ if ( ! function_exists('get_cookie'))
// --------------------------------------------------------------------
-/**
- * Delete a COOKIE
- *
- * @param mixed
- * @param string the cookie domain. Usually: .yourdomain.com
- * @param string the cookie path
- * @param string the cookie prefix
- * @return void
- */
if ( ! function_exists('delete_cookie'))
{
+ /**
+ * Delete a COOKIE
+ *
+ * @param mixed
+ * @param string the cookie domain. Usually: .yourdomain.com
+ * @param string the cookie path
+ * @param string the cookie prefix
+ * @return void
+ */
function delete_cookie($name = '', $domain = '', $path = '/', $prefix = '')
{
set_cookie($name, '', '', $domain, $path, $prefix);