From 0d0e4e3d064986237fc91eccdfb656d52bccabd0 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 24 Apr 2019 09:29:32 +0200 Subject: [PATCH 1/2] =?UTF-8?q?API=20response=20celsius=20and=20metric=20b?= =?UTF-8?q?oth=20mean=20to=20use=20=C2=B0C=20as=20unit=20for=20the=20tempe?= =?UTF-8?q?rature?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- curweather/curweather.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curweather/curweather.php b/curweather/curweather.php index 6d7edc06..4ede126b 100644 --- a/curweather/curweather.php +++ b/curweather/curweather.php @@ -62,7 +62,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti unset($_SESSION['curweather_notice_shown']); - if ((string) $res->temperature['unit'] === 'metric') { + if (in_array((string) $res->temperature['unit'], ['celsius', 'metric'])) { $tunit = '°C'; $wunit = 'm/s'; } else { From 95482504439bdd2f7321541bab818c2b59ef28d2 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 24 Apr 2019 09:34:21 +0200 Subject: [PATCH 2/2] mark v1.2 --- curweather/curweather.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curweather/curweather.php b/curweather/curweather.php index 4ede126b..e431491a 100644 --- a/curweather/curweather.php +++ b/curweather/curweather.php @@ -2,7 +2,7 @@ /** * Name: Current Weather * Description: Shows current weather conditions for user's location on their network page. - * Version: 1.1 + * Version: 1.2 * Author: Tony Baldwin * Author: Fabio Comuni * Author: Tobias Diekershoff