diff -uNr bugzilla-2.16.3-old/query.cgi bugzilla-2.16.3/query.cgi --- bugzilla-2.16.3-old/query.cgi 2003-05-28 18:34:39 +0400 +++ bugzilla-2.16.3/query.cgi 2003-05-28 18:37:10 +0400 @@ -374,6 +374,7 @@ # Add in the defaults. $vars->{'default'} = \%default; +$vars->{'cur_tab_name'} = "asearch"; # Generate and return the UI (HTML page) from the appropriate template. print "Content-type: text/html\n\n"; diff -uNr bugzilla-2.16.3-old/simple_query.cgi bugzilla-2.16.3/simple_query.cgi --- bugzilla-2.16.3-old/simple_query.cgi 1970-01-01 03:00:00 +0300 +++ bugzilla-2.16.3/simple_query.cgi 2003-05-28 18:35:03 +0400 @@ -0,0 +1,109 @@ +#!/usr/bonsaitools/bin/perl -wT +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is the Bugzilla Bug Tracking System. +# +# The Initial Developer of the Original Code is Netscape Communications +# Corporation. Portions created by Netscape are Copyright (C) 1998 +# Netscape Communications Corporation. All Rights Reserved. +# +# Contributor(s): Alexey Gladkov + +use diagnostics; +use strict; +use lib "."; + +require "CGI.pl"; + +use vars qw( + @legal_product + $buffer + $template + $vars +); + +ConnectToDatabase(); + +if (defined $::FORM{"GoAheadAndLogIn"}) { + # We got here from a login page, probably from relogin.cgi. We better + # make sure the password is legit. + confirm_login(); +} else { + quietly_check_login(); +} + +GetVersionTable(); + +if (!defined $::FORM{'product'}) { + my @products; + + foreach my $p (@::legal_product) { + next if (Param("usebuggroups") && GroupExists($p) && !UserInGroup($p)); + push @products,$p; + } + + my $prodsize = scalar(@products); + if ($prodsize == 0) { + DisplayError("Either no products have been defined to enter bugs ". + "against or you have not been given access to any.\n"); + exit; + } + elsif ($prodsize > 1) { + $vars->{'prod'} = \@products; + $vars->{'cur_tab_name'} = "ssearch"; + $vars->{'target'} = "simple_query.cgi"; + + print "Content-type: text/html\n\n"; + $template->process("search/simple-search.html.tmpl", $vars) + || ThrowTemplateError($template->error()); + exit; + } + +} + +sub GetQuery { + my ($sqlfield,$matchtype,$matchstr) = @_; + + my $query = ""; + if ($matchtype eq 'substr') { + $query .= " AND " . $sqlfield . " LIKE "; + $matchstr = '%' . $matchstr . '%'; + } elsif ($matchtype eq 'regexp') { + $query .= " AND " . $sqlfield . " REGEXP "; + $matchstr = '.' + unless $matchstr; + } elsif ($matchtype eq 'notregexp') { + $query .= " AND " . $sqlfield . " NOT REGEXP "; + $matchstr = '.' + unless $matchstr; + } + $query .= SqlQuote($matchstr); + return $query; +} + +my $product = SqlQuote($::FORM{'product'}); +my $component = $::FORM{'component_str'} ? $::FORM{'component_str'} : ".*"; + +my $SQLwhere = GetQuery("value",$::FORM{'component_type'},$component); +SendSQL("SELECT value FROM components WHERE program=".$product.$SQLwhere); + +my $query=""; +while (MoreSQLData()) { + my ($comp_value) = FetchSQLData(); + $query.="&component=".$comp_value; +} + +# We add to buffer our results. +$::buffer.=$query; + +do 'buglist.cgi'; + diff -uNr bugzilla-2.16.3-old/template/en/default/account/created.html.tmpl bugzilla-2.16.3/template/en/default/account/created.html.tmpl --- bugzilla-2.16.3-old/template/en/default/account/created.html.tmpl 2003-05-28 18:34:39 +0400 +++ bugzilla-2.16.3/template/en/default/account/created.html.tmpl 2003-05-28 18:35:03 +0400 @@ -36,7 +36,7 @@

When the e-mail arrives, - log in here. + log in here.

[% PROCESS global/footer.html.tmpl %] diff -uNr bugzilla-2.16.3-old/template/en/default/account/prefs/footer.html.tmpl bugzilla-2.16.3/template/en/default/account/prefs/footer.html.tmpl --- bugzilla-2.16.3-old/template/en/default/account/prefs/footer.html.tmpl 2003-05-28 18:34:39 +0400 +++ bugzilla-2.16.3/template/en/default/account/prefs/footer.html.tmpl 2003-05-28 18:35:03 +0400 @@ -64,7 +64,7 @@
If you create remembered queries using the - query page, + query page, you can then come to this page and choose to have some of them appear in the footer of each Bugzilla page.
diff -uNr bugzilla-2.16.3-old/template/en/default/bug/create/user-message.html.tmpl bugzilla-2.16.3/template/en/default/bug/create/user-message.html.tmpl --- bugzilla-2.16.3-old/template/en/default/bug/create/user-message.html.tmpl 2003-05-28 18:34:39 +0400 +++ bugzilla-2.16.3/template/en/default/bug/create/user-message.html.tmpl 2003-05-28 18:35:03 +0400 @@ -31,4 +31,4 @@ Before reporting a bug, please read the bug writing guidelines, please look at the list of most frequently reported bugs, and please -search for the bug. +search for the bug. diff -uNr bugzilla-2.16.3-old/template/en/default/bug/navigate.html.tmpl bugzilla-2.16.3/template/en/default/bug/navigate.html.tmpl --- bugzilla-2.16.3-old/template/en/default/bug/navigate.html.tmpl 2003-05-28 18:34:39 +0400 +++ bugzilla-2.16.3/template/en/default/bug/navigate.html.tmpl 2003-05-28 18:35:03 +0400 @@ -50,5 +50,5 @@   Show list [% END %] -     Query page +     Query page      Enter new bug diff -uNr bugzilla-2.16.3-old/template/en/default/bug/process/verify-new-product.html.tmpl bugzilla-2.16.3/template/en/default/bug/process/verify-new-product.html.tmpl --- bugzilla-2.16.3-old/template/en/default/bug/process/verify-new-product.html.tmpl 2003-05-28 18:34:39 +0400 +++ bugzilla-2.16.3/template/en/default/bug/process/verify-new-product.html.tmpl 2003-05-28 18:35:03 +0400 @@ -96,7 +96,7 @@
-Cancel and Return to the Query Page +Cancel and Return to the Query Page [% PROCESS global/footer.html.tmpl %] diff -uNr bugzilla-2.16.3-old/template/en/default/global/useful-links.html.tmpl bugzilla-2.16.3/template/en/default/global/useful-links.html.tmpl --- bugzilla-2.16.3-old/template/en/default/global/useful-links.html.tmpl 2003-05-28 18:34:39 +0400 +++ bugzilla-2.16.3/template/en/default/global/useful-links.html.tmpl 2003-05-28 18:35:03 +0400 @@ -44,7 +44,7 @@ New | - Query | + Query | bug # | @@ -115,7 +115,7 @@ [% ELSE %] New Account | - Log In + Log In [% END %] diff -uNr bugzilla-2.16.3-old/template/en/default/index.html.tmpl bugzilla-2.16.3/template/en/default/index.html.tmpl --- bugzilla-2.16.3-old/template/en/default/index.html.tmpl 2003-05-28 18:34:39 +0400 +++ bugzilla-2.16.3/template/en/default/index.html.tmpl 2003-05-28 18:35:03 +0400 @@ -53,7 +53,7 @@ But it all boils down to a choice of:

- Query existing bug reports
+ Query existing bug reports
Enter a new bug report
Get summary reports

@@ -61,7 +61,7 @@ Change password or user preferences
Logout [% username FILTER html %]
[% ELSE %] - Log in to an existing account
+ Log in to an existing account
Open a new Bugzilla account
[% END %]

diff -uNr bugzilla-2.16.3-old/template/en/default/list/list.html.tmpl bugzilla-2.16.3/template/en/default/list/list.html.tmpl --- bugzilla-2.16.3-old/template/en/default/list/list.html.tmpl 2003-05-28 18:34:39 +0400 +++ bugzilla-2.16.3/template/en/default/list/list.html.tmpl 2003-05-28 18:35:03 +0400 @@ -92,7 +92,7 @@ [% IF bugs.size == 0 %] Zarro Boogs found.

- Query Page + Query Page   Enter New Bug Edit this query

@@ -132,7 +132,7 @@ - Query Page    + Query Page    Enter New Bug    Change Columns    diff -uNr bugzilla-2.16.3-old/template/en/default/reports/duplicates.html.tmpl bugzilla-2.16.3/template/en/default/reports/duplicates.html.tmpl --- bugzilla-2.16.3-old/template/en/default/reports/duplicates.html.tmpl 2003-05-28 18:34:39 +0400 +++ bugzilla-2.16.3/template/en/default/reports/duplicates.html.tmpl 2003-05-28 18:35:03 +0400 @@ -160,7 +160,7 @@
  • If problem not listed: