]> git.mxchange.org Git - friendica-addons.git/blobdiff - curweather/curweather.php
Update function names
[friendica-addons.git] / curweather / curweather.php
index bcbba91d83981872f75a0b5614bfa3d655619620..dc9f9bb833703469c15221974e67663756767fa9 100644 (file)
@@ -66,16 +66,17 @@ function getWeather( $loc, $units='metric', $lang='en', $appid='', $cachetime=0)
     return $r;
 }
 
-function curweather_install() {
+function curweather_install()
+{
        Addon::registerHook('network_mod_init', 'addon/curweather/curweather.php', 'curweather_network_mod_init');
-       Addon::registerHook('plugin_settings', 'addon/curweather/curweather.php', 'curweather_plugin_settings');
-       Addon::registerHook('plugin_settings_post', 'addon/curweather/curweather.php', 'curweather_plugin_settings_post');
+       Addon::registerHook('addon_settings', 'addon/curweather/curweather.php', 'curweather_addon_settings');
+       Addon::registerHook('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
 }
 
 function curweather_uninstall() {
        Addon::unregisterHook('network_mod_init', 'addon/curweather/curweather.php', 'curweather_network_mod_init');
-       Addon::unregisterHook('plugin_settings', 'addon/curweather/curweather.php', 'curweather_plugin_settings');
-       Addon::unregisterHook('plugin_settings_post', 'addon/curweather/curweather.php', 'curweather_plugin_settings_post');
+       Addon::unregisterHook('addon_settings', 'addon/curweather/curweather.php', 'curweather_addon_settings');
+       Addon::unregisterHook('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
 }
 
 function curweather_network_mod_init(&$fk_app,&$b) {
@@ -141,7 +142,7 @@ function curweather_network_mod_init(&$fk_app,&$b) {
 }
 
 
-function curweather_plugin_settings_post($a,$post) {
+function curweather_addon_settings_post($a,$post) {
        if(! local_user() || (! x($_POST,'curweather-settings-submit')))
                return;
        PConfig::set(local_user(),'curweather','curweather_loc',trim($_POST['curweather_loc']));
@@ -152,7 +153,7 @@ function curweather_plugin_settings_post($a,$post) {
 }
 
 
-function curweather_plugin_settings(&$a,&$s) {
+function curweather_addon_settings(&$a,&$s) {
 
        if(! local_user())
                return;
@@ -186,7 +187,7 @@ function curweather_plugin_settings(&$a,&$s) {
 }
 // Config stuff for the admin panel to let the admin of the node set a APPID
 // for accessing the API of openweathermap
-function curweather_plugin_admin_post (&$a) {
+function curweather_addon_admin_post (&$a) {
        if(! is_site_admin())
            return;
        if ($_POST['curweather-submit']) {
@@ -195,7 +196,7 @@ function curweather_plugin_admin_post (&$a) {
            info( t('Curweather settings saved.'.EOL));
        }
 }
-function curweather_plugin_admin (&$a, &$o) {
+function curweather_addon_admin (&$a, &$o) {
     if(! is_site_admin())
            return;
     $appid = Config::get('curweather','appid');