Move PConfig::set() to DI::pConfig()->set()

This commit is contained in:
nupplaPhil 2020-01-18 16:54:49 +01:00
parent ea3a9052d8
commit febc835a2d
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
42 changed files with 185 additions and 185 deletions

View file

@ -92,7 +92,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
'icon' => (string) $res->weather['icon'],
];
PConfig::set(local_user(), 'curweather', 'last', $now->getTimestamp());
DI::pConfig()->set(local_user(), 'curweather', 'last', $now->getTimestamp());
Cache::set('curweather'.md5($url), serialize($r), Cache::HOUR);
return $r;
@ -170,9 +170,9 @@ function curweather_addon_settings_post(App $a, $post)
return;
}
PConfig::set(local_user(), 'curweather', 'curweather_loc' , trim($_POST['curweather_loc']));
PConfig::set(local_user(), 'curweather', 'curweather_enable', intval($_POST['curweather_enable']));
PConfig::set(local_user(), 'curweather', 'curweather_units' , trim($_POST['curweather_units']));
DI::pConfig()->set(local_user(), 'curweather', 'curweather_loc' , trim($_POST['curweather_loc']));
DI::pConfig()->set(local_user(), 'curweather', 'curweather_enable', intval($_POST['curweather_enable']));
DI::pConfig()->set(local_user(), 'curweather', 'curweather_units' , trim($_POST['curweather_units']));
info(L10n::t('Current Weather settings updated.') . EOL);
}