Skip to content
Snippets Groups Projects
Commit 5a71702e authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Allow lookup by slice_uuid.

parent b7fb16a8
No related branches found
No related tags found
No related merge requests found
......@@ -53,11 +53,12 @@ $isfadmin = 0;
#
# Verify page arguments.
#
$reqargs = OptionalPageArguments("uuid", PAGEARG_STRING,
$reqargs = OptionalPageArguments("uuid", PAGEARG_UUID,
"slice_uuid",PAGEARG_UUID,
"maxextend", PAGEARG_INTEGER,
"oneonly", PAGEARG_BOOLEAN);
if (!isset($uuid)) {
if (! (isset($uuid) || isset($slice_uuid))) {
SPITHEADER(1);
echo "<div class='align-center'>
<p class='lead text-center'>
......@@ -72,7 +73,12 @@ if (!isset($uuid)) {
#
# See if the instance exists. If not, redirect back to the create page
#
$instance = Instance::Lookup($uuid);
if (isset($uuid)) {
$instance = Instance::Lookup($uuid);
}
else {
$instance = Instance::LookupBySlice($slice_uuid);
}
if (!$instance) {
SPITHEADER(1);
echo "<div class='align-center'>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment