From 0d7e0e8adaf0eb9736ff1d398ab4280f7f528821 Mon Sep 17 00:00:00 2001 From: defacer Date: Fri, 28 Jan 2005 03:52:56 +0000 Subject: [PATCH] A small change for the static initialization in page_map_class, and more debug added just before init is done. --- lib/pagelib.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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; -- 2.39.5