diff --git a/www/plabmetrics.php3 b/www/plabmetrics.php3 index 5f654bda77478de6ede28eff1b610c91c204b356..eea84c783a5a77f2bc115e4e57355b23010dee68 100644 --- a/www/plabmetrics.php3 +++ b/www/plabmetrics.php3 @@ -26,6 +26,14 @@ $this_user = CheckLoginOrDie(); $uid = $this_user->uid(); $isadmin = ISADMIN(); +if (!$PLABSUPPORT) { + PAGEHEADER("PlanetLab Metrics"); + echo "
This site does not have PlanetLab support configured.
"; + echo "Email $TBMAILADDR_OPS if this confuses you!
"; + PAGEFOOTER(); + exit(0); +} + # # 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). @@ -710,6 +718,13 @@ while ($row = mysql_fetch_array($qres)) { array_push($basenodetypes,$row['type']); } +if (empty($basenodetypes)) { + echo "This site has not added any PlanetLab-style node types.
"; + echo "Email $TBMAILADDR_OPS if this confuses you!
"; + PAGEFOOTER(); + exit(0); +} + # # Next, build query: #