Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Now sesskey is working fine at installation time.

  • Loading branch information...
commit 2c13dbe497a859ff83f62ef44d01168ffc126a2a 1 parent 92ff33e
stronk7 authored
Showing with 4 additions and 5 deletions.
  1. +2 −3 admin/config.php
  2. +2 −2 admin/site.php
5 admin/config.php
View
@@ -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");
4 admin/site.php
View
@@ -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");
Please sign in to comment.
Something went wrong with that request. Please try again.