mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-19 23:07:03 +00:00
[curweather] CR request:
- added/removed extra spaces - removed trailing spaces - nicely indented code block with `'$foo' => 'bar'`
This commit is contained in:
parent
bf6b8bc042
commit
00d957dfdc
1 changed files with 11 additions and 10 deletions
|
@ -49,6 +49,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
|
||||||
return $cached;
|
return $cached;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$res = new SimpleXMLElement(Network::fetchUrl($url));
|
$res = new SimpleXMLElement(Network::fetchUrl($url));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@ -98,7 +99,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
|
||||||
|
|
||||||
function curweather_network_mod_init(App $a, &$b)
|
function curweather_network_mod_init(App $a, &$b)
|
||||||
{
|
{
|
||||||
if (! intval(PConfig::get(local_user(), 'curweather','curweather_enable'))) {
|
if (!intval(PConfig::get(local_user(), 'curweather', 'curweather_enable'))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,7 +216,7 @@ function curweather_addon_settings(App $a, &$s)
|
||||||
// for accessing the API of openweathermap
|
// for accessing the API of openweathermap
|
||||||
function curweather_addon_admin_post(App $a)
|
function curweather_addon_admin_post(App $a)
|
||||||
{
|
{
|
||||||
if (! is_site_admin()) {
|
if (!is_site_admin()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,11 +246,11 @@ function curweather_addon_admin(App $a, &$o)
|
||||||
L10n::t('Caching Interval'),
|
L10n::t('Caching Interval'),
|
||||||
$cachetime,
|
$cachetime,
|
||||||
L10n::t('For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'), [
|
L10n::t('For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'), [
|
||||||
'0'=>L10n::t('no cache'),
|
'0' => L10n::t('no cache'),
|
||||||
'300'=>'5 '.L10n::t('minutes'),
|
'300' => '5 ' . L10n::t('minutes'),
|
||||||
'900'=>'15 '.L10n::t('minutes'),
|
'900' => '15 ' . L10n::t('minutes'),
|
||||||
'1800'=>'30 '.L10n::t('minutes'),
|
'1800' => '30 ' . L10n::t('minutes'),
|
||||||
'3600'=>'60 '.L10n::t('minutes')
|
'3600' => '60 ' . L10n::t('minutes')
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'$appid' => ['appid', L10n::t('Your APPID'), $appid, L10n::t('Your API key provided by OpenWeatherMap')]
|
'$appid' => ['appid', L10n::t('Your APPID'), $appid, L10n::t('Your API key provided by OpenWeatherMap')]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue