Commit ae6a47ee authored by Nigel McNie's avatar Nigel McNie
Browse files

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

parent 943e2afa
......@@ -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'])) {
$toarray = array(
'institutions' => 1,
......@@ -208,7 +208,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;
}
......@@ -259,7 +259,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