]> git.mjollnir.org Git - moodle.git/commitdiff
admin/register.php is now using sesskey.
authorstronk7 <stronk7>
Sun, 3 Oct 2004 15:28:35 +0000 (15:28 +0000)
committerstronk7 <stronk7>
Sun, 3 Oct 2004 15:28:35 +0000 (15:28 +0000)
Solved a minor bug with the use of one incorrect string.

Merged from MOODLE_14_STABLE

admin/index.php
admin/register.php

index 6429a9cc452d52abcdf223bfb45f01424ffd2fb9..979965d079cec4ce01825e2fe52b1af29392e033 100644 (file)
@@ -1,4 +1,4 @@
-<?PHP // $Id$
+<?php // $Id$
 
 /// Check that config.php exists, if not then call the install script
     if (!file_exists("../config.php")) {
     echo "</td>";
 
     echo "<td align=\"center\" width=\"33%\">";
-    print_single_button("register.php", NULL, get_string("registration"));
+    $options['sesskey'] = $USER->sesskey;
+    print_single_button("register.php", $options, get_string("registration"));
     echo "</td>";
     echo "<tr></table>";
 
index 0279a0548d065d2a035d97bec96fcdea00b777e7..b2c47b85562581e8e9191f96af56b75dc5e14472 100644 (file)
@@ -1,4 +1,4 @@
-<?PHP  // $Id$
+<?php  // $Id$
        // register.php - allows admin to register their site on moodle.org
 
     include("../config.php");
         redirect("index.php");
     }
 
+    if (!confirm_sesskey()) {
+        error(get_string('confirmsesskeybad', 'error'));
+    }
+
     if (!$admin = get_admin()) {
         error("No admins");
     }
@@ -35,7 +39,7 @@
        print_header("$site->shortname: $strregistration", "$site->fullname", 
                  "<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> $strregistration");
 
-    print_heading($strmanagemodules);
+    print_heading($strregistration);
 
     print_simple_box($strregistrationinfo, "center", "70%");
     echo "<br />";