Merge pull request #758 from nupplaphil/move_global_functions_3
Move Global Functions - Part 3
This commit is contained in:
commit
7a376aeaad
2 changed files with 2 additions and 2 deletions
|
@ -92,7 +92,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
|
||||||
];
|
];
|
||||||
|
|
||||||
PConfig::set(local_user(), 'curweather', 'last', $now->getTimestamp());
|
PConfig::set(local_user(), 'curweather', 'last', $now->getTimestamp());
|
||||||
Cache::set('curweather'.md5($url), serialize($r), CACHE_HOUR);
|
Cache::set('curweather'.md5($url), serialize($r), Cache::HOUR);
|
||||||
|
|
||||||
return $r;
|
return $r;
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,7 +132,7 @@ function openstreetmap_get_coordinates($a, &$b)
|
||||||
$curlResult = Network::curl($nomserver . $args);
|
$curlResult = Network::curl($nomserver . $args);
|
||||||
if ($curlResult->isSuccess()) {
|
if ($curlResult->isSuccess()) {
|
||||||
$j = json_decode($curlResult->getBody(), true);
|
$j = json_decode($curlResult->getBody(), true);
|
||||||
Cache::set($cachekey, $j, CACHE_MONTH);
|
Cache::set($cachekey, $j, Cache::MONTH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue