Merged siteidentifier from stable

This commit is contained in:
moodler 2004-10-03 03:47:31 +00:00
parent 58a1c3ea32
commit 9ff24fb76a

View file

@ -21,12 +21,8 @@
$admin->country = $CFG->country;
}
if (!$admin->secret) { // secret field hasn't been set yet
$admin->secret = random_string(15);
if (!set_field("user", "secret", $admin->secret, "id", $admin->id)) {
error("Could not set admin's secret string!");
}
if (empty($CFG->siteidentifier)) { // Unique site identification code
set_config('siteidentifier', random_string(32));
}
@ -60,7 +56,7 @@
echo "<!-- is flagged as a new entry and will be manually checked by the list maintainer -->\n";
echo "<input type=\"hidden\" name=\"url\" value=\"$CFG->wwwroot\">\n";
echo "<input type=\"hidden\" name=\"secret\" value=\"$admin->secret\">\n";
echo "<input type=\"hidden\" name=\"secret\" value=\"$CFG->siteidentifier\">\n";
echo "<input type=\"hidden\" name=\"host\" value=\"".$_SERVER["HTTP_HOST"]."\">\n";
echo "<input type=\"hidden\" name=\"lang\" value=\"".current_language()."\">\n";
echo "</td></tr>\n";