From 5537bb044ba55250589bcf9a05ea44ed3586d5e3 Mon Sep 17 00:00:00 2001 From: dongsheng Date: Wed, 18 Jun 2008 03:18:22 +0000 Subject: [PATCH] "MDL-12304, fix double text merged from MOODLE_19_STABLE" --- mod/chat/gui_header_js/jsupdate.php | 22 ++++++++++++++-------- mod/chat/gui_header_js/users.php | 18 +++++++++--------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/mod/chat/gui_header_js/jsupdate.php b/mod/chat/gui_header_js/jsupdate.php index 5c39d2e184..5d7ac74e85 100644 --- a/mod/chat/gui_header_js/jsupdate.php +++ b/mod/chat/gui_header_js/jsupdate.php @@ -62,8 +62,8 @@ $chat_newrow = ($chat_lastrow + $num) % 2; // no & in url, does not work in header! - $refreshurl = "{$CFG->wwwroot}/mod/chat/gui_header_js/jsupdate.php?chat_sid=$chat_sid&chat_lasttime=$chat_newlasttime&chat_lastrow=$chat_newrow"; - $refreshurlamp = "{$CFG->wwwroot}/mod/chat/gui_header_js/jsupdate.php?chat_sid=$chat_sid&chat_lasttime=$chat_newlasttime&chat_lastrow=$chat_newrow"; + $refreshurl = "{$CFG->wwwroot}/mod/chat/gui_header_js/jsupdate.php?chat_sid=$chat_sid&chat_lasttime=$chat_newlasttime&chat_lastrow=$chat_newrow"; + $refreshurlamp = "{$CFG->wwwroot}/mod/chat/gui_header_js/jsupdate.php?chat_sid=$chat_sid&chat_lasttime=$chat_newlasttime&chat_lastrow=$chat_newrow"; header('Expires: Sun, 28 Dec 1997 09:32:45 GMT'); header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); @@ -90,7 +90,7 @@ @@ -155,7 +161,7 @@ // support HTTP Keep-Alive header("Content-Length: " . ob_get_length() ); -ob_end_flush(); +ob_end_flush(); exit; diff --git a/mod/chat/gui_header_js/users.php b/mod/chat/gui_header_js/users.php index df65d5d2dd..60453d5396 100644 --- a/mod/chat/gui_header_js/users.php +++ b/mod/chat/gui_header_js/users.php @@ -114,7 +114,7 @@ $strbeep = get_string('beep', 'chat'); - echo '
Refresh link
'; + echo '
Refresh link
'; echo ''; foreach ($chatusers as $chatuser) { $lastping = $timenow - $chatuser->lastmessageping; @@ -141,19 +141,19 @@ // // Support HTTP Keep-Alive by printing Content-Length // - // If the user pane is refreshing often, using keepalives - // is lighter on the server and faster for most clients. + // If the user pane is refreshing often, using keepalives + // is lighter on the server and faster for most clients. // - // Apache is normally configured to have a 15s timeout on + // Apache is normally configured to have a 15s timeout on // keepalives, so let's observe that. Unfortunately, we cannot - // autodetect the keepalive timeout. + // autodetect the keepalive timeout. // // Using keepalives when the refresh is longer than the timeout - // wastes server resources keeping an apache child around on a - // connection that will timeout. So we don't. - if ($CFG->chat_refresh_userlist < 15) { + // wastes server resources keeping an apache child around on a + // connection that will timeout. So we don't. + if ($CFG->chat_refresh_userlist < 15) { header("Content-Length: " . ob_get_length() ); - ob_end_flush(); + ob_end_flush(); } exit; // no further output -- 2.39.5