]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15387 fixing regression spotted by John Beedell; merged from MOODLE_19_STABLE
authorskodak <skodak>
Tue, 1 Jul 2008 22:26:38 +0000 (22:26 +0000)
committerskodak <skodak>
Tue, 1 Jul 2008 22:26:38 +0000 (22:26 +0000)
mod/resource/type/html/resource.class.php

index 03a6bf28aec96eeb89f4f0fd80ca062f94b1fb58..a89c5820409476da49a4496a3a2501dffee9a968 100644 (file)
@@ -50,6 +50,11 @@ function display() {
     $formatoptions = new object();
     $formatoptions->noclean = true;
 
+    /// Set up some shorthand variables
+    $cm = $this->cm;
+    $course = $this->course;
+    $resource = $this->resource;
+
     // fix for MDL-9021, thanks Etienne Roz
     // fix for MDL-15387, thanks to John Beedell
     add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);
@@ -68,11 +73,6 @@ function display() {
         /// Set up generic stuff first, including checking for access
         parent::display();
 
-        /// Set up some shorthand variables
-        $cm = $this->cm;
-        $course = $this->course;
-        $resource = $this->resource;
-
         $pagetitle = strip_tags($course->shortname.': '.format_string($resource->name));
         $inpopup = optional_param('inpopup', '', PARAM_BOOL);