]> git.mjollnir.org Git - moodle.git/commitdiff
Fix new install with developer debug on.\r\rCan't print context name in the page footer...
authortjhunt <tjhunt>
Tue, 21 Jul 2009 13:58:47 +0000 (13:58 +0000)
committertjhunt <tjhunt>
Tue, 21 Jul 2009 13:58:47 +0000 (13:58 +0000)
lib/pagelib.php

index 1d63fee10e04c8deb32c4c63d759fd57dfabe959..ca65ed31a150ec2c9dbac8c9eda4b4d01d7f6ae9 100644 (file)
@@ -483,10 +483,15 @@ class moodle_page {
     }
 
     /**
-     * @return string a description of this page (context, page-type and sub-page.
+     * @return string a description of this page. Normally displayed in the footer in
+     * developer debug mode.
      */
     public function debug_summary() {
-        $summary = 'Context ' . print_context_name($this->context) . ' (context id ' . $this->context->id . '). ';
+        $summary = '';
+        $summary .= 'General type: ' . $this->generaltype . '. ';
+        if (!during_initial_install()) {
+            $summary .= 'Context ' . print_context_name($this->context) . ' (context id ' . $this->context->id . '). ';
+        }
         $summary .= 'Page type ' . $this->pagetype .  '. ';
         if ($this->subpage) {
             'Sub-page ' . $this->subpage .  '. ';