Commit 7deb603b authored by Leigh Stoller's avatar Leigh Stoller

Minor bug fixes

parent 36c598fc
......@@ -22,18 +22,28 @@ $isadmin = ISADMIN();
# Verify page arguments.
#
$optargs = OptionalPageArguments("experiment", PAGEARG_EXPERIMENT,
"exptidx", PAGEARG_INTEGER,
"records", PAGEARG_INTEGER);
"exptidx", PAGEARG_INTEGER,
"records", PAGEARG_INTEGER);
if (isset($exptidx)) {
#
# Just in case we get here via a current experiment link.
#
if (($foo = Experiment::Lookup($exptidx))) {
$experiment = $foo;
}
}
#
# If we got a current experiment, great. Otherwise we have to lookup
# data for a historical experiment.
#
if ($experiment) {
if (isset($experiment)) {
# Need these below.
$pid = $experiment->pid();
$eid = $experiment->eid();
$gid = $experiment->gid();
$exptidx = $experiment->idx();
# Permission
if (!$isadmin &&
......
......@@ -40,6 +40,14 @@ if (isset($instance)) {
$exptidx = $instance->exptidx();
$template = $instance->GetTemplate();
}
elseif (isset($exptidx)) {
#
# Just in case we get here via a current experiment link.
#
if (($foo = Experiment::Lookup($exptidx))) {
$experiment = $foo;
}
}
elseif (isset($template)) {
$experiment = $template->GetExperiment();
}
......@@ -52,6 +60,7 @@ if (isset($experiment)) {
# Need these below.
$pid = $experiment->pid();
$eid = $experiment->eid();
$exptidx = $experiment->idx();
# Permission
if (!$isadmin &&
......@@ -98,7 +107,7 @@ if (isset($template)) {
if (isset($instance)) {
$id = $instance->exptidx();
if ($experiment)
if (isset($experiment))
$path = $experiment->path();
echo "Subversion datastore for Instance $id";
......@@ -124,16 +133,19 @@ else {
echo "<br><br></font>";
#
# Only current experiments can be tagged.
#
if (isset($experiment)) {
echo "<form action='${TBBASE}/archive_tag.php3' $style method=get>\n";
echo "<b><input type=hidden name=experiment value='$exptidx'></b>";
echo "<b><input type=submit name=tag value='Tag Archive'></b>";
echo "<input type=hidden name=exptidx value='$exptidx'>";
echo "</form>";
}
echo "<form action='${TBBASE}/archive_tags.php3' $style method=get>";
echo "<b><input type=hidden name=experiment value='$exptidx'></b>";
echo "<b><input type=submit name=tag value='Show Tags'></b>";
echo "<input type=hidden name=exptidx value='$exptidx'>";
echo "</form>";
echo "<iframe width=100% height=800 scrolling=yes src='$url' border=2>".
......
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