]> git.mjollnir.org Git - moodle.git/commitdiff
Removed Martin's mistaken addition from a few days ago
authormoodler <moodler>
Thu, 5 Aug 2004 18:13:59 +0000 (18:13 +0000)
committermoodler <moodler>
Thu, 5 Aug 2004 18:13:59 +0000 (18:13 +0000)
mod/resource/restorelib.php

index c4c377e3fb557e5c5c98fae1332a39e3899add0d..1f8ce293abea10c397b052f0f92c006e0adbdd0d 100644 (file)
                 $oldtype = $resource->type;
                 $resource->type = $types[$oldtype];
                 $resource->options = $options[$oldtype];
-
-                //Finally, check some specific mimetypes to decide when to set the frame option
-                //making the restore smoother...:-)
-                require_once("$CFG->dirroot/files/mimetypes.php");
-                $embedded = false;
-                if ($resource->type == 'file' and !$resource->options and !$resource->popup) {
-                    $mimetype = mimeinfo("type", $resource->reference);
-                    if (in_array($mimetype, array('image/gif','image/jpeg','image/png'))
-                        or (substr($mimetype, 0, 10) == "video/x-ms")
-                        or ($mimetype == "audio/mp3")
-                        or ($mimetype == "video/quicktime")) {
-                        $embedded = true;
-                    }
-                    if (!$embedded) { 
-                        $resource->options = 'frame';
-                    }
-                }
             }
  
             //The structure is equal to the db, so insert the resource