From 8e4598066d7399f9ee0a2a334c61a204b30c5f7b Mon Sep 17 00:00:00 2001 From: "cyeh%bluemartini.com" <> Date: Thu, 22 Feb 2001 10:20:58 +0000 Subject: fix for 67278: Footer lines need separation patch submitted by shie9022@msmailhub.oulan.ou.edu (Alan Shields) make saved queries display better --- CGI.pl | 69 ++++++++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 25 deletions(-) diff --git a/CGI.pl b/CGI.pl index 72fd135bf..a6c159440 100644 --- a/CGI.pl +++ b/CGI.pl @@ -1056,8 +1056,15 @@ sub DumpBugActivity { sub GetCommandMenu { my $loggedin = quietly_check_login(); - my $html = qq{
}; - $html .= "New | Query"; + my $html = ""; + $html .= <<"--endquote--"; +\n"; if ($loggedin) { - my $mybugstemplate = Param("mybugstemplate"); - my %substs; - $substs{'userid'} = url_quote($::COOKIE{"Bugzilla_login"}); - if (!defined $::anyvotesallowed) { - GetVersionTable(); - } - if ($::anyvotesallowed) { - $html .= qq{ | My votes}; - } + #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()); - if ($mybugslink) { - my $mybugsurl = PerformSubsts($mybugstemplate, \%substs); - $html = $html . " | My bugs"; - } - SendSQL("SELECT name FROM namedqueries " . - "WHERE userid = $userid AND linkinfooter"); - while (MoreSQLData()) { - my ($name) = (FetchSQLData()); - $html .= " | $name"; - } - $html .= " | Edit prefs"; + + #Begin settings + $html .= ""; + + #begin preset queries + my $mybugstemplate = Param("mybugstemplate"); + my %substs; + $substs{'userid'} = url_quote($::COOKIE{"Bugzilla_login"}); + if (!defined $::anyvotesallowed) { + GetVersionTable(); + } + if ($::anyvotesallowed) { + $html .= qq{ | My votes}; + } + $html .= ""; + $html .= ""; + $html .= "\n"; } else { $html .= " | New account\n"; $html .= " | Log in"; + $html .= ""; } - $html .= ""; + $html .= "\n"; + $html .= "
+ +Actions: + +New | Query +--endquote-- + if (-e "query2.cgi") { $html .= "[beta]"; } @@ -1065,32 +1072,15 @@ sub GetCommandMenu { $html .= qq{ | bug \# }; - $html .= " | Reports"; + $html .= " | ReportsEdit prefs"; if (UserInGroup("tweakparams")) { $html .= ", parameters"; $html .= ", sanity check"; @@ -1108,13 +1098,42 @@ sub GetCommandMenu { $html .= ", keywords"; } $html .= " | Log out $::COOKIE{'Bugzilla_login'}"; + $html .= "
Preset Queries: \n"; + if ($mybugslink) { + my $mybugsurl = PerformSubsts($mybugstemplate, \%substs); + $html = $html . "My bugs"; + } + SendSQL("SELECT name FROM namedqueries " . + "WHERE userid = $userid AND linkinfooter"); + while (MoreSQLData()) { + my ($name) = (FetchSQLData()); + $html .= " | $name"; + } + $html .= "
"; return $html; } -- cgit v1.2.3-24-g4f1b