diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetVisData.php b/module/VuFind/src/VuFind/AjaxHandler/GetVisData.php index 79dc5421816ec2a255e0190c8d922b80ed086ecd..410a44ad8033c972ead88fb94fe36288c1db0f52 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetVisData.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetVisData.php @@ -148,7 +148,7 @@ class GetVisData extends AbstractBase } $paramsObj->getOptions()->disableHighlighting(); $paramsObj->getOptions()->spellcheckEnabled(false); - $filters = $paramsObj->getFilters(); + $filters = $paramsObj->getRawFilters(); $rawDateFacets = $params->fromQuery('facetFields'); $dateFacets = empty($rawDateFacets) ? [] : explode(':', $rawDateFacets); $fields = $this->processDateFacets($filters, $dateFacets); diff --git a/module/VuFind/src/VuFind/Controller/AbstractSearch.php b/module/VuFind/src/VuFind/Controller/AbstractSearch.php index 5c9c50099ebcb6b4dce50bee5e259ce8b4d0f877..0c3348d9f03afc1c4a498eee2d19825150e23747 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractSearch.php +++ b/module/VuFind/src/VuFind/Controller/AbstractSearch.php @@ -474,7 +474,7 @@ class AbstractSearch extends AbstractBase // Check to see if there is an existing range in the search object: if ($savedSearch) { - $filters = $savedSearch->getParams()->getFilters(); + $filters = $savedSearch->getParams()->getRawFilters(); if (isset($filters[$field])) { foreach ($filters[$field] as $current) { if ($range = SolrUtils::parseRange($current)) { diff --git a/module/VuFind/src/VuFind/Recommend/DPLATerms.php b/module/VuFind/src/VuFind/Recommend/DPLATerms.php index 34404018ee61c3fca05d519e9a30d98f0fbdd2a8..7fb045d285b1c5825bfa1ff06e858fcc74efced6 100644 --- a/module/VuFind/src/VuFind/Recommend/DPLATerms.php +++ b/module/VuFind/src/VuFind/Recommend/DPLATerms.php @@ -183,7 +183,7 @@ class DPLATerms implements RecommendInterface { // Extract the first search term from the search object: $search = $this->searchObject->getParams()->getQuery(); - $filters = $this->searchObject->getParams()->getFilters(); + $filters = $this->searchObject->getParams()->getRawFilters(); $lookfor = ($search instanceof \VuFindSearch\Query\Query) ? $search->getString() : ''; diff --git a/module/VuFind/src/VuFind/Recommend/MapSelection.php b/module/VuFind/src/VuFind/Recommend/MapSelection.php index 219907c3b446c14188dea9b0a12fcb7954b98be1..e9578445b784f1feecdb2173289493c097a5462a 100644 --- a/module/VuFind/src/VuFind/Recommend/MapSelection.php +++ b/module/VuFind/src/VuFind/Recommend/MapSelection.php @@ -218,7 +218,7 @@ class MapSelection implements \VuFind\Recommend\RecommendInterface, public function process($results) { $reorder_coords = []; - $filters = $results->getParams()->getFilters(); + $filters = $results->getParams()->getRawFilters(); foreach ($filters as $key => $value) { if ($key == $this->geoField) { $match = []; diff --git a/module/VuFind/src/VuFind/Recommend/OpenLibrarySubjects.php b/module/VuFind/src/VuFind/Recommend/OpenLibrarySubjects.php index 12b144da0232a186ba2847227599ddb1c2ad17dd..afcdd42b54cdaee4a1a60831c3709c5e250d75c3 100644 --- a/module/VuFind/src/VuFind/Recommend/OpenLibrarySubjects.php +++ b/module/VuFind/src/VuFind/Recommend/OpenLibrarySubjects.php @@ -205,7 +205,7 @@ class OpenLibrarySubjects implements RecommendInterface, if (null !== $from && null !== $to) { $range = ['from' => $from, 'to' => $to]; } elseif (is_object($params)) { - $currentFilters = $params->getFilters(); + $currentFilters = $params->getRawFilters(); if (isset($currentFilters[$field][0])) { $range = SolrUtils::parseRange($currentFilters[$field][0]); } diff --git a/module/VuFind/src/VuFind/Recommend/PubDateVisAjax.php b/module/VuFind/src/VuFind/Recommend/PubDateVisAjax.php index bf4c1da89a8efb356c29c96715547600840a24a3..894939a2e7f1d951f8d30969efb710999b824dab 100644 --- a/module/VuFind/src/VuFind/Recommend/PubDateVisAjax.php +++ b/module/VuFind/src/VuFind/Recommend/PubDateVisAjax.php @@ -134,7 +134,7 @@ class PubDateVisAjax implements RecommendInterface return []; } return $this->processDateFacets( - $this->searchObject->getParams()->getFilters() + $this->searchObject->getParams()->getRawFilters() ); } diff --git a/module/VuFind/src/VuFind/Recommend/SideFacets.php b/module/VuFind/src/VuFind/Recommend/SideFacets.php index 63649bc5335248236777686cc223e32535636952..a0f63f664afeb9c6e32733f6b405a1714f9a9936 100644 --- a/module/VuFind/src/VuFind/Recommend/SideFacets.php +++ b/module/VuFind/src/VuFind/Recommend/SideFacets.php @@ -421,7 +421,7 @@ class SideFacets extends AbstractFacets */ protected function getRangeFacets($property) { - $filters = $this->results->getParams()->getFilters(); + $filters = $this->results->getParams()->getRawFilters(); $result = []; if (isset($this->$property) && is_array($this->$property)) { foreach ($this->$property as $current) { diff --git a/module/VuFind/src/VuFind/Search/Base/Params.php b/module/VuFind/src/VuFind/Search/Base/Params.php index 7057d2ceb4f941805921c6cc1718a7a25f7809b8..8c848b6265403afc7b0b92baaa40e74d0cf8f7c3 100644 --- a/module/VuFind/src/VuFind/Search/Base/Params.php +++ b/module/VuFind/src/VuFind/Search/Base/Params.php @@ -1013,11 +1013,22 @@ class Params * * @return array */ - public function getFilters() + public function getRawFilters() { return $this->filterList; } + /** + * Get the raw filter list. + * + * @return array + * @deprecated Obsolete since VuFind 6.1. Use getRawFilters() instead. + */ + public function getFilters() + { + return $this->getRawFilters(); + } + /** * Return an array structure containing information about all current filters. * diff --git a/module/VuFind/src/VuFind/Search/EDS/Results.php b/module/VuFind/src/VuFind/Search/EDS/Results.php index 2207f8773a71736571de995bf86e0458d7371fc5..5e1cc555b68ce2ea99f603972aef65db2a46f091 100644 --- a/module/VuFind/src/VuFind/Search/EDS/Results.php +++ b/module/VuFind/src/VuFind/Search/EDS/Results.php @@ -90,7 +90,7 @@ class Results extends \VuFind\Search\Base\Results $facetResult = []; if (is_array($this->responseFacets)) { // Get the filter list -- we'll need to check it below: - $filterList = $this->getParams()->getFilters(); + $filterList = $this->getParams()->getRawFilters(); $translatedFacets = $this->getOptions()->getTranslatedFacets(); foreach ($this->responseFacets as $current) { // The "displayName" value is actually the name of the field on diff --git a/module/VuFind/src/VuFind/Search/Factory/UrlQueryHelperFactory.php b/module/VuFind/src/VuFind/Search/Factory/UrlQueryHelperFactory.php index 5888fae74ef4bfe8a133495684dc00865fc711d3..edb9aaf2efcf648821866b5bbab888b5f7ab0a3f 100644 --- a/module/VuFind/src/VuFind/Search/Factory/UrlQueryHelperFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/UrlQueryHelperFactory.php @@ -115,7 +115,7 @@ class UrlQueryHelperFactory if ($params->getPage() != 1) { $urlParams['page'] = $params->getPage(); } - $filters = $params->getFilters(); + $filters = $params->getRawFilters(); if (!empty($filters)) { $urlParams['filter'] = []; foreach ($filters as $field => $values) { diff --git a/module/VuFind/src/VuFind/Search/Favorites/Results.php b/module/VuFind/src/VuFind/Search/Favorites/Results.php index e5159778756d5d36b53eb82f8596777efe7e512c..1d53a02c99eb1e171c9ca781f566ef785d86a3b9 100644 --- a/module/VuFind/src/VuFind/Search/Favorites/Results.php +++ b/module/VuFind/src/VuFind/Search/Favorites/Results.php @@ -222,7 +222,7 @@ class Results extends BaseResults */ protected function getTagFilters() { - $filters = $this->getParams()->getFilters(); + $filters = $this->getParams()->getRawFilters(); return $filters['tags'] ?? []; } @@ -238,7 +238,7 @@ class Results extends BaseResults if ($this->list === false) { // Check the filters for a list ID, and load the corresponding object // if one is found: - $filters = $this->getParams()->getFilters(); + $filters = $this->getParams()->getRawFilters(); $listId = $filters['lists'][0] ?? null; $this->list = (null === $listId) ? null : $this->listTable->getExisting($listId); diff --git a/module/VuFind/src/VuFind/Search/Minified.php b/module/VuFind/src/VuFind/Search/Minified.php index f4c5f77ff0d0786fc0749e9a8b04b38d88d80996..695cc3da72a609c1437a30812b5f83834340b842 100644 --- a/module/VuFind/src/VuFind/Search/Minified.php +++ b/module/VuFind/src/VuFind/Search/Minified.php @@ -107,7 +107,7 @@ class Minified // It would be nice to shorten filter fields too, but // it would be a nightmare to maintain. - $this->f = $searchObject->getParams()->getFilters(); + $this->f = $searchObject->getParams()->getRawFilters(); $this->hf = $searchObject->getParams()->getHiddenFilters(); } diff --git a/module/VuFind/src/VuFind/Search/Summon/Results.php b/module/VuFind/src/VuFind/Search/Summon/Results.php index 78f1fea14348ca11610d2aa6a6860405d03adf1d..24ca9fa5d3201099111532e60b619fcef74b8a43 100644 --- a/module/VuFind/src/VuFind/Search/Summon/Results.php +++ b/module/VuFind/src/VuFind/Search/Summon/Results.php @@ -202,7 +202,7 @@ class Results extends \VuFind\Search\Base\Results protected function formatFacetData($current) { // We'll need this in the loop below: - $filterList = $this->getParams()->getFilters(); + $filterList = $this->getParams()->getRawFilters(); // Should we translate values for the current facet? $field = $current['displayName']; diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SideFacetsTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SideFacetsTest.php index 015b9a4861dc1c7a8518ec79d78267bad6136098..f8427d2b9500b6fd91d1a917858d21a6cf6d2ec4 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SideFacetsTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SideFacetsTest.php @@ -194,7 +194,7 @@ class SideFacetsTest extends \VuFindTest\Unit\TestCase 'numeric' => ['[1 TO 9]'], ]; $results = $this->getMockResults(); - $results->getParams()->expects($this->any())->method('getFilters') + $results->getParams()->expects($this->any())->method('getRawFilters') ->will($this->returnValue($filters)); $sf = $this->getSideFacets($this->getMockConfigLoader($config), $results); $expected = [