From: Matteo Nastasi (mop) Date: Thu, 25 Oct 2012 16:04:35 +0000 (+0200) Subject: CO_list management moved to cookie system X-Git-Tag: v4.0.0~27 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=3610477b5c8d4a8e1e9996014a81e257ba33c075;p=brisk.git CO_list management moved to cookie system --- diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index e7ff714..942a90c 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -1655,9 +1655,9 @@ class Room { * if ($idx == -$idx && ret == user) => SUCCESS (but the login exists in the auth db) */ - function add_user(&$sess, &$idx, $name, $pass, $ip) + function add_user(&$sess, &$idx, $name, $pass, $ip, $cookie) { - GLOBAL $G_base, $CO_list; + GLOBAL $G_base; $idx = 0; @@ -1797,12 +1797,12 @@ class Room { $this->user[$idx]->code = $authenticate->code_get(); $this->user[$idx]->flags |= USER_FLAG_LISTAUTH; - if (isset($CO_list)) { - if (strcmp($CO_list, "auth") == 0) { + if (isset($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($CO_list, "isolation") == 0) { + if (strcmp($cookie['CO_list'], "isolation") == 0) { $this->user[$idx]->flags &= ~USER_FLAG_MAP_AUTH; $this->user[$idx]->flags |= USER_FLAG_ISOLAUTH; } diff --git a/web/index.php b/web/index.php index b83532c..9d4a9c5 100644 --- a/web/index.php +++ b/web/index.php @@ -280,7 +280,7 @@ function index_main(&$room, &$header_out, $addr, $get, $post, $cookie) $room->garbage_manager(TRUE); /* try login */ - if (($user = $room->add_user(&$sess, &$idx, $name, $pass_private, $addr)) != FALSE) { + if (($user = $room->add_user(&$sess, &$idx, $name, $pass_private, $addr, $cookie)) != FALSE) { $ACTION = "room"; if ($idx < 0) { $idx = -$idx - 1;