게시판에서 회원 아이디로 댓글 검색시 잘못된 결과가 나오는 문제 (#322)

This commit is contained in:
zipuragi
2024-06-07 12:25:31 +09:00
committed by GitHub
parent 9c44d234ed
commit ca30e27b27

View File

@ -712,7 +712,7 @@ function get_sql_search($search_ca_name, $search_field, $search_text, $search_op
$tmp = explode(",", trim($search_field));
$field = explode("||", $tmp[0]);
$not_comment = "";
if (!empty($tmp[1]))
if (isset($tmp[1]))
$not_comment = $tmp[1];
$str .= "(";
@ -768,8 +768,11 @@ function get_sql_search($search_ca_name, $search_field, $search_text, $search_op
$op1 = " $search_operator ";
}
$str .= " ) ";
if ($not_comment)
if ($not_comment === '1') {
$str .= " and wr_is_comment = '0' ";
} else if ($not_comment === '0') {
$str .= " and wr_is_comment = '1' ";
}
return $str;
}