Commit b67fd0c2 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix broken sort by institution

parent 170bb96e
......@@ -289,6 +289,10 @@ class PluginSearchInternal extends PluginSearch {
}
}
}
if (strpos($sort, 'institution') === 0 && $institutionsearch == '') {
$institutionsearch = ' LEFT OUTER JOIN {usr_institution} i ON i.usr = u.id ';
$sort = 'i.' . $sort;
}
$count = get_field_sql('SELECT COUNT(*) FROM {usr} u ' . $institutionsearch . $where, $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