Commit a563f099 authored by Grant Ayers's avatar Grant Ayers

Correctly handle installations without WIKI support

parent 92606ad8
......@@ -49,6 +49,12 @@ $rhl_std = OSinfo::LookupByName($emulab_ops, "RHL-STD");
$fbsd_std = OSinfo::LookupByName($emulab_ops,"FBSD-STD");
$frisbee_mfs = OSinfo::LookupByName($emulab_ops,"FRISBEE-MFS");
if ($freebsd_mfs == null || $fbsd410_rhl90_std == null ||
$rhl_std == null || $fbsd_std == null || $frisbee_mfs == null) {
PAGEERROR("You must add images from Utah into your database" .
" before adding a nodetype. See installation documentation for details!",1);
}
# This belongs elsewhere!
$initial_attributes = array(
array("attrkey" => "adminmfs_osid", "attrvalue" => $freebsd_mfs->osid(),
......
......@@ -759,7 +759,9 @@ if (! $returning) {
$args["affiliation"] = $formfields["usr_affil"];
$args["affiliation_abbreviation"] = $formfields["usr_affil_abbrev"];
$args["password"] = $formfields["password1"];
$args["wikiname"] = ($WIKISUPPORT ? $formfields["wikiname"] : "");
if ($WIKISUPPORT) {
$args["wikiname"] = $formfields["wikiname"];
}
if (isset($formfields["usr_URL"]) &&
$formfields["usr_URL"] != $HTTPTAG && $formfields["usr_URL"] != "") {
......
......@@ -925,7 +925,10 @@ if (!$returning) {
$args["affiliation"] = $formfields["usr_affil"];
$args["affiliation_abbreviation"] = $formfields["usr_affil_abbrev"];
$args["password"] = $formfields["password1"];
$args["wikiname"] = ($WIKISUPPORT ? $formfields["wikiname"] : "");
if ($WIKISUPPORT) {
$args["wikiname"] = $formfields["wikiname"];
}
if (isset($formfields["usr_URL"]) &&
$formfields["usr_URL"] != $HTTPTAG && $formfields["usr_URL"] != "") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment