Skip to content
Snippets Groups Projects
Commit 66b9366b authored by Demian Katz's avatar Demian Katz
Browse files

Resolving VUFIND-628 (Facets out of order when shown by multiple recommendation modules).

parent 79f8de22
No related merge requests found
......@@ -411,11 +411,12 @@ class Results extends BaseResults
}
// Loop through every field returned by the result set
$validFields = array_keys($filter);
foreach ($this->rawResponse['facet_counts']['facet_fields']
as $field => $data) {
// Skip filtered fields and empty arrays:
if (!in_array($field, $validFields) || count($data) < 1) {
foreach (array_keys($filter) as $field) {
$data = isset($this->rawResponse['facet_counts']['facet_fields'][$field])
? $this->rawResponse['facet_counts']['facet_fields'][$field]
: array();
// Skip empty arrays:
if (count($data) < 1) {
continue;
}
// Initialize the settings for the current field
......
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