fixed typos in chat_force_language(), added encoding to message page, minor cleanup
This commit is contained in:
@@ -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 = '';
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
<html>
|
||||
<body>
|
||||
<html>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -49,6 +49,12 @@
|
||||
<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\"> </div>");
|
||||
}
|
||||
<?php
|
||||
$beep = false;
|
||||
$refreshusers = false;
|
||||
|
||||
+4
-2
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user