messaging - fixed page encoding in headers; merged from MOODLE_15_STABLE

This commit is contained in:
skodak 2005-11-05 10:50:35 +00:00
parent 7415831fce
commit bac472e019
4 changed files with 59 additions and 5 deletions

View File

@ -21,11 +21,20 @@
error("User ID was incorrect");
}
/// Select encoding
if (!empty($CFG->unicode)) {
$encoding = 'utf-8';
} else {
$encoding = get_string('thischarset');
}
/// Print frameset to contain all the various panes
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html>
<head><title><?php echo get_string('discussion', 'message').': '.fullname($user) ?></title></head>
<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $encoding ?>" />
<title><?php echo get_string('discussion', 'message').': '.fullname($user) ?></title>
</head>
<frameset rows="110,*,0,200" border="0" marginwidth="2" marginheight="1">
<frame src="user.php?id=<?php p($user->id)?>&amp;frame=user" name="user"
scrolling="no" marginwidth="0" marginheight="">

View File

@ -1,2 +1,24 @@
<html>
<body class="message course-1" id="message-messages">
<?php // $Id$
require('../config.php');
/// Select encoding
if (!empty($CFG->unicode)) {
$encoding = 'utf-8';
} else {
$encoding = get_string('thischarset');
}
/// Select direction
if ( get_string('thisdirection') == 'rtl' ) {
$direction = ' dir="rtl"';
} else {
$direction = ' dir="ltr"';
}
/// Output the header
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html <?php echo $direction ?>>
<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $encoding ?>" />';
</head>
<body class="message course-1" id="message-messages">

View File

@ -14,6 +14,13 @@
error("Messaging is disabled on this site");
}
/// Select encoding
if (!empty($CFG->unicode)) {
$encoding = 'utf-8';
} else {
$encoding = get_string('thischarset');
}
/// Script parameters
$userid = required_param('id', PARAM_INT);
$userfullname = strip_tags(required_param('name', PARAM_RAW));
@ -31,6 +38,7 @@
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n";
echo '<html><head><title> </title>';
echo '<meta http-equiv="content-type" content="text/html; charset='.$encoding.'" />';
echo '<script type="text/javascript">'."\n";
echo '<!--'."\n";
echo 'if (parent.messages.document.getElementById("messagestarted") == null) {'."\n";

View File

@ -19,7 +19,22 @@
$stylesheetshtml .= '<link rel="stylesheet" type="text/css" href="'.$stylesheet.'" />';
}
echo '<head>';
/// Select encoding
if (!empty($CFG->unicode)) {
$encoding = 'utf-8';
} else {
$encoding = get_string('thischarset');
}
/// Select direction
if ( get_string('thisdirection') == 'rtl' ) {
$direction = ' dir="rtl"';
} else {
$direction = ' dir="ltr"';
}
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">\n";
echo "<html $direction>\n<head>\n";
echo '<meta http-equiv="content-type" content="text/html; charset='.$encoding.'" />';
echo $stylesheetshtml;
/// Script parameters