From: Stephen L Johnson <sjohnson@monsters.org>
Date: Wed, 27 Sep 2000 04:08:33 +0000 (+0000)
Subject: Fix default value of $WWW_DEFAULT_VIEW.  Add SPONGSLEEP check code from
X-Git-Tag: spong-2_7_0-beta1~17
X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c302f872d52e70618926ce3d172f0a9b32b1741;p=spong.git

Fix default value of $WWW_DEFAULT_VIEW.  Add SPONGSLEEP check code from
other programs (was still depending on the old $SPONGSLEEP).  Fix missing
</b> in left frame view.
---

diff --git a/src/www-spong.pl b/src/www-spong.pl
index 0752023..a0b8bdc 100755
--- a/src/www-spong.pl
+++ b/src/www-spong.pl
@@ -37,7 +37,11 @@ $interactive = 0;
  
 &load_config_files();  # Loads the user specified configuration information
 
-$main::WWW_DEFAULT_VIEW = "HOST" unless $main::WWW_DEFAULT_VIEW;
+$main::WWW_DEFAULT_VIEW = "HOSTS" unless $main::WWW_DEFAULT_VIEW;
+
+# Find our SPONGSLEEP value
+$SPONGSLEEP = $SPONGSLEEP{'www-spong'} || $SPONGSLEEP{'DEFAULT'} ||
+              $SPONGSLEEP || 300;
 
 # Check to see if I am being run as a command line program (in which case I
 # just generate static HTML documents), or a CGI program (in which case I 
@@ -267,8 +271,8 @@ sub commands {
    print "<font size=+2><b>Hosts View</b></font>\n";
    unless ($WWWFRAMES == 3) {
       print "<hr>\n";
-      print "<b>Views: <a href=\"$me/bygroup/\" target=_top>Groups</a> || \n"; 
-      print "<a href=\"$me/group/all\" target=_top>Hosts</a> \n"; 
+      print "<b>Views:</b> <a href=\"$me/bygroup/\" target=_top>Groups</a>";
+      print " || \n<a href=\"$me/group/all\" target=_top>Hosts</a> \n"; 
    }
    print "<hr>\n";