Now sesskey is working fine at installation time.

Bug 2049
(http://moodle.org/bugs/bug.php?op=show&bugid=2049)
This commit is contained in:
stronk7
2004-10-06 00:03:32 +00:00
parent 92ff33eee8
commit 2c13dbe497
2 changed files with 4 additions and 5 deletions
+2 -3
View File
@@ -3,7 +3,6 @@
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");
+2 -2
View File
@@ -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");