From: terry%mozilla.org <> Date: Sat, 5 Feb 2000 08:38:15 +0000 (+0000) Subject: The "put this named query in the footer" feature was choking if the X-Git-Tag: bugzilla-2.12~395 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88d999247265e0d8884fb55d8f73887c69c40503;p=thirdparty%2Fbugzilla.git The "put this named query in the footer" feature was choking if the name of the query had a space in it. --- diff --git a/userprefs.cgi b/userprefs.cgi index 3a25755932..0ee7d576f3 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -20,7 +20,12 @@ use strict; require "CGI.pl"; - +# Shut up misguided -w warnings about "used only once". "use vars" just +# doesn't work for me. +sub sillyness { + my $zz; + $zz = $::defaultqueryname; +} my $userid; @@ -154,21 +159,24 @@ sub ShowFooter { EmitEntry("The 'My bugs' link at the footer of each page", $entry); SendSQL("SELECT name, linkinfooter FROM namedqueries " . "WHERE userid = $userid"); - my $found = 0; + my $count = 0; while (MoreSQLData()) { my ($name, $linkinfooter) = (FetchSQLData()); if ($name eq $::defaultqueryname) { next; } - $found = 1; my $entry = - BuildPulldown("query-" . value_quote($name), + BuildPulldown("query-$count", [["0", "should only appear in the query page"], ["1", "should appear on the footer of every page"]], $linkinfooter); EmitEntry("Your query named '$name'", $entry); + my $q = value_quote($name); + print qq{\n}; + $count++; } - if (!$found) { + print qq{\n}; + if (!$count) { print qq{
" . value_quote($k) . ": " . value_quote($::FORM{$k}) . "\n"; +# } + my $bank = $::FORM{'bank'} || "account"; my @banklist = (