Now sesskey is working fine at installation time.

Bug 2049
(http://moodle.org/bugs/bug.php?op=show&bugid=2049)

Merged from MOODLE_14_STABLE
This commit is contained in:
stronk7 2004-10-06 00:08:08 +00:00
parent f4646b44c1
commit 13e1a37198
2 changed files with 6 additions and 7 deletions

View 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");

View 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'));
}
@ -120,7 +120,7 @@
$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");