\n";
- echo '';
- echo $stylesheetshtml;
-
- include($CFG->javascript);
-
- require_once($CFG->libdir .'/editor/htmlEditor.class.php');
- $htmlEditorObject = new htmlEditor();
- echo $htmlEditorObject->configure();
-
- echo '';
+/// (Don't use print_header, for more speed)
+/// ehm - we have to use print_header() or else this breaks after any minor change in print_header()!
+ print_header();
/// Script parameters
$userid = required_param('id', PARAM_INT);
@@ -58,6 +33,7 @@ if (has_capability('moodle/site:sendmessage', get_context_instance(CONTEXT_SYSTE
if ($contact = $DB->get_record('message_contacts', array('userid'=>$user->id, 'contactid'=>$USER->id))) {
if ($contact->blocked and !has_capability('moodle/site:readallmessages', get_context_instance(CONTEXT_SYSTEM))) {
print_heading(get_string('userisblockingyou', 'message'));
+ print_footer('empty');
exit;
}
}
@@ -66,12 +42,11 @@ if (has_capability('moodle/site:sendmessage', get_context_instance(CONTEXT_SYSTE
if (!empty($userpreferences['message_blocknoncontacts'])) { // User is blocking non-contacts
if (empty($contact)) { // We are not a contact!
print_heading(get_string('userisblockingyounoncontact', 'message'));
+ print_footer('empty');
exit;
}
}
- echo '';
-
if ($message!='' and confirm_sesskey()) { /// Current user has just sent a message
/// Save it to the database...
@@ -129,6 +104,6 @@ if (has_capability('moodle/site:sendmessage', get_context_instance(CONTEXT_SYSTE
"\n//]]>".
"\n";
- echo '';
+ print_footer('empty');
}
?>