summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CGI.pl103
-rwxr-xr-xchecksetup.pl14
-rw-r--r--defparams.pl134
-rw-r--r--globals.pl7
-rwxr-xr-xrelogin.cgi2
5 files changed, 13 insertions, 247 deletions
diff --git a/CGI.pl b/CGI.pl
index f5ce6fb35..01afc62dd 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -1100,109 +1100,6 @@ sub GetBugActivity {
return(\@operations, $incomplete_data);
}
-sub GetCommandMenu {
- my $loggedin = quietly_check_login();
- if (!defined $::anyvotesallowed) {
- GetVersionTable();
- }
- my $html = qq {
-<FORM METHOD="GET" ACTION="show_bug.cgi">
-<TABLE width="100%"><TR><TD>
-Actions:
-</TD><TD VALIGN="middle" NOWRAP>
-<a href="enter_bug.cgi">New</a> |
-<a href="query.cgi">Query</a> |
-};
-
- if (-e "query2.cgi") {
- $html .= "[<a href=\"query2.cgi\">beta</a>]";
- }
-
- $html .= qq{
-<INPUT TYPE="SUBMIT" VALUE="Find"> bug \#
-<INPUT NAME="id" SIZE="6">
-| <a href="reports.cgi">Reports</a>
-};
- if ($loggedin) {
- if ($::anyvotesallowed) {
- $html .= " | <A HREF=\"votes.cgi?action=show_user\">My votes</A>\n";
- }
- }
- if ($loggedin) {
- #a little mandatory SQL, used later on
- SendSQL("SELECT mybugslink, userid, blessgroupset FROM profiles " .
- "WHERE login_name = " . SqlQuote($::COOKIE{'Bugzilla_login'}));
- my ($mybugslink, $userid, $blessgroupset) = (FetchSQLData());
-
- #Begin settings
- $html .= qq{
-</TD><TD>
- &nbsp;
-</TD><TD VALIGN="middle">
-Edit <a href="userprefs.cgi">prefs</a>
-};
- if (UserInGroup("tweakparams")) {
- $html .= ", <a href=\"editparams.cgi\">parameters</a>\n";
- }
- if (UserInGroup("editusers") || $blessgroupset) {
- $html .= ", <a href=\"editusers.cgi\">users</a>\n";
- }
- if (UserInGroup("editcomponents")) {
- $html .= ", <a href=\"editproducts.cgi\">products</a>\n";
- $html .= ", <a href=\"editattachstatuses.cgi\">
- attachment&nbsp;statuses</a>\n";
- }
- if (UserInGroup("creategroups")) {
- $html .= ", <a href=\"editgroups.cgi\">groups</a>\n";
- }
- if (UserInGroup("editkeywords")) {
- $html .= ", <a href=\"editkeywords.cgi\">keywords</a>\n";
- }
- if (UserInGroup("tweakparams")) {
- $html .= "| <a href=\"sanitycheck.cgi\">Sanity&nbsp;check</a>\n";
- }
-
- $html .= qq{
-| <a href="relogin.cgi">Log&nbsp;out</a> $::COOKIE{'Bugzilla_login'}
-</TD></TR>
-};
-
- #begin preset queries
- my $mybugstemplate = Param("mybugstemplate");
- my %substs;
- $substs{'userid'} = url_quote($::COOKIE{"Bugzilla_login"});
- $html .= "<TR>";
- $html .= "<TD>Preset&nbsp;Queries: </TD>";
- $html .= "<TD colspan=3>\n";
- if ($mybugslink) {
- my $mybugsurl = PerformSubsts($mybugstemplate, \%substs);
- $html = $html . "<A HREF=\"$mybugsurl\">My&nbsp;bugs</A>\n";
- }
- SendSQL("SELECT name FROM namedqueries " .
- "WHERE userid = $userid AND linkinfooter");
- my $anynamedqueries = 0;
- while (MoreSQLData()) {
- my ($name) = (FetchSQLData());
- my $disp_name = $name;
- $disp_name =~ s/ /&nbsp;/g;
- if ($anynamedqueries || $mybugslink) { $html .= " | " }
- $anynamedqueries = 1;
- $html .= "<A HREF=\"buglist.cgi?cmdtype=runnamed&amp;namedcmd=" .
- url_quote($name) . "\">$disp_name</A>\n";
- }
- $html .= "</TD></TR>\n";
- } else {
- $html .= "</TD><TD>&nbsp;</TD><TD valign=\"middle\" align=\"right\">\n";
- $html .=
- " <a href=\"createaccount.cgi\">New&nbsp;account</a>\n";
- $html .=
- " | <a href=\"query.cgi?GoAheadAndLogIn=1\">Log&nbsp;in</a>";
- $html .= "</TD></TR>";
- }
- $html .= "</TABLE>";
- $html .= "</FORM>\n";
- return $html;
-}
############# Live code below here (that is, not subroutine defs) #############
diff --git a/checksetup.pl b/checksetup.pl
index a3aee4a7d..59d1dc14c 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -903,13 +903,23 @@ if (-e "data/params") {
require "data/params";
require "defparams.pl";
use vars @::param_list;
+ open(PARAMFILE, ">>old-params.txt")
+ || die "$0: Can't open param-$item.txt for writing: $!\n";
+
foreach my $item (keys %::param) {
if (!grep($_ eq $item, @::param_list) && $item ne "version") {
- print "The $item parameter is no longer used in Bugzilla\n" .
- "and has been removed from your parameters file.\n";
+ print "The $item parameter is no longer used in Bugzilla,
+ so it has been removed from your parameters file and
+ written to old-params.txt.\n";
+
+ print PARAMFILE "\n\n$item:\n";
+ print PARAMFILE $::param{$item};
+
delete $::param{$item};
}
}
+
+ close PARAMFILE;
WriteParams();
}
diff --git a/defparams.pl b/defparams.pl
index 9189b85a7..2c6b8b889 100644
--- a/defparams.pl
+++ b/defparams.pl
@@ -153,17 +153,6 @@ DefParam("cookiepath",
"t",
"/");
-DefParam("preferlists",
- "If this is on, Bugzilla will display most selection options as selection lists. If this is off, Bugzilla will use radio buttons and checkboxes instead.",
- "b",
- 1);
-
-DefParam("capitalizelists",
- "If this is on, Bugzilla will capitalize list entries, checkboxes, and radio buttons. If this is off, Bugzilla will leave these items untouched.",
- "b",
- 0);
-
-
DefParam("usequip",
"If this is on, Bugzilla displays a silly quip at the beginning of buglists, and lets users add to the list of quips.",
"b",
@@ -193,27 +182,6 @@ DefParam("queryagainstshadowdb",
0);
-DefParam("usedespot",
- "If this is on, then we are using the Despot system to control our database of users. Bugzilla won't ever write into the user database, it will let the Despot code maintain that. And Bugzilla will send the user over to Despot URLs if they need to change their password. Also, in that case, Bugzilla will treat the passwords stored in the database as being crypt'd, not plaintext.",
- "b",
- 0);
-
-DefParam("despotbaseurl",
- "The base URL for despot. Used only if <b>usedespot</b> is turned on, above.",
- "t",
- "http://cvs-mirror.mozilla.org/webtools/despot/despot.cgi",
- \&check_despotbaseurl);
-
-
-sub check_despotbaseurl {
- my ($url) = (@_);
- if ($url !~ /^http.*cgi$/) {
- return "must be a legal URL, that starts with http and ends with .cgi";
- }
- return "";
-}
-
-
# Adding in four parameters for LDAP authentication. -JMR, 7/28/00
DefParam("useLDAP",
"Turn this on to use an LDAP directory for user authentication ".
@@ -244,113 +212,18 @@ DefParam("LDAPmailattribute",
#End of LDAP parameters
-DefParam("headerhtml",
- "Additional HTML to add to the HEAD area of documents, eg. links to stylesheets.",
- "l",
- '');
-
-DefParam("bodyhtml",
- "Additional parameters to add to the BODY tag at the beginning of documents, eg. background image/colors, link colors, etc",
- "l",
- 'BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000"');
-
-DefParam("footerhtml",
- "HTML to add to the bottom of every page. By default it displays the blurbhtml, and %commandmenu%, a menu of useful commands. You probably really want either bannerhtml or footerhtml to include %commandmenu%.",
- "l",
- '<TABLE BORDER="0"><TR><TD BGCOLOR="#000000" VALIGN="TOP">
-<TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%" BGCOLOR="lightyellow">
-<TR><TD>
-%blurbhtml%
-<BR>
-%commandmenu%
-</TD></TR></TABLE></TD></TR></TABLE>');
-
-DefParam("errorhtml",
- "This is what is printed out when a form is improperly filled out. %errormsg% is replaced by the actual error itself; %<i>anythingelse</i>% gets replaced by the definition of that parameter (as defined on this page).",
- "l",
- qq{<TABLE CELLPADDING=20><TR><TD BGCOLOR="#ff0000">
-<FONT SIZE="+2">%errormsg%</FONT></TD></TR></TABLE>
-<P>Please press <B>Back</B> and try again.<P>});
-
-
-
-DefParam("bannerhtml",
- "The html that gets emitted at the head of every Bugzilla page.
-Anything of the form %<i>word</i>% gets replaced by the defintion of that
-word (as defined on this page).",
- "l",
- q{<TABLE BGCOLOR="#000000" WIDTH="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0>
-<TR><TD><A HREF="http://www.mozilla.org/"><IMG
- SRC="http://www.mozilla.org/images/mozilla-banner.gif" ALT=""
-BORDER=0 WIDTH=600 HEIGHT=58></A></TD></TR></TABLE>
-<CENTER><FONT SIZE=-1>Bugzilla version %version%
-</FONT></CENTER>});
-
-DefParam("blurbhtml",
- "A blurb that appears as part of the header of every Bugzilla page. This is a place to put brief warnings, pointers to one or two related pages, etc.",
- "l",
- "This is <B>Bugzilla</B>: the Mozilla bug system. For more
-information about what Bugzilla is and what it can do, see
-<A HREF=\"http://www.mozilla.org/\">mozilla.org</A>'s
-<A HREF=\"http://www.mozilla.org/bugs/\"><B>bug pages</B></A>.");
-
-
-DefParam("mostfreqhtml",
- "The HTML which appears at the top of the list of most-frequently-reported bugs. Use it to explain the page, set a maintainer etc.",
- "l",
- q{
-<br><p>
-
-<b>What are "most frequent bugs"?</b>
-
-<blockquote>The Most Frequent Bugs page lists the known open bugs which
-are reported most frequently in recent builds of Mozilla. It is automatically
-generated from the Bugzilla database every 24 hours, by counting the number
-of direct and indirect duplicates of bugs.
-This information is provided in order to assist in minimizing
-the amount of duplicate bugs entered into Bugzilla which in turn cuts down
-on development time.
-</blockquote>
-
-<b>How do I use this list?</b>
-
-<ul>
-<li>Review the most frequent bugs list.</li>
-<li>If problem is listed:</li>
-
-<ul>
-<li>Click on Bug # link to confirm that you have found the same bug and comment
-if you have additional information. Or move on with your testing
-of the product.</li>
-</ul>
-
-<li>If problem not listed:</li>
-
-<ul>
-<li>Go to the <a href="query.cgi">Bugzilla Query/Search</a>
-page to try and locate a similar bug that has already been written.</li>
-<li>If you find your bug in Bugzilla, feel free to comment with any new or
-additional data you may have.</li>
-<li>If you cannot find your problem already documented in Bugzilla, go to the
-<a href="http://www.mozilla.org/quality/help/bug-form.html">Bugzilla Helper</a> and post a new bug.</li>
-</ul>
-
-</ul>
-<br>
-});
-
DefParam("mostfreqthreshold",
"The minimum number of duplicates a bug needs to show up on the <A HREF=\"duplicates.cgi\">most frequently reported bugs page</a>. If you have a large database and this page takes a long time to load, try increasing this number.",
"t",
"2");
+
DefParam("mybugstemplate",
"This is the URL to use to bring up a simple 'all of my bugs' list for a user. %userid% will get replaced with the login name of a user.",
"t",
"buglist.cgi?bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;email1=%userid%&amp;emailtype1=exact&amp;emailassigned_to1=1&amp;emailreporter1=1");
-
DefParam("shutdownhtml",
"If this field is non-empty, then Bugzilla will be completely disabled and this text will be displayed instead of all the Bugzilla pages.",
"l",
@@ -575,11 +448,6 @@ sub check_webdotbase {
return "";
}
-DefParam("entryheaderhtml",
- "This is a special header for the bug entry page. The text will be printed after the page header, before the bug entry form. It is meant to be a place to put pointers to intructions on how to enter bugs.",
- "l",
- '<A HREF="bugwritinghelp.html">Bug writing guidelines</A>');
-
DefParam("expectbigqueries",
"If this is on, then we will tell mysql to <tt>set option SQL_BIG_TABLES=1</tt> before doing queries on bugs. This will be a little slower, but one will not get the error <tt>The table ### is full</tt> for big queries that require a big temporary table.",
"b",
diff --git a/globals.pl b/globals.pl
index d04133d10..0f0e96a69 100644
--- a/globals.pl
+++ b/globals.pl
@@ -1424,13 +1424,6 @@ sub Param ($) {
return $::param{$value};
}
- # See if it is a dynamically-determined param (can't be changed by user).
- if ($value eq "commandmenu") {
- return GetCommandMenu();
- }
- if ($value eq "settingsmenu") {
- return GetSettingsMenu();
- }
# Um, maybe we haven't sourced in the params at all yet.
if (stat("data/params")) {
# Write down and restore the version # here. That way, we get around
diff --git a/relogin.cgi b/relogin.cgi
index 0d64fb71f..d3023c850 100755
--- a/relogin.cgi
+++ b/relogin.cgi
@@ -55,8 +55,6 @@ print "Set-Cookie: Bugzilla_login= ; path=$cookiepath; expires=Sun, 30-Jun-80 00
Set-Cookie: Bugzilla_logincookie= ; path=$cookiepath; expires=Sun, 30-Jun-80 00:00:00 GMT
";
-# delete the cookie before dumping the header so that it shows the user
-# as logged out if %commandmenu% is in the header
delete $::COOKIE{"Bugzilla_login"};
$vars->{'title'} = "Logged Out";