From: defacer Date: Fri, 28 Jan 2005 03:52:56 +0000 (+0000) Subject: A small change for the static initialization in page_map_class, X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0d7e0e8adaf0eb9736ff1d398ab4280f7f528821;p=moodle.git A small change for the static initialization in page_map_class, and more debug added just before init is done. --- diff --git a/lib/pagelib.php b/lib/pagelib.php index 88e6bd5769..37bc9e1bcf 100644 --- a/lib/pagelib.php +++ b/lib/pagelib.php @@ -49,9 +49,15 @@ function page_create_object($type, $id = NULL) { */ function page_map_class($type, $classname = NULL) { - static $mappings = array( - MOODLE_PAGE_COURSE => 'page_course' - ); + static $mappings = NULL; + + if($mappings === NULL) { + $mappings = array( + MOODLE_PAGE_COURSE => 'page_course' + ); + print_object('Debug info - initial mappings:'); + var_dump($mappings); + } if(!empty($type) && !empty($classname)) { $mappings[$type] = $classname;