Skip to content

Commit

Permalink
Fix listing favorites search request persisting
Browse files Browse the repository at this point in the history
  • Loading branch information
cocolabssas committed Mar 21, 2018
1 parent 007b4cf commit 12cb923
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and to the [CHANGELOG recommendations](http://keepachangelog.com/).
### Added

### Fixed
- Fix listing favorites search request persisting

### Changed

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
]
},
"require": {
"php": ">=5.4.0",
"php": "^7.1",
"symfony/symfony": "2.8.*",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
Expand Down
6 changes: 3 additions & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function indexFavouriteAction(Request $request)
$listings = new \ArrayIterator();
$nbListings = 0;

$listingSearchRequest = $this->get('cocorico.listing_search_request');
$listingSearchRequest = $this->getListingSearchRequest();
$form = $this->createSearchResultForm($listingSearchRequest);

$form->handleRequest($request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ListingSearchController extends Controller
*/
public function searchAction(Request $request)
{
$markers = array();
$markers = array('listingsIds' => array(), 'markers' => array());
$listings = new \ArrayIterator();
$nbListings = 0;

Expand All @@ -57,7 +57,6 @@ public function searchAction(Request $request)
$markers = $this->getMarkers($request, $results, $listings);

//Persist similar listings id
// print_r($markers);
$listingSearchRequest->setSimilarListings($markers['listingsIds']);

//Persist listing search request in session
Expand Down Expand Up @@ -324,7 +323,7 @@ public function similarListingAction(Request $request, $id = null)
/**
* @return ListingSearchRequest
*/
private function getListingSearchRequest()
protected function getListingSearchRequest()
{
$session = $this->get('session');
/** @var ListingSearchRequest $listingSearchRequest */
Expand Down

0 comments on commit 12cb923

Please sign in to comment.