Skip to content

Commit

Permalink
Merge pull request #5 from Blog404DE/correct-import-order
Browse files Browse the repository at this point in the history
Bugfix: wrong search order preventing import every new recommendation
  • Loading branch information
zoglo authored Feb 17, 2023
2 parents 0024471 + ffcefa3 commit da51ef3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Resources/contao/classes/GooglePlacesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ public function getGoogleReviews(?array $arrIds = null, bool $manualSync = false

foreach($objRecommendationArchives as $objRecommendationArchive)
{
$strSyncUrl = 'https://maps.googleapis.com/maps/api/place/details/json?language=' . ($objRecommendationArchive->syncLanguage ?? '') . '&place_id='.$objRecommendationArchive->googlePlaceId . '&fields=reviews&key=' . $objRecommendationArchive->googleApiToken;

$strSyncUrl = 'https://maps.googleapis.com/maps/api/place/details/json?reviews_sort=newest&language=' . ($objRecommendationArchive->syncLanguage ?? '') . '&place_id='.$objRecommendationArchive->googlePlaceId . '&fields=reviews&key=' . $objRecommendationArchive->googleApiToken;
$client = HttpClient::create();
$arrContent = $client->request('POST', $strSyncUrl)->toArray();
$objContent = (object) $arrContent;
Expand Down

0 comments on commit da51ef3

Please sign in to comment.