mirror of
https://github.com/moodle/moodle.git
synced 2025-04-27 11:23:06 +02:00
Merge branch 'w47_MDL-36524_m24_ieagain' of git://github.com/skodak/moodle
This commit is contained in:
commit
f138b38705
@ -346,12 +346,6 @@ class core_renderer extends renderer_base {
|
||||
public function standard_head_html() {
|
||||
global $CFG, $SESSION;
|
||||
$output = '';
|
||||
if ($this->page->theme->doctype === 'html5' or $this->page->theme->doctype === 'xhtml5') {
|
||||
// Make sure we set 'X-UA-Compatible' only if script did not request something else (such as MDL-29213).
|
||||
if (empty($CFG->additionalhtmlhead) or stripos($CFG->additionalhtmlhead, 'X-UA-Compatible') === false) {
|
||||
$output .= '<meta http-equiv="X-UA-Compatible" content="IE=edge" />' . "\n";
|
||||
}
|
||||
}
|
||||
$output .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' . "\n";
|
||||
$output .= '<meta name="keywords" content="moodle, ' . $this->page->title . '" />' . "\n";
|
||||
if (!$this->page->cacheable) {
|
||||
|
@ -1840,7 +1840,26 @@ function get_html_lang($dir = false) {
|
||||
|
||||
/**
|
||||
* Send the HTTP headers that Moodle requires.
|
||||
* @param $cacheable Can this page be cached on back?
|
||||
*
|
||||
* There is a backwards compatibility hack for legacy code
|
||||
* that needs to add custom IE compatibility directive.
|
||||
*
|
||||
* Example:
|
||||
* <code>
|
||||
* if (!isset($CFG->additionalhtmlhead)) {
|
||||
* $CFG->additionalhtmlhead = '';
|
||||
* }
|
||||
* $CFG->additionalhtmlhead .= '<meta http-equiv="X-UA-Compatible" content="IE=8" />';
|
||||
* header('X-UA-Compatible: IE=8');
|
||||
* echo $OUTPUT->header();
|
||||
* </code>
|
||||
*
|
||||
* Please note the $CFG->additionalhtmlhead alone might not work,
|
||||
* you should send the IE compatibility header() too.
|
||||
*
|
||||
* @param string $contenttype
|
||||
* @param bool $cacheable Can this page be cached on back?
|
||||
* @return void, sends HTTP headers
|
||||
*/
|
||||
function send_headers($contenttype, $cacheable = true) {
|
||||
global $CFG;
|
||||
|
Loading…
x
Reference in New Issue
Block a user