diff options
author | bugreport%peshkin.net <> | 2004-05-14 01:04:26 +0200 |
---|---|---|
committer | bugreport%peshkin.net <> | 2004-05-14 01:04:26 +0200 |
commit | 95b84377992077442427a25786387285f994cb97 (patch) | |
tree | e4cffdae54811e0a713cac7f15a3369b5845910d /userprefs.cgi | |
parent | a8de93fcc5c9a63482bd6461574750b470af5fa1 (diff) | |
download | bugzilla-95b84377992077442427a25786387285f994cb97.tar.gz bugzilla-95b84377992077442427a25786387285f994cb97.tar.xz |
Bug 236779: Add UI for changing "linkinfooter" flag for saved searches
r=gerv,preed
a=justdave
Diffstat (limited to 'userprefs.cgi')
-rwxr-xr-x | userprefs.cgi | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/userprefs.cgi b/userprefs.cgi index eefe40205..cd73678c9 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -301,7 +301,21 @@ sub DoSavedSearches() { $vars->{'queries'} = Bugzilla->user->queries; } -# No SaveSavedSearches() because this panel has no changeable fields (yet). +sub SaveSavedSearches() { + my $cgi = Bugzilla->cgi; + my $dbh = Bugzilla->dbh; + my @queries = @{Bugzilla->user->queries}; + my $sth = $dbh->prepare("UPDATE namedqueries SET linkinfooter = ? + WHERE userid = ? + AND name = ?"); + foreach my $q (@queries) { + my $linkinfooter = + defined($cgi->param("linkinfooter_$q->{'name'}")) ? 1 : 0; + $sth->execute($linkinfooter, $userid, $q->{'name'}); + } + + Bugzilla->user->flush_queries_cache; +} ############################################################################### @@ -340,6 +354,7 @@ SWITCH: for ($current_tab_name) { last SWITCH; }; /^saved-searches$/ && do { + SaveSavedSearches() if $cgi->param('dosave'); DoSavedSearches(); last SWITCH; }; |