Commit 4c5ef92a authored by Leigh B Stoller's avatar Leigh B Stoller

Minor fixes.

parent 16905e40
......@@ -94,7 +94,7 @@ $am_array = array('Utah DDC' =>
if (isset($profile)) {
#
# Guest users must use the uuid, but logged in users may use the
# internal index.
# internal index.
#
if (! ($this_user || IsValidUUID($profile))) {
SPITUSERERROR("Illegal profile for guest user: $profile");
......
......@@ -55,6 +55,7 @@ function SPITFORM($formfields, $errors)
$button_label = "Modify";
$title = "Modify Profile";
$editing = 1;
$uuid = $formfields["profile_uuid"];
}
else {
$button_label = "Create";
......@@ -360,7 +361,7 @@ function SPITFORM($formfields, $errors)
if ($editing) {
echo " <a class='btn btn-primary btn-sm pull-right'
style='margin-right: 10px;'
href='instantiate.php?profile=$idx'
href='instantiate.php?profile=$uuid'
type='submit' name='create'>Instantiate</a>\n";
echo " <a class='btn btn-danger btn-sm pull-left'
style='margin-right: 10px;'
......@@ -499,6 +500,7 @@ if (! isset($create)) {
return;
}
else {
$defaults["profile_uuid"] = $profile->uuid();
$defaults["profile_pid"] = $profile->pid();
$defaults["profile_description"] = $profile->description();
$defaults["profile_name"] = $profile->name();
......
......@@ -74,8 +74,7 @@ if (isset($ajax_request)) {
$profile_idx = addslashes($ajax_argument);
$query_result =
DBQueryWarn("select * from apt_profiles ".
"where idx='$profile_idx' and ".
" creator_idx='$target_idx'");
"where idx='$profile_idx'");
if (!$query_result || !mysql_num_rows($query_result)) {
SPITAJAX_ERROR(1, "No such profile $profile_idx!");
......
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