X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fbrisk.phh;h=29ec0e82d0860337ff505e0346376b4a4adbed16;hb=bddfecf27b05ebf105929f29ef23c26d3b258c3c;hp=a90358917503bb91ea515dffb3368aaf89988d55;hpb=5a0aa4a98df035d451b1e7b427ef16cc3580b932;p=brisk.git diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index a903589..29ec0e8 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -1418,11 +1418,13 @@ class Brisk if ($user->is_auth()) { $model = '{ "listen": { "__type": "radio" } }'; - $content = '{ "listen": {"val": "' . ($user->flags & USER_FLAG_ISOLAUTH ? "2" : - ($user->flags & USER_FLAG_LISTAUTH ? "1" : "0")) . - '" } }'; + $content = array('listen' => array('val' => ($user->flags & USER_FLAG_ISOLAUTH ? "2" : + ($user->flags & USER_FLAG_LISTAUTH ? "1" : "0")), + 'cur' => ($user->flags_cur & USER_FLAG_ISOLAUTH ? "2" : + ($user->flags_cur & USER_FLAG_LISTAUTH ? "1" : "0")))); + $ret .= sprintf('g_prefsf.fields_descr_set(JSON.parse(\'%s\'));', $model); - $ret .= sprintf('g_prefsf.json2dom(JSON.parse(\'%s\'));', $content); + $ret .= sprintf('g_prefsf.json2dom(JSON.parse(\'%s\'));', json_encode($content)); } if ($user->subst == 'standup') @@ -2095,7 +2097,7 @@ class Brisk /* MLANG: "Non puoi cambiare nick a un tavolo per soli autenticati.", "Il nickname \'%s\' è già registrato, se il suo proprietario si autentificherà verrai rinominato d\'ufficio come ghostN." */ if ($user->is_auth()) { - if (strcasecmp($user->name,$name_new) != 0) { + if (strcasecmp($user->name, $name_new) != 0) { if (( ($user->flags & USER_FLAG_MAP_AUTH) != USER_FLAG_ISOLAUTH) && ($user->subst == 'standup' || ($user->subst != 'standup' && $this->table[$user->table]->auth_type == TABLE_AUTH_TY_PUBL) @@ -2553,31 +2555,9 @@ class Brisk $this->user[$idx]->flags |= ($authenticate != FALSE ? USER_FLAG_AUTH : 0x00); $this->user[$idx]->flags |= ( ($pass != FALSE && $bdb == FALSE) ? USER_FLAG_DBFAILED : 0x00); log_auth("XXX", sprintf("FLAGS: [%x]", $this->user[$idx]->flags)); - + $this->user[$idx]->flags_cur = $this->user[$idx]->flags; if ($authenticate != FALSE) { $this->user[$idx]->code = $authenticate->code_get(); - if (0 == 1) { - // all this part is included in the db server - $this->user[$idx]->flags |= USER_FLAG_LISTAUTH; - - if (isset($cookie['CO_list'])) { - fprintf(STDERR, "QQ: %s CO_list: [%s]\n", __FUNCTION__, $cookie['CO_list']); - if (strcmp($cookie['CO_list'], "auth") == 0) { - $this->user[$idx]->flags &= ~USER_FLAG_MAP_AUTH; - $this->user[$idx]->flags |= USER_FLAG_LISTAUTH; - } - if (strcmp($cookie['CO_list'], "isolation") == 0) { - $this->user[$idx]->flags &= ~USER_FLAG_MAP_AUTH; - $this->user[$idx]->flags |= USER_FLAG_ISOLAUTH; - } - else { - $this->user[$idx]->flags &= ~USER_FLAG_MAP_AUTH; - } - } - } - else { - fprintf(STDERR, "QQ: CO_list not set flags: %x\n", __FUNCTION__, $this->user[$idx]->flags); - } } fprintf(STDERR, "QQ %s: flag %x\n", __FUNCTION__, $this->user[$idx]->flags); if ($ghost > -1) {