From d53839aa6dcf6940be9952b984edee6b5db8a28a Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Fri, 10 Jun 2005 13:25:23 +0000 Subject: [PATCH] Whoops - typo! --- mod/resource/type/file/resource.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mod/resource/type/file/resource.class.php b/mod/resource/type/file/resource.class.php index 218d2c535ed..aaf4700c154 100644 --- a/mod/resource/type/file/resource.class.php +++ b/mod/resource/type/file/resource.class.php @@ -253,7 +253,8 @@ function display() { /// Set up some variables - $inpopup = !empty($_GET["inpopup"]); + $inpopup_param = optional_param( 'inpopup','' ); + $inpopup = !empty( $inpopup_param ); if (resource_is_url($resource->reference)) { $fullurl = $resource->reference; @@ -345,7 +346,8 @@ function display() { /// Now check whether we need to display a frameset - if (empty($_GET['frameset']) and !$embedded and !$inpopup and $resource->options == "frame") { + $frameset = optional_param( 'frameset','' ); + if (empty($frameset) and !$embedded and !$inpopup and ($resource->options == "frame")) { echo "\n"; echo "\n"; echo ''; @@ -371,7 +373,7 @@ function display() { /// If we are in a frameset, just print the top of it - if (!empty($_GET['frameset']) and $_GET['frameset'] == "top") { + if (!empty( $frameset ) and ($frameset == "top") ) { print_header($pagetitle, $course->fullname, "$this->navigation ".format_string($resource->name), "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "parent")); $options->para = false;