Fix keyword Error 500 bug

parent d4142dcc
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
/data /data
/localconfig /localconfig
/index.html /index.html
*.*~
/skins/contrib/Dusk/admin.css /skins/contrib/Dusk/admin.css
/skins/contrib/Dusk/bug.css /skins/contrib/Dusk/bug.css
...@@ -2054,12 +2054,12 @@ sub build_subselect { ...@@ -2054,12 +2054,12 @@ sub build_subselect {
# unconditionally, so we return the subselect and let the DB optimizer # unconditionally, so we return the subselect and let the DB optimizer
# restrict the search based on other search criteria. # restrict the search based on other search criteria.
my $not = $negate ? "NOT" : ""; my $not = $negate ? "NOT" : "";
return "$outer $not IN (SELECT DISTINCT $inner FROM `$table` WHERE $cond)"; return "$outer $not IN (SELECT DISTINCT $inner FROM $table WHERE $cond)";
} }
# Execute subselects immediately to avoid dependent subqueries, which are # Execute subselects immediately to avoid dependent subqueries, which are
# large performance hits on MySql # large performance hits on MySql
my $q = "SELECT DISTINCT $inner FROM `$table` WHERE $cond"; my $q = "SELECT DISTINCT $inner FROM $table WHERE $cond";
my $dbh = Bugzilla->dbh; my $dbh = Bugzilla->dbh;
my $list = $dbh->selectcol_arrayref($q); my $list = $dbh->selectcol_arrayref($q);
return $negate ? "1=1" : "1=2" unless @$list; return $negate ? "1=1" : "1=2" unless @$list;
...@@ -2484,7 +2484,7 @@ sub _user_nonchanged { ...@@ -2484,7 +2484,7 @@ sub _user_nonchanged {
my $table = $first_join->{table}; my $table = $first_join->{table};
my $columns = "bug_id"; my $columns = "bug_id";
$columns .= ",isprivate" if @{$first_join->{extra}}; $columns .= ",isprivate" if @{$first_join->{extra}};
my $new_table = "SELECT DISTINCT $columns FROM `$table` AS $as $join_sql"; my $new_table = "SELECT DISTINCT $columns FROM $table AS $as $join_sql";
$first_join->{table} = "($new_table)"; $first_join->{table} = "($new_table)";
# We always want to LEFT JOIN the generated table. # We always want to LEFT JOIN the generated table.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment