From 0b1e5521bd8d1c7b6f349038fe4daa819da11d0e Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Tue, 13 Nov 2012 07:13:46 +0100 Subject: [PATCH] from html_streaming to xynt_streaming object name --- INSTALL.sh | 2 +- web/Obj/brisk.phh | 2 +- web/Obj/user.phh | 16 ++++++++-------- web/briskin5/Obj/briskin5.phh | 12 ++++++------ web/briskin5/index.php | 10 +++++----- web/briskin5/index_rd.php | 10 +++++----- web/index.php | 12 ++++++------ web/index_rd.php | 10 +++++----- web/index_wr.php | 2 +- ...-streaming-ifra.js => xynt-streaming-ifra.js} | 0 ...{xynt-http-streaming.js => xynt-streaming.js} | 14 +++++++------- 11 files changed, 45 insertions(+), 45 deletions(-) rename web/{xynt-http-streaming-ifra.js => xynt-streaming-ifra.js} (100%) rename web/{xynt-http-streaming.js => xynt-streaming.js} (95%) diff --git a/INSTALL.sh b/INSTALL.sh index 3195e3a..bffa041 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -334,7 +334,7 @@ sed -i "s@define *( *'BRISK_AUTH_CONF',[^)]*)@define('BRISK_AUTH_CONF', \"$brisk sed -i "s@var \+cookiepath \+= \+\"[^\"]*\";@var cookiepath = \"$prefix_path\";@g" ${web_path}__/commons.js -sed -i "s@\( \+cookiepath *: *\)\"[^\"]*\" *,@\1 \"$prefix_path\",@g" ${web_path}__/xynt-http-streaming.js +sed -i "s@\( \+cookiepath *: *\)\"[^\"]*\" *,@\1 \"$prefix_path\",@g" ${web_path}__/xynt-streaming.js document_root="$(grep DocumentRoot "${apache_conf}" | grep -v '^#' | awk '{ print $2 }')" sed -i "s@^\(\$DOCUMENT_ROOT *= *[\"']\)[^\"']*\([\"']\)@\1$document_root\2@g" ${web_path}__/spush/*.ph* diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 586f0d9..a94412e 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -984,7 +984,7 @@ class Room { $ret = "gst.st = ".($user_cur->step+1)."; ".($remove_wagon ? sprintf("tra.rem(%d);",$table_idx) : ""); if ($from_table && ($user_cur->table == $table_idx || $user->idx_get() == $i)) { - $ret .= 'gst.st_loc++; hstm.stop(); window.onunload = null; window.onbeforeunload = null; document.location.assign("index.php");|'; + $ret .= 'gst.st_loc++; xstm.stop(); window.onunload = null; window.onbeforeunload = null; document.location.assign("index.php");|'; // $ret .= 'gst.st_loc++; document.location.assign("index.php");|'; log_main("DOCUMENT.index.php: from table"); } diff --git a/web/Obj/user.phh b/web/Obj/user.phh index cc4d211..d094055 100644 --- a/web/Obj/user.phh +++ b/web/Obj/user.phh @@ -591,7 +591,7 @@ class User { $is_page_streaming = TRUE; log_crit("BLOCKING_ERROR UNREC: ".($is_unrecoverable ? "TRUE" : "FALSE")); - return (sprintf(($is_unrecoverable ? 'hstm.stop(); ' : '').'window.onbeforeunload = null; window.onunload = null; document.location.assign("index.php");')); + return (sprintf(($is_unrecoverable ? 'xstm.stop(); ' : '').'window.onbeforeunload = null; window.onunload = null; document.location.assign("index.php");')); } // FIXME TO SUPPORT iframe @@ -605,7 +605,7 @@ class User { log_rd2("PAGE_SYNC"); printf("xXx USER::PAGE_SYNC [%s]\n", get_class($this)); - return (sprintf('createCookie("table_idx", %d, 24*365, cookiepath); createCookie("table_token", "%s", 24*365, cookiepath); hstm.stop(); window.onunload = null; window.onbeforeunload = null; document.location.assign("%s");', $table_idx, $table_token, $page)); + return (sprintf('createCookie("table_idx", %d, 24*365, cookiepath); createCookie("table_token", "%s", 24*365, cookiepath); xstm.stop(); window.onunload = null; window.onbeforeunload = null; document.location.assign("%s");', $table_idx, $table_token, $page)); } @@ -760,11 +760,11 @@ class User { $body .= sprintf(" - + "); @@ -819,13 +819,13 @@ function stream_init($init_string, $enc, &$header_out, &$body, $get, $post, $coo $body .= sprintf(" - + "); diff --git a/web/briskin5/Obj/briskin5.phh b/web/briskin5/Obj/briskin5.phh index 22b75d1..c16d14c 100644 --- a/web/briskin5/Obj/briskin5.phh +++ b/web/briskin5/Obj/briskin5.phh @@ -729,11 +729,11 @@ class Bin5_user extends User { $body .= sprintf(" - + "); @@ -754,7 +754,7 @@ push(\"%s\"); $is_page_streaming = TRUE; log_crit("BLOCKING_ERROR UNREC: ".($is_unrecoverable ? "TRUE" : "FALSE")); - return (sprintf(($is_unrecoverable ? 'hstm.stop(); ' : '').'window.onbeforeunload = null; window.onunload = null; document.location.assign("../index.php");')); + return (sprintf(($is_unrecoverable ? 'xstm.stop(); ' : '').'window.onbeforeunload = null; window.onunload = null; document.location.assign("../index.php");')); } protected function page_sync($sess, $page) @@ -764,7 +764,7 @@ push(\"%s\"); $is_page_streaming = TRUE; log_rd2("PAGE_SYNC"); printf("xXx BIN5_USER::PAGE_SYNC\n"); - return (sprintf('hstm.stop(); window.onbeforeunload = null; window.onunload = null; document.location.assign("%s");', $page)); + return (sprintf('xstm.stop(); window.onbeforeunload = null; window.onunload = null; document.location.assign("%s");', $page)); } protected function maincheck($cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_subst, &$new_step, $splashdate, $table_idx, $table_token) @@ -1355,7 +1355,7 @@ class Bin5 { $user_cur->laccwr = $curtime; $ret = "gst.st = ".($user_cur->step+1)."; "; - $ret .= 'gst.st_loc++; hstm.stop(); window.onbeforeunload = null; window.onunload = null; document.location.assign("../index.php");|'; + $ret .= 'gst.st_loc++; xstm.stop(); window.onbeforeunload = null; window.onunload = null; document.location.assign("../index.php");|'; log_wr($user_cur->sess." BIN5_WAKEUP: ".$ret); $user_cur->comm[$user_cur->step % COMM_N] = $ret; diff --git a/web/briskin5/index.php b/web/briskin5/index.php index 1e0ba3b..7142f46 100644 --- a/web/briskin5/index.php +++ b/web/briskin5/index.php @@ -64,7 +64,7 @@ function bin5_index_main(&$header_out, $addr, $get, $post, $cookie) - + @@ -76,7 +76,7 @@ function bin5_index_main(&$header_out, $addr, $get, $post, $cookie) - + @@ -886,7 +886,7 @@ supported by:
var gst = new globst(); var topbanner_sfx, topbanner_dx; var g_brow = null; - var hstm = null; + var xstm = null; var sess = "not_connected"; var spo_slide, sup_slide; @@ -1001,7 +1001,7 @@ echo "$body"; ?> - + @@ -1057,8 +1057,8 @@ else { ?> sess = ""; -hstm = new http_streaming(window, null /* console*/ , gst, 'index_php', 'sess', sess, $('sandbox'), 'index_rd_ifra.php', function(com){eval(com);}); - hstm.hbit_set(heartbit); +xstm = new xynt_streaming(window, null /* console*/ , gst, 'index_php', 'sess', sess, $('sandbox'), 'index_rd_ifra.php', function(com){eval(com);}); + xstm.hbit_set(heartbit); tra = new train($('room_tit')); window.onunload = onunload_cb; window.onbeforeunload = onbeforeunload_cb; @@ -1070,7 +1070,7 @@ hstm = new http_streaming(window, null /* console*/ , gst, 'index_php', 'sess', $("proflashext").innerHTML = ""; // console.log("session from main: "+sess); - hstm.start(); + xstm.start(); // alert("ARR LENGTH "+g_preload_img_arr.length); // FIXME: preload image will be fired by stream instead here // setTimeout(preload_images, 0, g_preload_img_arr, g_imgct); diff --git a/web/index_rd.php b/web/index_rd.php index d2b5898..31c9058 100644 --- a/web/index_rd.php +++ b/web/index_rd.php @@ -70,7 +70,7 @@ function blocking_error($is_unrecoverable) $is_page_streaming = TRUE; log_crit("BLOCKING_ERROR UNREC: ".($is_unrecoverable ? "TRUE" : "FALSE")); - return (sprintf(($is_unrecoverable ? 'hstm.stop(); ' : '').'window.onbeforeunload = null; window.onunload = null; document.location.assign("index.php");')); + return (sprintf(($is_unrecoverable ? 'xstm.stop(); ' : '').'window.onbeforeunload = null; window.onunload = null; document.location.assign("index.php");')); } function page_sync($sess, $page, $table_idx, $table_token) @@ -82,7 +82,7 @@ function page_sync($sess, $page, $table_idx, $table_token) $is_page_streaming = TRUE; log_rd2("PAGE_SYNC"); - return (sprintf('createCookie("table_idx", %d, 24*365, cookiepath); createCookie("table_token", "%s", 24*365, cookiepath); hstm.stop(); window.onunload = null; window.onbeforeunload = null; document.location.assign("%s");', $table_idx, $table_token, $page)); + return (sprintf('createCookie("table_idx", %d, 24*365, cookiepath); createCookie("table_token", "%s", 24*365, cookiepath); xstm.stop(); window.onunload = null; window.onbeforeunload = null; document.location.assign("%s");', $table_idx, $table_token, $page)); } @@ -123,7 +123,7 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su if (($sem = Room::lock_data(FALSE)) == FALSE) { // wait 20 secs, then restart the xhr ignore_user_abort(FALSE); - return ("sleep(gst,20000);|hstm.xhr_abort();"); + return ("sleep(gst,20000);|xstm.xhr_abort();"); } // Verifica l'expire time lato server @@ -140,7 +140,7 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su if (($sem = Room::lock_data(TRUE)) == FALSE) { // wait 20 secs, then restart the xhr ignore_user_abort(FALSE); - return ("sleep(gst,20000);|hstm.xhr_abort();"); + return ("sleep(gst,20000);|xstm.xhr_abort();"); } $S_load_stat['lL_laccgarb']++; @@ -216,7 +216,7 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su // // wait 20 secs, then restart the xhr // ignore_user_abort(FALSE); -// return ("sleep(gst,20000);|hstm.xhr_abort();"); +// return ("sleep(gst,20000);|xstm.xhr_abort();"); // } // $first_loop = FALSE; // } // if ($first_loop == TRUE) { diff --git a/web/index_wr.php b/web/index_wr.php index 7746051..310e4f2 100644 --- a/web/index_wr.php +++ b/web/index_wr.php @@ -642,7 +642,7 @@ function index_wr_main(&$room, $remote_addr, $get, $post, $cookie) while (array_pop($user_cur->comm) != NULL); $ret = ""; - $ret .= sprintf('gst.st_loc++; gst.st=%d; createCookie("table_idx", %d, 24*365, cookiepath); createCookie("table_token", "%s", 24*365, cookiepath); createCookie("lang", "%s", 24*365, cookiepath); hstm.stop(); window.onunload = null ; window.onbeforeunload = null ; document.location.assign("briskin5/index.php");|', $user_cur->step+1, $table_idx, $table_token, $G_lang); + $ret .= sprintf('gst.st_loc++; gst.st=%d; createCookie("table_idx", %d, 24*365, cookiepath); createCookie("table_token", "%s", 24*365, cookiepath); createCookie("lang", "%s", 24*365, cookiepath); xstm.stop(); window.onunload = null ; window.onbeforeunload = null ; document.location.assign("briskin5/index.php");|', $user_cur->step+1, $table_idx, $table_token, $G_lang); $user_cur->comm[$user_cur->step % COMM_N] = $ret; $user_cur->trans_step = $user_cur->step + 1; diff --git a/web/xynt-http-streaming-ifra.js b/web/xynt-streaming-ifra.js similarity index 100% rename from web/xynt-http-streaming-ifra.js rename to web/xynt-streaming-ifra.js diff --git a/web/xynt-http-streaming.js b/web/xynt-streaming.js similarity index 95% rename from web/xynt-http-streaming.js rename to web/xynt-streaming.js index fe325be..f716d8c 100644 --- a/web/xynt-http-streaming.js +++ b/web/xynt-streaming.js @@ -1,6 +1,6 @@ // old targetpage == page and moved into start method -function http_streaming(win, console, gst, from, cookiename, sess, sandbox, page, cmdproc) +function xynt_streaming(win, console, gst, from, cookiename, sess, sandbox, page, cmdproc) { this.win = win; this.console = console; @@ -18,7 +18,7 @@ function http_streaming(win, console, gst, from, cookiename, sess, sandbox, page this.keepalive_new = -1; } -http_streaming.prototype = { +xynt_streaming.prototype = { win: null, console: null, gst: null, @@ -57,7 +57,7 @@ http_streaming.prototype = { createCookie(this.cookiename, sess, 24*365, this.cookiepath); // alert("start"); - this.log("http_streaming:start restart: "+this.restart_n); + this.log("xynt_streaming:start restart: "+this.restart_n); this.keepalives_equal = 0; this.ifra = this.doc.createElement("iframe"); this.ifra.style.visibility = "hidden"; @@ -105,7 +105,7 @@ http_streaming.prototype = { if (!this.watchable) { do { try{ - if (typeof(this.ifra.contentWindow.http_streaming) == 'undefined') + if (typeof(this.ifra.contentWindow.xynt_streaming) == 'undefined') break; } catch(b) { @@ -116,8 +116,8 @@ http_streaming.prototype = { on IE7 the the window frame scope is cleaned after the href is set, so we wait for a well know variable value before assign this object value to it (OO is a passion) */ - if (this.ifra.contentWindow.http_streaming == "ready") { - this.ifra.contentWindow.http_streaming = this; + if (this.ifra.contentWindow.xynt_streaming == "ready") { + this.ifra.contentWindow.xynt_streaming = this; this.watchable = true; this.watchdog_ct = 0; this.log("hs::watchdog: watchable = yes"); @@ -234,7 +234,7 @@ http_streaming.prototype = { }, // - // moved to xynt-http-streaming-ifra as push() + // moved to xynt-streaming-ifra as push() // // keepalive: function (s) { // this.log("hs::keepalive"); -- 2.17.1