Skip to content

Commit

Permalink
Fix styles and add missing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
maccabeelevine committed Oct 8, 2024
1 parent 86abb67 commit ec2dc6c
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
namespace VuFind\Controller;

use Laminas\ServiceManager\ServiceLocatorInterface;
use VuFindSearch\ParamBag;

/**
* ProQuest Federated Search Gateway Record Controller
Expand Down
2 changes: 1 addition & 1 deletion module/VuFind/src/VuFind/Search/ProQuestFSG/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function __construct(\VuFind\Config\PluginManager $configLoader)
if (isset($searchSettings->General->limit_options)) {
$this->limitOptions = $this->explodeListSetting($searchSettings->General->limit_options);
}

// Search handler setup:
$this->defaultHandler = 'cql.serverChoice';
if (isset($searchSettings->Basic_Searches)) {
Expand Down
2 changes: 0 additions & 2 deletions module/VuFind/src/VuFind/Search/ProQuestFSG/Params.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public function getBackendParameters()
}
}


return $backendParams;
}

Expand All @@ -88,5 +87,4 @@ public function getFacetValueRawDisplayText(string $field, string $value): strin
$parts = explode('|', $value);
return end($parts);
}

}
18 changes: 17 additions & 1 deletion module/VuFind/src/VuFind/Search/ProQuestFSG/Results.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,18 @@ class Results extends \VuFind\Search\Base\Results
*/
protected $backendId = 'ProQuestFSG';

/**
* Facets returned in search response.
*
* @var array
*/
protected $responseFacets = null;

/**
* Simplified version of result facets.
*
* @var array
*/
protected $simplifiedResponseFacets = null;

/**
Expand Down Expand Up @@ -94,6 +104,13 @@ public function getFacetList($filter = null)
return $this->buildFacetList($this->simplifiedResponseFacets, $filter);
}

/**
* Simply raw ProQuestFSG facets to the form that VuFind templates expect.
*
* @param array $rawFacets Raw facts returned from the record collection
*
* @return array Simple format of facets
*/
protected function simplifyFacets($rawFacets)
{
$simpleFacets = [];
Expand All @@ -107,5 +124,4 @@ protected function simplifyFacets($rawFacets)
}
return $simpleFacets;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

use VuFindSearch\ParamBag;

use function intval;
use function strval;

/**
* WorldCat SRU Search Interface
*
Expand All @@ -57,13 +60,16 @@ class Connector extends \VuFindSearch\Backend\SRU\Connector
*/
protected $sruVersion = '1.2';

/**
* The default path, if a particular database target is not indicated.
*
* @var string
*/
protected $defaultPath = '/all_subscribed';


/**
* Constructor
*
* @param string $wsKey Web services key
* @param \Laminas\Http\Client $client An HTTP client object
* @param array $options Additional config settings
*/
Expand Down Expand Up @@ -119,8 +125,7 @@ public function search(ParamBag $params, $offset, $limit)
[$filterKey, $filterValue] = explode(':', $filter, 2);
if ('Databases' == $filterKey) {
$path = '/' . $filterValue;
}
else {
} else {
$filterRelationValue = $filterValue ?
'=' . $filterValue :
'=1';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@
*/
class QueryBuilder
{
/**
* OCLC code to exclude from results
*
* @var string
*/
protected $oclcCodeToExclude;

/// Public API

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ public function checkForHttpError($result)
* Submit REST Request
*
* @param string $method HTTP Method to use: GET or POST
* @param string $path URL path following $this->host
* @param array $params An array of parameters for the request
* @param bool $process Should we convert the MARCXML?
*
Expand Down Expand Up @@ -246,7 +247,7 @@ protected function call($method = 'GET', $path = '', $params = null, $process =
$resultBody = $result->getBody();
if ($cacheKey) {
$this->putCachedData($cacheKey, $resultBody);
}
}
}

// Return processed or unprocessed response, as appropriate:
Expand Down

0 comments on commit ec2dc6c

Please sign in to comment.