aboutsummaryrefslogtreecommitdiffstats
path: root/query.cgi
diff options
context:
space:
mode:
authorterry%mozilla.org <>2000-01-24 01:14:09 +0000
committerterry%mozilla.org <>2000-01-24 01:14:09 +0000
commit00a814cd674b14f1ab1d903eb4b7b57a72f0b50a (patch)
treec3764a9f5215fe0e90aedf97b52e3283260ad591 /query.cgi
parentf8f099c18923dc1b9ba85e3cef1b6d77997aad66 (diff)
downloadbugs-00a814cd674b14f1ab1d903eb4b7b57a72f0b50a.tar
bugs-00a814cd674b14f1ab1d903eb4b7b57a72f0b50a.tar.gz
bugs-00a814cd674b14f1ab1d903eb4b7b57a72f0b50a.tar.bz2
bugs-00a814cd674b14f1ab1d903eb4b7b57a72f0b50a.tar.xz
bugs-00a814cd674b14f1ab1d903eb4b7b57a72f0b50a.zip
Add a way to remove a default query that you may have set.
Diffstat (limited to 'query.cgi')
-rwxr-xr-xquery.cgi27
1 files changed, 22 insertions, 5 deletions
diff --git a/query.cgi b/query.cgi
index 27e7adbfb..2abb98a42 100755
--- a/query.cgi
+++ b/query.cgi
@@ -58,7 +58,16 @@ if (defined $::FORM{"GoAheadAndLogIn"}) {
confirm_login();
}
+if ($::FORM{'nukedefaultquery'}) {
+ print "Set-Cookie: DEFAULTQUERY= ; path=/; expires=Sun, 30-Jun-80 00:00:00 GMT\n";
+ delete $::COOKIE{"DEFAULTQUERY"};
+ $::buffer = "";
+}
+
+
+my $userdefaultquery = 1;
if (!defined $::COOKIE{"DEFAULTQUERY"}) {
+ $userdefaultquery = 0;
$::COOKIE{"DEFAULTQUERY"} = Param("defaultquery");
}
@@ -611,15 +620,23 @@ if ($::COOKIE{'LASTORDER'}) {
$deforder = "Reuse same sort as last time";
unshift(@orders, $deforder);
}
-
+
+my $defquerytype = $userdefaultquery ? "my" : "the";
+
print make_options(\@orders, $deforder);
print "</SELECT></NOBR>
<INPUT TYPE=\"submit\" VALUE=\"Submit query\">
-<INPUT TYPE=\"reset\" VALUE=\"Reset back to the default query\">
-<INPUT TYPE=hidden name=form_name VALUE=query>
-<BR>Give me a <A HREF=\"help.html\">clue</A> about how to use this form.
-</FORM>
+<INPUT TYPE=\"reset\" VALUE=\"Reset back to $defquerytype default query\">
+";
+
+if ($userdefaultquery) {
+ print qq{<BR><A HREF="query.cgi?nukedefaultquery=1">Set my default query back to the system default</A>};
+}
+print "
+</FORM>
+<P>Give me a <A HREF=\"help.html\">clue</A> about how to use this form.
+<P>
";