Remove "notice" with new function
This commit is contained in:
parent
57e9404729
commit
897dbb30cf
10 changed files with 21 additions and 21 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue