Skip to content

Commit

Permalink
Fix SQL syntax error on manage_user_page
Browse files Browse the repository at this point in the history
Fixes #27117
  • Loading branch information
atrol authored and dregad committed Aug 1, 2020
1 parent bd2015e commit 8dd8212
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions manage_user_page.php
Expand Up @@ -211,9 +211,11 @@

# build a big where-clause and param list for all search terms, including negations
$t_first = true;
$t_where .= ' AND ( ';
foreach( $t_search_terms as $t_search_term => $t_negate ) {
if( !$t_first ) {
if( $t_first ) {
$t_where .= ' AND ( ';
$t_first = false;
} else {
$t_where .= ' AND ';
}

Expand All @@ -231,9 +233,10 @@
$t_where_params[] = $c_search;

$t_where .= ' )';
$t_first = false;
}
$t_where .= ' )';
if( !$t_first ) {
$t_where .= ' )';
}
}

$p_per_page = 50;
Expand Down

0 comments on commit 8dd8212

Please sign in to comment.