projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lastest modifies
[brisk.git]
/
web
/
Obj
/
user.phh
diff --git
a/web/Obj/user.phh
b/web/Obj/user.phh
index
ad402b8
..
1d693d5
100644
(file)
--- a/
web/Obj/user.phh
+++ b/
web/Obj/user.phh
@@
-209,8
+209,8
@@
class User {
$thiz->handpt = -1;
$thiz->exitislock = TRUE;
$thiz->handpt = -1;
$thiz->exitislock = TRUE;
+ $thiz->flags_db = 0x00;
$thiz->flags = 0x00;
$thiz->flags = 0x00;
- $thiz->flags_cur = 0x00;
$thiz->rec = FALSE;
$thiz->chattime = array_fill(0, CHAT_N, 0);
$thiz->rec = FALSE;
$thiz->chattime = array_fill(0, CHAT_N, 0);
@@
-259,8
+259,8
@@
class User {
$this->handpt = $from->handpt;
$this->exitislock = $from->exitislock;
$this->handpt = $from->handpt;
$this->exitislock = $from->exitislock;
+ $this->flags_db = $from->flags_db;
$this->flags = $from->flags;
$this->flags = $from->flags;
- $this->flags_cur = $from->flags_cur;
$this->rec = $from->rec;
$this->chattime = array();
$this->rec = $from->rec;
$this->chattime = array();
@@
-328,8
+328,8
@@
class User {
$thiz->exitislock = $from->exitislock;
$thiz->the_end = $from->the_end;
$thiz->exitislock = $from->exitislock;
$thiz->the_end = $from->the_end;
+ $thiz->flags_db = $from->flags_db;
$thiz->flags = $from->flags;
$thiz->flags = $from->flags;
- $thiz->flags_cur = $from->flags_cur;
$thiz->rec = $from->rec;
$thiz->chattime = array_fill(0, CHAT_N, 0);
$thiz->rec = $from->rec;
$thiz->chattime = array_fill(0, CHAT_N, 0);
@@
-375,20
+375,30
@@
class User {
return FALSE;
}
return FALSE;
}
- function flags_
set($flags,
$mask)
+ function flags_
db_get(
$mask)
{
{
-
$flags_old = $this->flags & (~
$mask);
- $this->flags = ($flags_old | ($flags & $mask));
+
return ($this->flags_db &
$mask);
+ }
- return ($flags_old);
+ function flags_db_set($flags_db, $mask)
+ {
+ $flags_db_old = $this->flags_db & (~$mask);
+ $this->flags_db = ($flags_db_old | ($flags_db & $mask));
+
+ return ($flags_db_old);
}
}
- function flags_
cur_set($flags_cur,
$mask)
+ function flags_
get(
$mask)
{
{
-
$flags_cur_old = $this->flags_cur & (~
$mask);
- $this->flags_cur = ($flags_cur_old | ($flags_cur & $mask));
+
return ($this->flags &
$mask);
+ }
- return ($flags_cur_old);
+ function flags_set($flags, $mask)
+ {
+ $flags_old = $this->flags & (~$mask);
+ $this->flags = ($flags_old | ($flags & $mask));
+
+ return ($flags_old);
}
function prefs_store()
}
function prefs_store()
@@
-396,7
+406,11
@@
class User {
if (($bdb = BriskDB::create()) == FALSE) {
return FALSE;
}
if (($bdb = BriskDB::create()) == FALSE) {
return FALSE;
}
- return ($bdb->user_prefs_update($this->code, ($this->flags & (USER_FLAG_TY_ALL | USER_FLAG_MAP_AUTH)),
+ if ($this->flags_db == $this->flags)
+ return TRUE;
+
+ $this->flags_db = $this->flags;
+ return ($bdb->user_prefs_update($this->code, ($this->flags_db & (USER_FLAG_TY_ALL | USER_FLAG_MAP_AUTH)),
$this->rec->supp_comp_get()));
}
$this->rec->supp_comp_get()));
}
@@
-410,10
+424,11
@@
class User {
function state_store()
{
function state_store()
{
- if (($bdb = BriskDB::create()) == FALSE) {
+
if (($bdb = BriskDB::create()) == FALSE) {
return FALSE;
}
return FALSE;
}
- return ($bdb->user_state_update($this->code, ($this->flags & (USER_FLAG_TY_ALL | USER_FLAG_MAP_AUTH)),
+ $this->flags_db = $this->flags;
+ return ($bdb->user_state_update($this->code, ($this->flags_db & (USER_FLAG_TY_ALL | USER_FLAG_MAP_AUTH)),
$this->rec->disa_reas_get()));
}
$this->rec->disa_reas_get()));
}