aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/session.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-12-23 22:59:55 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2011-12-25 01:51:32 -0500
commit10453b67525a0e26a3c859df4dab46907189af72 (patch)
treeb251dec947eaf3c644957386df961fd64404bc39 /phpBB/includes/session.php
parent99c102344ebe3b4a6c18e36c8bea8f3bdd997f2e (diff)
downloadforums-10453b67525a0e26a3c859df4dab46907189af72.tar
forums-10453b67525a0e26a3c859df4dab46907189af72.tar.gz
forums-10453b67525a0e26a3c859df4dab46907189af72.tar.bz2
forums-10453b67525a0e26a3c859df4dab46907189af72.tar.xz
forums-10453b67525a0e26a3c859df4dab46907189af72.zip
[ticket/10428] Documentation for optionget/optionset functions.
PHPBB3-10428
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r--phpBB/includes/session.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 457071e01e..a894242a39 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -2336,7 +2336,11 @@ class user extends session
}
/**
- * Get option bit field from user options
+ * Get option bit field from user options.
+ *
+ * @param int $key option key, as defined in $keyoptions property.
+ * @param int $data bit field value to use, or false to use $this->data['user_options']
+ * @return bool true if the option is set in the bit field, false otherwise
*/
function optionget($key, $data = false)
{
@@ -2345,7 +2349,16 @@ class user extends session
}
/**
- * Set option bit field for user options
+ * Set option bit field for user options.
+ *
+ * @param int $key Option key, as defined in $keyoptions property.
+ * @param bool $value True to set the option, false to clear the option.
+ * @param int $data Current bit field value, or false to use $this->data['user_options']
+ * @return int|bool If $data is false, the bit field is modified and
+ * written back to $this->data['user_options'], and
+ * return value is true if the bit field changed and
+ * false otherwise. If $data is not false, the new
+ * bitfield value is returned.
*/
function optionset($key, $value, $data = false)
{