mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 07:25:30 +02:00
Merged branch 'MDL-25775_head' of git://github.com/grabs/moodle.git
This commit is contained in:
commit
287d1c0c2c
@ -487,10 +487,15 @@ function resourcelib_embed_general($fullurl, $title, $clicktoopen, $mimetype) {
|
||||
}
|
||||
|
||||
$iframe = false;
|
||||
|
||||
$param = '<param name="src" value="'.$fullurl.'" />';
|
||||
|
||||
// IE can not embed stuff properly if stored on different server
|
||||
// that is why we use iframe instead, unfortunately this tag does not validate
|
||||
// in xhtml strict mode
|
||||
if ($mimetype === 'text/html' and check_browser_version('MSIE', 5)) {
|
||||
// The param tag needs to be removed to avoid trouble in IE.
|
||||
$param = '';
|
||||
if (preg_match('(^https?://[^/]*)', $fullurl, $matches)) {
|
||||
if (strpos($CFG->wwwroot, $matches[0]) !== 0) {
|
||||
$iframe = true;
|
||||
@ -510,7 +515,7 @@ EOT;
|
||||
$code = <<<EOT
|
||||
<div class="resourcecontent resourcegeneral">
|
||||
<object id="resourceobject" data="$fullurl" type="$mimetype" width="800" height="600">
|
||||
<param name="src" value="$fullurl" />
|
||||
$param
|
||||
$clicktoopen
|
||||
</object>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user