From 13fceaa4de99098bf54eaa5d3b7f8ed952ff911b Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Tue, 23 Feb 2010 08:08:28 +0000 Subject: [PATCH] mod-page MDL-21590 Fixed recent regression in page whereby a var was being used before being created --- mod/page/lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/page/lib.php b/mod/page/lib.php index 87928d2388f..23286bfefa4 100644 --- a/mod/page/lib.php +++ b/mod/page/lib.php @@ -248,13 +248,13 @@ function page_get_coursemodule_info($coursemodule) { global $CFG, $DB; require_once("$CFG->libdir/resourcelib.php"); - $info = new object(); - $info->name = $page->name; - if (!$page = $DB->get_record('page', array('id'=>$coursemodule->instance), 'id, name, display, displayoptions')) { return NULL; } + $info = new object(); + $info->name = $page->name; + if ($page->display != RESOURCELIB_DISPLAY_POPUP) { return $info; }