aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjake%acutex.net <>2001-12-13 06:41:04 +0000
committerjake%acutex.net <>2001-12-13 06:41:04 +0000
commite9f04a30422f4da41d15e22337b6e6477b2fb590 (patch)
treeb6b25129f616f2032330c74f0ddd5d59b13fffdf /checksetup.pl
parentFix for bug 73502: midair collision wasn't catching other bugs changing depen... (diff)
downloadbugzilla-e9f04a30422f4da41d15e22337b6e6477b2fb590.tar.gz
bugzilla-e9f04a30422f4da41d15e22337b6e6477b2fb590.tar.bz2
bugzilla-e9f04a30422f4da41d15e22337b6e6477b2fb590.zip
Bug 37339 and Bug 80183 - Adding a sidebar.cgi and index.cgi. The sidebar.cgi can currently be used in Mozilla/Netscape 6 and uses XUL that was originally written by Scott Collins <scc@mozilla.org>. The index.cgi displays both the proper header and footer in the appropriate places. It also changes the links accoding to if you are logged in or not.
r= ddk, kiko
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-xchecksetup.pl45
1 files changed, 45 insertions, 0 deletions
diff --git a/checksetup.pl b/checksetup.pl
index 942c4e2ef..99f2df135 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -282,6 +282,21 @@ sub LocalVar ($$)
# Set up the defaults for the --LOCAL-- variables below:
#
+LocalVar('index_html', <<'END');
+#
+# With the introduction of a configurable index page using the
+# template toolkit, Bugzilla's main index page is now index.cgi.
+# Most web servers will allow you to use index.cgi as a directory
+# index and many come preconfigured that way, however if yours
+# doesn't you'll need an index.html file that provides redirection
+# to index.cgi. Setting $index_html to 1 below will allow
+# checksetup.pl to create one for you if it doesn't exist.
+# NOTE: checksetup.pl will not replace an existing file, so if you
+# wish to have checksetup.pl create one for you, you must
+# make sure that there isn't already an index.html
+$index_html = 0;
+END
+
my $mysql_binaries = `which mysql`;
if ($mysql_binaries =~ /no mysql/) {
# If which didn't find it, just provide a reasonable default
@@ -473,6 +488,7 @@ my $my_db_port = ${*{$main::{'db_port'}}{SCALAR}};
my $my_db_name = ${*{$main::{'db_name'}}{SCALAR}};
my $my_db_user = ${*{$main::{'db_user'}}{SCALAR}};
my $my_db_pass = ${*{$main::{'db_pass'}}{SCALAR}};
+my $my_index_html = ${*{$main::{'index_html'}}{SCALAR}};
my $my_create_htaccess = ${*{$main::{'create_htaccess'}}{SCALAR}};
my $my_webservergroup = ${*{$main::{'webservergroup'}}{SCALAR}};
my @my_severities = @{*{$main::{'severities'}}{ARRAY}};
@@ -637,6 +653,35 @@ END
}
+if ($my_index_html) {
+ if (!-e "index.html") {
+ print "Creating index.html...\n";
+ open HTML, ">index.html";
+ print HTML <<'END';
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="REFRESH" CONTENT="0; URL=index.cgi">
+</HEAD>
+<BODY>
+<H1>I think you are looking for <a href="index.cgi">index.cgi</a></H1>
+</BODY>
+</HTML>
+END
+ close HTML;
+ }
+ else {
+ open HTML, "index.html";
+ if (! grep /index\.cgi/, <HTML>) {
+ print "\n\n";
+ print "*** It appears that you still have an old index.html hanging\n";
+ print " around. The contents of this file should be moved into a\n";
+ print " template and placed in the 'template/custom' directory.\n\n";
+ }
+ close HTML;
+ }
+}
+
# Just to be sure ...
unlink "data/versioncache";