From 4253758cff07c8c725435c8b4498384cbc358794 Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" Date: Tue, 27 Jul 2004 05:54:13 +0000 Subject: [PATCH] Bug 251837: Add UI to add/remove 'My Bugs' link in footer r=joel a=justdave git-svn-id: svn://10.0.0.236/trunk@159899 18797224-902f-48f8-a5cc-f745e15eee43 --- .../account/prefs/saved-searches.html.tmpl | 39 ++++++++++++++----- mozilla/webtools/bugzilla/userprefs.cgi | 6 +++ 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/mozilla/webtools/bugzilla/template/en/default/account/prefs/saved-searches.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/account/prefs/saved-searches.html.tmpl index a11c1c380f6..5055565e3c5 100644 --- a/mozilla/webtools/bugzilla/template/en/default/account/prefs/saved-searches.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/account/prefs/saved-searches.html.tmpl @@ -24,10 +24,6 @@
- @@ -40,15 +36,32 @@ + + + + + + + + [% FOREACH q = queries %] - + [% END %]
- Show in
- Footer -
Search Forget + Show in + Footer +
My Bugs + [% filtered_username = user.login FILTER url_quote %] + Run + +   + +   + + +
- - [% q.name FILTER html %] Run @@ -60,6 +73,12 @@ Forget + +
diff --git a/mozilla/webtools/bugzilla/userprefs.cgi b/mozilla/webtools/bugzilla/userprefs.cgi index cd73678c9b3..f71fdec02cd 100755 --- a/mozilla/webtools/bugzilla/userprefs.cgi +++ b/mozilla/webtools/bugzilla/userprefs.cgi @@ -298,6 +298,7 @@ sub DoPermissions { sub DoSavedSearches() { + $vars->{'user'} = Bugzilla->user; $vars->{'queries'} = Bugzilla->user->queries; } @@ -315,6 +316,11 @@ sub SaveSavedSearches() { } Bugzilla->user->flush_queries_cache; + + my $showmybugslink = defined($cgi->param("showmybugslink")) ? 1 : 0; + $dbh->do("UPDATE profiles SET mybugslink = $showmybugslink " . + "WHERE userid = " . Bugzilla->user->id); + Bugzilla->user->{'showmybugslink'} = $showmybugslink; }