X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2FObj%2Fuser.phh;h=f99384831d2e172adc9fab5130e458ebff430658;hb=78c68fdf4027088a08b915982ae19a500d9a4e26;hp=b13f56e4fa2b7e5510c01606526cf9b650675c3e;hpb=8ef84c5d0813096c4cc6cd05e3f213118ba8a33b;p=brisk.git
diff --git a/web/Obj/user.phh b/web/Obj/user.phh
index b13f56e..f993848 100644
--- a/web/Obj/user.phh
+++ b/web/Obj/user.phh
@@ -637,7 +637,7 @@ class User {
/* INDEX_RD_IFRA PORT */
- static function blocking_error($is_unrecoverable)
+ protected function blocking_error($is_unrecoverable)
{
GLOBAL $is_page_streaming;
@@ -647,22 +647,23 @@ class User {
}
// FIXME TO SUPPORT iframe
- static function page_sync($sess, $page, $table_idx, $table_token)
+ protected function page_sync($sess, $page, $table_idx, $table_token)
{
GLOBAL $is_page_streaming;
- log_rd2("page_sync:".var_export(debug_backtrace()));
+ // log_rd2("page_sync:".var_export(debug_backtrace()));
$is_page_streaming = TRUE;
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));
}
- function maincheck($cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_subst, &$new_step, $splashdate)
+ protected function maincheck($cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_subst, &$new_step, $splashdate, $table_idx, $table_token)
{
GLOBAL $G_lang, $mlang_indrd, $is_page_streaming;
// GLOBAL $first_loop;
@@ -678,23 +679,6 @@ class User {
$ret = FALSE;
$curtime = time();
- /* if ((($curtime - $this->lacc) > STREAM_TIMEOUT) || Room::garbage_time_is_expired($curtime)) { */
- /* $S_load_stat['lL_laccgarb']++; */
-
- /* if (($curtime - $this->lacc) >= STREAM_TIMEOUT) { */
- /* $S_load_stat['wU_lacc_upd']++; */
- /* $this->lacc = $curtime; */
- /* } */
-
- /* if (Room::garbage_time_is_expired($curtime)) { */
- /* log_only("F"); */
-
- /* $S_load_stat['wR_garbage']++; */
- /* log_main("pre garbage_manager TRE"); */
- /* $this->room->garbage_manager(FALSE); */
- /* } */
- /* } */
-
/* Nothing changed, return. */
if ($cur_step == $this->step)
return (FALSE);
@@ -709,7 +693,7 @@ class User {
$S_load_stat['wR_minusone']++;
if ($this->the_end == TRUE) {
- log_rd2("main_check: the end".var_export(debug_backtrace()));
+ // log_rd2("main_check: the end".var_export(debug_backtrace()));
$is_page_streaming = TRUE;
}
@@ -758,7 +742,9 @@ class User {
***************/
else if ($this->stat == 'table') {
log_load("RESYNC");
- return (self::page_sync($this->sess, "briskin5/index.php", $this->table, $this->table_token));
+ printf("xXx USER::MAINCHECK1 [%s]\n", get_class($this));
+
+ return ($this->page_sync($this->sess, "briskin5/index.php", $this->table, $this->table_token));
}
log_rd2("NEWSTAT: ".$this->stat);
} /* if ($cur_step == -1) { */
@@ -773,7 +759,8 @@ class User {
$to_stat = $this->stat;
/* Room::unlock_data($sem); */
log_load("RESYNC");
- return (self::page_sync($this->sess, ($to_stat == "table" ? "briskin5/index.php" : "index.php"), $this->table, $this->table_token));
+ printf("xXx USER::MAINCHECK2 [%s]\n", get_class($this));
+ return ($this->page_sync($this->sess, ($to_stat == "table" ? "briskin5/index.php" : "index.php"), $this->table, $this->table_token));
}
log_rd2("lost history, refresh from scratch");
$new_step = -1;
@@ -818,7 +805,7 @@ class User {
return ($ret);
} // function maincheck (...
-static function stream_fini($is_unrecoverable)
+public static function stream_fini($is_unrecoverable)
{
GLOBAL $G_four_rnd_string;
@@ -910,6 +897,10 @@ function stream_main(&$body, $get, $post, $cookie)
$CO_splashdate = "CO_splashdate".$G_splash_idx;
if (($splashdate = gpcs_var("$CO_splashdate", $get, $post, $cookie)) === FALSE)
$splashdate = "";
+ if (($table_idx = gpcs_var("table_idx", $get, $post, $cookie)) === FALSE)
+ $table_idx = "";
+ if (($table_token = gpcs_var("table_token", $get, $post, $cookie)) === FALSE)
+ $table_token = "";
$is_page_streaming = FALSE;
log_rd2("FROM OUTSIDE - STAT: ".$this->rd_stat." SUBST: ".$this->rd_subst." STEP: ".$this->rd_step." FROM: ".$this->rd_from. "IS_PAGE:" . $is_page_streaming);
@@ -920,7 +911,8 @@ function stream_main(&$body, $get, $post, $cookie)
$old_stat = $this->rd_stat;
$old_subst = $this->rd_subst;
$old_step = $this->rd_step;
- if (($ret = $this->maincheck($old_stat, $old_subst, $old_step, $this->rd_stat, $this->rd_subst, $this->rd_step, $splashdate)) != FALSE) {
+ printf("xXx PRE : rd_step %d\n", $this->rd_step);
+ if (($ret = $this->maincheck($old_stat, $old_subst, $old_step, $this->rd_stat, $this->rd_subst, $this->rd_step, $splashdate, $table_idx, $table_token)) != FALSE) {
$body .= sprintf("", $this->rd_scristp++));
-
+", $this->rd_scristp++, ($with_ping ? "\"act_ping();\"" : "null")));
+
+ return ($ret);
}
-function stream_ping()
+static function base_get()
{
- return (sprintf("", $this->rd_scristp++));
-
+ $c = get_called_class();
+ printf("CALLED_CLASS: [%s]\n", $c);
+ return $c::BASE;
}
- static function base_get()
- {
- $c = get_called_class();
- printf("CALLED_CLASS: [%s]\n", $c);
- return $c::BASE;
- }
-
} // end class User