]> git.mjollnir.org Git - moodle.git/commitdiff
Merged latest from stable
authormoodler <moodler>
Fri, 8 Oct 2004 05:41:52 +0000 (05:41 +0000)
committermoodler <moodler>
Fri, 8 Oct 2004 05:41:52 +0000 (05:41 +0000)
admin/site.php

index 082193c9b5d8495fbdc5a9514b98788b9f5867fd..a66bacc633e2395b891112305a96bb2c56542ddd 100644 (file)
         print_heading($strsitesettings);
     }
 
-    if (!isset($USER)) {
+    if (empty($USER->id)) {  // New undefined admin user
         $USER->htmleditor = true;
+        $sesskey = '';
+    } else {
+        $sesskey = $USER->sesskey;
     }
     $usehtmleditor = can_use_html_editor();
     $defaultformat = FORMAT_HTML;
 
-    $sesskey = !empty($USER->id) ? $USER->sesskey : '';
-
     print_simple_box_start("center", "", "$THEME->cellheading");
     include("site.html");
     print_simple_box_end();