Remove "notice" with new function

This commit is contained in:
Michael 2022-10-17 20:17:25 +00:00
parent 57e9404729
commit 897dbb30cf
10 changed files with 21 additions and 21 deletions

View file

@ -44,7 +44,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
$res = new SimpleXMLElement(DI::httpClient()->fetch($url));
} catch (Exception $e) {
if (empty($_SESSION['curweather_notice_shown'])) {
notice(DI::l10n()->t('Error fetching weather data. Error was: ' . $e->getMessage()));
DI::sysmsg()->addNotice(DI::l10n()->t('Error fetching weather data. Error was: ' . $e->getMessage()));
$_SESSION['curweather_notice_shown'] = true;
}