Commit 284d8620 authored by Ruslan Kabalin's avatar Ruslan Kabalin Committed by Francois Marier
Browse files

Made non-public groups invisible in search results.


Signed-off-by: default avatarRuslan Kabalin <ruslan.kabalin@luns.net.uk>
Signed-off-by: default avatarFrancois Marier <francois@catalyst.net.nz>
parent 500ea723
......@@ -535,10 +535,13 @@ class PluginSearchInternal extends PluginSearch {
}
if ($type == 'member') {
$sql .= 'AND id IN (' . $grouproles . ')';
$sql .= 'AND (id IN (' . $grouproles . '))';
}
else if ($type == 'notmember') {
$sql .= 'AND id NOT IN (' . $grouproles . ')';
$sql .= 'AND public = 1 AND (id NOT IN (' . $grouproles . '))';
}
else {
$sql .= 'AND (public = 1 OR id IN (' . $grouproles . '))';
}
$count = get_field_sql('SELECT COUNT(*) '.$sql, $values);
......
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