]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-8642, see tracker, merged from MOODLE_19_STABLE"
authordongsheng <dongsheng>
Wed, 25 Jun 2008 02:18:55 +0000 (02:18 +0000)
committerdongsheng <dongsheng>
Wed, 25 Jun 2008 02:18:55 +0000 (02:18 +0000)
mod/chat/gui_header_js/chatinput.php
mod/chat/gui_header_js/jsupdate.php

index 18b35fcecc9e9cd7297640624f27fc676d3c07fc..61b72b2c8f50635e9c7fa721a067226b0c9047c4 100644 (file)
@@ -1,6 +1,6 @@
 <?php  // $Id$
 
-    $nomoodlecookie = true;     // Session not needed!
+    define('NO_MOODLE_COOKIES', true); // session not used here
 
     require('../../../config.php');
     require('../lib.php');
@@ -53,7 +53,7 @@
           onsubmit="return empty_field_and_submit()" style="margin:0">
         <input type="text" id="input_chat_message" name="chat_message" size="50" value="" />
         <?php helpbutton('chatting', get_string('helpchatting', 'chat'), 'chat', true, false); ?><br />
-        <input type="checkbox" id="auto" size="50" value="" checked /><?php echo get_string('autoscroll', 'chat');?>
+        <input type="checkbox" id="auto" size="50" value="" checked='true' /><?php echo get_string('autoscroll', 'chat');?>
     </form>
 
     <form action="insert.php" method="post" target="empty" id="sendForm">
index cd3cc71a53eee21b5eb79c104299bf882df9c8ad..87fed99ccef7f0decb1be1f9119655c338b52aeb 100644 (file)
@@ -1,6 +1,6 @@
 <?php  // $Id$
 
-    $nomoodlecookie = true;     // Session not needed!
+    define('NO_MOODLE_COOKIES', true); // session not used here
 
     require('../../../config.php');
     require('../lib.php');
             }
         }
         ?>
-        if(parent.msg && parent.input.document.getElementById('auto').checked){
-            parent.msg.scroll(1,5000000);
+        if(parent.input){
+            var autoscroll = parent.input.document.getElementById('auto');
+            if(parent.msg && autoscroll && autoscroll.checked){
+                parent.msg.scroll(1,5000000);
+            }
         }
         //]]>
         </script>