]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed some notices, thanks Eloy!
authormoodler <moodler>
Sun, 1 Aug 2004 06:37:12 +0000 (06:37 +0000)
committermoodler <moodler>
Sun, 1 Aug 2004 06:37:12 +0000 (06:37 +0000)
mod/resource/type/file/resource.class.php

index acef107a6a318929b2d95739678fe1ac98684019..5b52e83daafe3477a57840358215a39728081056 100644 (file)
@@ -209,6 +209,7 @@ function display() {
     $resourcetype = '';
     $embedded = false;
     $mimetype = mimeinfo("type", $this->resource->reference);
+    $pagetitle = strip_tags($this->course->shortname.': '.$this->resource->name);
 
     if ($this->resource->options != "frame") {
         if (in_array($mimetype, array('image/gif','image/jpeg','image/png'))) {  // It's an image
@@ -280,8 +281,6 @@ function display() {
 
     if ($this->resource->popup and !$inpopup) {    /// Make a page and a pop-up window
 
-        $pagetitle = strip_tags($this->course->shortname.': '.$this->resource->name);
-
         print_header($pagetitle, $this->course->fullname, "$navigation {$this->resource->name}", "", "", true, update_module_button($this->cm->id, $this->course->id, $strresource), navmenu($this->course, $this->cm));