summaryrefslogtreecommitdiffstats
path: root/buglist.cgi
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 /buglist.cgi
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 'buglist.cgi')
-rwxr-xr-xbuglist.cgi3
1 files changed, 2 insertions, 1 deletions
diff --git a/buglist.cgi b/buglist.cgi
index c40e65aed..0cf659c3d 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -298,9 +298,10 @@ sub InsertNamedQuery {
my $dbh = Bugzilla->dbh;
$query_name = trim($query_name);
- my ($query_obj) = grep {$_->name eq $query_name} @{Bugzilla->user->queries};
+ my ($query_obj) = grep {lc($_->name) eq lc($query_name)} @{Bugzilla->user->queries};
if ($query_obj) {
+ $query_obj->set_name($query_name);
$query_obj->set_url($query);
$query_obj->set_query_type($query_type);
$query_obj->update();