Commit 6c1095ff authored by David Johnson's avatar David Johnson

Don't do anything if not PLABSUPPORT, and detect the fact that there are

no plab-style node_types, and add msgs to those effects.  Prompted by Mike
Blodgett at WAIL.
parent c55f8e6f
...@@ -26,6 +26,14 @@ $this_user = CheckLoginOrDie(); ...@@ -26,6 +26,14 @@ $this_user = CheckLoginOrDie();
$uid = $this_user->uid(); $uid = $this_user->uid();
$isadmin = ISADMIN(); $isadmin = ISADMIN();
if (!$PLABSUPPORT) {
PAGEHEADER("PlanetLab Metrics");
echo "<p>This site does not have PlanetLab support configured.</p>";
echo "<p>Email $TBMAILADDR_OPS if this confuses you!</p>";
PAGEFOOTER();
exit(0);
}
# #
# Hacks -- unset $pid and $eid vars if they are '' before we check args! # Hacks -- unset $pid and $eid vars if they are '' before we check args!
# (needed so we can let users drop a previous pid/eid filter). # (needed so we can let users drop a previous pid/eid filter).
...@@ -710,6 +718,13 @@ while ($row = mysql_fetch_array($qres)) { ...@@ -710,6 +718,13 @@ while ($row = mysql_fetch_array($qres)) {
array_push($basenodetypes,$row['type']); array_push($basenodetypes,$row['type']);
} }
if (empty($basenodetypes)) {
echo "<p>This site has not added any PlanetLab-style node types.</p>";
echo "<p>Email $TBMAILADDR_OPS if this confuses you!</p>";
PAGEFOOTER();
exit(0);
}
# #
# Next, build query: # Next, build query:
# #
......
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