From: Matteo Nastasi (mop) Date: Wed, 31 Oct 2012 17:00:03 +0000 (+0100) Subject: centralized space eating string management X-Git-Tag: v4.0.0~14 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=324d94cde1e6af57f937f4660484d15b740bc348;p=brisk.git centralized space eating string management --- diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 65e2aba..902bfc3 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -2165,7 +2165,7 @@ class Room { do { if (!isset($cookie['sess']) || (($user = $this->get_user($cookie['sess'], $idx)) == FALSE)) { - $content = User::stream_fini(TRUE); + $content = User::stream_fini($s_a_p->rndstr, TRUE); $s_a_p->pgflush_try_add($new_socket, 20, $header_out, $content); return TRUE; @@ -2181,7 +2181,7 @@ class Room { } $content = ""; - $user->stream_init($header_out, $content, $get, $post, $cookie); + $user->stream_init($s_a_p->rndstr, $header_out, $content, $get, $post, $cookie); $response = headers_render($header_out, -1).chunked_content($content); $response_l = mb_strlen($response, "ASCII"); diff --git a/web/Obj/user.phh b/web/Obj/user.phh index 4bd6d95..2b28adb 100644 --- a/web/Obj/user.phh +++ b/web/Obj/user.phh @@ -58,72 +58,6 @@ define('USER_FLAG_TY_DISABLE', 0x800000); // done define('RD_ENDTIME_DELTA', 240); define('RD_KEEPALIVE_TOUT', 4); -$G_four_rnd_string = - "GGZDGDRBXDWFXHGPYAAVDXEKFDUWSTEDTDVXBXQPMZAIFPNLRPTWMJAZRHXTIRNZ" -."HTZXAUVJDCLXENDCLIZXSSEQQGUADYEKNNANJWEGRUFHPLUNSEROZQJSLMUYNUVG" -."FPLQAGCMTTGIRRXZFBFQFTRBYPHTWFSXFKHKYBRDAOSOURCMEVGPVXJVUQAOCFPV" -."OQSUBOYWOZLDGRPQQIBNOTHFUHTCRRZOBCUONAXIYUYCJBFTVNWIITVHBYLNMPWR" -."LPMMIROZVRUNYXSJSMJINSXGACXDMJAEPNFFAERHVDJELXSPPJWKMNFGVGA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UBULHGESOARVICLMSUSHHTVYLFMLHFGKJNPYIYEMLBAZMLIDDSWRCVFOUSGC" -."TUQHWTUHRJUZHYQOKTWTLRVOSWRPSYBOBSZHZLRZEIZKKCMLNYICCUTIXNXETTKL" -."PYIFTUDCMWRQBZDROXTTVTAOOIQHIWOZESRHKPNGNCSHNAVEWUSGOTZCRNFSIXGF" -."QJUMUFPEZBFPOVGZZDCGDKEODSWAPNDNHVJUQDYLCXWNXSCDFFFPBTDOIZIZLBBP" -."ZXZYWTTPEUUCKXGBTXAJBAXYLMUVWWGWZYTXTKYVRXSOXOBHERLZJPRDXIQZRQLU" -."TXCLIJNKIRWMVQEJTLHZIDTNGBOYSULGWUTSYTKGNMGZFWKXCCZXGOQGZNQFZJUK" -."JMBQPQPZOPYTQMPEFTZUDLIIBZAZSZAPNILMIKMPKXJIRHRQMFSTJKAPIIQWOFYQ" -."HGANJGJSUGDIENDVEQFEMUJBGMZBPHLOARCVGMUUCHLCDDNKSJSCKYSALUAGUZFN" -."YVURVLREBESGXPANIDKGLPJZGXLKFKTPEQBQEINOYYZTBMPFBLBKIKVPAPFDKKRZ" -."YMVUBYCYTRXCIICUPTXKGQOIJSVSWPYVALIROWGVXDXGNSRVZOLEJHNRSUKHNTRJ" -."LQZQKBEFXYKIPXJRZMQMJKUGCNUKBZBWABPLHMAJJZVBCWOQYCLSGDUKJSTHTVXV" -."OUGJVADGJWGVNBNXYRZDSNLOZDIQRKOQAKJJDKXRMMTXRVTLOMTETNROPDYNXAGR"; - $S_load_stat = array( 'rU_heavy' => 0, 'lL_laccgarb' => 0, 'wU_lacc_upd' => 0, @@ -805,10 +739,8 @@ class User { return ($ret); } // function maincheck (... -public static function stream_fini($is_unrecoverable) + public static function stream_fini($init_string, $is_unrecoverable) { - GLOBAL $G_four_rnd_string; - // IF IFRAME THEN: $body = ""; $body .= sprintf(" @@ -822,7 +754,7 @@ window.onload = function () { if (http_streaming != \"ready\") { http_streaming. "); - $body .= sprintf("\n", $G_four_rnd_string); + $body .= sprintf("\n", $init_string); $body .= sprintf(" "); - $body .= sprintf("\n", $G_four_rnd_string); + $body .= sprintf("\n", $init_string); return TRUE; } @@ -891,8 +821,6 @@ window.onload = function () { if (http_streaming != \"ready\") { http_streaming. function stream_main(&$body, $get, $post, $cookie) { 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) diff --git a/web/briskin5/Obj/briskin5.phh b/web/briskin5/Obj/briskin5.phh index fc3a670..b2aae3f 100644 --- a/web/briskin5/Obj/briskin5.phh +++ b/web/briskin5/Obj/briskin5.phh @@ -720,10 +720,8 @@ class Bin5_user extends User { return ($ret); } -public static function stream_fini($is_unrecoverable) + public static function stream_fini($init_string, $is_unrecoverable) { - GLOBAL $G_four_rnd_string; - printf("xXx user::stream_fini\n"); // IF IFRAME THEN: @@ -739,7 +737,7 @@ window.onload = function () { if (http_streaming != \"ready\") { http_streaming. "); - $body .= sprintf("\n", $G_four_rnd_string); + $body .= sprintf("\n", $init_string); $body .= sprintf("