diff options
author | terry%mozilla.org <> | 2000-01-25 16:53:26 +0100 |
---|---|---|
committer | terry%mozilla.org <> | 2000-01-25 16:53:26 +0100 |
commit | 0230a614c04af4633fd9cb3d9216b720d474a4b7 (patch) | |
tree | 69468f51e04ac6caccd0d1a19229d6bea1abb65b /buglist.cgi | |
parent | 5fc31978bdcfe2790ee48d930d1c2adafe66b204 (diff) | |
download | bugzilla-0230a614c04af4633fd9cb3d9216b720d474a4b7.tar.gz bugzilla-0230a614c04af4633fd9cb3d9216b720d474a4b7.tar.xz |
Reworked preferences UI. Added ability to turn off "My bugs" link at
bottom. Made "My bugs" show bugs you own AND bugs you submitted.
Added ability to display your named queries in the footer. Many
random bugfixes.
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-x | buglist.cgi | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/buglist.cgi b/buglist.cgi index f096bd323..6427180e9 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -141,9 +141,17 @@ individual query. PutFooter(); exit(); } - SendSQL("REPLACE INTO namedqueries (userid, name, query) VALUES " . - "($userid, " . SqlQuote($name) . - ", " . SqlQuote($::buffer) . ")"); + $::buffer =~ s/[\&\?]cmdtype=[a-z]+//; + my $qname = SqlQuote($name); + SendSQL("SELECT query FROM namedqueries " . + "WHERE userid = $userid AND name = $qname"); + if (!FetchOneColumn()) { + SendSQL("REPLACE INTO namedqueries (userid, name, query) " . + "VALUES ($userid, $qname, " . SqlQuote($::buffer) . ")"); + } else { + SendSQL("UPDATE namedqueries SET query = " . SqlQuote($::buffer) . + " WHERE userid = $userid AND name = $qname"); + } PutHeader("OK, query saved."); print qq{ OK, you have a new query named <code>$name</code> @@ -874,6 +882,7 @@ if ($count == 0) { print qq{<p><A HREF="query.cgi">Query Page</A>\n}; print qq{ <A HREF="enter_bug.cgi">Enter New Bug</A>\n}; + print qq{<NOBR><A HREF="query.cgi?$::buffer">Edit this query</A></NOBR>\n}; } elsif ($count == 1) { print "One bug found.\n"; } else { |