]> git.mjollnir.org Git - moodle.git/commitdiff
A small change for the static initialization in page_map_class,
authordefacer <defacer>
Fri, 28 Jan 2005 03:52:56 +0000 (03:52 +0000)
committerdefacer <defacer>
Fri, 28 Jan 2005 03:52:56 +0000 (03:52 +0000)
and more debug added just before init is done.

lib/pagelib.php

index 88e6bd5769c30591ecc87cdc11023bce4b9da489..37bc9e1bcf3cc3800aca0b85d1fc8d86d68fa3c9 100644 (file)
@@ -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;