mod-page MDL-21590 Fixed recent regression in page whereby a var was being used before being created
This commit is contained in:
+3
-3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user