]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19696 make sure install works.
authortjhunt <tjhunt>
Fri, 3 Jul 2009 09:03:50 +0000 (09:03 +0000)
committertjhunt <tjhunt>
Fri, 3 Jul 2009 09:03:50 +0000 (09:03 +0000)
lang/en_utf8/moodle.php
lib/pagelib.php

index d1901b363477fd3f35231f1376e477716c7d2ef4..5129fce8655b761664203828bb91f0642d15b9b5 100644 (file)
@@ -1192,6 +1192,7 @@ $string['outline'] = 'Outline';
 $string['outlinereport'] = 'Outline report';
 $string['page'] = 'Page';
 $string['pageheaderconfigablock'] = 'Configuring a block in %%fullname%%';
+$string['pageshouldredirect'] = 'This page should automatically redirect. If nothing is happening please use the continue link below.';
 $string['parentcategory'] = 'Parent category';
 $string['parentcoursenotfound'] = 'Parent course not found!';
 $string['parentcoursenotmetacourse'] = 'Parent course not metacourse!';
index a57ae0f359681bed34ad5bb038aad4fd62b55573..7f0c049f15ad591aaa29a313639f6769878835a3 100644 (file)
@@ -855,20 +855,12 @@ class moodle_page {
     protected function starting_output() {
         global $SITE, $CFG;
 
-        if (during_initial_install()) {
-            $this->_course = new stdClass;
-            $this->_course->id = 1;
-            moodle_setlocale();
-            return;
-        }
+        $this->initialise_standard_body_classes();
 
-        if (!$this->_course) {
-            $this->set_course($SITE);
+        if (!during_initial_install()) {
+            $this->blocks->load_blocks();
         }
 
-        $this->initialise_standard_body_classes();
-        $this->blocks->load_blocks();
-
         // Add any stylesheets required using the horrible legacy mechanism.
         if (!empty($CFG->stylesheets)) {
             debugging('Some code on this page is using the horrible legacy mechanism $CFG->stylesheets to include links to ' .
@@ -896,7 +888,7 @@ class moodle_page {
     public function initialise_theme_and_output() {
         global $OUTPUT, $PAGE, $SITE, $THEME;
 
-        if (!$this->_course) {
+        if (!$this->_course && !during_initial_install()) {
             $this->set_course($SITE);
         }
 
@@ -1039,27 +1031,22 @@ class moodle_page {
         }
         $this->add_body_class($this->_legacyclass);
 
-        $this->add_body_class('course-' . $this->_course->id);
         $this->add_body_classes(get_browser_version_classes());
         $this->add_body_class('dir-' . get_string('thisdirection'));
         $this->add_body_class('lang-' . current_language());
         $this->add_body_class('yui-skin-sam'); // Make YUI happy, if it is used.
-
         $this->add_body_class($this->url_to_class_name($CFG->wwwroot));
 
-        $this->add_body_class('context-' . $this->context->id);
-
-        if (!empty($this->_cm)) {
-            $this->add_body_class('cmid-' . $this->_cm->id);
+        if (!during_initial_install()) {
+            $this->add_body_class('course-' . $this->_course->id);
+            $this->add_body_class('context-' . $this->context->id);
         }
 
-        $this->add_body_class('context-' . $this->context->id);
-
         if (!empty($this->_cm)) {
             $this->add_body_class('cmid-' . $this->_cm->id);
         }
 
-        if ($CFG->allowcategorythemes) {
+        if (!empty($CFG->allowcategorythemes)) {
             $this->ensure_category_loaded();
             foreach ($this->_categories as $catid => $notused) {
                 $this->add_body_class('category-' . $catid);