Commit da50bf46 authored by Nigel McNie's avatar Nigel McNie

Fix call time pass by reference in the solr search plugin. Fixes #1849.

parent 97d1ad65
......@@ -168,7 +168,7 @@ END;
set_config_plugin('search', 'solr', 'solrurl', $values['solrurl']);
}
private static function remove_key_prefix($results) {
private static function remove_key_prefix(&$results) {
if (is_array($results['data'])) {
foreach ($results['data'] as &$result) {
$new_result = array();
......@@ -200,7 +200,7 @@ END;
}
$results = self::send_query($query_string, $limit, $offset,
array('type' => 'user', 'index_active' => 1));
self::remove_key_prefix(&$results);
self::remove_key_prefix($results);
return $results;
}
......@@ -242,7 +242,7 @@ END;
$sort = $solrfields[$sortby] . ' ' . $sortdir;
$results = self::send_query($q, $limit, $offset, array('type' => 'user'), '*', false, $sort);
self::remove_key_prefix(&$results);
self::remove_key_prefix($results);
return $results;
}
......
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