aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2023-07-12 23:43:16 +0200
committerGitHub <noreply@github.com>2023-07-12 23:43:16 +0200
commit2f75ab3a963cff2f2f3d93c3f9391edfc2b7bb0c (patch)
tree42e70b6dcc4f68bd0e3890f6c95f3614a322c252 /apps
parent592aeec17e766e41ce94846675530e23ebe8cc96 (diff)
parent61f70340ecd25f18935d8ff2c258f4d42256e760 (diff)
downloadnextcloud-server-2f75ab3a963cff2f2f3d93c3f9391edfc2b7bb0c.tar.gz
nextcloud-server-2f75ab3a963cff2f2f3d93c3f9391edfc2b7bb0c.zip
Merge pull request #38991 from nextcloud/backport/38665/stable27
[stable27] fix(weather_status): Pass address as param to OSM API
Diffstat (limited to 'apps')
-rw-r--r--apps/weather_status/lib/Service/WeatherStatusService.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/weather_status/lib/Service/WeatherStatusService.php b/apps/weather_status/lib/Service/WeatherStatusService.php
index 5b1d926f090..b334a5e3ba3 100644
--- a/apps/weather_status/lib/Service/WeatherStatusService.php
+++ b/apps/weather_status/lib/Service/WeatherStatusService.php
@@ -8,7 +8,7 @@ declare(strict_types=1);
* @author Julien Veyssier <eneiluj@posteo.net>
* @author Roeland Jago Douma <roeland@famdouma.nl>
*
- * @license GNU AGPL version 3 or any later version
+ * @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -310,13 +310,14 @@ class WeatherStatusService {
*/
private function searchForAddress(string $address): array {
$params = [
+ 'q' => $address,
'format' => 'json',
'addressdetails' => '1',
'extratags' => '1',
'namedetails' => '1',
'limit' => '1',
];
- $url = 'https://nominatim.openstreetmap.org/search/' . $address;
+ $url = 'https://nominatim.openstreetmap.org/search';
$results = $this->requestJSON($url, $params);
if (count($results) > 0) {
return $results[0];