summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-05-14 04:41:50 +0200
committerlpsolit%gmail.com <>2008-05-14 04:41:50 +0200
commitc9406294e5e843aa311db65a49e1d8def6356c13 (patch)
tree0a45b9d26e402e2ecc87f2494753a4bc51e3595b /Bugzilla/Search
parent1d34c237764ec4374315b3b619b7b93b21153f73 (diff)
downloadbugzilla-c9406294e5e843aa311db65a49e1d8def6356c13.tar.gz
bugzilla-c9406294e5e843aa311db65a49e1d8def6356c13.tar.xz
Bug 433514: Renaming a saved search with the same name of different case causes db error - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'Bugzilla/Search')
-rw-r--r--Bugzilla/Search/Saved.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/Bugzilla/Search/Saved.pm b/Bugzilla/Search/Saved.pm
index 3484eb3bc..9aa27714d 100644
--- a/Bugzilla/Search/Saved.pm
+++ b/Bugzilla/Search/Saved.pm
@@ -55,7 +55,7 @@ use constant VALIDATORS => {
link_in_footer => \&_check_link_in_footer,
};
-use constant UPDATE_COLUMNS => qw(query query_type);
+use constant UPDATE_COLUMNS => qw(name query query_type);
##############
# Validators #
@@ -79,6 +79,8 @@ sub _check_query {
$query || ThrowUserError("buglist_parameters_required");
my $cgi = new Bugzilla::CGI($query);
$cgi->clean_search_url;
+ # Don't store the query name as a parameter.
+ $cgi->delete('known_name');
return $cgi->query_string;
}
@@ -204,6 +206,7 @@ sub user {
# Mutators #
############
+sub set_name { $_[0]->set('name', $_[1]); }
sub set_url { $_[0]->set('query', $_[1]); }
sub set_query_type { $_[0]->set('query_type', $_[1]); }