mirror of
https://github.com/moodle/moodle.git
synced 2025-04-26 02:44:13 +02:00
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:
parent
f4646b44c1
commit
13e1a37198
@ -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");
|
||||
|
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user