diff --git a/module/VuFind/src/VuFind/Auth/Database.php b/module/VuFind/src/VuFind/Auth/Database.php index 159be808e6b5e38f7c4f868a5f09ee078a8e5861..733dc239dffdba9388c4e74ec9323da1a793a576 100644 --- a/module/VuFind/src/VuFind/Auth/Database.php +++ b/module/VuFind/src/VuFind/Auth/Database.php @@ -58,8 +58,8 @@ class Database extends AbstractBase public function authenticate($request) { // Make sure the credentials are non-blank: - $this->username = trim($request->getParam('username')); - $this->password = trim($request->getParam('password')); + $this->username = trim($request->post()->get('username')); + $this->password = trim($request->post()->get('password')); if ($this->username == '' || $this->password == '') { throw new AuthException('authentication_error_blank'); } @@ -92,7 +92,7 @@ class Database extends AbstractBase 'password' => '', 'password2' => '', 'email' => '' ); foreach ($params as $param => $junk) { - $params[$param] = $request->getParam($param, ''); + $params[$param] = $request->post()->get($param, ''); } // Validate Input diff --git a/module/VuFind/src/VuFind/Search/Base/Params.php b/module/VuFind/src/VuFind/Search/Base/Params.php index e5b284cdb5e2d117e4a98415a1917b092df013c0..9b5a8872ff17eaf9d2c8cb219277be2ec716d0d8 100644 --- a/module/VuFind/src/VuFind/Search/Base/Params.php +++ b/module/VuFind/src/VuFind/Search/Base/Params.php @@ -164,7 +164,7 @@ class Params protected function initShards($request) { $legalShards = array_keys($this->options->getShards()); - $requestShards = $request->getParam('shard', array()); + $requestShards = $request->query()->get('shard', array()); if (!is_array($requestShards)) { $requestShards = array($requestShards); } @@ -195,7 +195,7 @@ class Params { // Check for a limit parameter in the url. $defaultLimit = $this->options->getDefaultLimit(); - if (($limit = $request->getParam('limit')) != $defaultLimit) { + if (($limit = $request->query()->get('limit')) != $defaultLimit) { // make sure the url parameter is a valid limit if (in_array($limit, $this->options->getLimitOptions())) { $this->limit = $limit; @@ -221,7 +221,7 @@ class Params */ protected function initPage($request) { - $this->page = intval($request->getParam('page')); + $this->page = intval($request->query()->get('page')); if ($this->page < 1) { $this->page = 1; } @@ -260,7 +260,7 @@ class Params { // If no lookfor parameter was found, we have no search terms to // add to our array! - if (is_null($lookfor = $request->getParam('lookfor'))) { + if (is_null($lookfor = $request->query()->get('lookfor'))) { return false; } @@ -276,7 +276,7 @@ class Params } // Flatten type arrays for backward compatibility: - $handler = $request->getParam('type'); + $handler = $request->query()->get('type'); if (is_array($handler)) { $handler = $handler[0]; } @@ -325,14 +325,14 @@ class Params $groupCount = 0; // Loop through each search group - while (!is_null($lookfor = $request->getParam('lookfor' . $groupCount))) { + while (!is_null($lookfor = $request->query()->get('lookfor' . $groupCount))) { $group = array(); // Loop through each term inside the group for ($i = 0; $i < count($lookfor); $i++) { // Ignore advanced search fields with no lookup if ($lookfor[$i] != '') { // Use default fields if not set - $typeArr = $request->getParam('type' . $groupCount); + $typeArr = $request->query()->get('type' . $groupCount); if (isset($typeArr[$i]) && !empty($typeArr[$i])) { $handler = $typeArr[$i]; } else { @@ -340,7 +340,7 @@ class Params } // Add term to this group - $boolArr = $request->getParam('bool' . $groupCount); + $boolArr = $request->query()->get('bool' . $groupCount); $group[] = array( 'field' => $handler, 'lookfor' => $lookfor[$i], @@ -354,7 +354,7 @@ class Params // Add the completed group to the list $this->searchTerms[] = array( 'group' => $group, - 'join' => $request->getParam('join') + 'join' => $request->query()->get('join') ); } @@ -373,10 +373,10 @@ class Params protected function initSort($request) { // Check for special parameter only relevant in RSS mode: - if ($request->getParam('skip_rss_sort', 'unset') != 'unset') { + if ($request->query()->get('skip_rss_sort', 'unset') != 'unset') { $this->skipRssSort = true; } - $this->setSort($request->getParam('sort')); + $this->setSort($request->query()->get('sort')); } /** @@ -389,7 +389,7 @@ class Params protected function initView($request) { // Check for a view parameter in the url. - $view = $request->getParam('view'); + $view = $request->query()->get('view'); $lastView = $this->getLastView(); if (!empty($view)) { if ($view == 'rss') { @@ -1123,16 +1123,16 @@ class Params */ protected function initDateFilters($request) { - $daterange = $request->getParam('daterange'); + $daterange = $request->query()->get('daterange'); if (!empty($daterange)) { $ranges = is_array($daterange) ? $daterange : array($daterange); foreach ($ranges as $range) { // Validate start and end of range: $yearFrom = $this->formatYearForDateRange( - $request->getParam($range . 'from') + $request->query()->get($range . 'from') ); $yearTo = $this->formatYearForDateRange( - $request->getParam($range . 'to') + $request->query()->get($range . 'to') ); // Build filter only if necessary: @@ -1155,7 +1155,7 @@ class Params protected function initFilters($request) { // Handle standard filters: - $filter = $request->getParam('filter'); + $filter = $request->query()->get('filter'); if (!empty($filter)) { if (is_array($filter)) { foreach ($filter as $current) { diff --git a/module/VuFind/src/VuFind/Search/Favorites/Params.php b/module/VuFind/src/VuFind/Search/Favorites/Params.php index e41f914a959f1630bd5776939629956c6e473ff9..f78a09f258569136e7a5b90acc6b23de7628f36b 100644 --- a/module/VuFind/src/VuFind/Search/Favorites/Params.php +++ b/module/VuFind/src/VuFind/Search/Favorites/Params.php @@ -73,7 +73,7 @@ class Params extends BaseParams protected function initFilters($request) { // Special filter -- if the "id" parameter is set, limit to a specific list: - $id = $request->getParam('id'); + $id = $request->query()->get('id'); if (!empty($id)) { $this->addFilter("lists:{$id}"); } diff --git a/module/VuFind/src/VuFind/Search/MixedList/Params.php b/module/VuFind/src/VuFind/Search/MixedList/Params.php index fc723b7d419a194a25504e38142e16c848edddbc..9b947fe4197f0f7b88861a9a19067d25b2056006 100644 --- a/module/VuFind/src/VuFind/Search/MixedList/Params.php +++ b/module/VuFind/src/VuFind/Search/MixedList/Params.php @@ -50,7 +50,7 @@ class Params extends BaseParams */ protected function initSearch($request) { - $this->recordsToRequest = $request->getParam('id', array()); + $this->recordsToRequest = $request->query()->get('id', array()); // We always want to display the entire list as one page: $this->setLimit(count($this->recordsToRequest)); diff --git a/module/VuFind/src/VuFind/Search/Solr/Params.php b/module/VuFind/src/VuFind/Search/Solr/Params.php index 1adfd6536773f0643a805f5f9b1ba004211076a2..83440355375ea340c281f9058311b4c6d07db6a6 100644 --- a/module/VuFind/src/VuFind/Search/Solr/Params.php +++ b/module/VuFind/src/VuFind/Search/Solr/Params.php @@ -151,7 +151,7 @@ class Params extends BaseParams protected function initSearch($request) { // Special case -- did we get a list of IDs instead of a standard query? - $ids = $request->getParam('overrideIds', null); + $ids = $request->query()->get('overrideIds', null); if (is_array($ids) && !empty($ids)) { $this->setQueryIDs($ids); } else { @@ -159,7 +159,7 @@ class Params extends BaseParams parent::initSearch($request); // Another special case -- are we doing a tag search? - $tag = $request->getParam('tag', ''); + $tag = $request->query()->get('tag', ''); if (!empty($tag)) { $this->setBasicSearch($tag, 'tag'); } @@ -353,7 +353,7 @@ class Params extends BaseParams // Use the default behavior of the parent class, but add support for the // special illustrations filter. parent::initFilters($request); - switch ($request->getParam('illustration', -1)) { + switch ($request->query()->get('illustration', -1)) { case 1: $this->addFilter('illustrated:Illustrated'); break; @@ -363,7 +363,7 @@ class Params extends BaseParams } // Check for hidden filters: - $hidden = $request->getParam('hiddenFilters'); + $hidden = $request->query()->get('hiddenFilters'); if (!empty($hidden) && is_array($hidden)) { foreach ($hidden as $current) { $this->addHiddenFilter($current); diff --git a/module/VuFind/src/VuFind/Search/SolrAuthor/Params.php b/module/VuFind/src/VuFind/Search/SolrAuthor/Params.php index dafb9930af507a476121210042f8f2ea29850dd7..e39ea6d428f6a0869fd6b3c63b3a6c883e924ee2 100644 --- a/module/VuFind/src/VuFind/Search/SolrAuthor/Params.php +++ b/module/VuFind/src/VuFind/Search/SolrAuthor/Params.php @@ -50,7 +50,7 @@ class Params extends BaseParams { // If no lookfor parameter was found, we have no search terms to // add to our array! - if (is_null($lookfor = $request->getParam('author'))) { + if (is_null($lookfor = $request->query()->get('author'))) { return false; } diff --git a/module/VuFind/src/VuFind/Search/SolrAuthorFacets/Params.php b/module/VuFind/src/VuFind/Search/SolrAuthorFacets/Params.php index 5d317f3a77b93d622963bb5d3c99ee7a22d0e923..8fe91fcc77fa27b12202da4a73e04f5786b9121a 100644 --- a/module/VuFind/src/VuFind/Search/SolrAuthorFacets/Params.php +++ b/module/VuFind/src/VuFind/Search/SolrAuthorFacets/Params.php @@ -75,7 +75,7 @@ class Params extends BaseParams { // If no lookfor parameter was found, we have no search terms to // add to our array! - if (is_null($lookfor = $request->getParam('lookfor'))) { + if (is_null($lookfor = $request->query()->get('lookfor'))) { return false; }