]> git.mjollnir.org Git - moodle.git/commitdiff
fixed typos in chat_force_language(), added encoding to message page, minor cleanup
authorskodak <skodak>
Tue, 8 Feb 2005 21:23:19 +0000 (21:23 +0000)
committerskodak <skodak>
Tue, 8 Feb 2005 21:23:19 +0000 (21:23 +0000)
mod/chat/gui_header_js/chatinput.php
mod/chat/gui_header_js/chatmsg.php
mod/chat/gui_header_js/jsupdate.php
mod/chat/lib.php

index c4d9471263447f5a9591e0042e4b37cd4f2ce222..67f53eaf489ef9998591b99e9bdf0ae9d7afac1c 100644 (file)
@@ -17,7 +17,6 @@
     ?>
     <script type="text/javascript">
     <!--
-    scroll_active = true;
     function empty_field_and_submit() {
         document.sendForm.chat_message.value = document.inputForm.chat_message.value;
         document.inputForm.chat_message.value = '';
index 678b075cfe031a125815f0f0a2679d11b20f83d4..1e2e4fbff1616973f1a1c18bcaa7726dad4908f0 100644 (file)
@@ -1,2 +1,4 @@
-<html>
-<body>
+<html>\r
+<body>\r
+</body>\r
+</html>\r
index 7ac6981c0ff64fd28e08a4adb391f541e256699f..ac27742851736d134c7a4a1cd1b581412dfa575f 100644 (file)
         <meta http-equiv="content-type" content="text/html; charset=<?php echo get_string('thischarset'); ?>" />
         <script type="text/javascript">
         <!--
+        if (parent.msg.document.getElementById("msgStarted") == null) {
+            parent.msg.document.open("text/html","replace");
+            parent.msg.document.write("<html><head>");
+            parent.msg.document.write("<meta http-equiv=\"content-type\" content=\"text/html; charset=<?php echo get_string('thischarset'); ?>\" />");
+            parent.msg.document.write("</head><body><div style=\"display: none\" id=\"msgStarted\">&nbsp;</div>");
+        }
         <?php
         $beep = false;
         $refreshusers = false;
index 5100b70070a751ac60f8654a726f454f2585ba9c..916b6848071349527b7af1a7ea538b53b102edc7 100644 (file)
@@ -295,11 +295,13 @@ function chat_force_language($lang) {
 /// This function prepares moodle to operate in given language
 /// usable when $nomoodlecookie = true;
 /// BEWARE: there must be no $course, $USER or $SESSION
+    global $CFG;
+
     if(!empty($CFG->courselang)) {
-        uset($CFG->courselang);
+        unset($CFG->courselang);
     }
     if(!empty($CFG->locale)) {
-        uset($CFG->locale);
+        unset($CFG->locale);
     }
     $CFG->lang = clean_filename($lang);
     moodle_setlocale();