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

Minor fixes.

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