From: defacer Date: Thu, 25 Nov 2004 17:23:57 +0000 (+0000) Subject: Somehow I forgot to commit these and the whole page setup wasn't working X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=99110470baf28654254d10582837f16c63c39a1f;p=moodle.git Somehow I forgot to commit these and the whole page setup wasn't working after renaming MoodlePage => page_base. --- diff --git a/blocks/pagedemo.php b/blocks/pagedemo.php index 0baaf58205..27d837eb71 100644 --- a/blocks/pagedemo.php +++ b/blocks/pagedemo.php @@ -31,7 +31,7 @@ define('BLOCK_POS_CENTERDOWN', 'cd'); // The actual Page derived class - class MoodlePage_Test extends MoodlePage { + class page_test extends page_base { // Mandatory; should return our identifier. function get_type() { diff --git a/index.php b/index.php index cd180ea8b9..5f566c9109 100644 --- a/index.php +++ b/index.php @@ -55,7 +55,7 @@ $langmenu = popup_form ($CFG->wwwroot .'/index.php?lang=', $langs, 'chooselang', $currlang, '', '', '', true); } - $PAGE = MoodlePage::create_object(MOODLE_PAGE_COURSE, SITEID); + $PAGE = page_base::create_object(MOODLE_PAGE_COURSE, SITEID); print_header(strip_tags($site->fullname), $site->fullname, 'home', '', '', diff --git a/lib/pagelib.php b/lib/pagelib.php index c3f000493a..dab25f916b 100644 --- a/lib/pagelib.php +++ b/lib/pagelib.php @@ -1,8 +1,8 @@ pagetype = $type; $data->pageid = $id; - $classname = MoodlePage::map_page_type($type); + $classname = page_base::map_page_type($type); $object = &new $classname; // TODO: subclassing check here @@ -190,7 +190,7 @@ class MoodlePage { // Use it to associate the textual identifier of your Page with the actual class name that has to be instantiated. function map_page_type($type, $classname = NULL) { static $mappings = array( - MOODLE_PAGE_COURSE => 'MoodlePage_Course' + MOODLE_PAGE_COURSE => 'page_course' ); if(!empty($type) && !empty($classname)) { @@ -217,7 +217,7 @@ class MoodlePage { * @package pages */ -class MoodlePage_Course extends MoodlePage { +class page_course extends page_base { // Any data we might need to store specifically about ourself should be declared here. // After init_full() is called for the first time, ALL of these variables should be