From: Matteo Nastasi Date: Wed, 1 Aug 2012 11:07:26 +0000 (+0200) Subject: splash cookie management updated X-Git-Tag: v4.0.0~68 X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=brisk.git;a=commitdiff_plain;h=891d36866274e1fe44c12751d2fda0f18b4426d5 splash cookie management updated --- diff --git a/web/index_rd_ifra.php b/web/index_rd_ifra.php index 4329397..6e59fb4 100644 --- a/web/index_rd_ifra.php +++ b/web/index_rd_ifra.php @@ -146,14 +146,14 @@ function page_sync($sess, $page, $table_idx, $table_token) -function maincheck(&$room, &$user, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_subst, &$new_step) +function maincheck(&$room, &$user, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_subst, &$new_step, $splashdate) { GLOBAL $G_lang, $mlang_indrd, $is_page_streaming; // GLOBAL $first_loop; GLOBAL $G_with_splash, $G_splash_content, $G_splash_interval, $G_splash_idx; GLOBAL $G_splash_w, $G_splash_h, $G_splash_timeout; $CO_splashdate = "CO_splashdate".$G_splash_idx; - GLOBAL $$CO_splashdate; + $$CO_splashdate = $splashdate; GLOBAL $S_load_stat; @@ -572,12 +572,16 @@ window.onload = function () { if (http_streaming != \"ready\") { http_streaming. return TRUE; } -function index_rd_ifra_main(&$room, &$user, &$body) +function index_rd_ifra_main(&$room, &$user, &$body, $get, $post, $cookie) { - GLOBAL $is_page_streaming; + GLOBAL $is_page_streaming, $G_splash_idx; // FIXME: only to test fwrite // GLOBAL $G_four_rnd_string; + $CO_splashdate = "CO_splashdate".$G_splash_idx; + if (($splashdate = gpcs_var("$CO_splashdate", $get, $post, $cookie)) === FALSE) + $splashdate = ""; + $is_page_streaming = FALSE; log_rd2("FROM OUTSIDE - STAT: ".$user->rd_stat." SUBST: ".$user->rd_subst." STEP: ".$user->rd_step." FROM: ".$user->rd_from. "IS_PAGE:" . $is_page_streaming); @@ -591,7 +595,7 @@ function index_rd_ifra_main(&$room, &$user, &$body) $old_stat = $user->rd_stat; $old_subst = $user->rd_subst; $old_step = $user->rd_step; - if (($ret = maincheck($room, $user, $old_stat, $old_subst, $old_step, $user->rd_stat, $user->rd_subst, $user->rd_step)) != FALSE) { + if (($ret = maincheck($room, $user, $old_stat, $old_subst, $old_step, $user->rd_stat, $user->rd_subst, $user->rd_step, $splashdate)) != FALSE) { // $no_data = FALSE; if (0 == 1) { echo '@BEGIN@'; diff --git a/web/index_wr.php b/web/index_wr.php index 08fdda1..d3caf66 100644 --- a/web/index_wr.php +++ b/web/index_wr.php @@ -442,8 +442,11 @@ function index_wr_main(&$room, $remote_addr, $get, $post, $cookie) else if ($argz[0] == 'splash') { GLOBAL $G_with_splash, $G_splash_content, $G_splash_interval, $G_splash_idx; GLOBAL $G_splash_w, $G_splash_h, $G_splash_timeout; - $CO_splashdate = "CO_splashdate".$G_splash_idx; - GLOBAL $$CO_splashdate; + /* $CO_splashdate = "CO_splashdate".$G_splash_idx; */ + /* if (($$CO_splashdate = gpcs_var("$CO_splashdate", $get, $post, $cookie)) === FALSE) */ + /* $$CO_splashdate = ""; */ + + /* GLOBAL $$CO_splashdate; */ $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; diff --git a/web/spush/brisk-spush.php b/web/spush/brisk-spush.php index 2717b52..4e22c36 100755 --- a/web/spush/brisk-spush.php +++ b/web/spush/brisk-spush.php @@ -370,7 +370,7 @@ function main() $response = $user->rd_cache_get(); if ($response == "") { $content = ""; - index_rd_ifra_main($room, $user, $content); + index_rd_ifra_main($room, $user, $content, $get, $post, $cookie); if ($content == "" && $user->rd_kalive_is_expired($curtime)) { $content = index_rd_ifra_keepalive($user);