X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fuser.phh;h=e0dd01d8263f43b6bcc0fcd479dab5fb4eb3b244;hb=e05b72f2d772b765dd9bd54098cd2c4efbb7b06b;hp=51956c8ece15d3c5fd6c96a3853e78bff676e561;hpb=7b4375bcaf7de9530942d79b3bb78991054d7e84;p=brisk.git diff --git a/web/Obj/user.phh b/web/Obj/user.phh index 51956c8..e0dd01d 100644 --- a/web/Obj/user.phh +++ b/web/Obj/user.phh @@ -121,6 +121,7 @@ class User { var $table_pos; // idx on the table var $table_token;// token that identify a game on a table var $flags; // Bitfield with: AUTHENTICATE: 0x02 + var $flags_vlt; // Volatile flags valid for this session only var $rec; // field with user db record or FALSE var $the_end; // Flag to change the end of the session @@ -174,6 +175,7 @@ class User { $thiz->exitislock = TRUE; $thiz->flags = 0x00; + $thiz->flags_vlt = 0x00; $thiz->rec = FALSE; $thiz->chattime = array_fill(0, CHAT_N, 0); @@ -220,6 +222,7 @@ class User { $this->exitislock = $from->exitislock; $this->flags = $from->flags; + $this->flags_vlt = $from->flags_vlt; $this->rec = $from->rec; $this->chattime = array(); @@ -285,6 +288,7 @@ class User { $thiz->the_end = $from->the_end; $thiz->flags = $from->flags; + $thiz->flags_vlt = $from->flags_vlt; $thiz->rec = $from->rec; $thiz->chattime = array_fill(0, CHAT_N, 0); @@ -305,8 +309,18 @@ class User { function flags_set($flags, $mask) { - $flags_old = $this->flags & (~$mask); - $this->flags = ($flags_old | ($flags & $mask)); + $flags_old = $this->flags; + $this->flags = (($flags_old & (~$mask)) | ($flags & $mask)); + + return ($flags_old != $this->flags); + } + + function flags_vlt_set($flags_vlt, $mask) + { + $flags_vlt_old = $this->flags_vlt; + $this->flags_vlt = (($flags_vlt_old & (~$mask)) | ($flags_vlt & $mask)); + + return ($flags_vlt_old != $this->flags_vlt); } function store_set() @@ -588,7 +602,8 @@ class User { $is_super = $this->flags & USER_FLAG_TY_SUPER; $ret .= show_notify_ex(str_replace("\n", " ", $G_splash_content[$G_lang]), ($is_super ? 0 : $G_splash_timeout), - $mlang_indrd[($is_super ? 'btn_btotabsup' : 'btn_backtotab')][$G_lang], + // $mlang_indrd[($is_super ? 'btn_btotabsup' : 'btn_backtotab')][$G_lang], + $mlang_indrd['btn_backtotab'][$G_lang], $G_splash_w, $G_splash_h, true, ($is_super ? 0 : $G_splash_timeout)); $ret .= sprintf('|createCookie("CO_splashdate%d", %d, 24*365, cookiepath);', $G_splash_idx, $curtime);