projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moved chunked_content into user class and set chunked as optional
[brisk.git]
/
web
/
Obj
/
transports.phh
diff --git
a/web/Obj/transports.phh
b/web/Obj/transports.phh
index
0f0e4a7
..
a77fad7
100644
(file)
--- a/
web/Obj/transports.phh
+++ b/
web/Obj/transports.phh
@@
-69,6
+69,10
@@
class Transport_template {
function chunk($step, $cont)
{
}
function chunk($step, $cont)
{
}
+
+ function is_chunked()
+ {
+ }
}
class Transport_xhr {
}
class Transport_xhr {
@@
-90,6
+94,7
@@
class Transport_xhr {
static function fini($init_string, $base, $blockerr)
{
static function fini($init_string, $base, $blockerr)
{
+ return (sprintf('@BEGIN@ %s window.onbeforeunload = null; window.onunload = null; document.location.assign("%sindex.php"); @END@', ($blockerr ? 'xstm.stop(); ' : ''), $base));
return ("");
}
return ("");
}
@@
-97,6
+102,11
@@
class Transport_xhr {
{
return ("@BEGIN@".$cont."@END@");
}
{
return ("@BEGIN@".$cont."@END@");
}
+
+ function is_chunked()
+ {
+ return TRUE;
+ }
}
class Transport_iframe {
}
class Transport_iframe {
@@
-123,7
+133,7
@@
var xynt_streaming = \"ready\";", $base, $base);
if ($step > 0)
$ret .= sprintf("last_clean = %d;\n", ($step-1));
$ret .= sprintf("
if ($step > 0)
$ret .= sprintf("last_clean = %d;\n", ($step-1));
$ret .= sprintf("
-window.onload = function () {
if (xynt_streaming != \"ready\") { xynt_streaming.transp.stopped = true;
} };
+window.onload = function () {
try { if (xynt_streaming != \"ready\") { xynt_streaming.transp.stopped = true; } } catch(e) { /* console.log(\"catcha\"); */
} };
</script>
</head>
<body>");
</script>
</head>
<body>");
@@
-142,7
+152,7
@@
window.onload = function () { if (xynt_streaming != \"ready\") { xynt_streaming.
<script type=\"text/javascript\">
var xynt_streaming = \"ready\";", $base, $base);
$ret .= sprintf("
<script type=\"text/javascript\">
var xynt_streaming = \"ready\";", $base, $base);
$ret .= sprintf("
-window.onload = function () {
if (xynt_streaming != \"ready\") { xynt_streaming.reload();
} };
+window.onload = function () {
try { if (xynt_streaming != \"ready\") { xynt_streaming.reload(); } } catch(e) { /* console.log(\"catcha\"); */
} };
</script>
</head>
<body>");
</script>
</head>
<body>");
@@
-165,6
+175,11
@@
push(null);\n// -->\n</script>", $step);
push(\"%s\");\n// -->\n</script>", $step, escpush($cont) );
}
}
push(\"%s\");\n// -->\n</script>", $step, escpush($cont) );
}
}
+
+ function is_chunked()
+ {
+ return TRUE;
+ }
}
class Transport_htmlfile extends Transport_iframe {
}
class Transport_htmlfile extends Transport_iframe {
@@
-187,5
+202,14
@@
class Transport {
return new Transport_iframe();
}
}
return new Transport_iframe();
}
}
+ static function gettype($transp)
+ {
+ if ($transp == 'xhr' || $transp == 'htmlfile') {
+ return "Transport_".$transp;
+ }
+ else {
+ return 'Transport_iframe';
+ }
+ }
}
?>
\ No newline at end of file
}
?>
\ No newline at end of file