282
# Set up the defaults for the --LOCAL-- variables below:
282
# Set up the defaults for the --LOCAL-- variables below:
285
LocalVar('index_html', <<'END');
287
# With the introduction of a configurable index page using the
288
# template toolkit, Bugzilla's main index page is now index.cgi.
289
# Most web servers will allow you to use index.cgi as a directory
290
# index and many come preconfigured that way, however if yours
291
# doesn't you'll need an index.html file that provides redirection
292
# to index.cgi. Setting $index_html to 1 below will allow
293
# checksetup.pl to create one for you if it doesn't exist.
294
# NOTE: checksetup.pl will not replace an existing file, so if you
295
# wish to have checksetup.pl create one for you, you must
296
# make sure that there isn't already an index.html
285
my $mysql_binaries = `which mysql`;
300
my $mysql_binaries = `which mysql`;
286
if ($mysql_binaries =~ /no mysql/) {
301
if ($mysql_binaries =~ /no mysql/) {
287
# If which didn't find it, just provide a reasonable default
302
# If which didn't find it, just provide a reasonable default
473
my $my_db_name = ${*{$main::{'db_name'}}{SCALAR}};
488
my $my_db_name = ${*{$main::{'db_name'}}{SCALAR}};
474
my $my_db_user = ${*{$main::{'db_user'}}{SCALAR}};
489
my $my_db_user = ${*{$main::{'db_user'}}{SCALAR}};
475
my $my_db_pass = ${*{$main::{'db_pass'}}{SCALAR}};
490
my $my_db_pass = ${*{$main::{'db_pass'}}{SCALAR}};
491
my $my_index_html = ${*{$main::{'index_html'}}{SCALAR}};
476
my $my_create_htaccess = ${*{$main::{'create_htaccess'}}{SCALAR}};
492
my $my_create_htaccess = ${*{$main::{'create_htaccess'}}{SCALAR}};
477
my $my_webservergroup = ${*{$main::{'webservergroup'}}{SCALAR}};
493
my $my_webservergroup = ${*{$main::{'webservergroup'}}{SCALAR}};
478
my @my_severities = @{*{$main::{'severities'}}{ARRAY}};
494
my @my_severities = @{*{$main::{'severities'}}{ARRAY}};
656
if ($my_index_html) {
657
if (!-e "index.html") {
658
print "Creating index.html...\n";
659
open HTML, ">index.html";
661
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
664
<META HTTP-EQUIV="REFRESH" CONTENT="0; URL=index.cgi">
667
<H1>I think you are looking for <a href="index.cgi">index.cgi</a></H1>
674
open HTML, "index.html";
675
if (! grep /index\.cgi/, <HTML>) {
677
print "*** It appears that you still have an old index.html hanging\n";
678
print " around. The contents of this file should be moved into a\n";
679
print " template and placed in the 'template/custom' directory.\n\n";
641
# Just to be sure ...
686
# Just to be sure ...
642
unlink "data/versioncache";
687
unlink "data/versioncache";
19
Type in one or more words (or word fragments) to search for:
19
Type in one or more words (or word fragments) to search for:
21
<!-- The name of the form must be "f" (used in "quicksearch.js"). -->
23
<form name="f" action="show_bug.cgi" method="get"
21
<form name="f" action="show_bug.cgi" method="get"
24
onsubmit="QuickSearch(); return false;">
22
onsubmit="QuickSearch(f.id.value); return false;">
27
<td><input type="text" size="40" name="id"/></td>
25
<td><input type="text" size="40" name="id"/></td>
48
function go_to (url) {
48
function go_to (url) {
49
document.location.href = url;
49
if (sidebar == 1) {
50
//window.open(url, "other" );
50
load_relative_url(url);
52
document.location.href = url;
53
function map(l, f) {
56
function map(l, f) {
600
return (new Date()).getTime();
603
return (new Date()).getTime();
603
function ShowURL(mode) {
606
function ShowURL(mode,input) {
604
var input = document.f.id.value;
605
var searchURL = make_query_URL(bugzilla+"buglist.cgi", input, false);
607
var searchURL = make_query_URL(bugzilla+"buglist.cgi", input, false);
606
if (searchURL != no_result) {
608
if (searchURL != no_result) {
607
var pieces = searchURL.replace(/[\?]/g,"\n?").replace(/[\&]/g,"\n&");
609
var pieces = searchURL.replace(/[\?]/g,"\n?").replace(/[\&]/g,"\n&");
684
// derived from http://www.cs.hmc.edu/~jruderma/s/bugz.html
686
// derived from http://www.cs.hmc.edu/~jruderma/s/bugz.html
686
// QuickSearch combines lookup-by-bug-number and search
688
// QuickSearch combines lookup-by-bug-number and search
687
// in a single textbox. It's name must be document.f.id .
689
// in a single textbox.
689
// type nothing:
691
// type nothing:
690
// --> go to bugzilla front page
692
// --> go to bugzilla front page
696
// --> search summary, product, component, keywords, status whiteboard
698
// --> search summary, product, component, keywords, status whiteboard
697
// (and URL if it's an IP address, a host.name, or an absolute://URL)
699
// (and URL if it's an IP address, a host.name, or an absolute://URL)
699
function QuickSearch ()
701
function QuickSearch (input)
701
var input = document.f.id.value;
703
//remove leading and trailing whitespace
703
//remove leading and trailing whitespace
704
input = input.replace(/^[\s]+/,"").replace(/[\s]+$/,"");
704
input = input.replace(/^[\s]+/,"").replace(/[\s]+$/,"");
729
function LoadQuery() {
729
function LoadQuery(input) {
730
var input = document.f.id.value;
732
//remove leading and trailing whitespace
730
//remove leading and trailing whitespace
733
input = input.replace(/^[\s]+/,"").replace(/[\s]+$/,"");
731
input = input.replace(/^[\s]+/,"").replace(/[\s]+$/,"");
13
Type in one or more words (or word fragments) to search for:
13
Type in one or more words (or word fragments) to search for:
15
<!-- The name of the form must be "f" (used in "quicksearch.js"). -->
17
<form name="f" action="show_bug.cgi" method="get"
15
<form name="f" action="show_bug.cgi" method="get"
18
onsubmit="QuickSearch(); return false;">
16
onsubmit="QuickSearch(f.id.value); return false;">
21
<td><input type="text" size="40" name="id"/></td>
19
<td><input type="text" size="40" name="id"/></td>
22
<td align=left><input type="submit" name="run" value="Search"/></td>
20
<td align=left><input type="submit" name="run" value="Search"/></td>
23
<td align=left><input type="button" name="load" value="Load Query"
21
<td align=left><input type="button" name="load" value="Load Query"
24
onclick="LoadQuery();" />
22
onclick="LoadQuery(f.id.value);" />