aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_cookie.inc.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-11-18 10:02:17 +0000
committermistic100 <mistic@piwigo.org>2013-11-18 10:02:17 +0000
commit3e1d6ba47a9201486851fb41f4ec4a0df2db2d5b (patch)
tree7f17be73be3cce3029eb3d326c37b44ce62447c6 /include/functions_cookie.inc.php
parent54343578e9f824dcdebb7874308fff4dc71c3619 (diff)
feature 2999: documentation of functions\comment|cookie|filter|html
git-svn-id: http://piwigo.org/svn/trunk@25548 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_cookie.inc.php')
-rw-r--r--include/functions_cookie.inc.php36
1 files changed, 26 insertions, 10 deletions
diff --git a/include/functions_cookie.inc.php b/include/functions_cookie.inc.php
index 668dca670..df18997b5 100644
--- a/include/functions_cookie.inc.php
+++ b/include/functions_cookie.inc.php
@@ -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