mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-22 02:23:41 +00:00
API response celsius and metric both mean to use °C as unit for the temperature
This commit is contained in:
parent
5f6ec2f83f
commit
0d0e4e3d06
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
|
||||||
|
|
||||||
unset($_SESSION['curweather_notice_shown']);
|
unset($_SESSION['curweather_notice_shown']);
|
||||||
|
|
||||||
if ((string) $res->temperature['unit'] === 'metric') {
|
if (in_array((string) $res->temperature['unit'], ['celsius', 'metric'])) {
|
||||||
$tunit = '°C';
|
$tunit = '°C';
|
||||||
$wunit = 'm/s';
|
$wunit = 'm/s';
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue