Commit ed1f3afd authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan
Browse files

fixing search group query in mysql

parent 1ea63ce7
......@@ -629,7 +629,7 @@ class PluginSearchInternal extends PluginSearch {
if ($type == 'member') {
$sql .= 'AND (
owner = ? OR id IN (
SELECT "group" FROM {group_member} WHERE member = ?
SELECT gm.group FROM {group_member} gm WHERE gm.member = ?
)
)';
$values[] = $USER->get('id');
......@@ -638,7 +638,7 @@ class PluginSearchInternal extends PluginSearch {
else if ($type == 'notmember') {
$sql .= "AND (
owner != ? AND id NOT IN (
SELECT group FROM {group_member} WHERE member = ?
SELECT gm.group FROM {group_member} gm WHERE gm.member = ?
)
)";
$values[] = $USER->get('id');
......@@ -659,7 +659,7 @@ class PluginSearchInternal extends PluginSearch {
if ($type == 'member') {
$sql .= 'AND (
owner = ? OR id IN (
SELECT "group" FROM {group_member} WHERE member = ?
SELECT gm.group FROM {group_member} gm WHERE gm.member = ?
)
)
';
......@@ -667,7 +667,7 @@ class PluginSearchInternal extends PluginSearch {
else if ($type == 'notmember') {
$sql .= "AND (
owner != ? AND id NOT IN (
SELECT group FROM {group_member} WHERE member = ?
SELECT gm.group FROM {group_member} gm WHERE gm.member = ?
)
)
";
......
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