MDL-9798 fallback to html mimetype when missing index.php, index.html; merged from MOODLE_18_STABLE
This commit is contained in:
@@ -38,6 +38,11 @@
|
||||
print_heading($strpolicyagreement);
|
||||
|
||||
$mimetype = mimeinfo('type', $CFG->sitepolicy);
|
||||
if ($mimetype == 'document/unknown') {
|
||||
//fallback for missing index.php, index.html
|
||||
$mimetype = 'text/html';
|
||||
}
|
||||
|
||||
echo '<div class="noticebox">';
|
||||
echo '<object id="policyframe" data="'.$CFG->sitepolicy.'" type="'.$mimetype.'">';
|
||||
echo link_to_popup_window ($CFG->sitepolicy, 'agreement', $strpolicyagreementclick,
|
||||
|
||||
Reference in New Issue
Block a user