Fix search bug that would search section instead of group for header searches.

This commit is contained in:
Retro_Guy 2024-03-23 05:22:05 -07:00
parent b88b3ed437
commit 283e33c40e
1 changed files with 2 additions and 2 deletions

View File

@ -318,8 +318,8 @@ function get_header_search($group, $terms)
GLOBAL $CONFIG, $config_name, $spooldir, $snippet_size;
$terms = preg_replace('/\%/', '\%', $terms);
$searchterms = "%" . $terms . "%";
if (isset($search_group) && $_POST['searchpoint'] != 'msgid') {
$grouplist[0] = $search_group;
if (isset($group) && $_POST['searchpoint'] != 'msgid') {
$grouplist[0] = $group;
} elseif ($_POST['searchpoint'] != 'msgid') {
$local_groupfile = $spooldir . "/" . $config_name . "/local_groups.txt";
$grouplist = file($local_groupfile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);