Skip to content

Commit

Permalink
Merge pull request #10885 from Elgg/10884_access_hook
Browse files Browse the repository at this point in the history
fix(search): allows get_sql, access hook to be used correctly
  • Loading branch information
mrclay committed Apr 10, 2017
2 parents 38fbb68 + 98835bc commit a9c37a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mod/search/search_hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,10 @@ function search_tags_hook($hook, $type, $value, $params) {
$params['joins'][] = "JOIN {$db_prefix}metastrings msn on md.name_id = msn.id";
$params['joins'][] = "JOIN {$db_prefix}metastrings msv on md.value_id = msv.id";

$access = _elgg_get_access_where_sql(array('table_alias' => 'md'));
$access = _elgg_get_access_where_sql([
'table_alias' => 'md',
'guid_column' => 'entity_guid',
]);
$sanitised_tags = array();

foreach ($search_tag_names as $tag) {
Expand Down

0 comments on commit a9c37a9

Please sign in to comment.