X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Findex_rd.php;h=da00f1d12da6e79f34cbc00680add9bea11e377f;hb=515592aef07a347102b36f2de400e23285df159e;hp=8b25ae0f222f312ac4d4cf691d1085a503b361e3;hpb=ba124be15839e2a62fa793b70869e0209f8daf90;p=brisk.git diff --git a/web/index_rd.php b/web/index_rd.php index 8b25ae0..da00f1d 100644 --- a/web/index_rd.php +++ b/web/index_rd.php @@ -2,7 +2,7 @@ /* * brisk - index_rd.php * - * Copyright (C) 2006-2008 Matteo Nastasi + * Copyright (C) 2006-2009 Matteo Nastasi * mailto: nastasi@alternativeoutput.it * matteo.nastasi@milug.org * web: http://www.alternativeoutput.it @@ -57,7 +57,7 @@ function unrecerror() $is_page_streaming = TRUE; log_rd2("UNREC_ERROR:".var_export(debug_backtrace())); - return (sprintf('the_end=true; window.onunload = null; document.location.assign("index.php");')); + return (sprintf('the_end=true; window.onunload = null; window.onbeforeunload = null; document.location.assign("index.php");')); } function page_sync($sess, $page, $table_idx, $table_token) @@ -69,7 +69,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); the_end=true; window.onunload = 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); the_end=true; window.onunload = null; window.onbeforeunload = null; document.location.assign("%s");', $table_idx, $table_token, $page)); } @@ -110,7 +110,14 @@ function maincheck($sess, $cur_stat, $cur_subst, $cur_step, &$new_stat, &$new_su ignore_user_abort(FALSE); } else { + // wait 20 secs, then restart the xhr + ignore_user_abort(FALSE); + + return ("sleep(gst,20000);|xhr_rd_abort(xhr_rd);"); + /* + ignore_user_abort(FALSE); return (FALSE); + */ } if (($proxy_step = step_get($sess)) != FALSE) {