Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Commit

Permalink
Fixed a bug where searches with spaces were not being processed corre…
Browse files Browse the repository at this point in the history
…ctly because the search query string was being constructed naively.
  • Loading branch information
nickbart committed Dec 25, 2012
1 parent 2e14839 commit 1cea148
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Server/Library/SectionAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,15 @@ protected function buildEndpoint($endpoint)
*/
protected function buildSearchEndpoint($type, $query)
{
$parameters = array(
'type' => $type,
'query' => trim($query)
);

$endpoint = sprintf(
'%s?type=%d&query=%s',
'%s?%s',
self::ENDPOINT_SEARCH,
$type,
trim($query)
http_build_query($parameters)
);

return $this->buildEndpoint($endpoint);
Expand Down

0 comments on commit 1cea148

Please sign in to comment.