Update function names

update function names and hook calls
This commit is contained in:
Adam Magness 2018-01-20 08:57:41 -05:00
parent 0afd633346
commit c71f7b0e1a
50 changed files with 356 additions and 348 deletions

View file

@ -30,8 +30,8 @@ function fromgplus_uninstall() {
Addon::unregisterHook('cron', 'addon/fromgplus/fromgplus.php', 'fromgplus_cron');
// Old hooks
Addon::unregisterHook('plugin_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Addon::unregisterHook('plugin_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
Addon::unregisterHook('addon_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post');
}
function fromgplus_addon_settings(&$a,&$s) {
@ -94,19 +94,21 @@ function fromgplus_addon_settings_post(&$a,&$b) {
}
}
function fromgplus_plugin_admin(&$a, &$o){
$t = get_markup_template("admin.tpl", "addon/fromgplus/");
function fromgplus_addon_admin(&$a, &$o)
{
$t = get_markup_template("admin.tpl", "addon/fromgplus/");
$o = replace_macros($t, [
'$submit' => t('Save Settings'),
'$key' => ['key', t('Key'), trim(Config::get('fromgplus', 'key')), t('')],
]);
$o = replace_macros($t, [
'$submit' => t('Save Settings'),
'$key' => ['key', t('Key'), trim(Config::get('fromgplus', 'key')), t('')],
]);
}
function fromgplus_plugin_admin_post(&$a){
$key = ((x($_POST,'key')) ? trim($_POST['key']) : '');
Config::set('fromgplus','key',$key);
info( t('Settings updated.'). EOL );
function fromgplus_addon_admin_post(&$a)
{
$key = ((x($_POST, 'key')) ? trim($_POST['key']) : '');
Config::set('fromgplus', 'key', $key);
info(t('Settings updated.'). EOL);
}
function fromgplus_cron($a,$b) {