mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
mod-page MDL-21590 Fixed recent regression in page whereby a var was being used before being created
This commit is contained in:
parent
c2c16f70fd
commit
13fceaa4de
@ -248,13 +248,13 @@ function page_get_coursemodule_info($coursemodule) {
|
|||||||
global $CFG, $DB;
|
global $CFG, $DB;
|
||||||
require_once("$CFG->libdir/resourcelib.php");
|
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')) {
|
if (!$page = $DB->get_record('page', array('id'=>$coursemodule->instance), 'id, name, display, displayoptions')) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$info = new object();
|
||||||
|
$info->name = $page->name;
|
||||||
|
|
||||||
if ($page->display != RESOURCELIB_DISPLAY_POPUP) {
|
if ($page->display != RESOURCELIB_DISPLAY_POPUP) {
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user