]> git.mjollnir.org Git - moodle.git/commitdiff
Now sesskey is working fine at installation time.
authorstronk7 <stronk7>
Wed, 6 Oct 2004 00:08:08 +0000 (00:08 +0000)
committerstronk7 <stronk7>
Wed, 6 Oct 2004 00:08:08 +0000 (00:08 +0000)
Bug 2049
(http://moodle.org/bugs/bug.php?op=show&bugid=2049)

Merged from MOODLE_14_STABLE

admin/config.php
admin/site.php

index f8b1f94082b0af8ba2443ddbb36bee2757f9a4d1..1bf5d02e46fc07a54f9d0037b63cbe73cf53037c 100644 (file)
@@ -1,9 +1,8 @@
-<?PHP  // $Id$
+<?php  // $Id$
        // config.php - allows admin to edit all configuration variables
 
     require_once("../config.php");
 
-
     if ($site = get_site()) {   // If false then this is a new installation
         require_login();
         if (!isadmin()) {
@@ -22,7 +21,7 @@
 
        if ($config = data_submitted($match)) {  
 
-        if (isset($USER)) {             // Additional identity check
+        if (!empty($USER->id)) {             // Additional identity check
             if (!confirm_sesskey()) {
                 error(get_string('confirmsesskeybad', 'error'));
             }
@@ -88,7 +87,7 @@
         echo "<br />";
     }
 
-    $sesskey = isset($USER) ? $USER->sesskey : '';
+    $sesskey = !empty($USER->id) ? $USER->sesskey : '';
 
     print_simple_box_start("center", "", "$THEME->cellheading");
        include("config.html");
index aa9bdd2ca77d2d251a0943923070b78ebaad77a5..082193c9b5d8495fbdc5a9514b98788b9f5867fd 100644 (file)
@@ -1,4 +1,4 @@
-<?PHP // $Id$
+<?php // $Id$
 
     require_once("../config.php");
 
@@ -14,7 +14,7 @@
 
        if ($form = data_submitted()) {
 
-        if (isset($USER)) {             // Additional identity check
+        if (!empty($USER->id)) {             // Additional identity check
             if (!confirm_sesskey()) {
                 error(get_string('confirmsesskeybad', 'error'));
             }
     $usehtmleditor = can_use_html_editor();
     $defaultformat = FORMAT_HTML;
 
-    $sesskey = isset($USER) ? $USER->sesskey : '';
+    $sesskey = !empty($USER->id) ? $USER->sesskey : '';
 
     print_simple_box_start("center", "", "$THEME->cellheading");
     include("site.html");