js last_clean management fixed
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.com>
Wed, 18 Jul 2012 22:24:11 +0000 (00:24 +0200)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.com>
Wed, 18 Jul 2012 22:24:11 +0000 (00:24 +0200)
web/index_rd_ifra.php

index 7546c2c..761d4cb 100644 (file)
@@ -560,9 +560,8 @@ function index_rd_ifra_init(&$room, &$user, &$header_out, &$body, $get, $post, $
 <script type=\"text/javascript\" src=\"xynt-http-streaming-ifra.js\"></script>
 <script type=\"text/javascript\">
 var http_streaming = \"ready\";");
-    if (isset($st)) {
-        $body .= sprintf("last_clean = %d;\n", $st);
-    }
+    if ($user->rd_scristp > 0)
+        $body .= sprintf("last_clean = %d;\n", ($user->rd_scristp-1));
     $body .= sprintf("
 window.onload = function () { if (http_streaming != \"ready\") { http_streaming.reload(); } };
 </script>