aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_cookie.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions_cookie.inc.php')
-rw-r--r--include/functions_cookie.inc.php38
1 files changed, 27 insertions, 11 deletions
diff --git a/include/functions_cookie.inc.php b/include/functions_cookie.inc.php
index 668dca670..4e547e10e 100644
--- a/include/functions_cookie.inc.php
+++ b/include/functions_cookie.inc.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | Piwigo - a PHP based photo gallery |
// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org |
// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
// +-----------------------------------------------------------------------+
@@ -21,10 +21,19 @@
// | USA. |
// +-----------------------------------------------------------------------+
-// cookie_path returns the path to use for the Piwigo cookie.
-// If Piwigo is installed on :
-// http://domain.org/meeting/gallery/category.php
-// cookie_path will return : "/meeting/gallery"
+/**
+ * @package functions\cookie
+ */
+
+
+/**
+ * Returns the path to use for the Piwigo cookie.
+ * If Piwigo is installed on :
+ * http://domain.org/meeting/gallery/
+ * it will return : "/meeting/gallery"
+ *
+ * @return string
+ */
function cookie_path()
{
if ( isset($_SERVER['REDIRECT_SCRIPT_NAME']) and
@@ -83,9 +92,13 @@ function cookie_path()
}
/**
- * persistently stores a variable in pwg cookie
- * @return boolean true on success
- * @see pwg_get_cookie_var
+ * Persistently stores a variable in pwg cookie.
+ * Set $value to null to delete the cookie.
+ *
+ * @param string $car
+ * @param mixed $value
+ * @param int|null $expire
+ * @return bool
*/
function pwg_set_cookie_var($var, $value, $expire=null)
{
@@ -104,9 +117,12 @@ function pwg_set_cookie_var($var, $value, $expire=null)
}
/**
- * retrieves the value of a persistent variable in pwg cookie
- * @return mixed
+ * Retrieves the value of a persistent variable in pwg cookie
* @see pwg_set_cookie_var
+ *
+ * @param string $var
+ * @param mixed $default
+ * @return mixed
*/
function pwg_get_cookie_var($var, $default = null)
{
@@ -120,4 +136,4 @@ function pwg_get_cookie_var($var, $default = null)
}
}
-?>
+?> \ No newline at end of file